Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Use of _elements with a Bundle

43 views
Skip to first unread message

SEZ

unread,
Jan 12, 2018, 5:19:37 PM1/12/18
to HAPI FHIR
Hi all,

I know that HAPI has the built in _elements parameter for every resource so if I want to do a Patient Search or Read and only get back the name, photo and address then the HAPI server will only return those top level elements in the returned JSON but I was wondering if the same thing can be done with a returned Bundle per a scenario like this:

Bundle
     Patient (_elements=name,address)
     Coverage(_element=type, etc)
     Account(_elements=status, etc)

In other words, I want to be able to Bundle any resources (e.g. Patient, Coverage, Account, etc) that are requested but with the added capability of only returning the requested elements from each resource within the Bundle.   Kind of GraphQL-ish.

Is this possible using HAPI?

Any help on this would be greatly appreciated.

Thank you,
SEZ


Joel Battiste

unread,
Apr 25, 2025, 5:33:09 PMApr 25
to HAPI FHIR
I am also having trouble getting this to work:
GET /Bundle?_elements=_id&_pretty=true

Although this does work:
GET /Patient?_elements=_id&_pretty=true

Why does Bundle _elements not work?
Reply all
Reply to author
Forward
0 new messages