
Run benchmark of drug utilisation cohort generation
Source:R/benchmarkDrugUtilisation.R
benchmarkDrugUtilisation.RdRun benchmark of drug utilisation cohort generation
Usage
benchmarkDrugUtilisation(
cdm,
ingredient = "acetaminophen",
alternativeIngredient = c("ibuprofen", "aspirin", "diclofenac"),
indicationCohort = NULL
)Examples
# \donttest{
library(DrugUtilisation)
library(omock)
cdm <- mockCdmFromDataset(datasetName = "GiBleed", source = "duckdb")
#> ℹ Reading GiBleed tables.
#> ℹ Adding drug_strength table.
#> ℹ Creating local <cdm_reference> object.
#> ℹ Inserting <cdm_reference> into duckdb.
timings <- benchmarkDrugUtilisation(cdm)
#> 19-11-2025 17:18:14 Benchmark get necessary concepts
#> 19-11-2025 17:18:15 Benchmark generateDrugUtilisation
#> 19-11-2025 17:18:18 Benchmark generateDrugUtilisation with numberExposures and
#> daysPrescribed
#> 19-11-2025 17:18:21 Benchmark require
#> 19-11-2025 17:18:24 Benchmark generateIngredientCohortSet
#> 19-11-2025 17:18:29 Benchmark summariseDrugUtilisation
#> 19-11-2025 17:18:35 Benchmark summariseDrugRestart
#> 19-11-2025 17:18:38 Benchmark summariseProportionOfPatientsCovered
#> 19-11-2025 17:18:42 Benchmark summariseTreatment
#> 19-11-2025 17:18:46 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 GiBleed task get necessary concepts overall overall
#> 2 1 GiBleed task generateDrugUtilisati… overall overall
#> 3 1 GiBleed task generateDrugUtilisati… overall overall
#> 4 1 GiBleed task require overall overall
#> 5 1 GiBleed task generateIngredientCoh… overall overall
#> 6 1 GiBleed task summariseDrugUtilisat… overall overall
#> 7 1 GiBleed task summariseDrugRestart overall overall
#> 8 1 GiBleed task summariseProportionOf… overall overall
#> 9 1 GiBleed task summariseTreatment overall overall
#> 10 1 GiBleed 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>
# }