Stream: implementers
Topic: Best way to get a list of patients from a list of IDs
Guido Cardinali (Aug 14 2019 at 09:24):
Hey guys! Currently using .NET library for FHIR DSTU2. First thing we're doing is getting a list of appointments for the day, and from there we'd need to get the demographics of the patients for all appointments. Should we send a read request for every patient id, or is there a better way to get a bundle of all of them in a single request? Maybe use an _include in the appointments search?
Brian Postlethwaite (Aug 14 2019 at 09:53):
Yes, that would work.
Guido Cardinali (Aug 14 2019 at 10:07):
Yes, that would work.
Hi Brian, thanks for the answer. Do you mean a Read request for every patient id, or the _include?
Michele Mottini (Aug 14 2019 at 12:19):
Use _include if the server supports it. Otherwise you can do a single Patient search specifying all the ids ( .../Patient?_ids=xx1,xx2,xx3. . . )
Guido Cardinali (Aug 14 2019 at 12:29):
Use _include if the server supports it. Otherwise you can do a single Patient search specifying all the ids ( .../Patient?_ids=xx1,xx2,xx3. . . )
Thanks Michele (grazie!). Unfortunately the server doesn't support _include, and also returns an error when using the multiple _ids parameter in the search query (sigh). I think i'll just manually READ every patient, sending multiple asynchronous requests and getting the responses. :)
Alexander Kiel (Aug 14 2019 at 12:32):
You can also try a batch request containing individual GET requests for each patient.
Last updated: Apr 12 2022 at 19:14 UTC