Closed vaakesan-SMH closed 8 months ago
One question I am curious: when an encounter is present in the
ipdiag
orerdiag
table, but by the HMSR definition does not have anydiagnosis_at_admission
, in current version the encounter is excluded from the output whenat_admission = TRUE
, which would make them the same as those without any diagnosis data. Is this the desired results or should they be included and get 0 for their comorbidity index?
That's a good point about the difference between NA
and 0. I agree with you that these admissions should probably be 0. I've pushed a commit to fix this. Could you please re-review?
If we decide to output
0
on index at admission for cases with diagnosis data but nodiagnosis_at_admission
, to be consistent whenraw_comorbidities = T
the raw comorbidities should include these patients and output0
for them as well?
That is a good point, I will make this fix.
If we decide to output
0
on index at admission for cases with diagnosis data but nodiagnosis_at_admission
, to be consistent whenraw_comorbidities = T
the raw comorbidities should include these patients and output0
for them as well?
@guoyi-smh, I've made the change to output 0 for raw comorbidities when no diagnoses at admission are present. Please review and let me know what you think.
Closes #4.
This requires some refactoring of the comorbidity calculations so that each of charlson and elixhauser are simple wrappers. Otherwise, documentation is shared as much as possible.
Small edit to the
.Rproj
file to force redocumentation on package build.