Stream: implementers
Topic: multiple resources in search criteria
Kalyani Yerra (Jul 18 2017 at 15:29):
I'm hoping to understand if there is a convention in FHIR for searching across multiple resources with a single request. For instance, I want to find all patients that have a Med Order for drug NNN who also have an Observation with LOINC-code XYZ.
What is the best way to achieve this?
Lloyd McKenzie (Jul 18 2017 at 15:43):
Look at "has" in the search page.
Bill Harty (Jul 18 2017 at 16:28):
thanks for that info - very helpful. One followup question: the spec provides an example as follows:
GET [base]/Patient?_has:Observation:patient:code=1234-5
To me, that reads as "Get all patients who have an observation with a patient who has a code of 1234-5". It seems like it should be:
GET [base]/Patient?_has:Observation:code=1234-5
Is that a typo? Or is the ":patient:" necessary to establish the reference back....as the spec says, ".....where the Observation refers to the patient resource in the patient search parameter".
Grahame Grieve (Jul 25 2017 at 07:57):
yes, necessary
Yunwei Wang (Jul 26 2017 at 14:25):
How do I know if a server support _has filter or not? I don't see that in CapabilityStatement.
Last updated: Apr 12 2022 at 19:14 UTC