Open anthonysena opened 4 years ago
A few notes on how to reproduce this:
/<cohort_definition_id>
suffix as described above@anthonysena I've examined how WebAPI prepares profile and found when using profile without cohort definition then index date is a first event date. And when using cohort then index date is a cohort start date. That's the reason why the same event offset differs in different modes. One case when offsets are exactly the same is when cohort includes a first patient's event. Could you clarify is this behavior correct?
If yes, then I'd like to ask is it possible the issue impacted by patient's data? I mean, probably by some reason, one event is out of observation period.
@wivern - can you point me to the code where this is happening? I'm a bit torn on this: a patient can have events that fall outside of the observation_period and we'd still like to see them on the patient profile. That said, I'm not sure how we'd orient the time axis to reflect this. Seeing the code might give me an idea here. Thank you!
Sure, this magic doing inside the PersonService from 135 to 143 lines.
Let's move this out of this release and consider it either for after 2.8 or 3.0
Expected behavior
When using the patient profile without a cohort definition (for defining the index), I expect that the "Start Days" is based on the start of the observation period.
Actual behavior
There appears to be some behavior where this is not offset. We observed that for a particular person, a diagnosis that was 1 day after observation was labeled as "8 days" instead.
Steps to reproduce behavior
Navigate to
/atlas/#/profiles/<database>/<person_id>
and observe the issue. This issue does not seem to happen when viewing that same person when they are part of a cohort:/atlas/#/profiles/<database>/<person_id>/<cohort_definition_id>