icd9 (version 1.3.1)

icd9InReferenceCode: match ICD9 codes

Description

Finds children of icd9Reference and looks for icd9 in the resulting vector.

Usage

icd9InReferenceCode(icd9, icd9Reference, isShort, isShortReference = TRUE)
icd9 %i9in% icd9Reference

Arguments

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.
isShortReference
logical, see argument isShort
"icd9, icd9Reference"
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".

Value

logical vector

Examples

Run this code
#%i9in% assumes both test code(s) and reference set of codes are \emph{short}
"1024" %i9in% "102"
"1024" %i9in% c("102","1025")
c("102", "1024","1025") %i9in% "102"
c("102", "1024","1025") %i9in% c("1024", "1025")
c("102", "1024","1025") %i9in% c("102", "1024", "1025")

Run the code above in your browser using DataLab