combine: Combine ICD codes

Description Usage Arguments See Also Examples

Description

These function implement ICD specific methods for c, i.e., combinations of lists or vectors of codes, while preserving ICD classes. Base R c just drops all user defined classes and casts down to lowest common denominator, e.g. if mixing numbers and characters. No attempt here to catch all possible combinations of feeding in mixed ICD types and other types. Let R do what it normally does, but just try to keep classes of the first item in the list.

Usage

1
2
3
4
5
## S3 method for class 'icd9'
c(..., warn = FALSE)

## S3 method for class 'icd10'
c(..., warn = FALSE)

Arguments

...

elements to combine

warn

single logical value, if TRUE, will give warnings when incompatible types are combined using c

See Also

ICD data types

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Care with the following:
c(as.icd9("E998"), as.icd10("A10"))
# which results in both codes sharing the 'icd9' class.
# ICD-10 codes
(a <- as.icd10("A100SSX"))
(b <- as.icd10("Z999A"))
c(a, b)
c(as.icd_short_diag(a), as.icd_short_diag(b))
(d <- as.icd10("A10.0SSX"))
(e <- as.icd10("Z99.9A"))
c(d, e)
c(as.icd_decimal_diag(d), as.icd_decimal_diag(e))
# warn when mixing attribute types
suppressWarnings(
  c(as.icd_short_diag(a), as.icd_decimal_diag(e))
)

icd documentation built on July 2, 2020, 4:07 a.m.