Description Usage Arguments See Also Examples
Expand ICD-9 codes to all possible sub-codes
1 2 3 4 5 6 | icd9Children(icd9, isShort = icd9GuessIsShort(icd9), onlyReal = TRUE,
onlyBillable = FALSE)
icd9ChildrenShort(icd9Short, onlyReal = TRUE, onlyBillable = FALSE)
icd9ChildrenDecimal(icd9Decimal, onlyReal = TRUE, onlyBillable = FALSE)
|
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. |
onlyReal |
single logical value, if TRUE, will limit the search to those codes which appear in the master list, not just syntactically valid codes. Since nearly valid, out-dated or new codes may be missed, not limiting to 'real' values will be useful. Ultimately, there will need to be annual (and all-time) master lists of codes and the ability to test against a given master list given the year of the ICD-9 coding. |
onlyBillable |
single logical value, if |
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" |
Other ICD-9 ranges: icd9Condense
,
icd9ExpandMinor
,
icd9ExpandRange
1 2 3 4 5 6 7 8 | library(magrittr)
icd9ChildrenShort("10201", FALSE) # no children other than self
icd9Children("0032", FALSE) # guess it was a short, not decimal code
icd9ChildrenShort("10201", TRUE) # empty because 102.01 is not meaningful
icd9ChildrenShort("003", TRUE) %>% icd9ExplainShort(doCondense = FALSE)
icd9ChildrenDecimal("100.0")
icd9ChildrenDecimal("100.00")
icd9ChildrenDecimal("2.34")
|
The icd9 package is now deprecated. The new 'icd' package is on CRAN and has ICD-10 support and bug-fixes. All the functions available in 'icd9' have been preserved in 'icd', but a simpler set of function names is also available.
To install it, use:
install.packages("icd")
# or for the development version:
devtools::install_github("jackwasey/icd")
Then:
remove.packages("icd9")
[1] "10201"
character(0)
character(0)
[1] "Other salmonella infections"
[2] "Salmonella gastroenteritis"
[3] "Salmonella septicemia"
[4] "Localized salmonella infections"
[5] "Localized salmonella infection, unspecified"
[6] "Salmonella meningitis"
[7] "Salmonella pneumonia"
[8] "Salmonella arthritis"
[9] "Salmonella osteomyelitis"
[10] "Other localized salmonella infections"
[11] "Other specified salmonella infections"
[12] "Salmonella infection, unspecified"
[1] "100.0"
character(0)
character(0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.