
Summarise code use from achilles counts
summariseAchillesCodeUse.Rd
Summarise code use from achilles counts
Usage
summariseAchillesCodeUse(x, cdm, countBy = c("record", "person"))
Examples
# \donttest{
cdm <- mockVocabRef("database")
#> Warning: There are observation period end dates after the current date: 2025-02-19
#> ℹ The latest max observation period end date found is 2025-12-31
#> Warning: There are observation period end dates after the current date: 2025-02-19
#> ℹ The latest max observation period end date found is 2025-12-31
oa <- getCandidateCodes(cdm = cdm, keywords = "osteoarthritis")
#> Limiting to domains of interest
#> Getting concepts to include
#> Adding descendants
#> Search completed. Finishing up.
#> ✔ 2 candidate concepts identified
#> Time taken: 0 minutes and 0 seconds
result_achilles <- summariseAchillesCodeUse(list(oa = oa$concept_id), cdm = cdm)
#>
result_achilles
#> # A tibble: 2 × 13
#> result_id cdm_name group_name group_level strata_name strata_level
#> <int> <chr> <chr> <chr> <chr> <chr>
#> 1 1 mock codelist_name oa domain_id condition
#> 2 1 mock codelist_name oa domain_id condition
#> # ℹ 7 more variables: variable_name <chr>, variable_level <chr>,
#> # estimate_name <chr>, estimate_type <chr>, estimate_value <chr>,
#> # additional_name <chr>, additional_level <chr>
CDMConnector::cdmDisconnect(cdm)
# }