OHDSI / WebAPI

OHDSI WebAPI contains all OHDSI services that can be called from OHDSI applications
Apache License 2.0
126 stars 156 forks source link

Incorrect CohortPathway result when creating non-overlapping cohorts for analysis. #2363

Closed chrisknoll closed 2 months ago

chrisknoll commented 2 months ago

Expected behavior

The test case should result in 2 mutually exclusive groups of two time windows: jan 1 - jan 5 and jan 8 - jan 23.

Actual behavior

The result shows the last step as a combination between jan 1- jan 5 and jan 8 - jan 23.

Steps to reproduce behavior

  1. Create target cohort of people on Observation Period between Jan 1 and Jan 31 2021
  2. Crate event cohort of people in Observation Period between jan 1 and Jan 5 2021
  3. Create event cohort of people in Observation Period between jan 8 and jan 21 2021
  4. Create Pathway Analysis using cohort 1 as Target, and cohorts from 2 and 3 as event cohorts.
  5. Expected result is a pathway that shows people going from event 1 to event 2, with no overlaps
  6. Actual result: pathway result shows final step has everyone in combo of 1 and 2.
chrisknoll commented 2 months ago

Not an issue:

The test cases described above didn't specify the cohort exist should end with the end date + 0d, and therefore the cohorts went on until end of observation, leading to the behavior that every subsequent step was a combo.