Surgery Flags Software for ICD-9-CM

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.

Surgery flags are part of the 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.

The Surgery Flags Software for ICD-9-CM is being made available for users who would like to identify surgical procedures and encounters using ICD-9-CM coded data. AHRQ looks forward to your comments and suggestions for changes and improvements.

The Surgery Flags Software was first released in September 2014. The software was updated annually to reflect changes in ICD-9-CM and CPT codes. The initial release was valid for ICD-9-CM codes through September 2013 and CPT codes through December 2013. A second version was released in June 2015. This version not only brought the Surgery Flags software up to date for ICD-9-CM and CPT codes through 2015, but the software assignments were also validated by certified coding specialists. A third version, focusing on CPT only, was released in August 2019. This version brought the Surgery Flag software up to date for CPT codes through January 2019. The software assignments were also validated by certified coding specialists. The ICD-9-CM and CPT portions of the Surgery Flags Software were separated to create two Surgery Flags tools in August 2019 -- the Surgery Flags for ICD-9-CM and the Surgery Flags for Services and Procedures.

Contents:

The Surgery Flags Software for ICD-9-CM provides a method for identifying surgical procedures and encounters using International Classification of Diseases, 9th Revision, Clinical Modification (ICD-9-CM) coded data.

The Surgery Flags Software for ICD-9-CM is current as of fiscal year 2015 and can be used with any data that include ICD-9-CM procedure information.

Approximately 2,600 ICD-9-CM surgical procedure codes (a subset of the 3,882 ICD-9-CM procedure codes) are classified as a narrowly defined therapeutic invasive surgery (NARROW) or a more broadly defined surgery that includes diagnostic invasive procedures (BROAD).

Return to Contents
 

The Surgery Flags Software for ICD-9-CM provides a schema for identifying surgical procedures based on the International Classification of Diseases, 9th Revision, Clinical Modification (maintained by the National Center for Health Statistics (NCHS) and the Centers for Medicare and Medicaid Services (CMS)). ICD-9-CM procedure coding is used in facility claims, primarily for inpatient procedures.

Values for the Surgery Flags Software for ICD-9-CM

A procedure that is classified as a surgery based on a narrow, targeted, and restrictive definition (surgery flag value = NARROW) includes invasive surgical procedures:

An invasive therapeutic surgical procedure involving incision, excision, manipulation, or suturing of tissue that penetrates or breaks the skin; typically requires use of an operating room; and also requires regional anesthesia, general anesthesia, or sedation to control pain.

Guiding Key Terms:

  • Invasive (does not go through an existing orifice)
  • Therapeutic
  • Pacemakers
  • Robotic-assisted procedures
  • Laparoscopy
  • Layer closure
  • Complex repair
  • Extensive, complicated
  • Penetrating wound
  • Deep
  • Complicated
  • Tissue transfer

Examples of procedures that are classified as NARROW include:

  • 64.0 - Circumcision
  • 74.0 - Classical Cesarean Section
  • 81.54 - Total Knee Replacement

A procedure that is classified as a surgery based on a broad definition (surgery flag value = BROAD) includes surgical procedures that may not fit the more strict definition of surgery applied for the narrow flag, but are often performed in surgical settings. This definition includes diagnostic surgical procedures:

An invasive therapeutic or diagnostic surgical procedure involving incision, excision, manipulation, or suturing of tissue that penetrates or breaks the skin or enters a body cavity through an existing orifice; typically requires use of an operating room; and also typically requires regional anesthesia, general anesthesia, or sedation to control pain. This includes percutaneous procedures, endoscopic procedures, and all "open" surgical procedures, regardless of therapeutic or diagnostic purpose. By definition, the BROAD flag includes all narrowly defined surgical procedures as well as a broader group of diagnostic and less invasive therapeutic surgeries.

Guiding Key Terms:

  • Therapeutic and diagnostic surgeries that go through an existing orifice and require a sterile field
  • Episiotomy
  • Lacerations
  • Endoscopies in conjunction with therapeutic intervention (e.g., incision, removal of polyp, destruction of lesion)
  • Simple repair
  • Subcutaneous
  • Drainage
  • Exploratory (diagnostic)
  • Percutaneous

Examples of procedures that are classified as BROAD include:

  • 75.69 - Repair OB Laceration NEC
  • 45.15 - Open Small Bowel Biopsy
  • 00.63 - Percutaneous Insertion of Carotid Artery Stent(s)

