OHDSI Home | Forums | Wiki | Github

[Atlas] diagnosis criteria as cohort entry event or initial event

Hi! Good afternoon.

I tried putting the same criteria for diabetes diagnosis as cohort entry event (figure 1) and initial event(figure 2) and assumed that they would yield the same results, however, the numbers were different.

Criteria: 1) patients with at least 1 inpatient diabetes diagnosis; 2) patients with at least 2 outpatient diabetes diagnosis (on separate day).

Figure 1

Because the index date is the date of having diagnosis, and I want to set up the date of inpatient and outpatient visit the same as the date of having diagnosis (0 day before and 0 day after).

Figure 2

Because all the records were recorded after 2017 so the criteria about observation period start date won’t affect the result, presumably. Also, the index date is the observation start date, all the events would occur 0 before and all after the index date.

Any suggestions on trouble shooting will be greatly appreciated!


I second this inquiry in hopes of receiving suggestions. Thanks!

In figure 1, you are looking for the condition ocurrence with the nested criteria, which will technically look at ‘all’ condition ocurrences, and then remove those that don’t satisfy the nesting criteria, which is that there exists a visit date that matches the condition date. Note: usually the 1-in-2-out doesn’t mean that the 2 outs happened on the same day, at least in my experience, just that you’re considered diagnosed if it’s in an inpatient visit once, or if it happens again at a second visit, you’re diagnosed at the second.

In figure 2, you’re looking at observation periods after a certain date, and only the first observation period (you specify limit events to earliest per person) and then among those first observation periods, find those people that had condition occurrence with the associated visit inside the observation period, or 2 ocurrences of a diagnosis associated with an OP visit.

These are two very different approaches, that yield very different dates: the first one is based on a condition date, the second one is based on an observation period. The first one is looking for any visit that happens on the diagnosis date, the second one is looking for a condition_occurrecne – visit_occurrence join where the visit_id of condition_ocurrence matches the visit_id of visit_occurrence.

I would not be surprised that these produced different results, and I’d go as far to say you’d never get a match considering one is based on OP and another is based on Condition_occurrence.

1 Like