Path
Attachment
Id
Attachment
Cardinality
0 - *
Definition
For referring to data content defined in other formats.
Comment
When providing a summary view (for example with Observation.value[x]) Attachment should be represented with a brief display text such as "Signed Procedure Consent".
Constraint
If the Attachment has data, it SHALL have a contentType
All FHIR elements must have a @value or children
Condition
Mime type of the content, with charset etc.
Path
Attachment.contentType
Id
Attachment.contentType
Type
Cardinality
0 - 1
Definition
Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.
Comment
Requirements
Processors of the data need to be able to know how to interpret the data.
Binding
required
The mime type of an attachment. Any valid mime type is allowed.
Constraint
All FHIR elements must have a @value or children
Uri where the data can be found
Path
Attachment.url
Id
Attachment.url
Type
Cardinality
0 - 1
Definition
A location where the data can be accessed.
Comment
If both data and url are provided, the url SHALL point to the same content as the data contains. Urls may be relative references or may reference transient locations such as a wrapping envelope using cid: though this has ramifications for using signatures. Relative URLs are interpreted relative to the service url, like a resource reference, rather than relative to the resource itself. If a URL is provided, it SHALL resolve to actual data.
Requirements
The data needs to be transmitted by reference.
Constraint
All FHIR elements must have a @value or children
Number of bytes of content (if url provided)
Path
Attachment.size
Id
Attachment.size
Type
Cardinality
0 - 1
Definition
The number of bytes of data that make up this attachment (before base64 encoding, if that is done).
Comment
The number of bytes is redundant if the data is provided as a base64binary, but is useful if the data is provided as a url reference.
Requirements
Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all.
Constraint
All FHIR elements must have a @value or children
Hash of the data (sha-1, base64ed)
Path
Attachment.hash
Id
Attachment.hash
Type
Cardinality
0 - 1
Definition
The calculated hash of the data using SHA-1. Represented using base64.
Comment
The hash is calculated on the data prior to base64 encoding, if the data is based64 encoded. The hash is not intended to support digital signatures. Where protection against malicious threats a digital signature should be considered, see [Provenance.signature](provenance-definitions.html#Provenance.signature) for mechanism to protect a resource with a digital signature.
Requirements
Included so that applications can verify that the contents of a location have not changed due to technical failures (e.g., storage rot, transport glitch, incorrect version).
Constraint
All FHIR elements must have a @value or children
Label to display in place of the data
Date attachment was first created