In this example we’re going to just create a cohort of individuals with an ankle sprain using the Eunomia synthetic data.
library(CDMConnector)
library(CohortConstructor)
library(CodelistGenerator)
library(PatientProfiles)
library(IncidencePrevalence)
library(PhenotypeR)
con <- DBI::dbConnect(duckdb::duckdb(),
CDMConnector::eunomiaDir("synpuf-1k", "5.3"))
cdm <- CDMConnector::cdmFromCon(con = con,
cdmName = "Eunomia Synpuf",
cdmSchema = "main",
writeSchema = "main",
achillesSchema = "main")
cdm$injuries <- conceptCohort(cdm = cdm,
conceptSet = list(
"ankle_sprain" = 81151
),
name = "injuries")We can get the incidence and prevalence of our study cohort using
populationDiagnostics():
This function builds on IncidencePrevalence R package to perform the following analyses:
All analyses are performed for:
We can use IncidencePrevalence package to visualise the results obtained.