Implement support for include statements in CQL
Support referencing libraries, ie. include FHIRCommon version '4.0.1' called FC in CQL.
See: https://cql.hl7.org/02-authorsguide.html#libraries
+1 : An FYI, see this information https://github.com/cqframework/cql-execution/pull/251 as the IG Publisher tooling using cql2elm with options that uses the namespace of the IG being developed as a convention when building the includes. This is different outcome if using the converter outside of an IG.
Incidentally, the IG tooling can create a one-to-one FHIR Library for every CQL library. The FHIR Library resource includes not only the base64 CQL, but also elm+json and elm+xml content. Does/could blaze use this if it is present in the FHIR Library resource, or will it run the translator in all cases? This could have consequences as the namespace might be lost as it would be converted outside the context of an IG (with canonical base)...
Here is an example bundle (Measure, Libraries, and ValueSets) created using the IG Publisher tooling: https://gist.github.com/bkaney/f369ec1df7238f62ff5d2e593ed82ce3
This works with the VS Code CQL evaluator (which uses CQF Tooling) https://marketplace.visualstudio.com/items?itemName=cqframework.cql
Running the measure (GET http://localhost:8080/fhir/Measure/CMS122v9/$evaluate-measure?periodStart=2000&periodEnd=2030) gives this currently (most recent docker image):

+1 : An FYI, see this information cqframework/cql-execution#251 as the IG Publisher tooling using cql2elm with options that uses the namespace of the IG being developed as a convention when building the includes. This is different outcome if using the converter outside of an IG.
Incidentally, the IG tooling can create a one-to-one FHIR Library for every CQL library. The FHIR Library resource includes not only the base64 CQL, but also elm+json and elm+xml content. Does/could blaze use this if it is present in the FHIR Library resource, or will it run the translator in all cases? This could have consequences as the namespace might be lost as it would be converted outside the context of an IG (with canonical base)...
Blaze always does the CQL-to-ELM Conversion using the cqframework translator currently in version 1.5.4.
I updated the CQL to try it as all-in-one (see: https://gist.github.com/bkaney/f369ec1df7238f62ff5d2e593ed82ce3#file-all-in-one-cql), and I see this error:
:cognitect.anomalies/message "Unsupported ELM expression type: OperandRef"
Is this already covered by https://github.com/samply/blaze/issues/493 or is this a new issue?
The error with the OperandRef occurs, because Blaze currently doesn't support functions https://github.com/samply/blaze/issues/501. Also #110 and #493 has to be resolved before your query could be evaluated.
Okay, and I see all of that might enable https://github.com/samply/blaze/issues/452. FWIW I can remove the functions, but support for valueset references (#110) is something that would block.
Functions in the same CQL library are implemented in #766.