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{
library(DrugUtilisation)
library(CDMConnector)
library(duckdb)
#> Loading required package: DBI
requireEunomia()
#> ℹ `EUNOMIA_DATA_FOLDER` set to: /tmp/RtmpGmLk45.
#>
#> Download completed!
con <- dbConnect(duckdb(), eunomiaDir())
#> Creating CDM database /tmp/RtmpGmLk45/GiBleed_5.3.zip
cdm <- cdmFromCon(con = con, cdmSchema = "main", writeSchema = "main")
#> ! cdm name not specified and could not be inferred from the cdm source table
timings <- benchmarkDrugUtilisation(cdm)
#> 17-01-2025 12:33:59 Benchmark get necessary concepts
#> 17-01-2025 12:33:59 Benchmark generateDrugUtilisation
#> 17-01-2025 12:34:02 Benchmark generateDrugUtilisation with numberExposures and
#> daysPrescribed
#> 17-01-2025 12:34:05 Benchmark require
#> 17-01-2025 12:34:07 Benchmark generateIngredientCohortSet
#> 17-01-2025 12:34:12 Benchmark summariseDrugUtilisation
#> 17-01-2025 12:34:18 Benchmark summariseDrugRestart
#> 17-01-2025 12:34:21 Benchmark summariseProportionOfPatientsCovered
#> 17-01-2025 12:34:25 Benchmark summariseTreatment
#> 17-01-2025 12:34:31 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 An OMOP CDM databa… task get necess… overall overall
#> 2 1 An OMOP CDM databa… task generateDr… overall overall
#> 3 1 An OMOP CDM databa… task generateDr… overall overall
#> 4 1 An OMOP CDM databa… task require overall overall
#> 5 1 An OMOP CDM databa… task generateIn… overall overall
#> 6 1 An OMOP CDM databa… task summariseD… overall overall
#> 7 1 An OMOP CDM databa… task summariseD… overall overall
#> 8 1 An OMOP CDM databa… task summariseP… overall overall
#> 9 1 An OMOP CDM databa… task summariseT… overall overall
#> 10 1 An OMOP CDM databa… task drop creat… 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>
# }