Compute Elixhauser comorbidity score
elixhauser_comorbidity_index.Rd
Based on the methodology from Elixhauser A et al. 1998, Quan H et al. 2005, and van Walraven C et al. 2009 using ICD-10 codes as the mapping algorithm, implemented in the R comorbidity package by Gasparini, 2018.
Can compute either Elixhauser score at admission based on HSMR Methodology or for the entire patient encounter. The default is to compute comorbidity at admission.
Usage
elixhauser_comorbidity_index(
ipdiag,
erdiag,
at_admission = TRUE,
raw_comorbidities = FALSE
)
Arguments
- ipdiag
(
data.table
ordata.frame
)ipdiagnosis
table as defined in the GEMINI Data Repository Dictionary.- erdiag
(
data.table
ordata.frame
)erdiagnosis
table as defined in the GEMINI Data Repository Dictionary. Typically, ER diagnoses should be included when deriving comorbidity in order to increase sensitivity. However, in certain scenarios, users may choose to only include IP diagnoses by specifyingerdiag = NULL
. This may be useful when comparing cohorts with different rates of ER admissions.- at_admission
(
logical
)
Whether to calculate the score for all comorbidities or for only pre-admit comorbidities.- raw_comorbidities
(
logical
)
Whether to output adata.table
of raw comorbidities as opposed to pre-computed scores.
Value
(data.table
)
By default, for each encounter, outputs the comorbidity score. If raw_comorbidities
is TRUE
,
outputs a wide data.table
with a column for each comorbidity for each encounter.
Details
A hierarchy of comorbidities is used when calculating the cormorbidity score, but not when outputting raw_comorbidites
.
This affects comorbidities present in a patient with different degrees of severity. See documentation for
comorbidity::comorbidity()
for details.