OHDSI / Circe

[Under development] CIRCE is a cohort definition and syntax compiler tool for OMOP CDMv5
Apache License 2.0
5 stars 4 forks source link

Adding criteria to define 'overlap' of inclusion criteria within primary event cohort duration (cohort start to cohort end) #27

Open pbr6cornell opened 9 years ago

pbr6cornell commented 9 years ago

A use case that's come up a couple times for me:

I want to find patients who have concomitant medications, as defined by a drug era of drug A that 'overlaps' the drug era of a different drug B, where overlap = B.end_date > A.start_date AND B.start_date < A.end_date.

More generically, when we define 'primary events', we are producing a cohort-like construct that has COHORT_START_DATE and COHORT_END_DATE. We then allow inclusion criteria to determine qualification based on either a calendar date window, or some defined interval relative to COHORT_START_DATE. It would be useful to also allow the user to defined an interval relative to the COHORT_END_DATE. In this way, for any inclusion criteria from a table that has both a start_date and end_date (CONDITION_OCCURRENCE, CONDITION_ERA, DRUG_EXPOSURE, DRUG_ERA, VISIT_OCCURRENCE), a user could construct criteria to find 'overlapping' episodes.