calculate.daoh | R Documentation |
Calculates the number of days each patient spent alive and out of hospital during the DAOH period of each index event. Applies calculate.dih and calculate.dd, then sums.
calculate.daoh( index.op.dt, patient.dt, daoh.event.dt, patient.id.col.name = "PRIM_HCU.IDencrypted", index.event.id.col.name = "index.event.id", cropped.admission.start.col.name = "cropped.admission.start", cropped.admission.end.col.name = "cropped.admission.end", daoh.period.start.col.name = "daoh.period.start", daoh.period.end.col.name = "daoh.period.end", dod.col.name = "DOD" )
index.op.dt |
A data.table that minimally has a patient identifier, a unique index event identifier for each event, and a date on which it occurred. Will be modified by reference to have a days in hospital column for each index event. |
patient.dt |
A data.table with patient details, minimally including date of death. |
daoh.event.dt |
A data.table with index event identifier, and all admissions found within the DAOH period of that index event, cropped so that they are not outside the DAOH limits, or overlapping patient death, generated by consolidate.events. |
patient.id.col.name |
Character name of the patient identifier column (Default: 'PRIM_HCU.IDencrypted') |
index.event.id.col.name |
Character name of the index event identifier column (Default: 'index.event.id') |
cropped.admission.start.col.name |
Character name of the column with admission start dates that do not go outside the DAOH period (Default: 'cropped.admission.start') |
cropped.admission.end.col.name |
Character name of the column with admission end dates that do not go outside the DAOH period (Default: 'cropped.admission.end') |
daoh.period.start.col.name |
Character name of the column in index.op.dt with the start of each DAOH period (Default: 'daoh.period.start') |
daoh.period.end.col.name |
Character name of the column in index.op.dt with the end of each DAOH period (Default: 'daoh.period.end') |
dod.col.name |
Character name of the column that contains date of death in the patient.dt (Default: 'DOD') |
A data.table that is index.op.dt, but with columns for days dead, days in hospital, and days alive and out of hospital (dd, dih, daoh). The input index.op.dt will be modified by reference, so it's not strictly necessary to use the output.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.