prUniform | R Documentation |
These two functions can convert the ICD diagnostic codes to a uniform format.
icdPrDecimalToShort(
prDataFile,
icdColName,
dateColName,
icdVerColName = NULL,
icd10usingDate = NULL
)
icdPrShortToDecimal(
prDataFile,
icdColName,
dateColName,
icdVerColName = NULL,
icd10usingDate = NULL
)
prDataFile |
A data frame object of clinical procedure data with at least 2 columns: ICD, and Date. As for date column, the data format should be YYYY/MM/DD or YYYY-MM-DD. |
icdColName |
Column name of ICD column in prDataFile. Data type of this argumant should be string without quotation marks. |
dateColName |
Column name of date column in prDataFile (with date in YYYY/MM/DD or YYYY-MM-DD format). Data type of this argumant should be string without quotation marks. |
icdVerColName |
(Optional) Column name of ICD-9/10 version recorded in prDataFile. Data format in this column should be numeric 9L or 10L. |
icd10usingDate |
The date that ICD-10 was started to be used in prDataFile dataset. The data format should be YYYY/MM/DD or YYYY-MM-DD. Necessary if icdVerColName is null. |
These transformation functions do not only convert the ICD to uniform format, but also check the potential coding error of the ICD codes’ format or version.
Two new data.table
s. 1) ICD
: Uniformly formatted procedure codes. 2) Error
: Potential error codes.
# sample file for example
head(samplePrFile)
# convert the procedure codes to the short format
icdPrDecimalToShort(samplePrFile,ICD,Date, icdVerColName = NULL, "2015/10/01")
# convert the procedure codes to the decimal format
icdPrShortToDecimal(samplePrFile,ICD,Date, icdVerColName = NULL, "2015/10/01")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.