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 "Attachment".
Constraint
All FHIR elements must have a @value or children
It the Attachment has data, it SHALL have a contentType
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.
Uri where the data can be found
Path
Attachment.url
Id
Attachment.url
Type
Cardinality
0 - 1
Definition
An alternative 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.
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.
Hash of the data (sha-1, base64ed)
Label to display in place of the data
Date attachment was first created