Binary
Maturity Level | Security Category | Resource Category |
---|---|---|
Normative | Other | Foundation |
Resource Content
Name | Required | Type | Description & Constraints |
---|---|---|---|
contentType | ✓ | code | MimeType of the binary content |
securityContext | Reference<Any> | Identifies another resource to use as proxy when enforcing access control | |
data | base64Binary | The actual content |
Search Parameters
N/A
Scope and Usage
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. Using the same framework means that the existing servers, security arrangements, code libraries, etc. can handle additional related content.
Common uses for Binary resources include:
- CDA Documents (i.e. with XDS)
- PDF Documents
- Images
- Any other binary content (text, zip archives, etc.)
These resources are served in their native form on the REST interface, but can also be represented in XML, JSON, or other formats when included in a Bundle. This is particularly useful when you need to include the content directly in a response rather than leaving it as a reference.
Boundaries and Relationships
The Binary resource serves several key purposes in the FHIR ecosystem:
Integration with Attachments
- Used as a target in the Attachment data type via the
.url
element - Commonly referenced by DocumentReference and Media resources
- Can be a target wherever the Attachment data type is used
Important Characteristics
- No Search Support: Unlike DocumentReference and Media resources, Binary resources do not support search operations
- No Context: The Binary resource itself doesn't carry metadata like author, procedure, or technique
- For contextual information, use Media or DocumentReference resources instead
- Binary resources focus solely on conveying the actual file content
Document Handling
- CDA and PDF documents must be conveyed as Binary (non-native FHIR formats)
- FHIR Documents can be sent natively using Bundle
- However, they may sometimes be sent as Binary to maintain consistency with other document types
- For images, the Media resource is preferred
- Exception: when content is already in binary form (e.g., some IHE XDS implementations)
Referenced Elements
This resource is referenced by: