Binary

A resource that represents the data of a single raw artifact as digital content accessible in its native format.

Overview

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.

Definition

The official URL for this profile is:

https://fhir.athena.io/StructureDefinition/ah-binary

The base definition for this profile is:

Binary

NameFlagsCard.TypeDescription & Constraintsdoco
.. Binary0..*BinaryPure binary content defined by a format other than FHIR
... idΣ0..1stringLogical id of this artifact
... metaΣ0..1MetaMetadata about the resource
... implicitRules?!Σ0..1uriA set of rules under which this content was created
... contentTypeΣ1..1codeMimeType of the binary content
Binding: Mime Types (required): The mime type of an attachment. Any valid mime type is allowed.

... data0..1base64BinaryThe actual content

doco Documentation for this format

Detailed Definitions


Binary

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.

Cardinality 0..*
Type Root
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).

Binary.id

The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.

Cardinality 0..1
Type string
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.

Binary.meta

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.

Cardinality 0..1
Type Meta

Binary.implicitRules

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.

Cardinality 0..1
Type uri
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.

Binary.language

The base language in which the resource is written.

Cardinality 0..1
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).

Binary.contentType

MimeType of the binary content represented as a standard MimeType (BCP 13).

Cardinality 1..1
Type code Binding: Mime Types (required)

Binary.data

The actual content, base64 encoded.

Cardinality 0..1
Type base64Binary
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.

Interactions

READ

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.

GET
/fhir/r4/Binary/{logicalId}
Try in Postman

Parameters

required

conditional required

Name Type Description
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.

Response Codes

Response code Description
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.
Was this information helpful? Yes | No Thank you for your feedback! What went wrong? Incomplete or incorrect information | Irrelevant Content | Others
Submit

On this Page