Description Usage Arguments Value Author(s) Examples
Converting ICD codes between the ICD-9 and ICD-10 classifications is not entirely trivial. There are about twice as many codes in ICD-10 compared to ICD-9. In addition, several countries have constructed their own variants of the classification systems. This function will try to convert ICD codes between the two definitions, with a possibility to specify how flexible the translation should be. If a code is translated and yields multiple ICD codes in the target definition, only the first code will be returned. The function also has multicore support, to reduce computing time when analyzing large datasets. Also, if an ICD code is not found in the database on its 4-digit representation, the function will also try to find a 3-digit code by keeping only the first three characters in the code. It will work only with the 'clean' original versions of ICD, i.e. country-specific codes have to be converted into a style that the function understands; e.g. "I259" for ICD10, "4149" for ICD9. This function is in early development, and should be tested more before put to use.
1 2 | convertICD(ICDcode, from = "icd10", to = "icd9", flexibility = 1,
cores = 1)
|
ICDcode |
a vector containing the ICD codes that should be converted. The code must not contain dots (which are common in some countries representation of the ICD10 system). |
from |
What is the source classification: "icd10" or "icd9"? Defaults to "icd10". |
to |
What is the destination classification: "icd10" or "icd9"? Defaults to "icd9". |
flexibility |
Takes either of the following values: 0, 1, 2:
Defaults to 1. |
cores |
The number of processor cores to use. Multicore functionality is available on all unix platforms (e.g. MacOSX, Linux), but not on Windows. Defaults to 1. |
Outputs a character vector containing the converted ICD codes.
Daniel Lindholm
1 2 3 4 5 6 | # Simple example of converting from ICD10 to ICD9:
convertICD("I259")
# Run on several processor cores:
test_codes <- c("I10", "I259", "C820", "E669")
convertICD(test_codes, cores = 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.