Julia Community 🟣

[ANN] ICD_GEMs.jl: A Package to Translate Between ICD-9 and ICD-10 Codes

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)
Enter fullscreen mode Exit fullscreen mode

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)  
Enter fullscreen mode Exit fullscreen mode

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"])
Enter fullscreen mode Exit fullscreen mode

For more information, please consider reading the documentation.

Discussions, issues and PRs are always welcome!

References

Contacts

Author GitHub Twitter
Pietro Monticone @pitmonticone @PietroMonticone
Claudio Moroni @ClaudMor @Claudio__Moroni

Top comments (1)

Collapse
 
logankilpatrick profile image
Logan Kilpatrick

This is awesome to see!! Glad you all are taking advantage of Forem for package announcements.