You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that because CQL defines duration and difference operations for date and time valued intervals, width is not defined for intervals of these types.
and:
The width operator returns the width of an interval. The result of this operator is equivalent to invoking: (end of argument – start of argument).
The predecessor operator is defined for the Integer, Long, Decimal, Quantity, Date, DateTime, and Time types.
So, peeling this backwards, we can see that Width could only be implemented on the types that Predecessor and Successor support. Of those, the Width documentation specifically discludes date and time values because of the custom operators (which use quantity units).
This leaves us with Width being only defined for Integer, Long, Decimal, and Quantity types.
Therefore I think CQL-to-ELM should raise an error on Width on any interval type except those 4.
The text was updated successfully, but these errors were encountered:
brynrhodes
added
bug
cql
The issue relates to or requires a change or clarification on the CQL specification
labels
Apr 14, 2022
From the official tests, this is an example:
In appendix B for width (https://cql.hl7.org/09-b-cqlreference.html#width), width's signature is generic but we have two contrary statements:
and:
In particular, if an engine implements Width as suggested by using end and start, then we look at the documentation for end (https://cql.hl7.org/09-b-cqlreference.html#end).
End's documentation says this:
(ditto for Start and the successor operator).
Thus in order to implement end, you need to implement it through predecessor.
The documentation for predecessor (https://cql.hl7.org/09-b-cqlreference.html#predecessor) says this:
So, peeling this backwards, we can see that Width could only be implemented on the types that Predecessor and Successor support. Of those, the Width documentation specifically discludes date and time values because of the custom operators (which use quantity units).
This leaves us with Width being only defined for Integer, Long, Decimal, and Quantity types.
Therefore I think CQL-to-ELM should raise an error on Width on any interval type except those 4.
The text was updated successfully, but these errors were encountered: