Skip to contents

Index stays of a cohort table

Usage

stays_from_cohort(con, cohort_table = "cohort", cohort_id = NULL)

Arguments

con

A DBI connection to an OMOP DuckDB.

cohort_table

Table with subject_id (or person_id) and cohort_start_date (the admission).

cohort_id

Optional cohort_definition_id to keep.

Value

A data frame person_id, stay_id, admit_date in cohort order; stay_id is visit_occurrence_id when present.