Concept callback functions
Owing to increased complexity and more diverse applications, recursive
concepts (class rec_cncpt
) may specify callback functions
to be called on corresponding data objects and perform post-processing
steps.
pafi( ..., match_win = hours(2L), mode = c("match_vals", "extreme_vals", "fill_gaps"), fix_na_fio2 = TRUE, interval = NULL ) vent(..., match_win = hours(6L), min_length = mins(10L), interval = NULL) sed(..., interval = NULL) gcs( ..., valid_win = hours(6L), set_sed_max = TRUE, set_na_max = TRUE, interval = NULL ) urine24( ..., min_win = hours(12L), limits = NULL, start_var = "start", end_var = "end", interval = NULL ) vaso60(..., max_gap = mins(5L), interval = NULL)
... |
Data input used for concept calculation |
match_win |
Time-span during which matching of values is allowed |
mode |
Method for matching PaO2 and FiO2 values |
fix_na_fio2 |
Logical flag indicating whether to impute missing FiO2 values with 21 |
interval |
Expected time series step size (determined from data if
|
min_length |
Minimal time span between a ventilation start and end time |
valid_win |
Maximal time window for which a GCS value is valid if no newer measurement is available |
set_sed_max |
Logical flag for considering sedation |
set_na_max |
Logical flag controlling imputation of missing GCS values with the respective maximum values |
min_win |
Minimal time span required for calculation of urine/24h |
limits |
Passed to |
start_var, end_var |
Passed to |
max_gap |
Maximum time gap between administration windows that are merged (can be negative). |
Several concept callback functions are exported, mainly for documenting their arguments, as default values oftentimes represent somewhat arbitrary choices and passing non-default values might be of interest for investigating stability with respect to such choices. Furthermore, default values might not be ideal for some datasets and/or analysis tasks.
pafi
In order to calculate the PaO2/FiO2 (or Horowitz index), for a given time point, both a PaO2 and a FiO2 measurement is required. As the two are often not measured at the same time, some form of imputation or matching procedure is required. Several options are available:
match_vals
allows for a time difference of maximally match_win
between two measurements for calculating their ratio
extreme_vals
uses the worst PaO2 and a
FiO2 values within the time window spanned by
match_win
fill_gaps
represents a variation of extreme_vals
, where ratios are
evaluated at every time-point as specified by interval
as opposed to
only the time points where either a PaO2 or a
FiO2 measurement is available
Finally, fix_na_fio2
imputes all remaining missing FiO2 with 21,
the percentage (by volume) of oxygen in (tropospheric) air.
vent
Building on the atomic concepts vent_start
and vent_end
, an binary
indicator for ventilation status is constructed by combining start and end
events that are separated by at most match_win
and at least min_length
.
Time-points (as determined by interval
) that fall into such ventilation
windows are set to TRUE
, while missingness (NA
) or FALSE
indicate no
mechanical ventilation. Currently, no clear distinction between invasive
an non-invasive ventilation is made.
sed
In order to construct an indicator for patient sedation, information from
the two concepts trach
and rass
is pooled: A patient is considered
sedated if intubated or has less or equal to -2 on the Richmond
Agitation-Sedation Scale.
gcs
Aggregating components of the Glasgow Coma Scale into a total score
(whenever the total score tgcs
is not already available) requires
coinciding availability of an eye (egcs
), verbal (vgcs
) and motor
(mgcs
) score. In order to match values, a last observation carry forward
imputation scheme over the time span specified by valid_win
is performed.
Furthermore passing TRUE
as set_sed_max
will assume maximal points for
time steps where the patient is sedated (as indicated by sed
) and passing
TRUE
as set_na_max
will assume maximal points for missing values (after
matching and potentially applying set_sed_max
).
urine24
Single urine output events are aggregated into a 24 hour moving window sum.
At default value of limits = NULL
, moving window evaluation begins with
the first and ends with the last available measurement. This can however be
extended by passing an id_tbl
object, such as for example returned by
stay_windows()
to full stay windows. In order to provide data earlier
than 24 hours before the evaluation start point, min_win
specifies the
minimally required data window and the evaluation scheme is adjusted for
shorter than 24 hour windows.
vaso60
Building on concepts for drug administration rate and drug administration
durations, administration events are filtered if they do not fall into
administrations windows of at least 1h. The max_gap
argument can be used
to control how far apart windows can be in order to be merged (negative
times are possible as well, meaning that even overlapping windows can be
considered as individual windows).
Either an id_tbl
or ts_tbl
depending on the type of concept.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.