HEALTHCARE COST & UTILIZATION PROJECT

User Support

Do Your own analysis
Explore Expert Research & Limited Datasets

Elixhauser Comorbidity Software for ICD-9-CM

 
Elixhauser Comorbidity Software, Version 3.7

ICD-9-CM codes were frozen in preparation for ICD-10-CM/PCS implementation and regular maintenance of the codes has been suspended. The HCUP Tools for ICD-9-CM should only be used with data for discharges before 10/1/2015. For data containing discharges after 10/1/2015, the Elixhauser Comorbidity Software for ICD-10-CM should be used.

The Elixhauser Comorbidity Software is one in a family of databases and software tools developed as part of the Healthcare Cost and Utilization Project (HCUP), a Federal-State-Industry partnership sponsored by the Agency for Healthcare Research and Quality. HCUP databases, tools, and software inform decision making at the national, State, and community levels.

Contents:

Elixhauser Comorbidity software assigns variables that identify comorbidities in hospital discharge records using the diagnosis coding of ICD-9-CM (International Classification of Diseases, Ninth Edition, Clinical Modifications). This document describes the software that creates the comorbidity measures reported by Elixhauser et al. ("Comorbidity Measures for Use with Administrative Data." Medical Care, 1998;36:8-27). In addition, this page includes information on the new Index, which allows users to create an index score—a single numeric value—that describes the comorbidity burden and that may be more useful for multivariate analyses, especially with relatively small sample sizes ("Identifying Increased Risk of Readmission and In-Hospital Mortality Using Hospital Administrative Data: The AHRQ Elixhauser Comorbidity Index." Exit Disclaimer Medical Care, 2017 Jul; 55(7):698-705).
Return to Contents
 

In 2015, a team of HCUP researchers and statisticians used a large analysis file built from all-payer hospital administrative data from the HCUP State Inpatient Databases (SID) from 18 States in 2011 and 2012 to create two indices based on the Elixhauser Comorbidity measures designed to predict in-hospital mortality and 30-day readmission in administrative data.
  • Moore BJ, White S, Washington R, Coenen N, Elixhauser A. Identifying increased risk of readmission and in-hospital mortality using hospital administrative data: The AHRQ Elixhauser Comorbidity index. Med Care. 2017 Jul; 55(7):698-705.
The index scores performed as well as using all 29 Elixhauser Comorbidity variables separately. The indices were stable across multiple subsamples defined by demographic characteristics or clinical condition. The downloading information for creating the index weights is provided below.

Currently, the indices are only available for use with ICD-9-CM data. Once administrative data on hospital admissions coded with ICD-10-CM diagnosis codes becomes available, we can begin to re-evaluate the current indices. In longitudinal studies that include data from prior to October 1, 2015, researchers will still be reliant on ICD-9-CM based comorbidity algorithms.

Select to download software.

The comorbidity software consists of three SAS computer programs for PCs. Although these programs are written in SAS, they are being distributed in ASCII so that they can be readily adapted to other programming languages.

The first program, Creation of Format Library for Elixhauser Comorbidity Groups, creates a SAS format library that maps diagnosis codes into comorbidity indicators. Additional formats are also created to exclude conditions that may be complications or that may be related to the principal diagnosis:
  • Comformat2012-2015.txt is designed for files that include MS-DRG version 29 or later.
The second SAS program, Creation of Elixhauser Comorbidity Variables, applies the formats created above to a data set containing administrative data and then creates the comorbidity variables:
  • Comoanaly2012-2015.txt is intended for use with data containing MS-DRGs.
The third SAS program, Creation of Elixhauser Comorbidity Index Scores, applies the weights and creates the two indices for the Elixhauser Comorbidity Software — one for in-hospital mortality and one for readmission.
  • Comindex2012-2015.txt is intended for use with data containing the Elixhauser comorbidity variables.
This documentation describes three topics:
  • Data elements required for the programs.
  • The SAS programs.
  • How to use the SAS programs on an IBM-compatible PC.
Return to Contents
 

The input data file must contain certain elements that are coded in specific ways. These elements are required for the assignment of the comorbidity flags. The flags are 0/1 indicators that note whether individual records include each comorbidity.

The input data set must have the following two variables:
  1. Diagnosis-related groups (DRG or MS-DRG).
  2. Diagnostic codes (ICD-9-CMs).
The required elements and coding are described in more detail below.

