Learn R Programming

icd (version 3.3)

explain_table: Explain ICD-9 and ICD-10 codes in English from decimal (123.45 style), Tabulates the decimal format alongside converted non-decimal format.

Description

Output is ordered in the same order as the input. A logical column ismajor indicates if the code is a parent Category.

Usage

explain_table(...)

# S3 method for default explain_table(x, short_code = guess_short(x), condense = FALSE, brief = TRUE, warn = TRUE, ...)

# S3 method for icd9 explain_table(...)

# S3 method for icd10 explain_table(...)

# S3 method for icd9cm explain_table(x, short_code = guess_short(x), condense = FALSE, brief = TRUE, warn = TRUE, ...)

# S3 method for icd10cm explain_table(x, short_code = guess_short(x), condense = FALSE, brief = TRUE, warn = TRUE, ...)

icd_explain_table.default(...)

icd_explain_table.icd10(...)

icd_explain_table.icd10cm(...)

icd_explain_table.icd9(...)

icd_explain_table.icd9cm(...)

icd_explain_table(...)

Arguments

...

arguments passed on to other functions

x

vector or other structure of ICD codes to explain in human language

short_code

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.

condense

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 sub-types.

brief

single logical value, default is FALSE. If TRUE, the short description from the canonical CMS descriptions 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.

...

arguments passed on to other functions

Value

data frame with fields for ICD-9 code, name and description. The ordering is in the same order as input, including rows filled with NA for invalid input codes

Methods (by class)

  • default: explaining ICD codes from a character vector, guessing ICD version

  • icd9: from vector of ICD-9 codes.

  • icd10: from vector of ICD-10 codes.

  • icd9cm: explain character vector of ICD1-10-CM codes

  • icd10cm: explain character vector of ICD1-10-CM codes

Deprecated function names

Future versions of icd will drop the icd_ prefix. For example, charlson should be used in favor of icd_charlson. To distinguish icd function calls, consider using the prefix icd:: instead, e.g., icd::charlson. Functions which specifically operate on either ICD-9 or ICD-10 codes or their sub-types will retain the prefix. E.g. icd9_comorbid_ahrq. icd specific classes also retain the prefix, e.g., icd_wide_data.

Details

If the code is both a valid ICD9 and a ICD10 the output will default the descriptions to ICD10. The code would otherwise have to be explicitly cast to get ICD9 descriptions.

A column for source year may be added in the future. Other changes may occur this new feature gets testing and use.

If the input x is of mixed type it will choose to convert by