Examples of procedures that are classified as neither NARROW nor BROAD (surgery flag value = NEITHER) include:

  • Blood transfusion
  • Vaccination
  • Lithotripsy
  • Radiosurgery
  • Closed reduction
  • Colonoscopy without biopsy or removal of tissue (with exceptions noted above)
  • Use of endoscopes for diagnostic purposes only and for which nothing was removed
  • Shaving
  • Identified paired codes

Process of Assigning Procedure Codes to Surgery Flags

The classification of procedures began with the ICD-9-CM-based HCUP Procedure Classes tool. The Procedure Classes (PR Class) software classifies all ICD-9-CM codes into one of four mutually exclusive categories (1=Minor Diagnostic Non-operating Room Procedure, 2= Minor Therapeutic Non-operating Room Procedure, 3=Major Diagnostic Operating Room Procedure, and 4=Major Therapeutic Operating Room Procedure). All ICD-9-CM procedure codes in PR Class 4 (major therapeutic) were categorized as NARROW. All ICD-9-CM procedure codes in PR Class 3 were categorized as BROAD (major diagnostic). All ICD-9-CM procedure codes in PR Class 1 were not categorized as NARROW or BROAD.

Next, using information from Weiser, Semel, Simon, et. al. (2011)i, a certified clinical coding specialist, a general surgeon, an analyst, and AHRQ staff reviewed and assigned ICD-9-CM procedure codes in PR Class 2 and determined whether the procedure was NARROW, BROAD, or NEITHER.

The following iterative process was used to assign ICD-9-CM codes to Surgery Flag values:

  • Each ICD-9-CM code in PR Class 2 was reviewed by a coder and categorized based on the definitions provided above. A coder rationale was provided for each questionable code. It was made clear that "operations" does not necessarily mean that a surgery was performed.
  • If there was not one best category or if there was lack of clarity about what the procedure involved, the general surgeon reviewed the code and categorized it based on the definitions above. A surgeon rationale was provided for each questionable code.
  • AHRQ staff reviewed the codes and the rationale. A list of key terms with expected assignments was developed.
  • Codes were reviewed for consistency of assignments based on key terms, consistency within the three digit grouping of codes, and consistency of treatment of paired codes (identified paired codes were assigned a value of NEITHER since the qualifying surgical code should be assigned a BROAD or NARROW value and be on the same record).
  • Assignments were reviewed for consistency and accuracy.
  • ICD-9-CM code assignments were re-reviewed and discussed and reassignments were made based on consensus.
  • A final review was conducted by AHRQ staff.
  • A final version of the ICD-9-CM file ("ICD-9-CM Backbone file") was created.
Return to Contents
 

Surgery Flags Software for ICD-9-CM

The Surgery Flags Software for ICD-9-CM consists of a SAS program and CSV file that includes information about the classification of procedures into the broad and narrow definitions of surgeries. The surgical flag has value of '0' (NEITHER), '1' (BROAD) or '2' (NARROW). Any code with a value of '2' always has a value of '1' as well; that is '2' NARROW is a subset of '1' BROAD. The CSV file name is:

  • SURGERY_FLAGS_I9_2015.CSV

This file can be used to assign the surgery flags to data with ICD-9-CM procedures. The Surgery Flags Software file contains flag assignments for all ICD-9-CM procedure codes (broadly or narrowly defined).

CSV File

The CSV file included with the Surgery Flags for ICD-9-CM tool can be loaded into almost any kind of database or statistical package. The first two rows of the file contain the field headers and also list the values for the surgical flag:

  • The ICD-9-CM CSV file has three columns of information. The first column specifies the ICD-9-CM procedure code. The second column indicates the surgical flag for the code (1=BROAD, 2= NARROW). The third column provides the ICD-9-CM procedure label.

Sample SAS Load Program

Researchers have the option of creating record-level flags or procedure-level flags. Optional code is included in the top comments section of the program that would create binary BROAD and NARROW surgery flags for each record.

The software includes a sample SAS program ("SURGERY_FLAGS_LOAD_PROGRAM.SAS") that reads in the ICD-9-CM software file and creates flags to identify surgical procedures based on a BROAD or NARROW definition of surgery.

This SAS program assumes the use of discharge-level data where a single discharge record contains all of the procedure codes on a single line. The SAS load program creates surgery flags for each procedure on a discharge record. Values of '1'=BROAD or '2'=NARROW will be in each flag. Any codes that are not in the software files are assigned a surgery flag of 0.

The program is intended for data with ICD-9-CM procedure codes. By default, the program assumes up to 5 ICD-9-CM procedures are present on each record, although this can be adjusted by changing the following parameter in the SAS file:

%LET NUMI9PRS=5;

Please note that in order to build a list of all discharges with "BROAD" surgeries, analysts will need to capture codes with surgery flag=1 (BROAD) as well as codes that have surgery flag=2 (NARROW) because the NARROW codes are also BROAD by definition.

