Stream: hapi
Topic: valueSet in search query
Moritz Kähler (Apr 08 2021 at 05:24):
I'm trying to query resources based on a valueSet.
Therefore I'm using following request:
http://hapi.fhir.org/baseR4/Observation?code:in=http://hapi.fhir.org/baseR4/ValueSet/1160250
but I'm getting Unknown ValueSet: http%3A%2F%2Fhapi.fhir.org%2FbaseR4%2FValueSet%2F1160250
But the valueSet exists. And matching FHIR resources also exist.
I tried the same with condition resource against an DSTU3 version, and it also does not work.
There I did not receive an error, but the result was not filtered according to the valueSet.
Do I have a wrong understanding?
Is it possible to query for resources with a valueSet like it is describe here: https://www.hl7.org/fhir/search.html ?
Moritz Kähler (Apr 08 2021 at 05:24):
(deleted)
Moritz Kähler (Apr 12 2021 at 12:09):
does someone else face this problem?
Julian Sass (Apr 13 2021 at 11:07):
Hi @Moritz Kähler, from your query it looks like you are using a literal reference to your ValueSet. You could try using a logical reference and use the canonical that's in ValueSet.url. That should work.
Moritz Kähler (Apr 14 2021 at 07:59):
Thanks for you answer, but somehow it does not work.
When using the canonical, I don't get an error, but it does not work as expected.
When I run following query
http://hapi.fhir.org/baseR4/Observation?code:in=http://hl7.org/fhir/ValueSet/observation-vitalsignresult
I get an empty result.
But following query returns a result:
http://hapi.fhir.org/baseR4/Observation?code=8302-2
And the code 8302-2 is part of the valueSet observation-vitalsignresult.
So the first query should not return an empty result.
John Silva (Apr 14 2021 at 11:14):
It you query the ValueSet, it is definitely there:
https://hapi.fhir.org/baseR4/ValueSet/observation-vitalsignresult/$expand
And, as you did, if you directly query for Observations that use one of the codes in that ValueSet they are there.
So, I suspect it's either a HAPI bug or a configuration/setup issue on the public HAPI server?
I also tried with LOINC since the CodeSystem for it exists but the code:in doesn't.
https://hapi.fhir.org/baseR4/CodeSystem?url=http://loinc.org (CodeSystem exists)
https://hapi.fhir.org/baseR4/ValueSet?url=http://loinc.org (ValueSet doesn't)
https://hapi.fhir.org/baseR4/Observation?code:in=http://loinc.org (doesn't return any Obs)
Moritz Kähler (Apr 16 2021 at 10:46):
This issue is already reported here: https://github.com/hapifhir/hapi-fhir/issues/1784
But this thread is older than one year.
Moritz Kähler (Jan 28 2022 at 13:56):
In Hapi 5.6 this is solved.
More details see here:
https://chat.fhir.org/#narrow/stream/179167-hapi/topic/code.3Ain
Last updated: Apr 12 2022 at 19:14 UTC