
Run benchmark of drug utilisation cohort generation
Source:R/benchmarkDrugUtilisation.R
benchmarkDrugUtilisation.Rd
Run benchmark of drug utilisation cohort generation
Usage
benchmarkDrugUtilisation(
cdm,
ingredient = "acetaminophen",
alternativeIngredient = c("ibuprofen", "aspirin", "diclofenac"),
indicationCohort = NULL
)
Examples
# \donttest{
CDMConnector::requireEunomia()
#> ℹ `EUNOMIA_DATA_FOLDER` set to: /tmp/RtmpEau4II.
#>
#> Download completed!
con <- duckdb::dbConnect(duckdb::duckdb(), CDMConnector::eunomiaDir())
#> Creating CDM database /tmp/RtmpEau4II/GiBleed_5.3.zip
cdm <- CDMConnector::cdmFromCon(con = con, cdmSchema = "main", writeSchema = "main")
timings <- benchmarkDrugUtilisation(cdm)
#> 07-05-2025 13:38:08 Benchmark get necessary concepts
#> 07-05-2025 13:38:09 Benchmark generateDrugUtilisation
#> 07-05-2025 13:38:12 Benchmark generateDrugUtilisation with numberExposures and
#> daysPrescribed
#> 07-05-2025 13:38:15 Benchmark require
#> 07-05-2025 13:38:18 Benchmark generateIngredientCohortSet
#> 07-05-2025 13:38:23 Benchmark summariseDrugUtilisation
#> 07-05-2025 13:38:29 Benchmark summariseDrugRestart
#> 07-05-2025 13:38:31 Benchmark summariseProportionOfPatientsCovered
#> 07-05-2025 13:38:36 Benchmark summariseTreatment
#> 07-05-2025 13:38:40 Benchmark drop created tables
timings
#> # A tibble: 10 × 13
#> result_id cdm_name group_name group_level strata_name strata_level
#> <int> <chr> <chr> <chr> <chr> <chr>
#> 1 1 Synthea task get necessary concepts overall overall
#> 2 1 Synthea task generateDrugUtilisati… overall overall
#> 3 1 Synthea task generateDrugUtilisati… overall overall
#> 4 1 Synthea task require overall overall
#> 5 1 Synthea task generateIngredientCoh… overall overall
#> 6 1 Synthea task summariseDrugUtilisat… overall overall
#> 7 1 Synthea task summariseDrugRestart overall overall
#> 8 1 Synthea task summariseProportionOf… overall overall
#> 9 1 Synthea task summariseTreatment overall overall
#> 10 1 Synthea task drop created tables overall overall
#> # ℹ 7 more variables: variable_name <chr>, variable_level <chr>,
#> # estimate_name <chr>, estimate_type <chr>, estimate_value <chr>,
#> # additional_name <chr>, additional_level <chr>
# }