
Create a cohort of groups of the updated Charlson Comorbidity Index (CCI)
Source:R/updatedCharlson.R
updatedCharlsonCohort.RdUsage
updatedCharlsonCohort(
cdm,
categories,
name,
ageAdjusted = TRUE,
conceptSet = getIndexCodelist("updated_charlson"),
subsetCohort = NULL,
subsetCohortId = NULL
)Arguments
- cdm
A
cdm_referenceobject.- categories
A named list of numeric vectors, each containing the lower and upper bounds of a score interval. Upper and lower bounds are both included. The name will be used to name the resultant cohort.
- name
Name of the new cohort table created in the cdm object.
- ageAdjusted
Logical; whether to include age adjustment in the updated Charlson Comorbidity Index.
- conceptSet
A named concept set supplied as a
codelist,codelist_with_details,concept_set_expression, or named list of concept IDs. It must containcongestive_heart_failure,dementia,chronic_pulmonary_disease,connective_tissue_disease,mild_liver_disease,hemiplegia,severe_chronic_kidney_disease,diabetes_with_complication,any_malignancy,moderate_or_severe_liver_disease,metastatic_solid_tumor,aidsas concepts. By default, internal codelists are used.- subsetCohort
A character refering to a cohort table containing individuals for whom cohorts will be generated. Only individuals in this table will appear in the generated cohort. If
NULLno subsetting will be performed.- subsetCohortId
Specifies cohort IDs from the
subsetCohorttable to include. If none are provided, all cohorts from the subsetCohort are included.
Details
The updated CCI is based on Quan et al. (2011) (doi:10.1093/aje/kwq433 ).
Examples
if (FALSE) { # \dontrun{
library(omock)
library(duckdb)
library(OmopIndices)
library(dplyr)
cdm <- mockCdmFromDataset(datasetName = "GiBleed", source = "duckdb")
cdm$my_cohort <- updatedCharlsonCohort(
cdm = cdm,
categories = list(
"none" = c(0, 0),
"mild" = c(1, 2),
"moderate" = c(3, 4),
"severe" = c(5, Inf)
),
name = "my_cohort"
)
cdm$my_cohort
settings(cdm$my_cohort)
} # }