Concept: Elixhauser Comorbidity Index
Last Updated: 2023-02-03
Source of Diagnosis Codes for the Elixhauser Comorbidity Index
The diagnosis codes required for use in the Elixhauser Comorbidity Index are available from the Hospital Abstracts data and the Medical Services / Physician Claims data.
Hospital data contains all the relevant diagnoses during an episode of care as an inpatient. For each diagnosis recorded in the hospital data, a corresponding variable called diagnosis type is used to identify whether the diagnosis is considered a comorbidity (pre-existing condition) or a complication (a condition arising during the hospital stay). Complications are identified by a diagnosis type = "C" (complication) in the data prior to April 1, 2004 (for use with ICD-9-CM codes) or by a diagnosis type = "2" (post-admit comorbidity) in the data beginning on April 1, 2004 (for use with ICD-10 codes). At MCHP, complications can be included or excluded in the Elixhauser Comorbidity Index algorithm.
The Medical Services / Physician Claims data contain only one diagnosis code per record, relevant to the reason for the visit to the physician. Although the Elixhauser Comorbidity Index is originally designed to work with hospital data only, at MCHP we have developed a method that can include 3-digit diagnosis codes from the Medical Services data, if warranted by the research, to expand the scope of comorbidity found in the population. Note: In December 2018, a 5-digit diagnosis code variable was added to the Medical Services data. If recorded, the first 3-digits of both the 3-digit and 5-digit diagnosis code variables will match exactly. The 5-digit diagnosis code variable applies to records from 2015/16 forward, but may not be available in all records.
See the section titled MCHP Elixhauser Comorbidity Index SAS Macro for the Medical Services / Physician Claims Data (3- and 5-Digit ICD-9-CM Codes) for more information on using the Medical Services / Physician Claims data.
Lists of Elixhauser Comorbidity Index Categories and the Associated ICD Codes
- For a current list of the 31 categories in the Elixhauser Comorbidity Index used in MCHP research, along with the ICD-9-CM and ICD-10-CA diagnosis codes from both Hospital Abstracts (hosp) and Medical Services (med) data, please see the relevant table from Lix et al. (2016).
- For a list of 31 categories used in the Elixhauser Comorbidity Index, please see Table 1. ICD-9-CM and ICD-10 Coding Algorithms for Elixhauser Comorbidities from Quan et al., 2005.
MCHP Elixhauser Comorbidity Index SAS Macros
At MCHP there are different SAS macros available that can be used to generate the Elixhauser Comorbidity Index score - a total of the number of comorbidity categories. The process involves producing category indicators at the record level from hospital abstracts data and counting the number of categories for each episode of care, or if desired, reviewing multiple records from hospital abstracts and physician visits data for the same individual over time, and then counting the overall number of categories indicated - a category is only counted once in this longitudinal approach. The SAS code includes:
- two SAS macros that identify the Elixhauser Comorbidity categories and the total number of categories for each individual record (hospital episode). One macro is based on ICD-9-CM diagnoses codes and the other is based on ICD-10 diagnoses codes;
- a SAS macro that identifies the appropriate Elixhauser Comorbidity category for each record from the Medical Services / Physician Claims data based on 3- and 5-digit ICD-9-CM diagnosis codes; and
- a SAS macro that calculates a longitudinal Index score based on all of the episodes of hospital care and physician visits for an individual and each category of comorbidity present.
MCHP Elixhauser Comorbidity Index SAS Macros for Hospital Data - Individual Episodes of CareThere are two different SAS macros available for working with hospital data: one for use with ICD-9-CM diagnosis codes and one for use with ICD-10 diagnosis codes.
To run the MCHP Elixhauser Comorbidity Index SAS macro, a file containing individual hospital records with diagnosis codes and the corresponding diagnosis type is required. Although the Elixhauser Comorbidity Index was originally designed for use with comorbidities only, there may be times when the Index should consider all diagnoses. For example, if the Index is being used in a longitudinal study, all diagnoses could be included in the Index calculation. However, if the study period only covers a short period of time, including complications may over-estimate the burden of disease.
The MCHP Elixhauser Comorbidity Index SAS macros have a parameter option to include all types of diagnoses (type=off) or to limit the diagnoses by excluding complications (type=on). A research decision should be made on whether to include all diagnoses or exclude complications in the Index calculation.
The two MCHP SAS macros for working with the hospital data are available below:
- MCHP SAS Macro Code - ICD-9-CM Elixhauser Index - _ElixhauserICD9CM.sas.txt
- MCHP SAS Macro Code - ICD-10 Elixhauser Index - _ElixhauserICD10.sas.txt
NOTE: The MCHP SAS macros are based on information in Quan's "Enhanced Elixhauser Diagnosis-Type SAS code" programs, but are modified to be more generalized for use with other data sources and to run more efficiently at MCHP.MCHP Elixhauser Comorbidity Index SAS Macro for the Medical Services / Physician Claims Data (3- and 5-Digit ICD-9-CM Codes)
To run the MCHP Elixhauser Comorbidity Index SAS macro with the Medical Services / Physician Claims data, a file containing individual physician visit records with the diagnosis codes is required.
CAUTION: the Medical Services data should not be used alone to create the Elixhauser Comorbidity Index, as many 3-digit ICD-9-CM codes lack the specificity required in the algorithm. The Medical Services data should only be used in conjunction with the Hospital Abstracts data to generate a total Index score. In general, using Medical Services data alone to calculate the Elixhauser Comorbidity Index is not recommended and goes beyond the original intent of the Index.
NOTE: In December 2018, a 5-digit diagnosis code variable was added to the Medical Services data. If recorded, the first 3-digits of both the 3-digit and 5-digit diagnosis code variables will match exactly. The 5-digit diagnosis code variable applies to records from 2015/16 forward, but may not be available in all records.
The use of 3-digit codes requires modifications in the original Elixhauser Comorbidity Index algorithm. These modifications include:
- combining the two diabetes conditions, "Diabetes With Complications" and "Diabetes Without Complications" into one category because it is not possible to differentiate between the two categories using 3-digit codes. Anyone with ICD code "250" is assigned to the less severe "Diabetes Without Complications" category.
- combining the two anemia conditions, "Blood Loss Anemia" and "Deficiency Anemia" into one category because it is not possible to differentiate between the two categories using 3-digit codes. Anyone with either ICD code "280" or "281" is assigned to the "Deficiency Anemia" category.
- deciding to include or exclude certain codes in specific categories due to the specificity issue. For example, the 3-digit codes do not provide enough specificity for classifying diagnoses properly into the "Peptic Ulcer Disease excluding bleeding" category. For a complete list of the 3-digit ICD-9-CM codes used for each category and the choices that were made for inclusion/exclusion of 3-digit codes in our research, please see Using 3-Digit ICD-9-CM Codes with the Elixhauser Comorbidity Index.
See the Notes, Cautions and Limitations section for more information on specificity and using 3-digit ICD codes in the algorithm.
The MCHP Elixhauser SAS macro for working with the Medical Services / Physician Claims 3- and 5-digit ICD-9-CM codes is available below. This code was updated in November 2020 to work with 3- and 5-digit ICD-9-CM diagnosis codes and again in January 2023 to run as a macro.
MCHP Elixhauser Comorbidity Index SAS Macro - Calculating a Longitudinal Index Score
This macro will calculate a longitudinal Index score (the total number of comorbidity categories indicated) for an individual based on multiple Index records over time. It takes into account all of the comorbidity categories indicated for all episodes of hospital care and physician visits and the algorithm flags a comorbidity category as present only once during the calculation and does not increase the overall Index score when the same category occurs more than once. With the Elixhauser Comorbidity Index, we do not assign weights to the comorbidity categories.
The MCHP SAS macro for calculating the longitudinal Index score is available below:
MCHP Research Using the Elixhauser Comorbidity Index
The following is a list of published MCHP deliverable research that have used the Elixhauser Comorbidity Index, and a brief description of how the Index is used in that research.
1. Garland et al. (2012)In the MCHP Deliverable The Epidemiology and Outcomes of Critical Illness in Manitoba by Garland et al. (2012), they used the Elixhauser Comorbidity Index with 31 comorbidity categories as an independent variable in modeling resource use within a one-year period of hospital discharge. Their use of the Elixhauser Comorbidity Index was based on the work by Quan as one of three systems for assessing chronic comorbid health conditions. For more information on the use of the Elixhauser Comorbidity Index in this research, please read the following sections of the report:
2. Lix et al. (2016)
In the MCHP Deliverable Cancer Data Linkage in Manitoba: Expanding the Infrastructure for Research by Lix et al. (2016), additional SAS code was developed by MCHP to incorporate the 3-digit ICD-9-CM codes in the Medical Services / Physician Claims data into the Elixhauser Comorbidity Index algorithm.
For a list of the 31 categories (Comorbid Conditions) and the corresponding ICD-9-CM and ICD-10-CA Diagnosis Codes from both Hospital Abstracts (hosp) and Medical Services (med) data, please see the relevant table from Lix et al. (2016).
For more information on using 3-digit codes from the Medical Services data, see the section titled MCHP Elixhauser Comorbidity Index SAS Macro for 3- and 5-Digit Codes in the Medical Services / Physician Claims Data in this concept.
In this research, they compared comorbidities in a cancer cohort and a matched cancer-free cohort for three different types of cancer. See Table 4.4: Percent of Patients with Elixhauser Index Diagnoses in the Cancer Cohort and Matched Cancer-Free Cohort.3. Distribution of Elixhauser Scores - 2003-2005
Some preliminary information on the distribution of scores for the Elixhauser Comorbidity Index is available for 2003-2005, looking back two years among those aged 65+ in Manitoba. These tables include frequency distributions of total Elixhauser comorbidity counts for each year from 2003 to 2005, and a list for 2003 of the most common, ICD-9-CM most responsible diagnosis in the prior two years, for those with an Elixhauser Index score of zero. This information is available in a document in the Links section below: MCHP Documentation - Distribution of Elixhauser Scores - (internal access only).
In the publication "Comorbidity measures for use with administrative data" by Elixhauser et al. (1998), they develop the original index that contains 30 comprehensive categories of comorbidity based on ICD-9-CM coding found in hospital abstracts data. For patients with closely related comorbidities (e.g. diabetes and diabetes with complication), only the more severe comorbidity is counted. The purpose of this project is "to improve on measures of comorbidity for use with administrative databases" ... and ... "develop comorbidity measures to predict hospital charges, length of stay, and in-hospital mortality."
For more information on the original Elixhauser Index, including the software to run the Index, see:
2. Southern et al. (2004)
In the publication "Comparison of the Elixhauser and Charlson/Deyo methods of comorbidity measurement in administrative data" by Southern et al. (2004), they compare the Charlson Comorbidity Index and Elixhauser Comorbidity Index in predicting in-hospital mortality for patients with myocardial infarction (MI), and find the Elixhauser Comorbidity measures perform better than the Charlson Comorbidity measures.
In the publication "Coding algorithms for defining comorbidities in ICD-9-CM and ICD-10 administrative data" by Quan et al. (2005), they "conducted a multistep process to develop ICD-10 coding algorithms to define Charlson and Elixhauser comorbidities in administrative data and assess the performance of the resulting algorithms." They followed Elixhauser's coding algorithm, which led to modifications and enhanced coding algorithms for the index. Quan also noted that the Elixhauser algorithm has been revised twice and the recent version posted on the Agency for Healthcare Research Quality (AHRQ) website contained more ICD-9-CM codes but excludes the "cardiac arrhythmia" category, resulting in 29 categories.
Table 1. ICD-9-CM and ICD-10 Coding Algorithms for Elixhauser Comorbidities from Quan et al. (2005), identifies the ICD-9-CM codes for each category of comorbidity in Elixhauser's original and subsequent work on the AHRQ web site, as well as the ICD-10 and enhanced ICD-9-CM codes identified by Quan et al. in their work.
The Elixhauser Comorbidity Index SAS® code developed for this project is available below with Quan's permission:
- Quan's - ICD-9-CM Enhanced Elixhauser SAS Code
- Quan's - ICD-9-CM Enhanced Elixhauser Diagnosis-Type SAS Code
- Quan's - ICD-10 Enhanced Elixhauser SAS Code
- Quan's - ICD-10 Enhanced Elixhauser Diagnosis-Type SAS Code
NOTE: Quan's SAS code examples have not been validated at MCHP.
4. Li et al. (2008)
In the publication "Risk adjustment performance of Charlson and Elixhauser comorbidities in ICD-9 and ICD-10 administrative databases" by Li et al. (2008) , they assess the performance of the Charlson Comorbidity Index and the Elixhauser Comorbidity Index using ICD-9 and ICD-10 coding systems and find that the "change in coding algorithms did not influence the performance of either ... [index] ... in the prediction of outcome."
5. van Walraven et al. (2009)
In the publication "A modification of the Elixhauser comorbidity measures into a point system for hospital death using administrative data" by van Walraven et al. (2009) they modified the Elixhauser Comorbidity Index by developing a scoring system that "reflected the strength of each comorbidity group's independent association with hospital death." They found the "Elixhauser comorbidity system can be condensed to a single numeric score that summarizes disease burden and is adequately discriminative for death in hospital".