icd9IsReal: Check whether ICD-9 codes exist

Description Usage Arguments Value Functions

View source: R/real.R

Description

This is different from syntactic validity: it looks it up in the canonical list of ICD-9 codes published by the CMS, and which are included in this package under extdata. Checking syntactic validity using link{icd9IsValid} etc. is still useful, with a changing list of icd-9 codes over time, and possible imperfections in the master lists derived from CMS.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
icd9IsReal(icd9, isShort = icd9GuessIsShort(icd9), onlyBillable = FALSE)

icd9IsRealShort(icd9Short, onlyBillable = FALSE)

icd9IsRealDecimal(icd9Decimal, onlyBillable = FALSE)

icd9GetReal(icd9, isShort = icd9GuessIsShort(icd9), onlyBillable = FALSE)

icd9GetRealShort(icd9Short, onlyBillable = FALSE)

icd9GetRealDecimal(icd9Decimal, onlyBillable = FALSE)

Arguments

icd9

is a character vector or factor of ICD-9 codes. If fewer than five characters is given in a code, then the digits are greedily assigned to hundreds, then tens, then units, before the decimal parts. E.g. "10" becomes "010", not "0010".

isShort

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.

onlyBillable

single logical value (default FALSE), if TRUE will divert to test whether the codes are in the billable list instead of seeing if they are any leaf or branch node.

icd9Short

is a character vector of ICD-9 codes. If fewer than five characters is given in a code, then the digits are greedily assigned to hundreds, then tens, then units, before the decimal parts. E.g. "10" becomes "010", not "0010"

icd9Decimal

character vector of ICD-9 codes. If fewer than five characters is given in a code, then the digits are greedily assigned to hundreds, then tens, then units, before the decimal parts. E.g. "10" becomes "010", not "0010"

Value

logical vector

Functions


jackwasey/icd9 documentation built on May 18, 2019, 7:57 a.m.