One small addition - the dataset has no observation_period table.
I wish there was a very clear convention on how to create observation_period table from "non-health plan" data.
Is there a better script (e.g., merging 30 day eras) that this ultra simple one?
--"create table observation_period as"
select person_id,min(visit_start_date) as observation_period_start_date,
max(visit_end_date) as observation_period_end_date
from visit_occurrence group by person_id
@ericaVoss, how do you tell this forum that the code block is SQL? (to get syntax highlighting?)