callback_cncpt: Concept callback functions

Description Usage Arguments Details Value

Description

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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
pafi(
  ...,
  match_win = hours(2L),
  mode = c("match_vals", "extreme_vals", "fill_gaps"),
  fix_na_fio2 = TRUE,
  interval = NULL
)

safi(
  ...,
  match_win = hours(2L),
  mode = c("match_vals", "extreme_vals", "fill_gaps"),
  fix_na_fio2 = TRUE,
  interval = NULL
)

vent_dur(..., match_win = hours(6L), min_length = mins(30L), interval = NULL)

vent_ind(..., 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)

vaso_ind(..., interval = NULL)

supp_o2(..., interval = NULL)

avpu(..., interval = NULL)

bmi(..., interval = NULL)

norepi_equiv(..., interval = NULL)

Arguments

...

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 NULL)

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 fill_gaps() in order to expand the time series beyond first and last measurements

start_var, end_var

Passed to fill_gaps()

max_gap

Maximum time gap between administration windows that are merged (can be negative).

Details

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:

Finally, fix_na_fio2 imputes all remaining missing FiO2 with 21, the percentage (by volume) of oxygen in (tropospheric) air.

vent_dur and vent_ind

Building on the atomic concepts vent_start and vent_end, vent_dur determines time windows during which patients are mechanically ventilated by combining start and end events that are separated by at most match_win and at least min_length. Durations can be converted into an indicator variable represented by vent_ind, where 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).

Value

Either an id_tbl or ts_tbl depending on the type of concept.


ricu documentation built on May 20, 2021, 1:05 a.m.