Question

A patient can have a list of binary documents attached to them (not FHIR structured documents). Some are very large binary documents with 100+ pages such as PDFs or multi-page TIFFs.

Is there a standard way to page a binary document, in terms of:

  • Total pages in document
  • Get binary for page N

I see paging is specified for the /fhir/search resource but not on a document specifically. This might seem beyond the scope of FHIR, but if the document is 100Mb+ you don't want to have to download the whole file to read the first couple of pages.

I appreciate some documents can't reliably support paging such as text/html documents.

...or is there a way to specify a list of pages as linked resources (/fhir/patient/11/document/22/?page=1) within a document?

Was it helpful?

Solution

FHIR treats binary resources as blobs. From a behavior perspective, it treats PDF documents, images, videos, text files and everything else identically. So no paging within a binary. Essentially you get the same behavior retrieving a binary from a FHIR repository as you would retrieving it from an XDS repository. Basic metadata (via DocumentReference) or the whole document.

That doesn't mean you couldn't define a custom (or even standard) Query on Binary that provided more smarts, it's just not part of the current FHIR standard. For it to make sense as part of the base standard, we'd need to see evidence of fairly broad support for this type of capability in existing systems (and ideally software libraries that make exposing "pages" of PDF and other types of documents - and probably segments of video and audio clips while we're at it)

Some alternatives to consider:

  • register the really large documents or videos using separate binaries for each chapter or segment to reduce retrieval size and allow "smarter" retrieval
  • define an extension that provides a "thumbnail" that can be included with the DocumentReference to give a better sense of content prior to retrieval (e.g. a document abstract, a lower-bandwidth image, etc.) A standard extension will be provided to support this in the next 6 months or so as we define extensions for all ISO 21090 data type properties that didn't make it into core.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top