icd_children: Get children of ICD codes

Description

Expand ICD codes to all possible sub-codes, optionally limiting to those codes which are defined or billable (leaf nodes).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
icd_children(x, ...)

## S3 method for class 'character'
icd_children(x, ...)

## S3 method for class 'icd9'
icd_children(x, short_code = icd_guess_short(x),
  defined = TRUE, billable = FALSE, ...)

## S3 method for class 'icd10'
icd_children(x, short_code = icd_guess_short(x), defined,
  billable = FALSE, ...)

## S3 method for class 'icd10cm'
icd_children(x, short_code = icd_guess_short(x), defined,
  billable = FALSE, ...)

Arguments

x

data, e.g. character vector of ICD codes.

...

arguments passed on to other functions

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.

defined

single logical value, whether returned codes should only include those which have definitions. Definition is based on the ICD version being used, e.g. ICD-9-CM, the WHO version of ICD-10, or other.

billable

single logical value, whether to limit return codes also by whether they are billable, i.e. leaf nodes. This is really only designed for use with ICD-9-CM, ICD-10-CM etc, since the WHO versions are not designed for billing, but for public health and death reporting.

Methods (by class)

See Also

Other ICD-9 ranges: icd_condense, icd_expand_minor, icd_expand_range

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
library(magrittr, warn.conflicts = FALSE, quietly = TRUE) # optional

# no children other than self
icd_children("10201", short_code = TRUE, defined =FALSE)

# guess it was ICD-9 and a short, not decimal code
icd_children("0032")

# empty because 102.01 is not meaningful
icd_children("10201", short_code = TRUE, defined =TRUE)
icd_children("003", short_code = TRUE, defined =TRUE) %>%
  icd_explain(condense = FALSE, short_code = TRUE)

icd_children(short_code = FALSE, "100.0")
icd_children(short_code = FALSE, "100.00")
icd_children(short_code = FALSE, "2.34")

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.