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
267 stars 123 forks source link

Fix operator resolution involving generics and supertypes #1424

Closed antvaset closed 3 weeks ago

antvaset commented 1 month ago

For a hypothetical operator defined as

OperatorB : (T, System.Integer) -> T

the following should hold:

1) When passed in (System.Boolean, System.Any), OperatorB should resolve with the (System.Boolean, System.Integer) -> System.Boolean signature. 2) When passed in (System.Boolean, System.Integer) later during translation, OperatorB should resolve with the (System.Boolean, System.Integer) -> System.Boolean signature. Previous resolution involving System.Any must not affect this resolution. 3) When passed in (FHIR.Quantity, System.Integer), OperatorB should resolve with the (FHIR.Quantity, System.Integer) -> FHIR.Quantity signature. 4) When later passed in (FHIR.Distance, System.Integer), OperatorB should resolve with the (FHIR.Distance, System.Integer) -> FHIR.Distance signature. Previous instantiation of (FHIR.Quantity, System.Integer) with a supertype for OperatorB must not affect this resolution.

github-actions[bot] commented 1 month ago

Formatting check succeeded!

antvaset commented 3 weeks ago

Closing in favor of https://github.com/cqframework/clinical_quality_language/pull/1426 and https://github.com/cqframework/clinical_quality_language/pull/1428