Stream: implementers
Topic: Understanding _include
Richard Kavanagh (Apr 29 2016 at 16:21):
I am attempting to form a search query to return all appointments for a patient with a given id. I use this query and it seems to work
Richard Kavanagh (Apr 29 2016 at 16:22):
http://fhirtest.uhn.ca/baseDstu2/Appointment?patient:Patient.identifier=TestPatient
Richard Kavanagh (Apr 29 2016 at 16:22):
Now I want to use an _include statement to bring back the Patient resource as well as the appointment so I use this
Richard Kavanagh (Apr 29 2016 at 16:22):
Richard Kavanagh (Apr 29 2016 at 16:23):
The resulting bundle has APPOINTMENT and PATIENT resources but also PRACTITIONER resources. What did I do wrong?
Chris Grenz (Apr 29 2016 at 21:09):
Try this: http://fhirtest.uhn.ca/baseDstu2/Appointment?patient:Patient.identifier=TestPatient&_include=Appointment:patient:Patient
Chris Grenz (Apr 29 2016 at 21:09):
you can limit the referenced types in the include the same way as in the other query parameter....
Brian Postlethwaite (Apr 29 2016 at 23:46):
That looks like a bug in HAPI. That link using the patient param should be filtering down to patient already (even though this is the actor property)
Grahame Grieve (Apr 30 2016 at 01:12):
yes
James Agnew (May 01 2016 at 15:18):
Yeah, this looks like a bug. Will put in a fix for the next server update.
James Agnew (May 03 2016 at 15:25):
FYI @Richard Kavanagh this has been fixed. Your previous query works as expected now.
Last updated: Apr 12 2022 at 19:14 UTC