
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/RtmpgjuKHN.
#>
#> Download completed!
con <- duckdb::dbConnect(duckdb::duckdb(), CDMConnector::eunomiaDir())
#> Creating CDM database /tmp/RtmpgjuKHN/GiBleed_5.3.zip
cdm <- CDMConnector::cdmFromCon(con = con, cdmSchema = "main", writeSchema = "main")
timings <- benchmarkDrugUtilisation(cdm)
#> 27-03-2025 14:39:53 Benchmark get necessary concepts
#> 27-03-2025 14:39:54 Benchmark generateDrugUtilisation
#> 27-03-2025 14:39:57 Benchmark generateDrugUtilisation with numberExposures and
#> daysPrescribed
#> 27-03-2025 14:40:01 Benchmark require
#> 27-03-2025 14:40:03 Benchmark generateIngredientCohortSet
#> 27-03-2025 14:40:09 Benchmark summariseDrugUtilisation
#> 27-03-2025 14:40:15 Benchmark summariseDrugRestart
#> 27-03-2025 14:40:17 Benchmark summariseProportionOfPatientsCovered
#> 27-03-2025 14:40:22 Benchmark summariseTreatment
#> 27-03-2025 14:40:27 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>
# }