medicalrisk is a collection of tools and data for performing patient-level medical risk adjustment using administrative data.
The data sets include
icd9cm_elixhauser, which are data frames that map ICD-9-CM
codes to comorbidities, using the Charlson and Elixhauser
classifications respectively. The mapping comes from the paper by Quan in
2005, and uses the CMS
With a properly formatted source data frame of patients and ICD-9-CM values, the
dcast methods can be used
to generate comorbidity tables.
add_charlson_index_df method will calculate the
Charlson Comorbidity Index for each patient.
For data sources that present ICD-9-CM codes as a comma-separated
melt_icd9list method will convert such data
tables into a one-row-per-code format suitable for
merge to the
For implementation, testing, and examples several external data sources are used: