There are situations where it is useful or required to handle pure binary content using the same framework as other resources. Typically, this is when the binary content is referred to from other FHIR Resources. A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.
This profile is used to define the content that will be returned by the API Server in response to requests to access Binary resources. All elements described in the Definition and Detailed Definitions below are supported, which means that the API Server is capable of supplying these fields from the product database when they have been populated via the product or its APIs.
The official URL for this profile is:
The base definition for this profile is:
|Name||Flags||Card.||Type||Description & Constraints|
|Binary||0..*||Binary||Pure binary content defined by a format other than FHIR|
|id||Σ||0..1||string||Logical id of this artifact|
|meta||Σ||0..1||Meta||Metadata about the resource|
|implicitRules||?!Σ||0..1||uri||A set of rules under which this content was created|
|language||0..1||code||Language of the resource content|
Binding: CommonLanguages (preferred): A human language.
|contentType||Σ||1..1||code||MimeType of the binary content|
Binding: Mime Types (required): The mime type of an attachment. Any valid mime type is allowed.
|data||0..1||base64Binary||The actual content|
Documentation for this format
A resource that represents the data of a single raw artifact as digital content accessible in its native format. A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.
|Comments||Typically, Binary resources are used for handling content such as: * CDA Documents (i.e. with XDS) * PDF Documents * Images (the Media resource is preferred for handling images, but not possible when the content is already binary - e.g. XDS).|
The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
|Comments||The only time that a resource does not have an id is when it is being submitted to the server using a create operation.|
The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.
A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.
|Comments||Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.|
The base language in which the resource is written.
|Type||code Binding: CommonLanguages (preferred)|
|Comments||Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).|
MimeType of the binary content represented as a standard MimeType (BCP 13).
|Type||code Binding: Mime Types (required)|
The actual content, base64 encoded.
|Comments||If the content type is itself base64 encoding, then this will be base64 encoded twice - what is created by un-base64ing the content must be the specified content type.|
Read interactions are executed as specified in the HL7 FHIR RESTful API read specification. To read Binary resources, an application will perform an HTTP GET specifying the logical ID of the Binary being retrieved.
The [patient|user|system]/Binary.read authorization scope is required.
❙ conditional required
|logicalId||string||(REQUIRED) The logical ID of the resource (alias: Resource.id). It is specified in the URL path and not as a query parameter.|
|200 OK||The requested Binary resource was found and is contained within the body of the HTTP response.|
|400 Bad Request||The server could not understand the request due to invalid syntax. The body of the HTTP response will contain an OperationOutcome resource that indicates the invalid request could not be processed.|
|404 Not Found||The requested resource does not exist. The body of the HTTP response will contain an OperationOutcome resource that indicates the resource could not be found.|
|410 Gone||The requested resource has been permanently deleted from server with no forwarding address. The body of the HTTP response will contain an OperationOutcome resource that indicates the resource could not be found.|
|500 Internal Server Error||The server has encountered a situation it doesn't know how to handle. The body of the HTTP response will contain an OperationOutcome resource that indicates the nature of the error.|
|5xx Server Error||The server may return other error codes to indicate other error conditions. The body of the HTTP response will contain an OperationOutcome resource that indicates the nature of the error.|