You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For each Person, one or more OBSERVATION_PERIOD records may be present, but they will not overlap or be back to back to each other.
The former is checked, the latter two conditions are not. Below query would give you the violating records for overlapping observation periods. By adding one day to the end dates, this also captures observation periods ending and starting within a day (i.e. back to back, without a gap).
SELECT*FROM observation_period AS a
JOIN observation_period AS b ONa.person_id=b.person_idANDa.observation_period_start_date<= DATEADD(d, 1, b.observation_period_end_date)
AND DATEADD(d, 1, a.observation_period_end_date) >=b.observation_period_start_dateANDa.observation_period_id<>b.observation_period_id
;
The text was updated successfully, but these errors were encountered:
From the OMOP Observation Period conventions:
The former is checked, the latter two conditions are not. Below query would give you the violating records for overlapping observation periods. By adding one day to the end dates, this also captures observation periods ending and starting within a day (i.e. back to back, without a gap).
The text was updated successfully, but these errors were encountered: