Learn R Programming

icd (version 2.2)

is.icd_short_diag: test ICD-related classes

Description

currently no checks on correctness of the classes for these functions

Usage

is.icd_short_diag(x, must_work = FALSE)

is.icd_decimal_diag(x, must_work = FALSE)

is.icd9(x)

is.icd10(x)

is.icd9cm(x)

is.icd10cm(x)

is.icd_long_data(x)

is.icd_wide_data(x)

is.icd_comorbidity_map(x)

Arguments

x

Any object which may have ICD-related classes set

must_work

single logical value, if FALSE (the default) this may return NULL if the attribute is not present. If TRUE, then either TRUE or FALSE is returned.

Details

is.icd_short_diag tests for presence of an attribute, not whether the code is a valid ICD code. If must_work is TRUE then NULL (i.e. no attribute set) returns FALSE, otherwise NULL is returned.