Program Structure

There are two general sections to the SAS load program:

  1. In the first phase, the program loads the CSV file into SAS then creates a temporary SAS format to be used later.
  2. In the second phase, the format created above is applied to the researcher's SAS dataset in order to create the surgery flags. The default action is to create a set of ICD-9-CM surgery flags for each record on a dataset. These are procedure-level flags, and the number of flags depends on the number of procedures on each record as specified by the user.

Optional Flags

Users may wish to create a record-level flag (as opposed to procedure-level flag) to identify the entire discharge as surgical or not. In order to do this, analysts should scan the ICD-9-CM surgery flags created by the program. If any surgery flag on a record contains the values '1' or '2', a record-level surgery flag would be created with a possible value of 'surgical'. Otherwise, the record-level flag would have a value of 'not surgical'.

An example of SAS code to do this which could be added at the end of the program follows:

RECORD_FLAG = 'NOT SURGICAL';
%if &NUMI9PRS > 0 %then %do;
    DO I = 1 TO &NUMI9PRS;
            IF I9SFLAGS(I) IN('1','2') THEN
                   RECORD_FLAG='SURGICAL';
            END;
%end;

Step-by-Step Guide

To apply Surgical Flag assignments to your SAS dataset, follow these steps:

  • Save the CSV files and SAS program to a directory of your choosing.
  • Identify the location of the SAS dataset you wish to augment.
  • Edit the SAS load program so that:
    • The correct directory path for the CSV files and your SAS dataset is specified.
    • The maximum number of ICD-9-CM codes found on each record is indicated.
    • Your SAS dataset name is provided.
    • The names of the ICD-9-CM procedure codes match those on your SAS file.
  • Run the SAS program and examine the output to make sure the surgery flags were created correctly. A partial printing of 10 records is executed by the load program.
Return to Contents
 

Shift-click from this Web page: Click on the file name to automatically download the files for Surgery Flags for ICD-9-CM. Alternately, click on the following links with the right mouse button and select "Save Link As" (Google Chrome) or "Save Target As" (Internet Explorer) to download the ZIP folder to your computer. After downloading the files, extract the ZIP file contents by double clicking on the ZIP folder. The ZIP folder includes the Tool and a SAS load program.

ASCII Surgery Flags Software for ICD-9-CM file for use with user analytic software (i.e., SAS, Stata®, or SPSS)

Return to Contents
 

Henke RM, Karaca, Z, Moore B, Cutler E, Liu H, Marder WD, Wong HS. Impact of Health System Affiliation on Hospital Resource Use Intensity and Quality of Care. Health Services Research. 2018 Feb;53(1):63-86.

Wu RT, Shultz BN, Gabrick KS, Abraham PF, Cabrejo R, Persing JA, Alperovich M. National Longitudinal Comparison of Patients Undergoing Surgical Management of Craniosynostosis. The Journal of Craniofacial Surgery. 2018 Oct;29(7):1755-1759.

Mull HJ, Rivard PE, Legler A, Pizer SD, Hawn MT, Itani KMF, Rosen AK. Comparing definitions of outpatient surgery: Implications for quality measurement. American Journal of Surgery. 2017 Aug;214(2):186-192.

Gavigan T, Rozario N, Matthews B, Reinke C. Trends in parastomal hernia repair in the United States: a 14-y review. The Journal of Surgical Research. 2017 Oct;218:78-85.

Reinke CE, Thomason M, Paton L, Schiffern L, Rozario N, Matthews BD. Emergency general surgery transfers in the United States: a 10-year analysis. The Journal of Surgical Research. 2017 Nov;219:128-135.

Soleimani T, Sasor SE, Spera L, Eppley BE, Socas J, Chu MW, Tholpady SS. Pediatric pyoderma gangrenosum: is it just big wounds on little adults? The Journal of Surgical Research. 2016 Nov;206(1):113-117.

Return to Contents
 

Questions regarding the Surgery Flags Software for ICD-9-CM may be directed to HCUP User Support through the following channels:

Return to Contents
 

i Weiser, Semel, Simon, et. al. (2011) In-hospital Death following Inpatient Surgical Procedures in the United States, 1996–2006. World Journal of Surgery. Vol. 35, No. 9, pp. 1950-1956)


Internet Citation: Surgery Flags Software for ICD-9-CM. Healthcare Cost and Utilization Project (HCUP). August 2019. Agency for Healthcare Research and Quality, Rockville, MD. www.hcup-us.ahrq.gov/toolssoftware/surgflags/surgeryflags.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 8/7/19