Returns one SELECT yielding (cohort_definition_id, subject_id, cohort_start_date, cohort_end_date);
the end date equals the start date (an event cohort). No connection is needed - table names are
parameters. A top-level !x is compiled as everyone() & !x.
Usage
compile_phenotype(
expr,
cohort_definition_id = 1L,
index_table = NULL,
index_person_col = "subject_id",
index_date_col = "cohort_start_date",
concept_ancestor = "concept_ancestor",
concept = "concept"
)Arguments
- expr
A phenotype expression (see phenotype_criteria).
- cohort_definition_id
Cohort definition id stamped on every row.
- index_table
Optional table with a person column and an index date; leaf lookback / lookahead windows are relative to its (earliest per person) date and the population is restricted to it.
- index_person_col, index_date_col
Column names in
index_table.- concept_ancestor, concept
Table references for the vocabulary tables.