Required Elements of Input File

Element Type Length Label and Uniform Coding
DRG Num 3 DRG or MS-DRG in effect on discharge date, assigned by the DRG Grouper algorithm of the Centers For Medicare & Medicaid Services (CMS), formerly the Health Care Financing Administration (HCFA)
DX1 Char 5 Principal diagnosis, annnn (blanks indicate missing)
DX2-DXn Char 5 Secondary diagnoses 2-n, where n varies by data set
NDX Num 3 Number of diagnoses on this discharge. (Note: A macro variable defines this element; it is currently set as 2.) NDX should always be equal or less than the macro variable called NUMDX.

Select for Text Version. (PDF file, 10 KB)
Return to Contents
 

Creation of Format Library for Elixhauser Comorbidity Groups
The format program defines a format library that contains the diagnosis and DRG/MS-DRG screens necessary for the comorbidity analysis. The format library is referenced by the comorbidity analysis program.
  • Input: None
  • Output: Permanent SAS format library called \FMTLIB\formats.sc2.
  • Changes: The code points to a directory called FMTLIB on the c: drive for the format library output file. If you use another directory or drive, this code must be changed. Initially, this directory should be defined.
Return to Contents
 

Creation of Elixhauser Comorbidity Variables

The analysis program assigns 0/1 indicators to the inpatient records for the comorbidity variables of interest. This program assumes that the input data file conforms to specific variables names, attributes, and coding conventions, as described above. There is one version of this program that works with either DRG or MS-DRG.
  • Input: SAS inpatient data (CORE) conforming to HCUP coding conventions (described above), and SAS format library (FMTLIB), created from the included format program.
  • Output: SAS data set (ANALYSIS) containing inpatient records with their comorbidity indicators. The contents of the ANALYSIS file and the means for the comorbidity variables are output as hard copy. The output file is called ANALYSIS; if your file name differs, the DATA statement needs to be changed.
  • Changes: The code points to a directory called DATA on the c: drive for the input and output files. If you use another directory or drive, this code must be changed. Initially, the DATA directory needs to be defined. The macro variable (NUMDX) that defines the number of diagnoses on your data file needs to be defined (change the "2" to the appropriate number).
The macro variable (CORE) that defines the input file (SASname) needs to be defined; change the XXXXXX to the appropriate name.

There is an options statement that defines page and line size preferences; the settings currently are linesize=159 and pagesize=56. These settings can be changed, depending upon whether you prefer portrait or landscape style output.
Return to Contents
 

Creation of Elixhauser Comorbidity Index Scores

The index program assigns two index scores to the inpatient records, one for readmissions and one for in-hospital mortality. The index program can be used to transform the current 29 HCUP comorbidities variables into comorbidity index scores for each record. The comorbidity index scores for each observation are calculated as a weighted sum of each of the binary comorbidity variables on the record. The resulting comorbidity index scores can be used in analyses in place of the 29 individual measures. This program assumes that the input data file includes 29 binary comorbidity variables with specific variables names.
  • Input: SAS inpatient data (DS_) with 29 binary comorbidity variables, created from the included format program and analysis program.
  • Output: SAS data set (ANALYSIS) containing inpatient records with their comorbidity indicators as well as two comorbidity index variables. The contents of the ANALYSIS file and the means for the comorbidity index variables are output as hard copy. The output file is called ANALYSIS; if your file name differs, the DATA statement needs to be changed.
  • Changes: The code points to a directory called DATA on the c: drive for the input and output files. If you use another directory or drive, this code must be changed. Initially, the DATA directory needs to be defined. The SAS macro (get_cmscore) defines the names of the 29 comorbidity variables on your data file, and needs to be changed if you are not using HCUP databases. If your data do not contain all 29 of the comorbidity variables, set the macro variables for the missing indicators to blank in get_cmscore.
The macro variable (DS_) that defines the input file (SASname) needs to be defined; change "Severity_data" to the appropriate name.
Return to Contents
 

