dxComorbid | R Documentation |
The comorbidities classification (AHRQ, Charlson ,and Elixhauser Comorbidity) for ICD diagnostic codes is a diagnostic categorization scheme that can employ in many types of projects analyzing data on diagnoses.
icdDxToComorbid(
dxDataFile,
idColName,
icdColName,
dateColName,
icdVerColName = NULL,
icd10usingDate = NULL,
comorbidMethod,
isDescription = FALSE
)
dxDataFile |
A data frame object of clinical diagnostic data with at least 3 columns: ID, ICD, and Date. As for date column, the data format should be YYYY/MM/DD or YYYY-MM-DD. |
idColName |
Column name of ID column in dxDataFile. Data type of this argumant should be string without quotation marks. |
icdColName |
Column name of ICD column in dxDataFile. Data type of this argumant should be string without quotation marks. |
dateColName |
Column name of date column in dxDataFile, and the type of date column should be a date format in R or a string format with date information in YYYY/MM/DD or YYYY-MM-DD. Data type of this argumant should be string without quotation marks. |
icdVerColName |
(Optional) Column name if there is a columns to record ICD-9/10 version used in dxDataFile. In this column, data format should be numeric 9L or 10L to indicate which ICD version is used for each cell. See examples below to get more information. |
icd10usingDate |
The date that ICD-10 was started to be used in dxDataFile dataset. The data format should be YYYY/MM/DD or YYYY-MM-DD. Necessary if icdVerColName is null. |
comorbidMethod |
Three comorbidity methods: AHRQ, Charlson and Elixhauser Comorbidity. Change it to any of the other possible variables ( |
isDescription |
Category name or category description of standard classification methods for ICD diagnostic codes. By default it is set to |
Collapse ICD codes into a smaller number of clinically meaningful categories that are more useful for presenting descriptive statistics than are individual ICD diagnostic codes.
Three new data.table
s. 1) groupedDT
: Based on dxDataFile
with two new columns for uniform format diagnostic codes and classified categories. 2) summarised_groupedDT
: Summarized the groupedDT
dataset and sorted by memberID. 3) Error
: Potential error codes from standardization step: dxUniform
('icdDxShortToDecimal' and 'icdDxDecimalToShort').
Other code classification functions: dxPheWAS
, dxCustom
, DxCCS
# sample file for example
head(sampleDxFile)
# Group diagnostic codes into charlson comorbidity categories
icdDxToComorbid(sampleDxFile, ID, ICD, Date, icdVerColName = NULL, "2015-10-01", charlson)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.