Quickly attach ICD-10 and ICD-9/ICD10-CM codes descriptions to a data.table
icd_desc.Rd
Quickly attach ICD-10 and ICD-9/ICD10-CM codes descriptions to a data.table
Usage
icd_desc(
x,
code_col = "code",
vocab_col = "vocabulary_id",
simplify = FALSE,
keep_old = NULL
)
Arguments
- x
a data.table with phecodes to merge in descriptions and other metadata
- code_col
name of column in `x` that contains ICD codes
- vocab_col
name of column in `x` that contains ICD vocabulary (ICD9CM, ICD10, or ICD10CM)
- simplify
if TRUE, only return `code_col`, `vocabulary_id`, and `description` columns
- keep_old
if not NULL, keep additional columns from `x`
Examples
if (FALSE) { # \dontrun{
icd <- data.frame(
vocabulary_id = c("ICD9CM", "ICD10CM"),
code = c("185", "F32.A")
)
icd_desc(icd)
} # }