ICD-9-CM and DRG/MS-DRG coding changes through September 30, 2015, are incorporated into the Elixhauser Comorbidity Software. (Note that there were no new diagnosis codes for FY 2015.)
  • Changes to the Comorbidity Software for FY2012-2015, Version 3.7 are summarized in Table1-FY2012-V3_7 (PDF file, 10 KB).
  • Changes to the Comorbidity Software for FY2011, Version 3.6 are summarized in Table1-FY2011-V3_6 (PDF file, 13 KB).
  • Changes to the Comorbidity Software for FY2010, Version 3.5 are summarized in Table1-FY2010-V3_5 (PDF file, 12 KB).
  • Changes to the Comorbidity Software for FY2009, Version 3.4 are summarized in Table1-FY2009-V3_4 (PDF file, 17 KB).
  • Changes to the Comorbidity Software for FY2008, Version 3.3 are summarized in Table1-FY2008-V3_3 (PDF file, 15 KB).
  • Changes to the Comorbidity Software for FY2007, Version 3.2 are summarized in Table1-FY2007-V3_2 (PDF file, 15 KB).
  • Changes to the Comorbidity Software for FY2006, Version 3.1 are summarized in Table1-FY2006-V3_1 (PDF file, 15 KB).
  • Changes for FY2005, Version 3.0 are summarized in Table1-FY2005-V3_0 (PDF file, 17 KB).
  • Changes for FY2004, Version 2.1 are summarized in Table1-FY2004-V2_1. (PDF file, 39 KB).
Return to Contents
 

The library contains formats for the ICD-9-CM codes and DRG/MS-DRG screens. Construction of these variables is summarized in Table 2. (PDF file, 120 KB)

The original table appeared in the paper by Elixhauser et al (1998). This table has been updated to reflect the ICD-9-CM and DRG/MS-DRG updates in the software.

The analysis program creates these 29 Elixhauser comorbidity measures: CHF, VALVE, PULMCIRC, PERIVASC, HTN_C (using HTN, HTNCX), PARA, NEURO, CHRNLUNG, DM, DMCX, HYPOTHY, RENLFAIL, LIVER, ULCER, AIDS, LYMPH, METS, TUMOR, ARTH, COAG, OBESE, WGHTLOSS, LYTES, BLDLOSS, ANEMDEF, ALCOHOL, DRUG, PSYCH, DEPRESS.

The index program creates these two Elixhauser comorbidity index variables: READMIT_SCORE and MORTAL_SCORE.
Return to Contents
 

Web Browser Download: Your browser may support loading the files from this Web page. To download the files from this page, click on the following links with the right mouse button and select "Save Link As" (Mozilla) or "Save Target As" (Internet Explorer). After saving a file, find the file by using Windows® Explorer (Windows® 95/98/NT/2000/XP) or File Manager (Windows® 3.x) and then open it by double-clicking on the file name. Though they are written in SAS, all files are being distributed in ASCII so they can be readily adapted to other programming languages.
Return to Contents
 

Copies of previous versions of the Elixhauser Comorbidity Software are available for users who need to replace or access the old SAS programs.
Return to Contents
 
The following publications are examples of the many studies that have used this comorbidity algorithm:

Ahern,M. M., Hendryx,M. Avoidable hospitalizations for diabetes: comorbidity risks. Disease management: DM, 10(6):347-355 , December 2007.

Austin SR, Wong YN, Uzzo RG, Beck JR, Egleston BL. Why summary comorbidity measures such as the Charlson comorbidity index and Elixhauser score work. Med Care 2015;53(9):e65–72. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3818341/

Baldwin LM, Klabunde CN, Green P, Barlow W, Wright G. In search of the perfect comorbidity measure for use with administrative claims data: does it exist? Med Care. 2006 Aug;44(8):745-53. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3124350/

Bass E, French DD, Bradham DD, Rubenstein LZ. Risk-adjusted mortality rates of elderly veterans with hip fractures. Ann Epidemiol. 2007 Jul;17(7):514-9. Epub 2007 Apr 8.

Brasel KJ, Guse CE, Layde P, Weigelt JA. Rib fractures: relationship with pneumonia and mortality. Crit Care Med. 2006 Jun;34(6):1642-6.

Carney CP, Jones L, Woolson RF. Medical comorbidity in women and men with schizophrenia: a population-based controlled study. J Gen Intern Med. 2006 Nov;21(11):1133-7.

Cots F, Castells X, Mercade L, Torre P, Riu M. [Article in Spanish]. [Ajuste del riesgo: mas alla de los sistemas de clasificacion de pacientes]. Gac Sanit. 2001 Sep-Oct;15(5):423-31.

