** ICD-10 to ICD-9 for Vital Stats Data ; ** Formats for conversion to ICD9 ; ******************************************; $dx10_9f - convert ICD-10-CA diagnosis codes to ICD-9-CM icd9dx = put(ICD10dx,$dx10_9f.) ; ** Convert ICD-10-CA to ICD-9-CM ; icd9dx_grade = put(ICD10dx,$dx10_9g.) ; ** Grade of conversion ; $op10_9f - Convert CCI to ICD-9-CM icd9op = put(ICD10op,$op10_9f.) ; ** Convert CCI to ICD-9-CM ; icd9op_grade = put(ICD10op,$op10_9g.) ; Grade of conversions ; Unknown value of ICD-9-CM - 'UNK' Unknown grade of conversion - 'U' ** this format is used to identify the few codes that are not captured by the code below. ; proc format ; value $nd10_9f "A16 "-"A1699" ='011' "B20 "-"B2099","B21 "-"B2199","B22 "-"B2299","B23 "-"B2399"="042" "E148 " ="250" "D37 "-"D3799" ="2351" "G82 "-"G8299"="3441" "G938 "="3488" "J38 "-"J3899"="4783" "J46 "-"J4699"="493" other="000"; run; data test ; set rreg.vslk0112 ; length icd9 $6 ; if icdx1 = '' then do ; nomatch = 0; **** Codes match CIHI as they stand; icd9 = put(icd10cod,$dx10_9f.); icd9_grade = put(icd10cod,$dx10_9g.); ***Codes match with one additional 0; if icd9 = "UNK" then do; icd9 = put(trim(icd10cod)||"0",dx10_9f.); icd9_grade = put(trim(icd10cod)||"0",$dx10_9g.); nomatch = 1; end; ******Codes match with two additional 0; if icd9 = "UNK" then do; icd9 = put(trim(icd10cod)||"00",dx10_9f.); icd9_grade = put(trim(icd10cod)||"00",$dx10_9g.); nomatch = 2; end; ****** Codes match when substring the first three This captures only I11 - I13 codes Hypertensive heart and renal disease; if icd9 = "UNK" then do; icd9 = put(substr(icd10cod,1,3),$dx10_9f.); icd9_grade = put(substr(icd10cod,1,3),$dx10_9g.); nomatch = 3; end; ****** Add the codes not captured at all by CIHI conversion ; if put(ICD10COD,$nd10_9f.) ne '000' then do; icd9_grade = "3"; icd9=put(ICD10COD,$nd10_9f.); nomatch = 4 ; end; end ; ** Add E codes to ICDX1 variable so they match with the converted ICD-9-CM codes. See the concept on Vital Statistics and ICD9 codes for more information ; if icd9 = '' then do ; if substr(icdx1,1,1) in('8','9') then icd9 = compress('E' || icdx1) ; else icd9 = icdx1 ; end ; ** I have limited the length of the ICD9 code to the level that is probably most appropriately comparable, and most commonly used. Coding to the three character level also means that the 'kludge' used to get a match at the 5th and 6th digit are not used ; if substr(icd9,1,1) = 'E' then icd9 = substr(icd9,1,4) ; else icd9 = substr(icd9,1,3) || ' ' ; run; When one or two '0's are added to the ICD10 code there is generally only one ICD-9-CM code that matches the whole category. There are a few additional codes that are not captured using the above. Where there have been modifications the grade should be noted as '3'. These modifications have been supplied in the above format and should be reviewed prior to running any new year of data. The additional codes include: ICD10 ICD9-CM Notes A16__ - 011,012 Tuberculosis B20_ - 042 HIV related codes CIHI codes as B24 B21_ - 042 HIV related codes CIHI codes as B24 B22_ - 042 HIV related codes CIHI codes as B24 B23_ - 042 HIV related codes CIHI codes as B24 D37_ - 2351 Neoplasm of uncertain or unknown behavior of oral cavity and digestive organs E148 - 250 Unspecified Diabetes G82_ - 3441 Paraplegic G938 - 3488 Other conditions of the brain J38_ - 4783 Paralysis of vocal cords or larynx J46_ - 493 Asthma