icd9Explain: explain ICD9 codes

Description Usage Arguments Value Methods (by class) See Also Examples

View source: R/explain.R

Description

convert 'decimal' 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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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 class 'list'
icd9Explain(icd9, isShort = icd9GuessIsShort(icd9),
  doCondense = TRUE, brief = FALSE, warn = TRUE)

## S3 method for class 'factor'
icd9Explain(icd9, isShort = icd9GuessIsShort(icd9),
  doCondense = TRUE, brief = FALSE, warn = TRUE)

## S3 method for class 'character'
icd9Explain(icd9, isShort = icd9GuessIsShort(icd9),
  doCondense = TRUE, brief = FALSE, warn = TRUE)

## S3 method for class 'numeric'
icd9Explain(icd9, isShort = icd9GuessIsShort(icd9),
  doCondense = TRUE, brief = FALSE, warn = FALSE)

Arguments

icd9

is a character vector or factor 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".

isShort

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.

doCondense

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.

brief

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.

warn

single logical value, default is TRUE, meaning that codes which do not correspond to diagnoses, or to three-digit codes, will trigger a warning.

icd9Short

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"

icd9Decimal

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"

Value

data frame, or list of data frames, with fields for ICD9 code, name and description, derived from datamart lookup table

Methods (by class)

See Also

package comorbidities

Examples

1
2

jackwasey/icd9 documentation built on May 18, 2019, 7:57 a.m.