Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambiguous type reference is not throwing an error #1388

Open
brynrhodes opened this issue Jul 23, 2024 · 0 comments
Open

Ambiguous type reference is not throwing an error #1388

brynrhodes opened this issue Jul 23, 2024 · 0 comments
Labels

Comments

@brynrhodes
Copy link
Member

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.

@brynrhodes brynrhodes added the bug label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant