convert full format (123.45 style) ICD9 codes into the name and description for human review there are official ICD9-CM data tables, not with conversion to decimal notation, but to the textual format.
icd9Explain(icd9, isShort = icd9GuessIsShort(icd9), doCondense = TRUE,
brief = FALSE, warn = TRUE)icd9ExplainShort(icd9Short, doCondense = TRUE, brief = FALSE, warn = TRUE)
icd9ExplainDecimal(icd9Decimal, doCondense = TRUE, brief = FALSE,
warn = TRUE)
# S3 method for list
icd9Explain(icd9, isShort = icd9GuessIsShort(icd9),
doCondense = TRUE, brief = FALSE, warn = TRUE)
# S3 method for character
icd9Explain(icd9, isShort = icd9GuessIsShort(icd9),
doCondense = TRUE, brief = FALSE, warn = TRUE)
# S3 method for numeric
icd9Explain(icd9, isShort = icd9GuessIsShort(icd9),
doCondense = TRUE, brief = FALSE, warn = FALSE)
is a character vector of ICD-9 codes. If fewer than five characters is given in a code, then the digits are greedily assigned to hundreds, then tens, then units, before the decimal parts. E.g. "10" becomes "010", not "0010"
single logical value which determines whether the ICD-9 code provided is in short (TRUE) or decimal (FALSE) form. Where reasonable, this is guessed from the input data.
single logical value which indicates whether to condense the given set of ICD-9 codes by replacing subsets of codes with 'parent' codes which exactly encompass certain subsets. E.g. If all cholera diagnoses are provided, only '001 - Cholera' needs to be displayed, not all subtypes. This is currently partially implemented. See issue #3 in github.
single logical value, default is FALSE
. If TRUE
,
the short description from the canonical CMS descriptions (included in
extdata
) will be used, otherwise the long description is used.
single logical value, default is TRUE
, meaning that codes
which do not correspond to diagnoses, or to three-digit codes, will trigger
a warning.
is a character vector of ICD-9 codes. If fewer than five characters is given in a code, then the digits are greedily assigned to hundreds, then tens, then units, before the decimal parts. E.g. "10" becomes "010", not "0010"
character vector of ICD-9 codes. If fewer than five characters is given in a code, then the digits are greedily assigned to hundreds, then tens, then units, before the decimal parts. E.g. "10" becomes "010", not "0010"
data frame, or list of data frames, with fields for ICD9 code, name and description, derived from datamart lookup table
list
: explain all ICD-9 codes in a list of vectors
character
: explain character vector of ICD-9 codes
numeric
: explain numeric vector of ICD-9 codes, with warning
package comorbidities
# NOT RUN {
icd9ExplainShort(ahrqComorbid[[1]][1:3])
icd9ExplainShort(ahrqComorbid[[1]][1:3], brief = TRUE)
# }
Run the code above in your browser using DataLab