-
Notifications
You must be signed in to change notification settings - Fork 133
Open
Labels
Description
When two models have a type with the same unqualified name, and that name is referenced in CQL logic, the specification indicates that an ambiguous error should be raised:
library Test version '1.0.0'
using FHIR version '4.0.1'
using System version '1.0.0'
define function f(q Quantity): q
Specification link: https://cql.hl7.org/03-developersguide.html#multiple-data-models
There is a nuance that if the ambiguity is with the System model, and the System model declaration is implicit, the explicit model is preferred. However, if the system model declaration is explicit, this should be an error. (JIRA tracker to document this nuance: https://jira.hl7.org/browse/FHIR-46435)
So the following library is fine:
library Test version '1.0.0'
using FHIR version '4.0.1'
define function f(q Quantity): q
But the first one should give an ambiguous type reference.