-
Notifications
You must be signed in to change notification settings - Fork 24
QA Using a Period Where a Date is Expected
We cannot get our measure to calculate. There is an error related to the "same as" logic. As from what we can tell, there is no work-around for same as logic.
The issue appears to be related to "Medication Actively Being Taken by Tobacco User":
define "Medication Actively Being Taken by Tobacco User":
["Medication, Active" : "Tobacco Use Cessation Pharmacotherapy" ] Med
with "Screened and Identified as Tobacco User" Assess
such that Med.relevantPeriod same or after Assess.authorDatetime
and Med.relevantPeriod before end of "Measurement Period"
The interval Med.relevantPeriod is being used rather than a particular date for the comparisons against the Assess.authorDatetime and "Measurement Period". Consider modifying the query to something along the lines of what's below.
define "Medication Actively Being Taken by Tobacco User":
["Medication, Active" : "Tobacco Use Cessation Pharmacotherapy" ] Med
with "Screened and Identified as Tobacco User" Assess
such that Med.relevantPeriod starts same or after Assess.authorDatetime
and Med.relevantPeriod starts before end of "Measurement Period"
Note the addition of starts to both queries. See section 9.8.3 for "Before" and 9.8.10 for "Same or After" in the CQL specification, which need to take two Date Time arguments. The logic as it stands is providing an interval argument and a Date Time argument.
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