We're glad to announce ICD_GEMs.jl: a package that allows to translate ICD-9 codes in ICD-10 and viceversa via the General Equivalence Mappings (GEMs) of the International Classification of Diseases (ICD).
The package exports the latest GEMs release from the CDC and internally utilizes it to perform translations. To understand how GEMs work and the terminology and choices found throughout this package, please read the official documentation. It may be found in the package repository (here and here), or it may be downloaded, together with the GEMs, from the CDC's website.
GEMs and applied mappings are represented by the package via a custom type
GEM, and once a GEM (or an applied mapping) has been loaded (here we load an ICD10 -> ICD9 GEM from a CDC-formatted .txt source file) :
using ICD_GEMs path = "path/to/cdc_txt_file" direction = "I10_I9" # If the GEM translates from ICD-10 to ICD-9, otherwise "I9_I10" GEM_I10_I9_dictionary = get_GEM_dictionary_from_cdc_gem_txt(path, direction) # Or get_GEM_dictionary_from_cdc_gem_txt(path, direction)
It can be applied to perform custom translations:
ICD_10_neoplasms = ["C00-D48"] # This is equivalent as explicitly specifiying all codes from C00.XX to D48.XX ICD_9_neoplasm = execute_applied_mapping(GEM_I10_I9_dictionary, ICD_10_neoplasms)
Notice that the package supports the
- notation between pairs of codes, which is equivalent to specifying all codes in between separated by commas.
More complex translations, involving both single codes and ranges with arbitrary precision on both ends, can be performed:
execute_applied_mapping(GEM_I10_I9_dictionary, ["I60-I661", "I670", "I672-I679"])
For more information, please consider reading the documentation.
- Butler (2007), ICD-10 General Equivalence Mappings: Bridging the Translation Gap from ICD-9, Journal of AHIMA
- CMS (2018), 2018 ICD-10 CM and GEMs
- NCHS-CDC (2018), Diagnosis Code Set General Equivalence Mappings: ICD-10-CM to ICD-9-CM and ICD-9-CM to ICD-10-CM
- NCHS-CDC (2022), Comprehensive Listing ICD-10-CM Files (download General Equivalence Mappings here)