find_billable {touch} | R Documentation |
This function tries to find all the billable ICD codes that can be translated by CMS GEMs for each of the input diagnosis codes representing a major category.
find_billable(dx, version = 10, year = 2018,
match_all = TRUE, decimal = FALSE,
output = c("character", "list", "tidy-data"), ...)
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. |
version |
A numeric value specifying the version of the diagnosis
codes that should be either |
year |
A numeric value specifying the year of the CMS GEMs. The
currently available options are |
match_all |
A logical value specifying the strategy for finding
billable codes based on the input diagnosis category. If |
decimal |
A logical value. If |
output |
A character value specifying the format of the output. The
avaiable options are |
... |
Other arguments for future usage. A warning will be thrown out
if any argument goes into |
It is designed to be used with the function icd_map
for
translating the diagnosis codes that are not billable but representing
major categories. Notice that only the character vector output can be
directly passed to the function icd_map
for translation.
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>
icd_map
library(touch)
### for ICD-9 codes
icd9_major <- c("001", "316", "808", NA, "not_a_dx")
## find all billable codes under the major category
find_billable(icd9_major, version = 9)
## find the billable codes right under the major category
(icd9_billable <- find_billable(icd9_major, version = 9,
match_all = FALSE))
## compare the translation results
icd_map(icd9_major, nomatch = NA)
icd_map(icd9_billable, nomatch = NA)
### for ICD-10 codes
icd10_major <- c("T36.0X2", "T36.3X2", "T38.6X2")
## find all billable codes and output in different formats
find_billable(icd10_major, version = 10)
find_billable(icd10_major, version = 10, output = "list")
find_billable(icd10_major, version = 10, output = "tidy-data")
## add decimal if wanted
(icd10_billable <- find_billable(icd10_major, version = 10, decimal = TRUE))
## compare the translation results
icd_map(icd10_major, from = 10, to = 9, nomatch = NA)
icd_map(icd10_billable, from = 10, to = 9)