Merges one-row-per-person sources by person_id. Raw columns are
accepted only from tables whose cardinality is guaranteed to be at most one
row per person; repeatable clinical tables must be reduced through explicit
feature specifications. For cohort-aware demographics and age at index, use
ds.omop.plan.baseline instead.
Arguments
- plan
An
omop_planobject.- tables
Named list; each element maps a table name to a character vector of column names to include, e.g.
list(person = c("gender_concept_id", "race_concept_id")). Each column vector may be named to rename columns in the output:c(sex = "gender_concept_id", race = "race_concept_id")yields output columnssexandrace. Unnamed entries keep their source name. Identifier columns cannot be renamed (they are stripped server-side regardless).- name
Character; output name used as a key in the plan's outputs list and as the default symbol name on the server.
Examples
if (FALSE) { # \dontrun{
plan <- ds.omop.plan()
plan <- ds.omop.plan.person_level(plan,
tables = list(
person = c("gender_concept_id", "race_concept_id")
),
name = "demographics"
)
# Rename columns at request time with a named vector
plan <- ds.omop.plan.person_level(plan,
tables = list(person = c(sex = "gender_concept_id",
race = "race_concept_id")),
name = "demographics"
)
} # }