Learn R Programming

icd9 (version 0.2.1)

icd9ValidDecimal: check whether decimal icd9 codes are valid

Description

Check validity of 'long' (i.e. decimal form) ICD9 codes. The codes may be numeric disease descriptiors or V or E prefixed.

Usage

icd9ValidDecimal(icd9Decimal)

icd9ValidDecimalV(icd9Decimal)

icd9ValidDecimalE(icd9Decimal)

icd9ValidDecimalN(icd9Decimal)

Arguments

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 with T or F for each icd9 code provided according to validity

Details

Long form is not ambiguous so additional zeroes are tolerated. Although integer ICD-9 codes could be correct, there is a difference between 100 and 100.0, and indeed 100.00. Therefore, character class is enforced to avoid this problem.

See Also

http://www.stata.com/users/wgould/icd9/icd9.hlp url{http://www.sascommunity.org/wiki/Validate_the_format_of_ICD-9_codes}

Other ICD9 validation: icd9GetInvalidMappingDecimal, icd9GetInvalidMappingShort, icd9ValidMapping, icd9ValidMappingDecimal, icd9ValidMappingShort; icd9ValidMajor; icd9ValidNaWarnStop, icd9ValidNaWarnStopDecimal, icd9ValidNaWarnStopShort; icd9ValidShort, icd9ValidShortE, icd9ValidShortE, icd9ValidShortN, icd9ValidShortN, icd9ValidShortV, icd9ValidShortV; icd9Valid; stopIfInvalidIcd9, warnIfInvalidIcd9