cqframework / clinical_quality_language

Clinical Quality Language (CQL) is an HL7 specification for the expression of clinical knowledge that can be used within both the Clinical Decision Support (CDS) and Clinical Quality Measurement (CQM) domains. This repository contains complementary tooling in support of that specification.
https://confluence.hl7.org/display/CDS/Clinical+Quality+Language
Apache License 2.0
258 stars 120 forks source link

Contexts should have type specifiers #1273

Open EvanMachusak opened 10 months ago

EvanMachusak commented 10 months ago

The context definition in a library does not have its TypeSpecifier (presumably a NamedTypeSpecifier) populated.

"contexts": {
      "type": "Library$Contexts",
      "def": [
        {
          "type": "ContextDef",
          "locator": "7:1-7:15",
          "name": "Patient"
        },
        {
          "type": "ContextDef",
          "locator": "12:1-12:18",
          "name": "Unfiltered"
        }
      ]
    }

We need a qualified string here telling us that Patient is {http://hl7.org/fhir}Patient so we can differentiate it from other models that define a type called Patient in use in the same library.

JPercival commented 10 months ago

@brynrhodes - This requires a change to the ELM spec, possible candidate for CQL 2.0

ewoutkramer commented 10 months ago

Funny, I was thinking about this just last week as well, wanted to started a discussion, until I realized we are probably just supposed to use Element's resultTypeSpecifier for that. At least, that's what I have done now. Works for us, @EvanMachusak ;-)