OHSUCMP / htnu18ig

Repository for Hypertension U18 grant's Implementation Guide
Apache License 2.0
2 stars 0 forks source link

BPs with same timestamp and values are not treated uniquely #158

Closed aeyates closed 1 year ago

aeyates commented 1 year ago

I'm not sure what triggered this behavior in COACH sandbox except maybe a tester putting in the same data twice when creating BPs, but I observed in the prefetch two BP readings with the same timestamp and measurement but different ids:

id: ad0ef538-0fa8-42e0-b3de-94a508f3d8a4, timestamp: 2023-02-01T03:37:00-08:00, value: 124/81 id: 362fe148-dfbf-4f31-8a66-85b30a523c2d, timestamp: 2023-02-01T03:37:00-08:00, value: 124/81

These were computed as being a single reading in the CQL, causing the recommendations to report that there weren't enough BPs to calculate an average while COACH used both and did compute an average.

Note that this only occurs when timestamp and values are identical. If the timestamp is the same but the reading differs, CQL sees these as separate observations. All we need to do is also track the id to help distinguish, but I'll reserve implementation until we decide whether 2 readings close together count as 1 or 2 in the scoring system.

aeyates commented 1 year ago

Per DD, each individual reading should be counted separately when scoring.