is_defined: Check whether ICD-9 codes exist

Description Usage Arguments Details Value Methods (by class)

View source: R/real.R

Description

This is different from syntactic validity: it looks up codes in the canonical lists published by the CMS.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
is_defined(x, short_code = guess_short(x), ...)

## S3 method for class 'icd9'
is_defined(
  x,
  short_code = guess_short(x),
  billable = FALSE,
  leaf = billable,
  ...
)

## S3 method for class 'icd10cm'
is_defined(
  x,
  short_code = guess_short(x),
  billable = FALSE,
  leaf = billable,
  ...
)

## S3 method for class 'icd10'
is_defined(
  x,
  short_code = guess_short(x),
  billable = FALSE,
  leaf = billable,
  ...
)

## Default S3 method:
is_defined(x, short_code = guess_short(x), ...)

Arguments

x

vector if ICD codes to test whether defined in certain ICD code list

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.

...

arguments passed on to other functions

billable

single logical value, identical to 'leaf'. Leaf is preferred as most adaptations of WHO ICD codes are not oriented around money.

leaf

New synonym for 'billable', which will be deprecated.

Details

The source data from CMS, and code to generate the R data are included in the source tree of this package.

Value

logical vector

Methods (by class)


jackwasey/icd documentation built on Nov. 23, 2021, 9:56 a.m.