Calculate comorbidities, Charlson scores, perform fast and accurate validation, conversion, manipulation, filtering and comparison of ICD-9 and ICD-10 codes. This package enables a work flow from raw lists of ICD codes in hospital databases to comorbidities. ICD-9 and ICD-10 comorbidity mappings from Quan (Deyo and Elixhauser versions), Elixhauser and AHRQ included. Common ambiguities and code formats are handled.
comorbidities for a set of patients with one or more ICD codes each. All
the comorbidity functions attempt to guess which are your identifier and
ICD code fields, and these can also be specified exactly.
The AHRQ comorbidity mappings from ICD-9 and ICD-10 are provided as
icd10_map_ahrq. The easiest
way to use them is by calling the function
directly with your
icd_long_data format patient data.
Quan revised both Deyo/Charlson and Elixhauser ICD-9 and ICD-10 to
comorbidity mappings. These are presented as:
Like the AHRQ mappings, these are all carefully extracted from the original
publications or source code. These mappings can be used on patient data by
There is no canonical Charlson ICD-9 or ICD-10 mapping, so
comorbid_charlson uses the thoroughly researched and widely
comorbid_quan_deyo method by default.
The original Elixhauser mappings are provided by the lists
Elixhauser comorbidities can be calculated directly from patient data using
AHRQ publishes Hierarchical Condition Codes (HCC) which are
essentially comorbidity maps with very many comorbidities, complicated by a
single- or multi-level system. These categories can be computed using
AHRQ also publishes Clinical Classification Software (CCS) which
provides another set of disease groups, and this SAS code is implemented in
charlson calculates Charlson scores (Charlson Comorbidity
Indices) directly from your patient data. If you already calculated the
Charlson comorbidities, it is more efficient to use
calculates Van Walraven scores (based on the Elixhauser comorbidities,
instead of Charlson), and
van_walraven_from_comorbid if you
already calculated Elixhauser comorbidities
is_valid checks whether ICD-9 codes are syntactically valid
(although not necessarily genuine ICD-9 diagnoses). In contrast,
is_defined checks whether ICD-9 codes correspond to diagnoses
in the current ICD-9-CM definition from CMS.
There are many functions to convert ICD-9 codes or their components between
different formats and structures. The most commonly used are:
short_to_decimal to convert,
e.g., 002.3 to 0023 and back again. See convert for other options.
Conversion between ICD-9, ICD-10, and ICD-11 codes is not yet supported.
You can find children of a higher-level ICD-9 code with
children and find a common parent to a set of children (or
arbitrary list of ICD-9 codes) with
sort_icd sorts in hierarchical, then numerical order, so
'100.0' comes before '100.00', for example.
long_to_wide convert the two
most common data structures containing patient disease data. This is more
sophisticated and tailored to the problem than base reshaping or packages
like dplyr, although these could no doubt be used.
explain_code to convert a list of codes into
human-readable descriptions. This function can optionally reduce the codes
to a their top-level groups if all the child members of a group are
diff_comorbid allows summary of the differences
between comorbidity mappings, e.g. to find what has changed from
year-to-year or between revisions by different authors.
icd9cm_hierarchy is a
data.frame containing the full
ICD-9 classification for each diagnosis.
contains definitions of chapters, sub-chapters and three-digit groups.
Jack O. Wasey [email protected]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.