Attachment
- Profile status:
Draft
- Canonical URL:
http://fhir.smart4health.eu/StructureDefinition/s4h-attachment
Mandatory and must-support data elements
A valid instance according to this profile must satisfy the following constraints:
- a MIME-type (element:
contentType
) - Smart4Health constraint, to support targeted security-related check on content.
In addition, 4 top-level elements are marked as must-support.
Additional business rules
If the hash
element is filled, the hash will be checked upon upload and the resource rejected if the hash is incorrect. This business rule cannot be enforced by the profile.
Examples
For examples of S4H-conformant attachments, see the examples for the DocumentReference profile.
Formal views of profile content
Differential view
Shows only differences relative to the base resource definition.
S4hAttachment (Attachment) | I | Attachment | There are no (further) constraints on this element Element idAttachment Content in a format defined elsewhere DefinitionFor referring to data content defined in other formats. 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".
| |
id | 0..1 | string | There are no (further) constraints on this element Element idAttachment.id Unique id for inter-element referencing DefinitionUnique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
| |
extension | I | 0..* | Extension | There are no (further) constraints on this element Element idAttachment.extension Additional content defined by implementations Alternate namesextensions, user content DefinitionMay be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone. Unordered, Open, by url(Value) Extensions are always sliced by (at least) url Constraints
|
contentType | S Σ | 1..1 | codeBinding | There are no (further) constraints on this element Element idAttachment.contentType Mime type of the content, with charset etc. DefinitionIdentifies 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. Processors of the data need to be able to know how to interpret the data. Note that FHIR strings SHALL NOT exceed 1MB in size The mime type of an attachment. Any valid mime type is allowed.
General text/plain; charset=UTF-8, image/png Mappings
|
language | Σ | 0..1 | codeBinding | There are no (further) constraints on this element Element idAttachment.language Human language of the content (BCP-47) DefinitionThe human language of the content. The value can be any valid value according to BCP 47. Users need to be able to choose between the languages in a set of attachments. Note that FHIR strings SHALL NOT exceed 1MB in size A human language.
General en-AU Mappings
|
data | S | 0..1 | base64Binary | There are no (further) constraints on this element Element idAttachment.data Data inline, base64ed DefinitionThe actual data of the attachment - a sequence of bytes, base64 encoded. The data needs to able to be transmitted inline. The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON.
|
url | S Σ | 0..1 | url | Element idAttachment.url Uri where the data can be found DefinitionA location where the data can be accessed. The data needs to be transmitted by reference. Smart4Health-specific constraint: attachment must declare their content type to allow security-related checks on the content. 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.
General http://www.acme.com/logo-small.png Mappings
|
size | Σ | 0..1 | unsignedInt | There are no (further) constraints on this element Element idAttachment.size Number of bytes of content (if url provided) DefinitionThe number of bytes of data that make up this attachment (before base64 encoding, if that is done). Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all. 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.
|
hash | S Σ | 0..1 | base64Binary | There are no (further) constraints on this element Element idAttachment.hash Hash of the data (sha-1, base64ed) DefinitionThe calculated hash of the data using SHA-1. Represented using base64. 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). 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 for mechanism to protect a resource with a digital signature.
|
title | Σ | 0..1 | string | There are no (further) constraints on this element Element idAttachment.title Label to display in place of the data DefinitionA label or set of text to display in place of the data. Applications need a label to display to a human user in place of the actual data if the data cannot be rendered or perceived by the viewer. Note that FHIR strings SHALL NOT exceed 1MB in size
General Official Corporate Logo Mappings
|
creation | S Σ | 0..1 | dateTime | There are no (further) constraints on this element Element idAttachment.creation Date attachment was first created DefinitionThe date that the attachment was first created. This is often tracked as an integrity issue for use of the attachment.
|
Snapshot view
Shows all constraints, including those from underlying profiles and the base resource definition.
S4hAttachment (Attachment) | I | Attachment | There are no (further) constraints on this element Element idAttachment Content in a format defined elsewhere DefinitionFor referring to data content defined in other formats. 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".
| |
id | 0..1 | string | There are no (further) constraints on this element Element idAttachment.id Unique id for inter-element referencing DefinitionUnique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
| |
extension | I | 0..* | Extension | There are no (further) constraints on this element Element idAttachment.extension Additional content defined by implementations Alternate namesextensions, user content DefinitionMay be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone. Unordered, Open, by url(Value) Extensions are always sliced by (at least) url Constraints
|
contentType | S Σ | 1..1 | codeBinding | There are no (further) constraints on this element Element idAttachment.contentType Mime type of the content, with charset etc. DefinitionIdentifies 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. Processors of the data need to be able to know how to interpret the data. Note that FHIR strings SHALL NOT exceed 1MB in size The mime type of an attachment. Any valid mime type is allowed.
General text/plain; charset=UTF-8, image/png Mappings
|
language | Σ | 0..1 | codeBinding | There are no (further) constraints on this element Element idAttachment.language Human language of the content (BCP-47) DefinitionThe human language of the content. The value can be any valid value according to BCP 47. Users need to be able to choose between the languages in a set of attachments. Note that FHIR strings SHALL NOT exceed 1MB in size A human language.
General en-AU Mappings
|
data | S | 0..1 | base64Binary | There are no (further) constraints on this element Element idAttachment.data Data inline, base64ed DefinitionThe actual data of the attachment - a sequence of bytes, base64 encoded. The data needs to able to be transmitted inline. The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON.
|
url | S Σ | 0..1 | url | Element idAttachment.url Uri where the data can be found DefinitionA location where the data can be accessed. The data needs to be transmitted by reference. Smart4Health-specific constraint: attachment must declare their content type to allow security-related checks on the content. 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.
General http://www.acme.com/logo-small.png Mappings
|
size | Σ | 0..1 | unsignedInt | There are no (further) constraints on this element Element idAttachment.size Number of bytes of content (if url provided) DefinitionThe number of bytes of data that make up this attachment (before base64 encoding, if that is done). Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all. 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.
|
hash | S Σ | 0..1 | base64Binary | There are no (further) constraints on this element Element idAttachment.hash Hash of the data (sha-1, base64ed) DefinitionThe calculated hash of the data using SHA-1. Represented using base64. 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). 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 for mechanism to protect a resource with a digital signature.
|
title | Σ | 0..1 | string | There are no (further) constraints on this element Element idAttachment.title Label to display in place of the data DefinitionA label or set of text to display in place of the data. Applications need a label to display to a human user in place of the actual data if the data cannot be rendered or perceived by the viewer. Note that FHIR strings SHALL NOT exceed 1MB in size
General Official Corporate Logo Mappings
|
creation | S Σ | 0..1 | dateTime | There are no (further) constraints on this element Element idAttachment.creation Date attachment was first created DefinitionThe date that the attachment was first created. This is often tracked as an integrity issue for use of the attachment.
|