callback_int: Internal item callback utilities

Description Usage Arguments Value

Description

The utility function add_concept() is exported for convenience when adding external datasets and integrating concepts that require other concepts. While this could be solves by defining a rec_concpt, in some scenarios this might not be ideal, as it might be only required that itm implementations for certain data sources require additional information. Examples for this include vasopressor rates which might rely on patient weight, and blood cell counts when expressed as ratio. For performance reasons, the pulled in concept is internally cached, as this might be used unchanged many times, when loading several concepts that need to pull in the given concept. Persistence of cache is session-level and therefore this utility is intended to be used somewhat sparingly.

Usage

1
2
3
4
5
6
7
add_concept(x, env, concept, var_name = concept, aggregate = NULL)

add_weight(x, env, var_name = "weight")

calc_dur(x, val_var, min_var, max_var, grp_var = NULL)

combine_callbacks(...)

Arguments

x

Object in loading

env

Data source environment as available as env in callback functions

concept

String valued concept name that will be loaded from the default dictionary

var_name

String valued variable name

aggregate

Forwarded to load_concepts()

val_var

String valued column name corresponding to the value variable

min_var, max_var

Column names denoting start and end times

grp_var

Optional grouping variable (for example linking infusions)

...

Functions which will be successively applied

Value

A copy of x with the requested concept merged in.


ricu documentation built on Oct. 7, 2021, 9:06 a.m.