Learn R Programming

icd9 (version 0.2.1)

icd9PartsRecompose: recompose major and minor parts into icd9 codes

Description

internal function which checks vector lengths to avoid unintentional recycling of vectors when lengths differ. Length of one is fine for major or minor.

Usage

icd9PartsRecompose(major = NULL, minor = NULL, parts = NULL, sep)

icd9PartsToShort(major = NULL, minor = NULL, parts = NULL)

icd9PartsToDecimal(major = NULL, minor = NULL, parts = NULL)

Arguments

major
character vector of 'major' part of ICD-9 codes, i.e. that part which falls before the decimal point, in decimal notation. (In 5 digit notation, the 'major' part is be the first three characters (with leading zeroes), and includes V or E prefix. xyz
minor
character vector of 'minor' part of ICD-9 codes, i.e. that part which falls after the decimal point, in decimal notation. (In 5 digit notation, the 'major' part is be xyz, even when x and y are zero, thus the last two characters represent the 'minor' part
parts
data.frame with major and minor fields. This can be given instead of major and minor vectors
sep
character separator, usually "" or "." corresponding to 'short' or 'decimal' ICD-9 codes

Value

  • character vector. Deliberately returns zero-padded major, because otherwise we are creating ambiguous codes (even if we know what we mean)

See Also

Other ICD-9 convert: icd9AddLeadingZeroesMajor; icd9AddLeadingZeroesShort; icd9DecimalToShort; icd9DropZeroFromDecimal