Dominick KL, Dudley TK, Coffman CJ, Bosworth HB. Comparison of three comorbidity measures for predicting health service use in patients with osteoarthritis. Arthritis Rheum. 2005 Oct 15;53(5):666-72.

Farley JF, Harley CR, Devine JW. A comparison of comorbidity measurements to predict healthcare expenditures. Am J Manag Care. 2006 Feb;12(2):110-9.

French DD, Campbell R, Spehar A, Angaran DM. Benzodiazepines and injury: a risk adjusted model. Pharmacoepidemiol Drug Saf. 2005 Jan;14(1):17-24. http://onlinelibrary.wiley.com/doi/10.1002/pds.967/abstract Exit Disclaimer

French DD, Campbell R, Spehar A, Rubenstein LZ, Accomando J, Cunningham F. National Veterans Health Administration hospitalizations for syncope compared to acute myocardial infarction, fracture, or pneumonia in community-dwelling elders: outpatient medication and comorbidity profiles. J Clin Pharmacol. 2006 Jun;46(6):613-9.

French DD, Bass E, Bradham DD, Campbell RR, Rubenstein LZ. Rehospitalization After Hip Fracture: Predictors and Prognosis from a National Veterans Study. J Am Geriatr Soc, November 15, 2007 [Epub ahead of print]

French DD, Bass E, Bradham DD, Campbell RR, Rubenstein LZ. Rehospitalization After Hip Fracture: Predictors and Prognosis from a National Veterans Study. J Am Geriatr Soc, November 15, 2007 [Epub ahead of print]

French DD, Bass E, Bradham DD, Campbell RR, Rubenstein LZ. Rehospitalization After Hip Fracture: Predictors and Prognosis from a National Veterans Study. J Am Geriatr Soc, November 15, 2007 2008 Apr;56(4):705-10. Epub 2007 Nov 15.

Garvin JH, Redd A, Bolton D, Graham P, Roche D, Groeneveld P, Leecaster M, Shen S, Weiner MG. Exploration of ICD-9-CM coding of chronic diseases within the Elixhauser Comorbidity Measure in patients with chronic heart failure. Perspect Health Inf Manag 2013;10:1b. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3797549/

Ghali WA, Hall RE, Rosen AK, Ash AS, Moskowitz, MA. Searching for an improved clinical comorbidity index for use with ICD-9-CM administrative data. J Clin Epidemiol 1996;49(3):273–8. https://www.ncbi.nlm.nih.gov/pubmed/8676173

Glance LG, Dick AW, Osler TM, Mukamel DB. Does date stamping ICD-9-CM codes increase the value of clinical information in administrative data? Health Serv Res. 2006 Feb;41(1):231-51.

Ho KM, Finn J, Knuiman M, Webb SA. Combining multiple comorbidities with Acute Physiology Score to predict hospital mortality of critically ill patients: a linked data cohort study. Anaesthesia. 2007 Nov;62(11):1095-100.

Johnston JA, Wagner DP, Timmons S, Welsh D, Tsevat J, Render ML. Impact of different measures of comorbid disease on predicted mortality of intensive care unit patients. Med Care. 2002 Oct;40(10):929-40.

Kurichi JE, Stineman MG, Kwong PL, Bates BE, Reker DM. Assessing and using comorbidity measures in elderly veterans with lower extremity amputations. Gerontology. 2007;53(5):255-9. Epub 2007 Apr 13. https://www.karger.com/Article/Pdf/101703 Exit Disclaimer

Li B, Evans D, Faris P, Dean S, Quan H. Risk adjustment performance of Charlson and Elixhauser comorbidities in ICD-9 and ICD-10 administrative databases. BMC Health Services Research, 8:12, 2008.

Livingston EH, Rege RV. Technical complications are rising as common duct exploration is becoming rare. J Am Coll Surg. 2005 Sep; 201(3):426-33. http://linkinghub.elsevier.com/retrieve/pii/S1072-7515(05)00531-4

Livingston EH. Development of bariatric surgery-specific risk assessment tool. Surg Obes Relat Dis. 2007 Jan-Feb;3(1):14-20; discussion 20. Epub 2006 Dec 27.

Mitchell, Jean M. Effects Of Physician-Owned Limited-Service Hospitals: Evidence From Arizona. (Link removed because it no longer worked. Replacement not found.)

