-
Notifications
You must be signed in to change notification settings - Fork 24
QA Using Just the Date of a DateTime
Our test case is failing in Bonnie. We are not sure what the reason is as the CQL logic is correct but the test case is still failing.
The logic in question is:
define "GA with TOD4":
"TOD 2" T
with "Gestational age at Delivery" G
such that G.authorDatetime less than 1 day on or before day of start of T.relevantPeriod
"T" here represents the "Encounter, Performed: Encounter Inpatient" with relevant period starting 1/1/2012 8am
"G" here represents the "Assessment, Perfomred: Estimated Gestational Age at Delivery" with author date time at 12/31/2011 9am.
12/31/2011 at 9am is less than 1 day on or before day of 1/1/2012.
Based on this, it appears that the logic is performing as expected.
We have made changes such that the logic points to the "time of delivery" and not the "encounter" However, the test case is still failing.
The issue here is "day of"; "day of" makes it so it only pays attention to the date rather than the time. If you want it to pay attention to the time, change:
such that G.authorDatetime less than 1 day on or before day of A.authorDatetime
to:
such that G.authorDatetime less than 1 day on or before A.authorDatetime
Authoring Patterns - QICore v4.1.1
Authoring Patterns - QICore v5.0.0
Authoring Patterns - QICore v6.0.0
Cooking with CQL Q&A All Categories
Additional Q&A Examples
Developers Introduction to CQL
Specifying Population Criteria