Stream: hapi
Topic: Search by reference
Inês Silva (Jul 10 2018 at 15:24):
Hello
In HAPI FHIR Server is it possible to search by reference?
For example, I've tried to fetch from the Bundle the MessageHeader like "http://localhost:8080/hapi-fhir-jpaserver-example/baseDstu3/Bundle?message=MessageHeader/4455bae4-d7b4-4669-ab55-67ff36e55555555" but it do not find anything.
{ "resourceType": "Bundle", ... "type": "message", "entry": [ { "fullUrl": "http://localhost:8080/hapi-fhir-jpaserver-example/baseDstu3/MessageHeader/4455bae4-d7b4-4669-ab55-67ff36e55555555", "resource": { "resourceType": "MessageHeader", "id": "4455bae4-d7b4-4669-ab55-67ff36e55555555", ...
In the case where I receive a bundle from a client and save it in my server, the bundle id will change, I will really need to fetch de MessageHeader like this, I believe I do not have another way.
Jason Walonoski (Jul 11 2018 at 17:30):
It does not seem to work on the public HAPI server either.
For example, this Bundle has a MessageHeader: http://hapi.fhir.org/baseDstu3/Bundle/4489730
This query should work:
http://hapi.fhir.org/baseDstu3/Bundle?message=MessageHeader/4455bae4-d7b4-4669-ab55-67ff36e555
Alternatively this should work:
http://hapi.fhir.org/baseDstu3/Bundle?message=4455bae4-d7b4-4669-ab55-67ff36e555
I suggest you file an issue here: https://github.com/jamesagnew/hapi-fhir/issues
Inês Silva (Jul 12 2018 at 08:48):
@Jason Walonoski I will do that. Thanks
João Almeida (Nov 02 2021 at 18:57):
Hello everyone,
I have been looking into HAPI server and I have this example: http://hapi.fhir.org/baseR4/Observation/2182015
So according with this example, the following search should work right? http://hapi.fhir.org/baseR4/Observation?subject=Patient/2081525
any thoughts about it?
Last updated: Apr 12 2022 at 19:14 UTC