map_charlson_comorbidities | R Documentation |
Map ICD-10 or ICD-10-CM codes to a list of chronic comorbidities, comorbidity groups, and Charlson Comorbidity Index weights from \insertCiteQuan2005;textualRamses.
map_charlson_comorbidities(df, icd_column)
df |
a data frame containing ICD-10 look up data |
icd_column |
a variable name or column number in |
The input data frame df
enhanced with the following
variables:
comorb
a character vector of 17 comorbidity
codes (adapted from the
comorbidity
package)
comorb_group
a character vector of codes
grouping comorb
codes into 14 categories
collapsing different severities of the same condition
(for diabetes, liver disease, cancer). This is to avoid
double counting comorbidities.
charlson_weights
an integer vector of weights
from \insertCiteQuan2005;textualRamses used to compute the
weighted Charlson comorbidity score
Adapted from comorbidity()
mock_icd_data <- data.frame(
list(icd10_code = c("J44", "J44X", "J440")),
stringsAsFactors = FALSE)
mock_icd_data <- map_charlson_comorbidities(
mock_icd_data, "icd10_code")
mock_icd_data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.