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{
cdm_local <- omock::mockCdmReference() |>
omock::mockPerson(nPerson = 100) |>
omock::mockObservationPeriod() |>
omock::mockConditionOccurrence() |>
omock::mockDrugExposure() |>
omock::mockCohort(name = "my_cohort")
db <- DBI::dbConnect(duckdb::duckdb())
cdm <- CDMConnector::copyCdmTo(con = db,
cdm = cdm_local,
schema ="main",
overwrite = TRUE)
result <- cdm$my_cohort |>
codelistDiagnostics()
#> • Getting codelists from cohorts
#> Warning: No codelists found for the specified cohorts
#> Warning: Empty cohort_codelist attribute for cohort
#> ℹ Returning an empty summarised result
CDMConnector::cdmDisconnect(cdm = cdm)
# }