A SAS Format Catalog for ICD-9/ICD-10 Diagnoses and Procedures: Data Research Example and Custom Reporting Example May 10, 2018 Robert Richard Springborn, Ph.D. Office of Statewide Health Planning and Development Information Services Division, Healthcare Analytics Branch, Clinical Data Unit Sacramento, California
Motivation for Topic Office of Statewide Health Planning & Development (OSHPD) provides administrative data containing ICD-9 and ICD-10 diagnosis and procedure codes to users worldwide including: researchers; health care providers; health care insurance providers; and media. A SAS format catalog which adds ICD-9 and ICD-10 diagnosis and procedure code descriptions to administrative data, would greatly benefit all users and encourage new uses of administrative data by reducing the need for lookup manuals and tables. Today we will create the SAS format catalog. A data research example and custom reporting example are also presented. 2
A SAS Format Catalog For ICD-9/ICD-10 Create Four MS Excel Files (Display 1; Page 2) A datetime20. format, which converts a date time value (e.g. 30SEP2015:00:00:00 DT ) to a numeric value, reads variables of end_date and start_date from two parent datasets and creates four child datasets (Lines 22, 23, 43, 44). Diagnosis codes and descriptions for ICD-9 (diagnosis_icd9) and ICD-10 (diagnosis_icd10). Procedure codes and descriptions for ICD-9 (procedures_icd9) and ICD-10 (procedures_icd10) A SAS Enterprise Guide task is used to convert these four datasets into MS Excel files. DIAGNOSIS_ICD9_18APR2017.xls PROCEDURE_ICD9_18APR2017.xls DIAGNOSIS_ICD10_18APR2017.xlsx PROCEDURE_ICD10_18APR2017.xlsx 3
A SAS Format Catalog For ICD-9/ICD-10 Create ICD-9 Diagnosis and Procedure SAS Formats (Display 2; Pages 3-4) SAS format for ICD-9 diagnosis codes and descriptions ( $dx_icd9f. ) was created. PROC IMPORT reads DIAGNOSIS_ICD9_18APR2017.xls containing 15,964 ICD-9 diagnosis codes and descriptions (Lines 36-39). In lines 42-50 a SAS DATA Step creates: start a list of diagnosis codes; label a concatenation of diagnosis code and description; and a SAS format named $dx_icd9f. PROC FORMAT stores format $dx_icd9f in library forcat6 (Lines 68-69). SAS format for ICD-9 procedure codes and descriptions ( $px_icd9f ) was also created using the same three step method (Lines 78-112). Create ICD-10 Diagnosis and Procedure SAS Formats (Display 3; Pages 5-7) SAS format for ICD-10 diagnosis codes and descriptions ( $dx_icd10f ) was created (Lines 46-88). SAS Enterprise Guide imports DIAGNOSIS_ICD10_18APR2017.xlsx to create WORK.DIAGNOSIS_ICD10_18APR2017 The above three step method was applied to create format $dx_icd10f. SAS format for ICD-10 procedure codes and descriptions ( $px_icd10f ) was also created using the same two step method (Lines 102-143). 4
A Data Research Example A researcher wants to investigate 25 diagnoses, 21 procedures and their descriptions for patients who had coronary artery bypass graft (CABG) surgery in March, June, September, and December of 2015. The researcher wants the ability to: Visually examine the results in MS Excel. Use MS Excel tools for graphical, tabular, and statistical analyses. Compile Macros that Identify CABG Surgery (Appendix 1; Pages 8-10) Two macro lists containing ICD-10 procedure codes (&cabgicd10, 296 codes; &cabgexclicd10, 4,645 codes) were created to identify Isolated and Non-isolated CABG surgery cases. A macro list gives the programmer the ability to search up to 5,000 diagnosis or procedure codes using one macro. Isolated CABG surgery means that no other major procedure was performed at the same time as the bypass surgery. Isolated CABG with another major procedure (exclusion) is called Nonisolated CABG which has a higher risk of mortality. Several macros are compiled which will identify CABG surgery cases using ICD-9 and ICD-10 procedure codes. 5
A Data Research Example Construct the Cohort Study Population (Appendix 2; Pages 11-16) The SAS format catalog is read (Lines 9-12). Identify Isolated and Non-isolated CABG surgery cases with either ICD-9 procedure codes (patient discharge before Oct 1, 2015) or ICD-10 procedure codes (patient discharge after Sept 30, 2015) (Lines 14-374). Note the difference between macros containing a single ICD-9 procedure code (Lines 227-330) with macros using a macro list (&cabgicd10; &cabgexclicd10) containing up to several thousand ICD-10 codes (Lines 332-352). Select patient data for the cohort population (Lines 375-384). Construct Diagnosis and Procedures Code Descriptions (Appendix 2; Pages 17-21) ICD-9 and ICD-10 diagnosis and procedure codes without the decimal point from OSHPD s administrative data are reconstructed to include the decimal point and description using the SAS format catalog. For example, ICD-9 diagnosis codes have a decimal in position four. Twenty-five diagnosis codes were reconstructed with the decimal point, and SAS format $dx_icd9f was applied to create 25 new text variables containing diagnosis code and description (Lines 424-483). 6
A Data Research Example Send Results to MS Excel (Appendix 2; Pages 21-24) PROC REPORT sends results to MS Excel using Tagset ExcelXP with several options to improve the appearance of the report (Lines 706-718). PROC REPORT defines each column using statements of define, display, and style that control column appearance (Lines 735-886). The complete result includes variables; month and year of patient discharge, hospital name, type of CABG surgery, birth date, admission date, CABG surgery date, discharge date, 25 diagnoses with descriptions; 21 procedures with descriptions; and procedure dates. Final Result (Appendix 3; Page 25) In March, June, September, and December of 2015 there were 5,412 patients who had CABG surgery. Appendix 3 displays part of the result. Month and year of patient discharge, and hospital name. Primary and secondary of 25 diagnosis codes and descriptions. Primary and secondary of 21 procedure codes and descriptions with procedure date. Includes both ICD-9 (09-2015) and ICD-10 (12-2015) diagnoses and procedures. 7
A Data Research Example Final Result This result enables the researcher to: Visually study 25 diagnoses and 21 procedures with descriptions for each patient without using look-up manuals and tables. Use MS Excel tools for graphical, tabular and statistical analyses. Additional benefits: Import the results into SAS Enterprise Guide for further study. Use macros or a macro list to: modify procedures in the current study cohort of CABG surgery; or use diagnosis codes to construct a new study cohort such as diagnosis of liver disease. An unlimited number of study cohorts are possible. The handout contains the SAS program code to create the SAS format catalog and create the spreadsheet in Appendix 3. 8
A Custom Reporting Example Each year OSHPD releases the California Report on CABG Surgery which presents findings from analyses of data collected from California-licensed hospitals that perform adult CABG surgery. This report features risk-adjusted operative mortality used to evaluate hospital and surgeon performance. To make fair comparisons of care delivered by different healthcare providers, the risk model adjusts for differences in severity of illness (case mix) of patients across providers. OSHPD reviews data submitted by each hospital for completeness and errors. A custom data discrepancy report (Springborn 2013) compares the CCORP clinical data to OSHPD s hospital administrative data source, the Patient Discharge Data (PDD). Hospitals are asked to review discrepancies between the two data sources via patient medical chart review to verify that coding for eleven data variables are consistent. Each of the eleven variables are defined by one or more ICD-9 /ICD-10 diagnosis or procedure codes. The data discrepancy report uses the SAS format catalog to display the diagnoses and procedures codes and descriptions of the patient record when there is a difference between the CCORP data and PDD data. 9
A Custom Reporting Example Appendix 4 Page 26; shows the first page of the data discrepancy report which lists eleven data variables and their definitions. Appendix 5 Page 27; shows data discrepancies for CABG-REPORTING can be either: Missing CABG cases (PDD CABG=YES; CCORP CABG=NO); or NON-CABG cases (PDD CABG=NO; CCORP CABG=YES). The PDD data source is the standard. Appendix 6 Page 28; gives an example of a Missing CABG case. The PDD record shows ICD-10 procedure code 02RG07Z: replacement of mitral valve with autologous tissue substitute, open approach which is a CABG surgery. However, the CCORP record showed no CABG surgery. So the hospital is asked SHOULD THIS CASE BE ADDED TO CCORP? Appendix 7 Page 29; gives an example of NON-CABG case. The PDD record does not show ICD-9 procedure code 36.1x which means no CABG surgery was performed. However, the CCORP record showed there was a CABG surgery. So the hospital is asked SHOULD THIS CASE BE REMOVED FROM CCORP? 10
A Custom Reporting Example Final Result This custom reporting example showed how a SAS format catalog was used to develop the report on Coronary Artery Bypass Graft (CABG) surgery. This custom report s main purpose is to help hospitals correctly report and classify all CABGs, thus ensuring the results are based on the highest quality data possible. This custom data discrepancy report was created with ODS Report Writing Interface (RWI) and ODS LAYOUT offered in the Output Delivery System (ODS) in SAS 9.4. ODS RWI and ODS LAYOUT were designed exclusively to address custom reporting requirements that go far beyond traditional tabular output produced by SAS procedures (Springborn 2017; Springborn 2013). Using ODS RWI and ODS LAYOUT with the SAS format catalog enables all users of administrative data to meet and exceed their own custom data reporting needs. 11
Literature Cited Springborn, R. 2013. Set Yourself Free Use ODS Report Writing Technology in SAS Enterprise Guide Instead of Dynamic Data Exchange in PC SAS Part II SAS Code Revealed Proceedings of the SAS Global Forum 2013 Conference. April 2013., Paper 016-2013. San Francisco, CA. http://support.sas.com/resources/papers/proceedings13/016-2013.pdf. Springborn, R. 2017. A SAS Format Catalog for ICD-9/ICD-10 Diagnoses and Procedures Proceedings of the Western Users of SAS Software Inc., 25 th Annual Education Forum and Conference. September 2017., Paper 067-2017. Long Beach, CA. https://www.lexjansen.com/wuss/2017/67_final_paper_pdf.pdf. 12
Contact Information Thanks for attending my talk. Name: Robert Richard Springborn, Ph.D. Enterprise: OSHPD, Healthcare Analytics Branch Address: 2020 West El Camino Avenue City, State ZIP: Sacramento, CA 95833 Work Phone: 916-326- 3874 Fax: E-mail: Robert.Springborn@oshpd.ca.gov Web: Twitter: 13