| create_caresite_cohort | R Documentation |
For each person who visited the specified care site, their cohort window runs from their first visit start date to their last visit end date at that site. Optionally clips to observation period overlap.
create_caresite_cohort(
con,
care_site_id,
cohort_id,
cohort_schema = NULL,
cdm_schema,
overwrite = FALSE,
restrict_to_observation = TRUE,
collapse_strategy = c("person_span", "visit_occurrence")
)
con |
DBI connection to the OMOP CDM database. |
care_site_id |
Integer |
cohort_id |
Integer |
cohort_schema |
Schema for the cohort table ( |
cdm_schema |
Schema containing OMOP CDM tables. |
overwrite |
If |
restrict_to_observation |
If |
collapse_strategy |
How to collapse visits per person:
|
This uses server-side INSERT...SELECT for performance on large
databases (avoids downloading + re-uploading patient-level data).
Number of rows inserted (invisible).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.