API

ICD_GEMs.AbstractGEMType
AbstractGEM{T}

An abstract type representing a General Equivalence Map (GEM). T is the type of the low-level data structure used to represent the GEM.

source
ICD_GEMs.GEMType
struct GEM{T <: Union{DataFrame, OrderedDict{String, OrderedDict{String, Any}}}}

Represents a General Equivalence Map (GEM) table.

FIELDS

  • data<: Union{DataFrame,OrderedDict{String, OrderedDict{String, Any}}}: the actual GEM data, as returned by get_gem_dataframe_from_cdc_gem_txt or get_GEM_dictionary_from_cdc_gem_txt, so it may be a DataFrame or an OrderedDict;
  • direction::String: either "I9_I10" (from ICD-9 to ICD-10) or "I10_I9" (from ICD-10 to ICD-9).
source
ICD_GEMs.execute_applied_mappingMethod
execute_applied_mapping(GEM::GEM{OrderedDict{String, OrderedDict{String, Any}}}, source_codes::Vector{String})

Translate each element of source_codes to the target international classification contained in GEM using GEM.

source
ICD_GEMs.get_GEM_dataframe_from_cdc_gem_txtMethod
get_gem_dataframe_from_cdc_gem_txt(path_to_txt::String, direction::String)

Get a GEM{DataFrame} object from a .txt file as downloaded from the CDC website. path_to_txt is the path to the .txt file, while direction is the direction of the GEM file (either "I9_I10" or "I10_I9", see GEM).

source
ICD_GEMs.get_GEM_dictionary_from_cdc_gem_txtMethod
get_GEM_dictionary_from_cdc_gem_txt(path_to_txt::String, direction::String)

Return an OrderedDict representing the GEM file as downloaded from the CDC website. path_to_txt is the path to the .txt file, while direction is the direction of the GEM file (either "I9_I10" or "I10_I9", see GEM).

source
ICD_GEMs.get_ICD_code_rangeMethod
get_ICD_code_range(range::String)

Get all codes of revision revision between range[1] and range[2].

Parameters

  • range::String: must be a String of the form code_1-code_2, where code1 and code2 are two codes (whose revision is specified by revision);
  • revision::String: must be either "ICD-9" or "ICD-10".
source
ICD_GEMs.get_oomMethod
get_oom(x::Union{Float64,Int64})

Get the order of magnitude of x as a power of 10.

source