Stream: implementers
Topic: Searching with _elements and choice types
Josh Mandel (Dec 05 2019 at 20:43):
If I want to search for Observation?_elements=
in a query to return Observation
s with just the valueQuantity
(and not, say, category
or other "extraneous" data), the spec says:
The _elements parameter consists of a comma-separated list of base element names
I'm not sure what the base element name is for Observation.valueQuantity
. Official profile suggests value[x]
... but I see variable behavior across references servers.
Grahame Grieve (Dec 05 2019 at 20:45):
I don't think we ever discussed this
Josh Mandel (Dec 05 2019 at 20:45):
With HAPI, the following all work:
- http://hapi.fhir.org/baseR4/Observation?_format=json&_pretty=true&_elements=value
- http://hapi.fhir.org/baseR4/Observation?_format=json&_pretty=true&_elements=valueQuantity
- http://hapi.fhir.org/baseR4/Observation?_format=json&_pretty=true&_elements=valueWhyDoesThisWork!?
But this does't:
Josh Mandel (Dec 05 2019 at 20:46):
With Grahame's server, the following do not work:
- http://test.fhir.org/r4/Observation?_format=json&_pretty=true&_elements=value
- http://test.fhir.org/r4/Observation?_format=json&_pretty=true&_elements=valueQuantity
- http://test.fhir.org/r4/Observation?_format=json&_pretty=true&_elements=value[x]
(And I can't figure out what does work.)
Grahame Grieve (Dec 05 2019 at 20:47):
nothing will for value - bug in my code generator
Josh Mandel (Dec 05 2019 at 20:47):
OK, I'll add a Jira issue. @Grahame Grieve for the record, is there a way to coax your server into returning Observation via _elements
?
Josh Mandel (Dec 05 2019 at 20:47):
Ah, OK.
Grahame Grieve (Dec 05 2019 at 20:48):
all the other elements should be bound by _summary, but choice elements are not
Josh Mandel (Dec 05 2019 at 20:50):
Added J#25279
Josh Mandel (Dec 05 2019 at 20:50):
(This is coming up because I've been noodling on how to express proactive policies about what queries to allow/deny for a given client. )
Michele Mottini (Dec 05 2019 at 20:54):
_elements=value
on our server
Paul Church (Dec 05 2019 at 21:00):
Also _elements=value on GCP. There's no way to ask for valueQuantity specifically and omit other types though, do people want that?
nicola (RIO/SS) (Dec 10 2019 at 05:09):
Same on Aidbox. Just reminder - Observation.value.x would eliminate this problem. One logical inconsistency brings many anomalies.
Last updated: Apr 12 2022 at 19:14 UTC