Creation of Procedure and Diagnosis Code Labels Accounting for Changes in ICD-9-CM coding over time. Charles Burchill Original: Nov. 1993. Revision: July 5, 1994. September 27, 1995. July 15, 1996 To create label formats for individual years for Procedures or Diagnosis ICD-9-CM codes use the following macro in your SAS program to generate label formats. Macro Call _ICD9L ; (Was _mkfmt) Options fmt - [REQUIRED] The type of ICD-9-CM labels you want. Only one format can be used in the macro call. fmt=proc produces labels for Procedures. fmt=diag produces labels for Diagnosis. syear - Start year for formats (e.g. syear=85). May be 4 digit, if two digit 19yy is assumed. The default uses the fiscal year in which Manitoba Health started to use the revised ICD-9-CM codes. eyear - End year of formats (e.g. eyear=87). May be 4 digit, if two digit 19yy is assumed. If only syear is passed a format for only that year is created. long - If format is to be used for a longitudinal study. This option Uses all the labels, but adds a year range to each. The years included in the longitudinal study depend on the actual years in the data. The output format will be called $procl, or $diagl depending on the fmt option. To use this format you must create a variable in your dataset in the form proc||year or diag||year where year is a 4 digit number. This is so the macro will attach the appropriate labels to the appropriate year. (Different years have different ICD labels). Syear and eyear have no effect on the format when this option is used; it can be left out. e.g. of new long variable: newproc = substr(proc,1,4)|| "19" || substr(datesep,1,2); long=long Can use with Medical Claims, but must physically add a space to the diag variable so that it is 4 chars long. i.e. longitudinal variable needs to be 6 chars long. print - print out changes in ICD-9-CM codes as listed in the labels database. (All Changes to labels) print=print debug - turn on mprint and notes (freq tables with missing variables and %'s) debug=debug ; Output temporary format(s) for either Diagnosis, or Procedures called $procXXl [$procl] or $diagXXl [$diagl] Where XX is the last two digits of the year in question. The format as it is assumes a 4 character procedure, or diagnosis. E.G. To create 4 digit diagnosis for DX01 use: diag4d=substr(dx01,1,4); Several Example calls * create procedure formats for years 1985-87 $proc85l, $proc86l, $proc87l; _icd9l syear=85 eyear=87 fmt=proc ; Data test; set diagtest; format diag $diag85l. ; run; * create diagnosis formats for year 1989; _icd9l syear=89 fmt=diag ; Additional Information. ICD-9-CM codes are usually revised, added or modified in October by ICD-9-CM. Manitoba Health starts using the new or revised codes at the start of the following fiscal year. The years in this program reflect the year in which Manitoba Health started to use the new codes. Any new or revised codes (including deletions) are marked by an asterisk. I also realize that the macro may not be very efficient. If it works I will update the program. - error checking will be added. - user suggestions - Create permanent formats for each year(s). I would like to get away from concatenating the year onto the icd code; any suggestions. Charles Burchill Feburary 1, 1996 The following instructions should be used when updating the procedure and diagnosis code data sets. These data sets are then used by the _icd9l macro to generate point in time, or longitudinal formats for either diagnosis, or procedure codes. The data sets are currently located in the directory /cpe/docs/diag.and.proc.labels procall.ssd01 is the procedures dataset. diagall.ssd01 is the diagnosis dataset. All the changes can be made using PFSEdit started by submiting the fsedit procedure. libname dplabels '/cpe/docs/diag.and.proc.labels' ; proc fsedit data=dplabels.procall; run; *** Before making any changes to these data sets make a copy of them. After updating the data sets make sure they work. 1. New ICD codes: Add a new observation. Enter the ICD code in the DIAG (or PROC) variable. Enter Label with Starting with ICD code in the LABEL variable. Put an * in col 7 to indicate that it is a new or changed ICD code. e.g. 32.09 *OTH LOS ECX/DEST LESN/TISS BRONCHUS Enter 'New Code' in the COMENT variable Enter the year that ICD added the code in the ICDYR variable. Enter the year Manitoba health started using the new code in the YEAR variable. This is usually ICDYR + 1. Enter the ICD revision (currently 9) in the ICD variable. 2. Revised ICD codes: Add a new observation Enter the ICD code in the DIAG (or PROC) variable. Enter the Label starting with the ICD code in the LABEL variable. Put an * in col 7 to indicate that it is a revised ICD code. Edit the existing record with the same ICD code by adding and * in col 7 to indicate that it has been revised - forward looking revison. Enter 'revised' in the COMMENT variable Enter the year that ICD added the code in the ICDYR variable. Enter the year Manitoba health started using the new code in the YEAR variable. This is usually ICDYR + 1. Enter the ICD revision (currently 9) in the ICD variable. 3. Deleted ICD codes: Add a new observation Enter the ICD code in the DIAG (or PROC) variable. Enter the Label starting with the ICD code in the LABEL variable. Put an * in col 7 and DELETED starting in col 8 Edit the existing record with the same ICD code by adding and * in col 7 to indicate that it has been revised - forward looking revison. NOTE: If adding 'DELETED' makes the label longer than the field then drop the corresponding number of characters off the end of the label. Enter 'DELETED' in the COMMENT variable Enter the year that ICD deleted the code in the ICDYR variable. Enter the year Manitoba health stopped using the new code in the YEAR variable. This is usually ICDYR + 1. Enter the ICD revision (currently 9) in the ICD variable.