Skip Navigation

Elixhauser Comorbidity Software for ICD-10-CM, Version 1.1
The Elixhauser Comorbidity Software for ICD-10-CM is one of the HCUP tools that can be applied to HCUP and other similar databases. These tools are created by AHRQ through a Federal-State-Industry partnership.
 
 
Elixhauser Comorbidity Software for ICD-10-CM


The Elixhauser Comorbidity Software for ICD-10-CM assigns variables that identify comorbidities in hospital discharge records using the diagnosis coding of ICD-10-CM. This Web page describes the software that created the original ICD-9-CM comorbidity measures reported by Elixhauser et al. 1

The Elixhauser Comorbidity Software for ICD-10-CM consists of two SAS computer programs for personal computers. 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 created to exclude conditions that may be complications or that may be related to the principal diagnosis

  • Comformat2017.txt is designed for files that include ICD-10 MS-DRG version 34.
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:

  • Comoanaly2017.txt is intended for use with data containing ICD-10 MS-DRGs.

1 Elixhauser A, Steiner D, Harris DR, et al. Comorbidity measures for use with administrative data. Med Care, 1998;36(1):8-27.
 
Return to Contents
 

Two SAS programs comprise the Elixhauser Comorbidity Software for ICD-10-CM. They are described below.

Format Program

The format program defines a format library that contains the diagnosis and ICD-10 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.

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.

Analysis Program

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. This version of Elixhauser Comorbidity Software works with ICD-10 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.

An options statement defines page and line size preferences; the settings currently are linesize=159 and pagesize=56. These settings can be changed, depending on whether you prefer a portrait or landscape style output.

Diagnoses and DRGs

ICD-10-CM and ICD-10 MS-DRG (V33) coding changes through September 30, 2017, are incorporated into this software.

  • Changes to the Elixhauser Comorbidity Software for ICD-10-CM fiscal year (FY) 2017, Version 1.1 are summarized in Table1 (PDF file, 90 KB).
  • Changes to the Elixhauser Comorbidity Software for ICD-10-CM fiscal year (FY) 2016, Version 1.0 are summarized in Table1 (PDF file, 9 KB).

Variables Created

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

The analysis program creates these 29 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.
 
Return to Contents
 

System Requirements

In order to use the Elixhauser Comorbidity Software for ICD-10-CM, you will need SAS software and approximately 2 megabytes of disk space available on your hard drive to accommodate the SAS program files.

Required Data Elements

The input data set must have the following two variables:

  1. Diagnosis-related groups (ICD-10 MS-DRGs)
  2. Diagnostic codes (ICD-10-CM)

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 ICD-10 MS-DRG in effect on discharge date
DX1 Char 7 Principal diagnosis, ANAAAAA (blanks indicate missing, A indicate alphanumeric and N numeric)
DX2-DXn Char 7 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.

Using the Software

The Elixhauser Comorbidity Software for ICD-10-CM requires SAS but the ASCII file can be adapted to other types of software such as STATA or SPSS. The format program creates a SAS format library that maps diagnosis codes into comorbidity indicators. The analysis program applies the formats created above to a data set containing administrative data and then creates the comorbidity variables.

Representation of ICD-10-CM Diagnosis Codes

In practice, ICD-10-CM diagnoses are represented by 3- to 7-character codes with explicit decimals. In the files that you downloaded and in the vast majority of data files, ICD-10-CM diagnoses are represented with implicit decimals (no decimals present). (Alphanumeric codes are always enclosed in quotation marks.) Examples are given below.
Condition ICD-10-CM diagnosis code Alphanumeric code (with implicit decimals)
Reactive arthropathy, unspecified M02.9 'M029 '
Other reactive arthropathies, multiple sites M02.89 'M0289 '
Other reactive arthropathies, unspecified ankle and foot M02.879 'M02879 '

For proper handling of diagnosis codes:

  • Alphanumeric diagnosis codes must be left-justified so that there are two spaces following a 5-character diagnosis code and one space following a 6-character diagnosis code. For example, 'J206 '.
  • Trailing blanks should never be zero-padded (filled with zeroes so that all 7 characters are filled for codes that should be 3 or 4 characters long). For example, 'A191' should not be changed to 'A191000'.
 
Return to Contents
 

Shift-click from this Web page: Your browser may support loading the files for the ICD-10-CM Elixhauser Comorbidity Software from this Web page. To download the files from this Web page, click on the following links with the right mouse button and select Save Link As (Netscape®) or Save Target As (Internet Explorer®). After saving a file, find the file by using Windows® Explorer (Windows 98/95/NT/Vista/7/8/10) or File Manager (Windows 3.x) and then open it by double clicking on it.

October 2016 - Version 1.1 (valid for ICD-10-CM codes and v34 ICD-10 MS-DRGs)


Although 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 for ICD-10-CM are available for users who need to replace or access the old SAS programs.

 
Return to Contents
 

There are currently no publications using the Elixhauser Comorbidity Software for ICD-10-CM. Click here to see a partial list of publications using the Elixhauser Comorbidity Software for ICD-9-CM.
 
Return to Contents
 

Questions regarding the Elixhauser Comorbidity Software for ICD-10-CM may be directed to HCUP User Support through the following channels:

 
Return to Contents
 

Internet Citation: Elixhauser Comorbidity Software for ICD-10-CM, Version 1.1. Healthcare Cost and Utilization Project (HCUP). October 2016. Agency for Healthcare Research and Quality, Rockville, MD. www.hcup-us.ahrq.gov/toolssoftware/comorbidityicd10/comorbidity_icd10.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 10/13/16