Google Cloud Healthcare APIs FHIR Search Include Patient but not all resources with Appointment

461 Views Asked by At

I'm trying to run a search for Appointment and include some resources but not others. Specifically trying to avoid including some Binary resources linked as "supportingInfo" which are quite large.

But I'd still like to include Patient, Location, etc.

Using * works and includes all related resources: Patient, Location, Practitioner, and unfortunately Binary:

GET /Appointment?_include=*

But, none of these include anything other than the Appointments:

GET /Appointment?_include=Patient:patient

GET /Appointment?_include=Location:location

GET /Appointment?_include=Patient:actor

GET /Appointment?_include=Practitioner:practitioner

Am I doing something wrong? Or is this just a limitation of Google's FHIR API implementation? I've successfully used other, seemingly more advanced search features like _revinclude and _include:iterate but maybe it's all or nothing? I'm not sure how to go about confirming this?

1

There are 1 best solutions below

1
On BEST ANSWER

_include needs to specify the Resource and search parameter you're wanting to include. So for Appointment, it would be:

GET [base]/Appointment?_include=Appointment:patient,Appointment:location,Appointment:practitioner

If you wanted to also include some of the resources that an included resource pointed to, you'd need to do this: _include:iterate=Location:organization would return the organizations pointed to by Locations that were included by your priro include