icd_map {touch} | R Documentation |
This function provides an open-source implementation in R similar to the Mapping tool developed by the Agency for Healthcare Research and Quality (AHRQ). It translates the ICD diagnosis codes to the a different version by the General Equivalence Mappings (GEMs) developed by the National Center for Health Statistics, Centers for Medicare and Medicaid Services (CMS), AHIMA, the American Hospital Association, and 3M Health Information Systems. The CMS GEMs currently consist of the forward mapping from ICD-9 codes to ICD-10 codes and the backward mapping from ICD-10 codes to ICD-9 codes. In addition to these two mappings, the Agency for Healthcare Research and Quality (AHRQ) also proposed translation by using the reverse mappings and multi-stage procedure.
icd_map(dx, from = 9, to = 10, year = 2018, method = c("gem", "reverse-gem", "both", "multi-stage"), decimal = FALSE, nomatch = c('""', NA), output = c("character", "list", "tidy-data"), cache = TRUE, ...)
dx |
A character vector representing diagnosis codes. Each element of the vector can either represent individual diagnosis code or a set of diagnosis codes that are concartenated by commas in between. |
from |
A integer value specifying the original code version.
Currently, the available options are |
to |
A integer value specifying the original code version.
Currently, the available options are |
year |
A numeric value specifying the year of the CMS GEMs. The
currently available options are |
method |
A character string specifying the translateion method. The
available options are |
decimal |
A logical value. If |
nomatch |
A character string indicating no translation result can be
found through the specified mapping. By default, empty strings,
|
output |
A character value specifying the format of the output. The
avaiable options are |
cache |
A logical value specifying whether to cache all the mappings
for |
... |
Other arguments for future usage. A warning will be thrown out
if any argument goes into |
Taking the translation from ICD-9 codes to ICD-10 codes as an example, the
procedure is elaborated as follows: In stage one, the input ICD-9 codes
are mapped to ICD-10 codes using the ICD-9 to ICD-10 forward map as well
as the reverse of the ICD-10 to ICD-9 backward map. If multiStage =
FALSE
, the procedure will return the translation results from stage one
(and skip the following stages). Otherwise, the procedure will continue
and become a multiple stage process. In stage two, the ICD-10 codes
output from the stage one are mapped back to ICD-9 codes using the
backward map as well as the reverse of the forward map; In stage three, it
applies the forward map and reverse-backward map used in stage one again
to the ICD-9 codes from the stage two and return the resulting ICD-10
codes.
A character vector of the same length with the input vector will
be returned by default or if output = "charactor"
. A list of
character vectors will be returned if output = "list"
; A data
frame in tidy-format will be returned if output = "tidy-data"
.
See argument output
for details.
Wenjie Wang <wenjie.2.wang@uconn.edu>
2017-ICD-10-CM-and-GEMs. The U.S. Centers for Medicare & Medicaid Services. 22 August, 2016. https://www.cms.gov/Medicare/Coding/ICD10/2017-ICD-10-CM-and-GEMs.html. Accessed 28 September, 2018.
2018-ICD-10-CM-and-GEMs. The U.S. Centers for Medicare & Medicaid Services. 11 August, 2017. https://www.cms.gov/Medicare/Coding/ICD10/2018-ICD-10-CM-and-GEMs.html. Accessed 28 September, 2018.
The AHRQ MapIT Automated In-house Stand-alone Mapping Tool. Agency for Healthcare Research and Quality. 26 March, 2018. https://www.qualityindicators.ahrq.gov/resources/toolkits.aspx. Accessed 28 September, 2018.
library(touch) ### some random ICD-9 and ICD-10 codes icd9codes <- c("0011", "001.1", "316", "29383", "E9808", "V90") icd10codes <- c("F0390", "F0630", "F54", "F30.13", "A010", "M61019") ### forward mapping from ICD-9 to ICD-10 icd_map(icd9codes) icd_map(icd9codes, decimal = TRUE, nomatch = NA) ### backward mapping from ICD-10 to ICD-9 icd_map(icd10codes, from = 10, to = 9) icd_map(icd10codes, from = 10, to = 9, nomatch = NA, output = "list") icd_map(icd10codes, from = 10, to = 9, decimal = TRUE, nomatch = NA, output = "tidy") ### reverse-backward mapping from ICD-9 to ICD-10 icd_map(icd9codes, method = "reverse-gem") icd_map(icd9codes, method = "reverse", decimal = TRUE, nomatch = NA) ### reverse-forward mapping from ICD-10 to ICD-9 icd_map(icd10codes, from = 10, to = 9, method = "reverse-gem") icd_map(icd10codes, from = 10, to = 9, method = "reverse", decimal = TRUE, nomatch = NA) ### forward and reverse-backward mapping from ICD-9 to ICD-10 icd_map(icd9codes, method = "both") icd_map(icd9codes, method = "both", decimal = TRUE, nomatch = NA) ### backward and reverse-forward mapping from ICD-10 to ICD-9 icd_map(icd10codes, from = 10, to = 9, method = "both") icd_map(icd10codes, from = 10, to = 9, method = "both", decimal = TRUE, nomatch = NA) ### multi-stage process mapping ICD-9 to ICD-10 icd_map(icd9codes, method = "multi-stage") icd_map(icd9codes, method = "multi-stage", decimal = TRUE, nomatch = NA) ### multi-stage process mapping ICD-10 to ICD-9 icd_map(icd10codes, from = 10, to = 9, method = "multi-stage", cache = FALSE) icd_map(icd10codes, from = 10, to = 9, method = "multi-stage", decimal = TRUE, nomatch = NA, cache = FALSE)