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

Namespace - Missing Library identifier.system #449

Closed
JSRankins opened this issue Aug 21, 2019 · 4 comments
Closed

Namespace - Missing Library identifier.system #449

JSRankins opened this issue Aug 21, 2019 · 4 comments

Comments

@JSRankins
Copy link
Contributor

CQL R1 STU4 added namespace capability. Based on a read of CQL, it appears that the library identifier in the ELM XML and JSON should have a property named system that is the URI for the namespace. For reference, see the RelatedContextRetrieve library example in CQL that uses an Example namespace. The identifier for the library in the ELM XML file has the following:

<identifier id="Example.RelatedContextRetrieve" system="http://example.org/measures" version="0.1.0"/>

In fact, volume 2 of CQL-based HQMF IG R1 STU4 provides the following:

This example declares a library named Common in the CMS namespace. Per the CQL specification, the namespace for a library is included in the ELM, along with a URI that provides a globally unique, stable identifier for the namespace. For example, the URI for the CMS namespace would be https://ecqi.healthit.gov/ecqm/measures

However, when using the CQL-to-ELM Translator to transform a library containing a namespace, the system property is not provided in the ELM XML and JSON output. For example:

CMS.Common.1.0.000.cql

library CMS.Common version ‘1.0.000’ ...

ELM XML CMS.Common.1.0.000.xml

<library> <identifier id="CMS.Common" version="1.0.000"/> ... </library>

ELM JSON CMS.Common.1.0.000.json

  "identifier" : {
     "id" : "CMS.Common",
     "version": "1.0.000"
  }

In addition, there does not appear to be a way to provide the respective URI for the respective namespace.

Am I missing something?

@brynrhodes brynrhodes added this to the 1.4 Maintenance milestone Oct 29, 2019
@brynrhodes
Copy link
Member

Because the namespace is broader than a library, CQL does not provide a namespace declaration. The translator needs the namespace uri to be provided as a parameter.

brynrhodes added a commit that referenced this issue Apr 5, 2020
…ired one change to the cqlannotations.xsd, a non-normative aspect of the specification, to ensure that errors encountered in libraries referenced in other namespaces could be unambiguously identified.
brynrhodes added a commit that referenced this issue Apr 14, 2020
…support

#449: Implemented support for namespaces in the translator. This requ…
@brynrhodes
Copy link
Member

Addressed in 1.4.9 release

@lscott15
Copy link

lscott15 commented Aug 3, 2020

Because the namespace is broader than a library, CQL does not provide a namespace declaration. The translator needs the namespace uri to be provided as a parameter.

I feel like I'm missing something, how would I actually specify a namespace in practice? It sounds like it's a parameter to the cql>elm translation but I don't see it as one of the parameters to the CLI client or as a setting in the Atom plugin.

@brynrhodes
Copy link
Member

You're right, there is no command-line parameter for setting the namespace information, but it is a parameter to the translator component. If you need it exposed on the command-line, feel free to submit an issue request.

As of today, the only way to set the namespace is through the FHIR IG publisher, using the Adjunct Binary File loader and CQL processing: https://confluence.hl7.org/pages/viewpage.action?pageId=66938614#ImplementationGuideParameters-BinaryAdjunctFiles

Within a FHIR IG, the packageId of the IG is the namespaceName, and the canonicalBaseUrl of the IG is the namespaceUri. See the sample-ig and sample-content-ig for an example of referencing a CQL Library from a dependent IG.

We are currently working to expose this same capability to the Atom plugin, see CQF-Tooling issue 101.

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

No branches or pull requests

3 participants