Open alexzautke opened 12 months ago
CQL defines are included in the Library resource as parameters whose use is out
. That is intended behavior.
The return type of the CQL in your snippet would be a List<Encounter>
. Which value of FHIRAllTypes do you think it should be? When we use the CPG Library Evaluate operation, we return a Parameters resource. In this case, this definition would be expressed as a FHIR List resource containing the Encounters it returned.
We could set the type to Encounter
and use the cardinality (max: "*") and then repeat the parameter name multiple times in the outputted Parameters resource. That would obviate the need for an extension that qualifies that the parameter's type is List
and further that its element type is Encounter
. But it runs the risk of losing ordering. CQL could do:
define "Example"{1, 2, 3}
and the Parameters output where the name Example
is repeated 3 times with values 1
, 2
, and 3
could be the same as the output from define "Example": { 3,2,1 }
. It's unclear to me how much, if at all, that matters.
@richfirely do you know if this ticket should be included in the September WGM milestone? I see it in the current sprint, but it is not assigned to that milestone yet. If not, I will move it to the backlog
Describe the bug Take the following CQL expressions:
The SDK will produce a library resource based on this where "Qualifying Encounters" is mentioned as a parameter. However according to it should show up as a data requirement in the Library resource. Additionally, the "type" element in the "parameter" element of the Library is set to "List". Make sure to use the correct resource type.
Expected behavior Only parameters declared as parameters should be in the parameters section of the Library.
Version used: 1.0.0-rc2