Details
Pass the result to comorbidity_score() together with a data frame of 0/1 indicators for these 20 conditions. The condition (column) names are:
alcohol_abuse, any_tumor, cardiac_arrhythmias, chronic_pulmonary_disease, coagulopathy, complicated_diabetes, congestive_heart_failure, deficiency_anemia, dementia, fluid_and_electrolyte_disorders, hiv_aids, hemiplegia, hypertension, liver_disease, metastatic_cancer, peripheral_vascular_disease, psychosis, pulmonary_circulation_disorders, renal_failure, weight_loss.
Mapping ICD-9/ICD-10 diagnosis codes to these indicators is out of scope for this package; use the official Gagne SAS program or a mapping package such as comorbidity to build the flags, then score them here.
References
Gagne JJ, Glynn RJ, Avorn J, Levin R, Schneeweiss S. A combined comorbidity score predicted mortality in elderly patients better than existing scores. J Clin Epidemiol. 2011;64(7):749-759. doi:10.1016/j.jclinepi.2010.10.004
Sun JW, Rogers JR, Her Q, et al. Adaptation and validation of the combined comorbidity score for ICD-10-CM. Med Care. 2017;55(12):1046-1051. doi:10.1097/MLR.0000000000000824