FHIR Attachment Data Type (R5)

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 R5.

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.sizeinteger640..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
Attachment.heightpositiveInt0..1Height of the image in pixels (photo/video)
Attachment.widthpositiveInt0..1Width of the image in pixels (photo/video)
Attachment.framespositiveInt0..1Number of frames if > 1 (photo)
Attachment.durationdecimal0..1Length in seconds (audio / video)
Attachment.pagespositiveInt0..1Number of printed pages

Example JSON (R5)

{
  "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 collection of HL7 FHIR tools by Omindra Labs. The tools process your data in your browser; it is not uploaded for normal tool operations.