Stream: hapi
Topic: Search for resources by patient identifier
Shlomy Reinstein (May 22 2017 at 11:56):
Our application uses the HAPI FHIR server for an interactive cancer dashboard. The dashboard must load quickly, and it runs hundreds of searches on the FHIR server to get the data. To speed up the loading, we try to have as many concurrent searches as possible and eliminate serial searches as much as possible. The dashboard is patient-centric, so all the data presented is for a single patient at a time. To avoid waiting to load the Patient resource, most of our searches look for resources using the patient identifier - such as "/Observation?patient=xxxx" where xxxx is the patient identifier (normally the MRN).
The patient-identifier-based queries that we do work fine for Observations, reports etc. However, they do not work for Composition and QuestionnaireResponse resources. Is it possible we are using it incorrectly? Is there a different syntax for these resources, or is it not supported in HAPI, and why?
Shlomy Reinstein (Jun 07 2017 at 11:41):
I see now that I had some typos above. I am trying to use queries like "/<ResourceType>/patient.identifier=<xxx>", and this works fine. For some of the resource types, this works, but for others it doesn't. E.g. Composition/patient.identifier=<xxx> doesn't work, but Observation/patient.identifier=<xxx> works.
Grahame Grieve (Jun 07 2017 at 12:29):
that syntax is wrong - should be /<resourceType>?patient.identifier...
Shlomy Reinstein (Jun 08 2017 at 05:37):
You're right, my typo again, sorry. I meant that this works for many resources but not all. Any idea why?
Shlomy Reinstein (Jun 08 2017 at 05:38):
For Composition, /Composition?patient=<resourceID> works fine, but /Composition?patient.identifier=<patientID> does not. For Observation, both work fine.
Grahame Grieve (Jun 08 2017 at 06:32):
on what server? just HAPI? or others?
Anand Mohan Tumuluri (Jun 13 2017 at 23:18):
The search parameter patient in Composition refers to the field subject which is Reference(Any). You may need to explicitly scope the target type as Composition?patient:Patient.identifier=<patientID>.
Last updated: Apr 12 2022 at 19:14 UTC