Stream: cql
Topic: content type
Carl Leitner (Dec 15 2021 at 20:57):
In setting the attachment.contentType for a Library resource containing CQL, I assume that you would want it as 'text/cql' per this https://www.hl7.org/fhir/valueset-expression-language.html. What about CQL compiled to ELM? Shouldn't we have something like 'application/cql'?
Carl Leitner (Dec 15 2021 at 21:00):
@Bryn Rhodes @JP @Vitor Pamplona
JP (Dec 15 2021 at 21:03):
The expression type and the content type are actually two slightly different considerations. The contentType is bound to the set of MIME Types. Both application/elm+json
and application/eml+xml
are available there. See this for example usage:
https://github.com/cqframework/ecqm-content-r4/blob/master/input/resources/library/CMS111.json#L379
JP (Dec 15 2021 at 21:06):
The set of available expression languages is also expanding to distinguish between in-line CQL, and an expression that's available in a referenced library:
https://build.fhir.org/valueset-expression-language.xml.html
JP (Dec 15 2021 at 21:07):
So, from the perspective of the Knowledge Artifact, it doesn't care if the CQL is actually ELM or not. That's a runtime consideration based on the content that's available.
JP (Dec 15 2021 at 21:09):
(it's also possible to use profiles to constrain the content such that ELM is always available, so it's not the case it _has_ to be a runtime consideration - that's just currently the most common scenario)
JP (Dec 15 2021 at 21:10):
Here's the executable profile that requires ELM to be present:
https://build.fhir.org/ig/HL7/cqf-recommendations/StructureDefinition-cpg-executablelibrary.html#tx
Carl Leitner (Dec 15 2021 at 22:42):
Thank you!
Last updated: Apr 12 2022 at 19:14 UTC