Binary Access Operations
In many cases, resources such as DocumentReference are used to store large files such as scanned PDFs and images. These resources use the Attachment datatype, which ultimately stores a content type and a base 64 encoded representation of the binary content.
To deal with these binary content, HDR FHIR provides two custom FHIR operations that can be used to interact directly with binary content contained within resources such as DocumentReference. These operations can be used both to write and read back binary content.
These operations can be enabled/disabled using the binary_storage_enabled property. If this property is enable, the plain Binary Access Provider class can be registered with the server to provide the $binary-access-read and $binary-access-write operations that can be used to access attachment data as a raw binary.
- Binary Access Write Operation ($binary-access-write)
The process of writing a binary payload using the Binary Access Write Operation is done in a two-step process. - Binary Access Read Operation ($binary-access-read)
The Binary Access Read Operation can be used to read back binary content from Attachment elements in a similar way to the write operation.
Parent topic: FHIR Operations