FHIR Attachment Data Type (R4)

Attachment carries content such as a PDF report or an image, either inline as base64 (data) or by url. Element table, example JSON and FHIRPath for FHIR R4.

  • FHIR Attachment Data Type (R4) — part of the free FHIR Toolbox library.
  • Runs entirely in your browser: your FHIR data is never uploaded to a server.

Overview

Attachment carries content such as a PDF report or an image, either inline as base64 (data) or by url. contentType is a MIME type.

Elements

ElementTypeCardinalityDescription
Attachment.contentTypecode0..1Mime type of the content, with charset etc.
Attachment.database64Binary0..1Data inline, base64ed
Attachment.urlurl0..1Uri where the data can be found
Attachment.sizeunsignedInt0..1Number of bytes of content (if url provided)
Attachment.hashbase64Binary0..1Hash of the data (sha-1, base64ed)
Attachment.titlestring0..1Label to display in place of the data
Attachment.creationdateTime0..1Date attachment was first created

Example JSON (R4)

{
  "contentType": "application/pdf",
  "url": "https://example.org/reports/123.pdf",
  "title": "Discharge summary",
  "creation": "2024-05-01"
}

FHIRPath

  • DiagnosticReport.presentedForm.contentType — MIME types of attached reports

FHIR Toolbox is a free, privacy-first collection of HL7 FHIR utilities by Omindra Labs. Every tool performs zero-server processing — your health data never leaves your device.