Skip Navigation

Beta Elixhauser Comorbidity Software for ICD-10-CM
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.
 
Caution: These ICD-10-CM/PCS tools were created prior to the availability of ICD-10-CM/PCS-coded data. AHRQ is conducting analyses of ICD-10-CM/PCS data; preliminary findings suggest some unexpected discontinuities between the tools based on ICD-9-CM and those based on ICD-10-CM/PCS. See this page www.hcup-us.ahrq.gov/datainnovations/icd10_resources.jsp for details. The tools will undergo periodic updates and corrections as data using ICD-10-CM/PCS codes come into greater use. You are advised to visit this page regularly to download and apply the most recent version of the HCUP tools for your data throughout your research process.


Beta 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
  • ComformatYYYY_N.txt is designed for files that include fiscal year (FY) YYYY ICD-10-CM codes and corresponding MS-DRG. The N indicates the HCUP update number within each fiscal year. N>1 indicates changes were made after the initial fiscal year release.
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:
  • ComoanalyYYYY.txt is intended for use with data containing MS-DRGs.
The Elixhauser Comorbidity Software creates these 29 comorbidity measures:

Variable Name Description Variable Name Description
CHF Congestive Heart Failure Lymph Lymphoma
VALVE Valvular disease METS Metastatic cancer
PULMCIRC Pulmonary circulation disorders TUMOR Solid tumor without metastasis
PERIVASC Peripheral vascular disease ARTH Rheumatoid arthritis/ collagen vascular diseases
HTN_C (using HTN, HTNCX) Hypertension (combine uncomplicated and complicated) COAG Coagulation deficiency
PARA Paralysis OBESE Obesity
NEURO Other neurological disorders WGHTLOSS Weight loss
CHRNLUNG Chronic pulmonary disease LYTES Fluid and electrolyte disorders
DM Diabetes without chronic complications BLDLOSS Blood loss anemia
DMCX Diabetes with chronic complications ANEMDEF Deficiency anemias
HYPOTHY Hypothyroidism ALCOHOL Alcohol abuse
RENLFAIL Renal failure DRUG Drug abuse
LIVER Liver disease PSYCH Psychoses
ULCER Chronic peptic ulcer disease DEPESS Depression
AIDS HIV and AIDS (Acquired immune deficiency syndrome)    

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 ICD-10-CM diagnosis and 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.
 
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
I10_DX1 Char 7 Principal ICD-10-CM diagnosis, ANAAAAA (blanks indicate missing, A indicate alphanumeric and N numeric)
I10_DX2-DXn Char 7 Secondary ICD-10-CM diagnoses 2-n, where n varies by data set
I10_NDX Num 3 Number of ICD-10-CM diagnoses on this discharge. (Note: A macro variable defines this element; it is currently set as 2.) I10_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. Although they are written in SAS, all files are being distributed in ASCII so they can be readily adapted to other programming languages. Additional information about downloading the Elixhauser Comorbidity Software for ICD-10-CM Tool is available in the Elixhauser Comorbidity Software Load Guide (PDF file, 52 KB), and the HCUP Tools Loading Tutorial, part of the HCUP On-line Tutorials Series, provides step-by-step instructions for downloading, applying, and verifying HCUP Tools.

Version 2019.1 (Updated October 2018) (valid for FY2019 ICD-10-CM codes and v36 MS-DRGs)
Version 2018.1 (Updated October 2017) (valid for FY2018 ICD-10-CM codes and v35 MS-DRGs)
Version 2017.2 (Updated September 2017) (valid for FY2017 ICD-10-CM codes and v34 MS-DRGs)
Version 2016.2 (Updated September 2017) (valid for FY2016 ICD-10-CM codes and v33 MS-DRGs)
 
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: Beta Elixhauser Comorbidity Software for ICD-10-CM Healthcare Cost and Utilization Project (HCUP). October 2018. 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/19/18