FHIR Chat · Requesting multiple Binary Resources · implementers

Stream: implementers

Topic: Requesting multiple Binary Resources


view this post on Zulip Eric Haas (May 22 2018 at 05:53):

It is possible request multiple binaries in their native format at once. a la....

get /Binary?_id=foo1,foo2,foo3...?

view this post on Zulip Vadim Peretokin (May 22 2018 at 06:30):

What would the output look like then?

view this post on Zulip Grahame Grieve (May 22 2018 at 08:07):

I think that's possible.

view this post on Zulip John Moehrke (May 22 2018 at 12:35):

the result couldn't be a Bundle of Binary... would it be multiple mime parts?

view this post on Zulip Michael Donnelly (May 22 2018 at 14:26):

You could give it an accept header to get the binaries as resources rather than in their raw form.

view this post on Zulip Eric Haas (May 22 2018 at 16:02):

I want them in the raw form, maybe a zip file?

view this post on Zulip Eric Haas (May 22 2018 at 16:04):

otherwise a bundle of base64 encoded

view this post on Zulip Eric Haas (May 22 2018 at 16:07):

For example I'm looking at grabbing a bunch of OMH datapoints in there original (json) format ... they are not very big and I may want several. What if you want a bunch of progress notes ( aka text blobs) over the last 14 days. You are options as the client are:

  • make multiple calls to the endpoint
  • get a bundle of Base64 encoded text blobs
  • something else?
  • JSON-LD?

view this post on Zulip Eric Haas (May 22 2018 at 16:17):

On a similar note DocRef may return multiple urls so you might want to turn around and say "get me all these"

view this post on Zulip Michael Donnelly (May 22 2018 at 16:57):

Is the issue searching and retrieving or just retrieving?

If searching too, you could do a DocumentReference search with an _include request for Binary.

view this post on Zulip Eric Haas (May 22 2018 at 16:57):

just focused on retrieving....

view this post on Zulip Eric Haas (May 22 2018 at 16:59):

the _include for Binary on DR is and open issue ( is not a type Reference but URL) , unless you hammered that out last week.

view this post on Zulip Michael Donnelly (May 22 2018 at 19:56):

Ah, good point. No, we didn't touch that last week.

view this post on Zulip Michael Donnelly (May 22 2018 at 19:57):

I can't think of any options you haven't already enumerated.

view this post on Zulip Michael Donnelly (May 22 2018 at 19:58):

Personally, I'd hit the endpoint multiple times. The 33% overhead from base64 encoding would make the bundle approach enough more expensive (plus the decoding time on your end) that I think it'd be faster and easier to grab them one at a time.

view this post on Zulip Grahame Grieve (May 22 2018 at 20:00):

depends on your latency. but why not ask for a zip containing them all?

view this post on Zulip Grahame Grieve (May 22 2018 at 20:00):

we could choose to say that's how to do things

view this post on Zulip Eric Haas (May 22 2018 at 21:44):

I meant NDJSON above not JSON-LD ( for my json file use case)

view this post on Zulip Eric Haas (May 22 2018 at 21:51):

is this something we should take for a test drive in clin-notes/omh first before creating a tracker?

view this post on Zulip Michael Donnelly (May 22 2018 at 22:17):

It's definitely worth talking over some more. I don't have any theoretical objection to zipping binaries, but it wouldn't be a quick dev project for Epic, and our dance card is already quite full. We can do individual downloads today (obviously) and could take a look at Binary search by ID to return a Bundle.

view this post on Zulip Michael Donnelly (May 22 2018 at 22:19):

If you want to try it out, we've still got our system up from the Connectathon. Postman collection here: https://www.getpostman.com/collections/80389c641f9570e2745b

view this post on Zulip Jenni Syed (May 23 2018 at 16:41):

In our experience, most of the UI around these looks at the list and loads the documents 1 by 1 based on what they care about

view this post on Zulip Jenni Syed (May 23 2018 at 16:42):

If we're talking about system to system use cases, that may start going more towards bulk data?

view this post on Zulip Eric Haas (May 23 2018 at 16:58):

There are use cases where the binaries are not big enough or numerous enough to warrant bulk data. I.m trying to access a bunch of fitbit data in raw form over a period of time. You may have 10 or 20 smallish files.

view this post on Zulip Jenni Syed (May 23 2018 at 17:46):

Those normally wouldn't be documents in our system

view this post on Zulip Jenni Syed (May 23 2018 at 17:47):

or binary

view this post on Zulip Eric Haas (May 23 2018 at 17:51):

...I know... but its my non EHR use case where a provider app is fetching from a FHIR endpoint and preserving the native format. (I tried to make an analogy to all those short text blobby rounds notes type of "clinical notes" that you want to retrieve. Maybe you want the whole weeks worth. )


Last updated: Apr 12 2022 at 19:14 UTC