OHDSI Home | Forums | Wiki | Github

How can I identify a cohort with a length of at least n consecutive days of not exposing to a drug within m days after the index date?

cohort

#1

patients, may not, but usually expose to the drug A after the procedure B.
In this project, I want to identify the cohort who did not expose to the drug A, and the cohort who exposed to drug A but had at least 3 consecutive days of not exposing to the drug A within 14 days after undergoing the procedure B.
I set procedure B as the initial event and would like to add an inclusion criterion of drug exposure, but I don’t know how to specify this inclusion criterion for “a length of not exposing to”.
Can anyone help?

for example:

  1. 11 consecutive days expose + 3 consecutive days NO expose is good.
  2. 6 consecutive days expose + 3 consecutive days NO expose + 5 consecutive days expose is good.
  3. 6 consecutive days expose + 2 consecutive days NO expose + 5 consecutive days expose + 1 day NO expose is NOT good.

Thanks!


t