Run codelist-level diagnostics
codelistDiagnostics.Rd
`codelistDiagnostics()` runs phenotypeR diagnostics on the cohort_codelist attribute on the cohort. Thus codelist attribute of the cohort must be populated. If it is missing then it could be populated using `addCodelistAttribute()` function.
Furthermore `codelistDiagnostics()` requires achilles tables to be present in the cdm so that concept counts could be derived.
Examples
# \donttest{
library(CohortConstructor)
library(PhenotypeR)
cdm <- mockPhenotypeR()
cdm$arthropathies <- conceptCohort(cdm,
conceptSet = list("arthropathies" = c(40475132)),
name = "arthropathies")
#> Warning: ! `codelist` contains numeric values, they are casted to integers.
#> ℹ Subsetting table condition_occurrence using 1 concept with domain: condition.
#> ℹ No cohort entries found, returning empty cohort table.
result <- codelistDiagnostics(cdm$arthropathies)
#> • Getting codelists from cohorts
#> • Getting index event breakdown
#> Getting counts of arthropathies codes for cohort arthropathies
#> ℹ No records found in the cdm for the concepts provided.
#> Warning: The CDM reference containing the cohort must also contain achilles tables.
#> Returning only index event breakdown.
CDMConnector::cdmDisconnect(cdm = cdm)
# }