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/RtmpzNz1WK.
#>
#> Download completed!
con <- dbConnect(duckdb(), eunomiaDir())
#> Creating CDM database /tmp/RtmpzNz1WK/GiBleed_5.3.zip
cdm <- cdmFromCon(con = con, cdmSchema = "main", writeSchema = "main")
timings <- benchmarkDrugUtilisation(cdm)
#> 19-12-2024 13:43:11 Benchmark get necessary concepts
#> 19-12-2024 13:43:12 Benchmark generateDrugUtilisation
#> 19-12-2024 13:43:15 Benchmark generateDrugUtilisation with numberExposures and
#> daysPrescribed
#> 19-12-2024 13:43:18 Benchmark require
#> 19-12-2024 13:43:20 Benchmark generateIngredientCohortSet
#> 19-12-2024 13:43:25 Benchmark summariseDrugUtilisation
#> 19-12-2024 13:43:31 Benchmark summariseDrugRestart
#> 19-12-2024 13:43:33 Benchmark summariseProportionOfPatientsCovered
#> 19-12-2024 13:43:38 Benchmark summariseTreatment
#> 19-12-2024 13:43:43 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 synthetic … task get necess… overall overall
#> 2 1 Synthea synthetic … task generateDr… overall overall
#> 3 1 Synthea synthetic … task generateDr… overall overall
#> 4 1 Synthea synthetic … task require overall overall
#> 5 1 Synthea synthetic … task generateIn… overall overall
#> 6 1 Synthea synthetic … task summariseD… overall overall
#> 7 1 Synthea synthetic … task summariseD… overall overall
#> 8 1 Synthea synthetic … task summariseP… overall overall
#> 9 1 Synthea synthetic … task summariseT… overall overall
#> 10 1 Synthea synthetic … 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>
# }