CQL-to-ELM Translator - Incorrect elm generated for ToString(argument Time)
See original GitHub issueThe cql-to-elm translator generates incorrect elm for the ToString function when Time is passed as an argument as shown below
CQL:
define TimeOverload: ToString(@12:30:00.000)
ELM:
<def name="TimeOverload" context="Patient" accessLevel="Public">
<expression xsi:type="ToString">
<signature name="t:Ratio" xsi:type="NamedTypeSpecifier"/>
<operand xsi:type="Ratio">
<numerator value="30" unit="1"/>
<denominator value="0.000" unit="1"/>
</operand>
</expression>
</def>
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Implicit Use of FHIRHelpers Functions #382 - GitHub
I'm noticing there seems to be a change in how the CQL-to-ELM ... the translator tries to use the type of the AgeInYearsAt...
Read more >6. Translation Semantics - Clinical Quality Language (CQL)
In both CQL and ELM, the basic container for all declarations is the Library. ... an implementation could emit a ToString which took...
Read more >CQL-to-ELM Translator Reference Implementation
The CQL-to-ELM Translator is an open-source reference implementation that translates the high-level CQL syntax into the Expression Logical ...
Read more >Understanding Elm's Type Mismatch Error - Thoughtbot
One of the first error messages you'll run into is the “Type Mismatch” error. This error is fundamental to Elm's enforcement of its...
Read more >Db2 11 - Db2 SQL - TRANSLATE - IBM
The numeric argument is implicitly cast to a VARCHAR data type. to-string: An expression that specifies the characters to which certain characters in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for catching the spec flaw. STU comment submitted at http://www.hl7.org/dstucomments/showdetail_comment.cfm?commentid=1857
Hi @sanumula. In CQL, time literals start w/
@T
– so your code above should actually be:See: https://cql.hl7.org/02-authorsguide.html#date-datetime-and-time
Once you add the
T
, it should work as expected. Did CQL-to-ELM report any errors regarding that line of code or did it run smoothly and just produce unexpected ELM? I’d hope that it would have reported an error since@12:30:00.000
isn’t really a valid construct in CQL.