Healthcare Financial Services IG Edition 1 - Local Development build (v0.4.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
Official URL: http://nphies.sa/fhir/ksa/nphies-fs/StructureDefinition/DP-Attachment | Version: 0.4.0 | |||
Draft as of 2025-10-12 | Computable Name: DP_Attachment |
Attachment datatype, requires either .data or .url, .size and .hash supplied plus other required elements.
The Attachment datatype is used to convey a reference to or the actual contents of some type of file-based information such as a pdf document, jpeg image, etc. The key elements of the Attachment datatype are:
Attachment (format and size) is given below:
Extension | Kind of Document | MIME Type |
---|---|---|
Adobe Portable Document Format (PDF) | application/pdf | |
.jpeg, .jpg | JPEG images | image/jpeg |
Usages:
You can also check for usages in the FHIR IG Statistics
Description of Profiles, Differentials, Snapshots and how the different presentations work.
Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() | ||||
---|---|---|---|---|---|---|---|---|
![]() ![]() |
C | 0..* | Attachment | Content in a format defined elsewhere Constraints: att-1, ksa-att-1 | ||||
![]() ![]() ![]() |
Σ | 1..1 | DP_code | Mime type of the content, with charset etc. Binding: Mime Types (required): The mime type of an attachment. Any valid mime type is allowed. Example General: text/plain; charset=UTF-8, image/png | ||||
![]() ![]() ![]() |
SΣ | 0..1 | code | Human language of the content (BCP-47) Binding: CommonLanguages (preferred): A human language.
Example General: en-AU | ||||
![]() ![]() ![]() |
SC | 0..1 | DP_base64Binary | Data inline, base64ed Constraints: ksa-mlen-10MB | ||||
![]() ![]() ![]() |
SΣ | 0..1 | DP_url | Uri where the data can be found Example General: http://www.acme.com/logo-small.png | ||||
![]() ![]() ![]() |
SΣ | 0..1 | DP_unsignedInt | Number of bytes of content (if url provided) | ||||
![]() ![]() ![]() |
SΣC | 0..1 | DP_base64Binary | Hash of the data (sha-1, base64ed) Constraints: ksa-mlen-255 | ||||
![]() ![]() ![]() |
Σ | 1..1 | string | Label to display in place of the data Example General: Official Corporate Logo Max Length:250 | ||||
![]() ![]() ![]() |
Σ | 1..1 | DP_dateTime | Date attachment was first created | ||||
![]() |
Path | Status | Usage | ValueSet | Version | Source |
Attachment.contentType | Base | required | MimeType | 📍4.0.1 | FHIR Std. |
Attachment.language | Base | preferred | Common Languages | 📍4.0.1 | FHIR Std. |
Id | Grade | Path(s) | Description | Expression |
att-1 | error | Attachment | If the Attachment has data, it SHALL have a contentType |
data.empty() or contentType.exists()
|
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
ksa-att-1 | error | Attachment | Must provide a valid attachment suite of elements |
data.exists() xor (url.exists() and size.exists() and hash.exists())
|
ksa-mlen-10MB | error | Attachment.data | Maximum element length is 10MB. |
toString().length() <= 10285760
|
ksa-mlen-255 | error | Attachment.hash | Maximum element length is 255. |
toString().length() <= 255
|
This structure is derived from Attachment
Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
---|---|---|---|---|
![]() ![]() |
C | 0..* | Attachment | Content in a format defined elsewhere Constraints: ksa-att-1 |
![]() ![]() ![]() |
1..1 | DP_code | Mime type of the content, with charset etc. | |
![]() ![]() ![]() |
S | 0..1 | code | Human language of the content (BCP-47) |
![]() ![]() ![]() |
SC | 0..1 | DP_base64Binary | Data inline, base64ed Constraints: ksa-mlen-10MB |
![]() ![]() ![]() |
S | 0..1 | DP_url | Uri where the data can be found |
![]() ![]() ![]() |
S | 0..1 | DP_unsignedInt | Number of bytes of content (if url provided) |
![]() ![]() ![]() |
SC | 0..1 | DP_base64Binary | Hash of the data (sha-1, base64ed) Constraints: ksa-mlen-255 |
![]() ![]() ![]() |
1..1 | string | Label to display in place of the data Max Length:250 | |
![]() ![]() ![]() |
1..1 | DP_dateTime | Date attachment was first created | |
![]() |
Id | Grade | Path(s) | Description | Expression |
ksa-att-1 | error | Attachment | Must provide a valid attachment suite of elements |
data.exists() xor (url.exists() and size.exists() and hash.exists())
|
ksa-mlen-10MB | error | Attachment.data | Maximum element length is 10MB. |
toString().length() <= 10285760
|
ksa-mlen-255 | error | Attachment.hash | Maximum element length is 255. |
toString().length() <= 255
|
Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() | ||||
---|---|---|---|---|---|---|---|---|
![]() ![]() |
C | 0..* | Attachment | Content in a format defined elsewhere Constraints: att-1, ksa-att-1 | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() |
Σ | 1..1 | DP_code | Mime type of the content, with charset etc. Binding: Mime Types (required): The mime type of an attachment. Any valid mime type is allowed. Example General: text/plain; charset=UTF-8, image/png | ||||
![]() ![]() ![]() |
SΣ | 0..1 | code | Human language of the content (BCP-47) Binding: CommonLanguages (preferred): A human language.
Example General: en-AU | ||||
![]() ![]() ![]() |
SC | 0..1 | DP_base64Binary | Data inline, base64ed Constraints: ksa-mlen-10MB | ||||
![]() ![]() ![]() |
SΣ | 0..1 | DP_url | Uri where the data can be found Example General: http://www.acme.com/logo-small.png | ||||
![]() ![]() ![]() |
SΣ | 0..1 | DP_unsignedInt | Number of bytes of content (if url provided) | ||||
![]() ![]() ![]() |
SΣC | 0..1 | DP_base64Binary | Hash of the data (sha-1, base64ed) Constraints: ksa-mlen-255 | ||||
![]() ![]() ![]() |
Σ | 1..1 | string | Label to display in place of the data Example General: Official Corporate Logo Max Length:250 | ||||
![]() ![]() ![]() |
Σ | 1..1 | DP_dateTime | Date attachment was first created | ||||
![]() |
Path | Status | Usage | ValueSet | Version | Source |
Attachment.contentType | Base | required | MimeType | 📍4.0.1 | FHIR Std. |
Attachment.language | Base | preferred | Common Languages | 📍4.0.1 | FHIR Std. |
Id | Grade | Path(s) | Description | Expression |
att-1 | error | Attachment | If the Attachment has data, it SHALL have a contentType |
data.empty() or contentType.exists()
|
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
ksa-att-1 | error | Attachment | Must provide a valid attachment suite of elements |
data.exists() xor (url.exists() and size.exists() and hash.exists())
|
ksa-mlen-10MB | error | Attachment.data | Maximum element length is 10MB. |
toString().length() <= 10285760
|
ksa-mlen-255 | error | Attachment.hash | Maximum element length is 255. |
toString().length() <= 255
|
This structure is derived from Attachment
Summary
Mandatory: 3 elements
Must-Support: 5 elements
Structures
This structure refers to these other structures:
Key Elements View
Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() | ||||
---|---|---|---|---|---|---|---|---|
![]() ![]() |
C | 0..* | Attachment | Content in a format defined elsewhere Constraints: att-1, ksa-att-1 | ||||
![]() ![]() ![]() |
Σ | 1..1 | DP_code | Mime type of the content, with charset etc. Binding: Mime Types (required): The mime type of an attachment. Any valid mime type is allowed. Example General: text/plain; charset=UTF-8, image/png | ||||
![]() ![]() ![]() |
SΣ | 0..1 | code | Human language of the content (BCP-47) Binding: CommonLanguages (preferred): A human language.
Example General: en-AU | ||||
![]() ![]() ![]() |
SC | 0..1 | DP_base64Binary | Data inline, base64ed Constraints: ksa-mlen-10MB | ||||
![]() ![]() ![]() |
SΣ | 0..1 | DP_url | Uri where the data can be found Example General: http://www.acme.com/logo-small.png | ||||
![]() ![]() ![]() |
SΣ | 0..1 | DP_unsignedInt | Number of bytes of content (if url provided) | ||||
![]() ![]() ![]() |
SΣC | 0..1 | DP_base64Binary | Hash of the data (sha-1, base64ed) Constraints: ksa-mlen-255 | ||||
![]() ![]() ![]() |
Σ | 1..1 | string | Label to display in place of the data Example General: Official Corporate Logo Max Length:250 | ||||
![]() ![]() ![]() |
Σ | 1..1 | DP_dateTime | Date attachment was first created | ||||
![]() |
Path | Status | Usage | ValueSet | Version | Source |
Attachment.contentType | Base | required | MimeType | 📍4.0.1 | FHIR Std. |
Attachment.language | Base | preferred | Common Languages | 📍4.0.1 | FHIR Std. |
Id | Grade | Path(s) | Description | Expression |
att-1 | error | Attachment | If the Attachment has data, it SHALL have a contentType |
data.empty() or contentType.exists()
|
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
ksa-att-1 | error | Attachment | Must provide a valid attachment suite of elements |
data.exists() xor (url.exists() and size.exists() and hash.exists())
|
ksa-mlen-10MB | error | Attachment.data | Maximum element length is 10MB. |
toString().length() <= 10285760
|
ksa-mlen-255 | error | Attachment.hash | Maximum element length is 255. |
toString().length() <= 255
|
Differential View
This structure is derived from Attachment
Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
---|---|---|---|---|
![]() ![]() |
C | 0..* | Attachment | Content in a format defined elsewhere Constraints: ksa-att-1 |
![]() ![]() ![]() |
1..1 | DP_code | Mime type of the content, with charset etc. | |
![]() ![]() ![]() |
S | 0..1 | code | Human language of the content (BCP-47) |
![]() ![]() ![]() |
SC | 0..1 | DP_base64Binary | Data inline, base64ed Constraints: ksa-mlen-10MB |
![]() ![]() ![]() |
S | 0..1 | DP_url | Uri where the data can be found |
![]() ![]() ![]() |
S | 0..1 | DP_unsignedInt | Number of bytes of content (if url provided) |
![]() ![]() ![]() |
SC | 0..1 | DP_base64Binary | Hash of the data (sha-1, base64ed) Constraints: ksa-mlen-255 |
![]() ![]() ![]() |
1..1 | string | Label to display in place of the data Max Length:250 | |
![]() ![]() ![]() |
1..1 | DP_dateTime | Date attachment was first created | |
![]() |
Id | Grade | Path(s) | Description | Expression |
ksa-att-1 | error | Attachment | Must provide a valid attachment suite of elements |
data.exists() xor (url.exists() and size.exists() and hash.exists())
|
ksa-mlen-10MB | error | Attachment.data | Maximum element length is 10MB. |
toString().length() <= 10285760
|
ksa-mlen-255 | error | Attachment.hash | Maximum element length is 255. |
toString().length() <= 255
|
Snapshot View
Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() | ||||
---|---|---|---|---|---|---|---|---|
![]() ![]() |
C | 0..* | Attachment | Content in a format defined elsewhere Constraints: att-1, ksa-att-1 | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() |
Σ | 1..1 | DP_code | Mime type of the content, with charset etc. Binding: Mime Types (required): The mime type of an attachment. Any valid mime type is allowed. Example General: text/plain; charset=UTF-8, image/png | ||||
![]() ![]() ![]() |
SΣ | 0..1 | code | Human language of the content (BCP-47) Binding: CommonLanguages (preferred): A human language.
Example General: en-AU | ||||
![]() ![]() ![]() |
SC | 0..1 | DP_base64Binary | Data inline, base64ed Constraints: ksa-mlen-10MB | ||||
![]() ![]() ![]() |
SΣ | 0..1 | DP_url | Uri where the data can be found Example General: http://www.acme.com/logo-small.png | ||||
![]() ![]() ![]() |
SΣ | 0..1 | DP_unsignedInt | Number of bytes of content (if url provided) | ||||
![]() ![]() ![]() |
SΣC | 0..1 | DP_base64Binary | Hash of the data (sha-1, base64ed) Constraints: ksa-mlen-255 | ||||
![]() ![]() ![]() |
Σ | 1..1 | string | Label to display in place of the data Example General: Official Corporate Logo Max Length:250 | ||||
![]() ![]() ![]() |
Σ | 1..1 | DP_dateTime | Date attachment was first created | ||||
![]() |
Path | Status | Usage | ValueSet | Version | Source |
Attachment.contentType | Base | required | MimeType | 📍4.0.1 | FHIR Std. |
Attachment.language | Base | preferred | Common Languages | 📍4.0.1 | FHIR Std. |
Id | Grade | Path(s) | Description | Expression |
att-1 | error | Attachment | If the Attachment has data, it SHALL have a contentType |
data.empty() or contentType.exists()
|
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
ksa-att-1 | error | Attachment | Must provide a valid attachment suite of elements |
data.exists() xor (url.exists() and size.exists() and hash.exists())
|
ksa-mlen-10MB | error | Attachment.data | Maximum element length is 10MB. |
toString().length() <= 10285760
|
ksa-mlen-255 | error | Attachment.hash | Maximum element length is 255. |
toString().length() <= 255
|
This structure is derived from Attachment
Summary
Mandatory: 3 elements
Must-Support: 5 elements
Structures
This structure refers to these other structures:
Other representations of profile: CSV, Excel, Schematron