Generates risk estimates and comorbidity flags from ICD-9-CM codes available in administrative medical datasets. The package supports the Charlson Comorbidity Index, the Elixhauser Comorbidity classification, the Revised Cardiac Risk Index, and the Risk Stratification Index. Methods are table-based, fast, and use the 'plyr' package, so parallelization is possible for large jobs. Also includes a sample of real ICD-9 data for 100 patients from a publicly available dataset.
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 ICD-9-CM table.
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 listing, the
melt_icd9list method will convert such data tables into a one-row-per-code format
merge to the
For implementation, testing, and examples several external data sources are used: