Stream: fhirpath
Topic: Environment variables that are collections
JP (Jun 09 2021 at 17:49):
Hi! I have a use case where I'm trying to use a List of Encounters as the Environment variable %encounters
. In trying to implement the IEvaluationContext
interface I discovered that it expects to return a single Base
object:
I can't find any restriction on the use of collections in FHIRPath in any of the relevant guidance, and in fact it seems that everything should be treated as a collection:
http://hl7.org/fhir/fhirpath.html#vars
Note that these tokens are not restricted to simple types,
http://hl7.org/fhirpath/#collections
Collections are fundamental to FHIRPath, in that the result of every expression is a collection
Is there a different interface I should be implementing? Or is this an oversight in the IEvaluationContext
interface?
JP (Jun 10 2021 at 17:48):
Is this a question more appropriate for the hapi thread?
Paul Lynch (Jun 10 2021 at 18:05):
Possibly. I know FHIRPath, but I don't know what IEvaluationContext or Base are. But, there are probably some people on this stream who do.
JP (Jun 10 2021 at 18:09):
That makes sense. They are part of the org.hl7.fhir implementation of a FhirPath engine.
Grahame Grieve (Jun 10 2021 at 18:24):
it looks like an oversight to me
JP (Jun 10 2021 at 18:57):
https://github.com/hapifhir/org.hl7.fhir.core/issues/535
Last updated: Apr 12 2022 at 19:14 UTC