Learn R Programming

icd9 (version 0.2.1)

icd9DecimalToShort: convert between icd9 decimal and short formats

Description

converted decimal ICD9 code, e.g. 123.45 to 'short' e.g. 12345 non-decimal format

Usage

icd9DecimalToShort(icd9Decimal, leadingZeroes = TRUE,
  invalidAction = c("ignore", "silent", "warn", "stop"))

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"
leadingZeroes
logical whether to fill out major part with zeroes, or just truncate to the left. If E code, there is no valid code since E800-E999 is defined. V codes could be V0x or Vxx, and so could be zero padded.
invalidAction
character string (unit length) containing one of: "ignore", "silent", "warn", "stop"

- ignore no check for validity of ICD-9 code is made implicitly. This is the fastest option. If the function call is explicitly to check validity, e

Value

  • character vector of converted ICD-9 codes

See Also

Other ICD-9 convert: icd9AddLeadingZeroesMajor; icd9AddLeadingZeroesShort; icd9DropZeroFromDecimal; icd9PartsRecompose, icd9PartsToDecimal, icd9PartsToDecimal, icd9PartsToShort, icd9PartsToShort