Learn R Programming

icd (version 3.3)

icd_classes_conflict: Check whether there are any ICD class conflicts

Description

Some classes cannot be simultaneously true for one vector of ICD codes, e.g. ICD-9-CM and ICD-9 from the WHO. This function returns TRUE if there are any such combinations of incompatible classes. If the constructor functions such as icd9cm() and icd10() are used, this should never happen.

Usage

icd_classes_conflict(x)

Arguments

x

input object to test for class conflicts

Examples

Run this code
# NOT RUN {
bad_codes <- c("100", "A01", "V100", "E999.0")
class(bad_codes) <- c("icd9", "icd10cm")
stopifnot(icd:::icd_classes_conflict(bad_codes))
# }

Run the code above in your browser using DataLab