[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)

It can be applied to perform custom translations:

# Translate codes from ICD-10 to ICD-9
ICD_10_neoplasms = ["C00-D48"] # This is equivalent as explicitly specifiying all codes from C00.XX to D48.XX separated by commas
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.

Discussions, issues and PRs are always welcome!

References

Contacts

Author GitHub Twitter Discourse
Pietro Monticone @pitmonticone @PietroMonticone @PietroMonticone
Claudio Moroni @ClaudMor @Claudio__Moroni @claudio20497
10 Likes

Quick suggestion if there is time: rename the package to ICDGEMs.jl if there is time. It is not common to use underscores in package names.

1 Like

Thank you very much for the feedback.

We’ll certainly consider changing name in the near future.

5 Likes

How exciting @PietroMonticone and congrats on the package release!
This looks super interesting and something I may experiment with in the near future.
Do you have any interest in hosting it in JuliaHealth?
I would be happy to help migrate it over there with you as it could help with discovery while you continue to maintain full permissions to the repo.

~ tcp :deciduous_tree:

4 Likes

Hi @TheCedarPrince, thank you very much for your interest in this package that I’ve co-authored with @claudio20497.

It’d be great to host ICD_GEMs.jl in the JuliaHealth organization.

What should we do next? Enter the GitHub organization? How can we help?

4 Likes

Hey @PietroMonticone !

Not too much needs to be done actually - shouldn’t take more than an hour or so.
Would you be willing to coordinate setting a time to have a chat (or one of the coauthors such as @claudio20497 ) over email?
My email is jacobszelko@gmail.com and I could explain the process and if you are comfortable with things, we could go ahead with moving the repository to JuliaHealth all in the same call. :slight_smile:

2 Likes

Yes, it sounds good!

Please feel free to write your preferred dates and times to our collective email address inphyt@gmail.com.

2 Likes