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

Duplicate Include Library with distinct Aliases should not be allowed #1427

Open
gregory-akins opened this issue Oct 23, 2024 · 0 comments
Open

Comments

@gregory-akins
Copy link

Using Cql-to-Elm translation, a Include with a distinct Alias is successfully translated, but should cause an error.

ie.,

include MATGlobalCommonFunctionsQDM version '8.0.000' called Global1
include MATGlobalCommonFunctionsQDM version '8.0.000' called Global2 

or

include MATGlobalCommonFunctionsQDM version '7.0.000' called Global1
include MATGlobalCommonFunctionsQDM version '8.0.000' called Global2 

According to CQL - https://cql.hl7.org/03-developersguide.html#libraries-1

The local [identifier](https://cql.hl7.org/03-developersguide.html#identifiers) for a referenced library must be [unqualified](https://cql.hl7.org/03-developersguide.html#qualified-identifiers) and unique within the artifact

Also, commented in CQL channel in Zuplip. https://chat.fhir.org/#narrow/channel/179220-cql/topic/Duplicate.20.27aliased.27.20libraries

Greg Akins: CQL-To-ELM allows the inclusion of different versions of a library if they're aliased, but not otherwise.

I can understand why non-aliased libraries aren't allowed, because they're not fully qualified.

cqframework/cql-to-elm appears to allow this, however.

Is that a defect in the translator, or is it compliant with the spec for CQL 1.5?

library MyLibrary version 1

include YourLibrary version 1 as YL1
include YourLibrary version 2 as YL2

JP: Currently forbidden by the spec (as I read it):
https://cql.hl7.org/03-developersguide.html#libraries-1

all references to the same library use the same version

So, bug in cql-to-elm. That said, there's some discussion here about it:
#758

Greg Akins: Thanks JP

Greg Akins: JP said:

Currently forbidden by the spec (as I read it):
https://cql.hl7.org/03-developersguide.html#libraries-1

    all references to the same library use the same version

So, bug in cql-to-elm. That said, there's some discussion here about it:
https://github.com/cqframework/clinical_quality_language/issues/758

Beside that issue, which isn't specifically related to the issue I described

Does anyone know if there is an existing issue for fixing cql-to-elm? If not, I can write one up

Bryn Rhodes: @greg Akins I'm not aware of any issues for this specifically, if you can submit an issue, that would be great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant