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

Support for FHIR package registry and namespaces #39

Open
JPercival opened this issue Jun 22, 2022 · 3 comments
Open

Support for FHIR package registry and namespaces #39

JPercival opened this issue Jun 22, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@JPercival
Copy link
Contributor

In CQL, you can include a Library in a different namespace (which, loosely, implies a different project):

library Demo

include other.namespace.UltraLibrary as UL

define "Use UL":
    UL.X

The cql-language-server should know how to resolve those included libraries if they aren't in the current directory. This may require looking up the correct package on the FHIR package registry and downloading / caching it. It may also require support from the CQL compiler in order to do this correctly. In addition, the cql-language-server needs support for specifying how or where to resolve namespaces from. This is handled in the CQL compiler as the "NamespaceManager." Some namespaces may be able to be auto-detected, while others may require a configuration file in the local project.

@JPercival JPercival added the enhancement New feature or request label Jun 22, 2022
@rob-reynolds
Copy link

What is the path to get from a Library in a different namespace to a CQL Library in a FHIR Library resource?

@rob-reynolds
Copy link

rob-reynolds commented Jun 24, 2022

Like is is it:

  • not in current directory
  • if not exists .fhir/packages/other.namespace/UltraLibrary.json fetch FHIR package registry other.namespace
  • .fhir/packages/other.namespace/UltraLibrary.json
  • content where contentType= text/cql
  • base64 decode into memory

@JPercival
Copy link
Contributor Author

Almost. The namespace corresponds to the root IG url in most cases, which is associated with a package. There needs to be a facility for manually specifying that too, I think.

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

No branches or pull requests

2 participants