Adds a feature-extraction output that computes person-level summary
columns (boolean, count, mean, etc.) from event-level data in a
single OMOP table. Each omop_feature_spec in specs
produces one column in the resulting data frame. Each spec is evaluated
against its own concept scope. No output-wide concept prefilter is
added: such a prefilter would change the meaning of an unscoped spec or of
specs that use different concept_col values.
Arguments
- plan
An
omop_planobject.- name
Character; output name used as a key in the plan's outputs list.
- table
Character; source OMOP table name (e.g.
"condition_occurrence","measurement").- specs
Named list of
omop_feature_specobjects created by theomop.feature.*family of functions (e.g.omop.feature.boolean,omop.feature.count).- grain
Character;
"person"(default) or"episode". Episode grain preserves one row per cohort episode and requirestemporal$index_window.- temporal
Optional
omop.temporal()specification. Supply anindex_windowwhengrain = "episode"or when feature specs contain episode-relativetime_windowvalues.
Examples
if (FALSE) { # \dontrun{
plan <- ds.omop.plan()
plan <- ds.omop.plan.features(plan,
name = "lab_features",
table = "measurement",
specs = list(
has_glucose = omop.feature.boolean(c(3004410)),
glucose_mean = omop.feature.mean_value(c(3004410))
)
)
} # }