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

Issue a warning if ambiguous overloads are created using choice types #1336

Open brynrhodes opened 4 months ago

brynrhodes commented 4 months ago

Allowing the following:

define function Foo(t Integer)
define function Foo(t Choice<Integer, Decimal>)

Results in a potentially ambiguous overload selection and should be discouraged. Add a warning to the translator when this case is detected (i.e. a function with a choice signature is overloaded in a way that one signature completely includes another)

brynrhodes commented 4 months ago

There is a JIRA tracker to the specification to discourage this in the spec and consider deprecating the capability: https://jira.hl7.org/browse/FHIR-44879