cqframework / clinical_quality_language

Clinical Quality Language (CQL) is an HL7 specification for the expression of clinical knowledge that can be used within both the Clinical Decision Support (CDS) and Clinical Quality Measurement (CQM) domains. This repository contains complementary tooling in support of that specification.
https://confluence.hl7.org/display/CDS/Clinical+Quality+Language
Apache License 2.0
251 stars 121 forks source link

Unexpected union results #1348

Closed brynrhodes closed 2 months ago

brynrhodes commented 3 months ago

The following union works as expected:

define Foo3: { 1 } union { 1.0 }

returning { 1, 1.0 }

However, this oddly results in a null?

define Foo2: { 1, 'hi', true } union { 1.0, true }

I expected { 1, 'hi', true, 1.0 } but I get { 1, 'hi', true, null }?

JPercival commented 2 months ago

Appears that this may be a bug in the CQL Language Server rather than the CQL Runtime. IOW, they underlying value appears to be correctly computed, but it's serialized incorrectly.