Moore BJ, White S, Washington R, Coenen N, Elixhauser A. Identifying increased risk of readmission and in-hospital mortality using hospital administrative data: The AHRQ Elixhauser Comorbidity index. Med Care. 2017 Jul; 55(7):698-705.

Quan H, Sundararajan V, Halfon P, et al. Coding algorithms for defining comorbidities in ICD-9-CM and ICD-10 administrative data. Med Care 2005 Nov; 43(11):1073-1077. http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=16224307&query_hl=7

Robinson,D.,Jr, Eisenberg,D., Nietert,P. J., Doyle,M., Bala,M., Paramore,C., Fraeman,K., Renahan,K. Systemic sclerosis prevalence and comorbidities in the US, 2001-2002. Curr Med Res Opin, 24(4):1157-66, April 2008.

Schneeweiss S, Maclure M. Use of comorbidity scores for control of confounding in studies using administrative databases. Int J Epidemiol 2000;29(5):891–8. https://www.ncbi.nlm.nih.gov/pubmed/11034974

Sharabiani MT, Aylin P, Bottle A. Systematic review of comorbidity indices for administrative data. Med Care 2012;50(12):1109–18. https://www.ncbi.nlm.nih.gov/pubmed/22929993

Southern DA, Quan H, Ghali WA. Comparison of the Elixhauser and Charlson/Deyo methods of comorbidity measurement in administrative data. Med Care. 2004 Apr;42(4):355-60.

Stukenborg GJ, Wagner DP, Connors AF Jr. Comparison of the performance of two comorbidity measures, with and without information from prior hospitalizations. Med Care. 2001 Jul;39(7):727-39.

Tang,J., Wan,J. Y., Bailey,J. E. Performance of comorbidity measures to predict stroke and death in a community-dwelling, hypertensive Medicaid population. Stroke, 39(7):1938-44, July 2008, Epub 2008 Apr 24. http://stroke.ahajournals.org/content/strokeaha/39/7/1938.full.pdf Exit Disclaimer

Thombs BD, Singh VA, Halonen J, Diallo A, Milner SM. The effects of preexisting medical comorbidities on mortality and length of hospital stay in acute burn injury: evidence from a national sample of 31,338 adult patients. Ann Surg. 2007 Apr;245(4):629-34.

Thompson NR, Fan Y, Dalton JE, Jehi L, Rosenbaum BP, Vadera S, Griffith SD. A new Elixhauser-based comorbidity summary measure to predict in-hospital mortality. Med Care 2015;53(4):374–9. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4812819/

van Walraven C, Austin PC, Jenings A, Quan H, Forster AJ. A modification of the Elixhauser comorbidity measures into a point system for hospital death using administrative data. Medical Care. 2009 (47):626-633. http://www.ncbi.nlm.nih.gov/pubmed/19433995

Weinhandl,E. D., Snyder,J. J., Israni,A. K., Kasiske,B. L. Effect of comorbidity adjustment on CMS criteria for kidney transplant center performance. American journal of transplantation, 9(3):506-16, March 2009.

Werner RM, Asch DA, Polsky D. Racial Profiling: The Unintended Consequences of Coronary Artery Bypass Graft Report Cards. Circulation, 111:1257-1263, 2005;

Xiao H, Tan F, Goovaerts P, Ali A, Adunlin G, Huang Y, Gwede C. Construction of a comorbidity index for prostate cancer patients linking state cancer registry with inpatient and outpatient data. J Registry Manage. 2013 Winter; 40(4):159-64. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4337841/

Yan Y, Birman-Deych E, Radford MJ, et al. Comorbidity indices to predict mortality from Medicare data: results from the National Registry of Atrial Fibrillation. Med Care. 2005 Nov; 43(11):1073-1077. http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=16224299&query_hl=5

Zhu,H., Hill,M. D. Stroke: the Elixhauser Index for comorbidity adjustment of in-hospital case fatality. Neurology, 22;71(4):283-7, July 2008.
Return to Contents
 

Internet Citation: HCUP Elixhauser Comorbidity Software. Healthcare Cost and Utilization Project (HCUP). June 2017. Agency for Healthcare Research and Quality, Rockville, MD. www.hcup-us.ahrq.gov/toolssoftware/comorbidity/comorbidity.jsp.
Are you having problems viewing or printing pages on this website?
If you have comments, suggestions, and/or questions, please contact hcup@ahrq.gov.
Privacy Notice, Viewers & Players
Last modified 6/22/17