Healthcare Financial Services IG Edition 1
0.4.0 - STU-Ballot with Updates Saudi Arabia flag

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

Data Type Profile: DP_Attachment

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:

  • contentType (code) (required): the 'mime type' of the file content, common values for show below:
ExtensionKind of DocumentMIME Type
.pdfAdobe Portable Document Format (PDF)application/pdf
.jpeg, .jpgJPEG imagesimage/jpeg
  • language (code) (Optional): en: English, ar: Arabic
  • data (base64Binary) (is required if no url is provided): the attachment to be Base64 encoded and placed in this element.
  • url (url)( is required if no data is provided)This is the location of the attachment content
  • size (unsignedInt) (required if an url is provided): Number of bytes of content (if url provided)
  • hash (base64Binary) (required if an url is provided) : Hash of the data (sha-1, base64ed)
  • title (string) (required): Label to display in place of the data, or the name of the file
  • creation (dateTime) (required): Date attachment content was first created

Usages:

You can also check for usages in the FHIR IG Statistics

Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work.

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Attachment C 0..* Attachment Content in a format defined elsewhere
Constraints: att-1, ksa-att-1
... contentType Σ 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
... language SΣ 0..1 code Human language of the content (BCP-47)
Binding: CommonLanguages (preferred): A human language.
Additional BindingsPurpose
AllLanguages Max Binding

Example General: en-AU
... data SC 0..1 DP_base64Binary Data inline, base64ed
Constraints: ksa-mlen-10MB
... size SΣ 0..1 DP_unsignedInt Number of bytes of content (if url provided)
... hash SΣC 0..1 DP_base64Binary Hash of the data (sha-1, base64ed)
Constraints: ksa-mlen-255
... title Σ 1..1 string Label to display in place of the data
Example General: Official Corporate Logo
Max Length:250
... creation Σ 1..1 DP_dateTime Date attachment was first created

doco Documentation for this format

Terminology Bindings

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.

Constraints

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

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Attachment C 0..* Attachment Content in a format defined elsewhere
Constraints: ksa-att-1
... contentType 1..1 DP_code Mime type of the content, with charset etc.
... language S 0..1 code Human language of the content (BCP-47)
... data SC 0..1 DP_base64Binary Data inline, base64ed
Constraints: ksa-mlen-10MB
... size S 0..1 DP_unsignedInt Number of bytes of content (if url provided)
... hash SC 0..1 DP_base64Binary Hash of the data (sha-1, base64ed)
Constraints: ksa-mlen-255
... title 1..1 string Label to display in place of the data
Max Length:250
... creation 1..1 DP_dateTime Date attachment was first created

doco Documentation for this format

Constraints

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
NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Attachment C 0..* Attachment Content in a format defined elsewhere
Constraints: att-1, ksa-att-1
... id 0..1 string Unique id for inter-element referencing
... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
... contentType Σ 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
... data SC 0..1 DP_base64Binary Data inline, base64ed
Constraints: ksa-mlen-10MB
... url SΣ 0..1 DP_url Uri where the data can be found
Example General: http://www.acme.com/logo-small.png
... size SΣ 0..1 DP_unsignedInt Number of bytes of content (if url provided)
... hash SΣC 0..1 DP_base64Binary Hash of the data (sha-1, base64ed)
Constraints: ksa-mlen-255
... title Σ 1..1 string Label to display in place of the data
Example General: Official Corporate Logo
Max Length:250
... creation Σ 1..1 DP_dateTime Date attachment was first created

doco Documentation for this format

Terminology Bindings

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.

Constraints

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

Key Elements View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Attachment C 0..* Attachment Content in a format defined elsewhere
Constraints: att-1, ksa-att-1
... contentType Σ 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
... language SΣ 0..1 code Human language of the content (BCP-47)
Binding: CommonLanguages (preferred): A human language.
Additional BindingsPurpose
AllLanguages Max Binding

Example General: en-AU
... data SC 0..1 DP_base64Binary Data inline, base64ed
Constraints: ksa-mlen-10MB
... size SΣ 0..1 DP_unsignedInt Number of bytes of content (if url provided)
... hash SΣC 0..1 DP_base64Binary Hash of the data (sha-1, base64ed)
Constraints: ksa-mlen-255
... title Σ 1..1 string Label to display in place of the data
Example General: Official Corporate Logo
Max Length:250
... creation Σ 1..1 DP_dateTime Date attachment was first created

doco Documentation for this format

Terminology Bindings

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.

Constraints

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

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Attachment C 0..* Attachment Content in a format defined elsewhere
Constraints: ksa-att-1
... contentType 1..1 DP_code Mime type of the content, with charset etc.
... language S 0..1 code Human language of the content (BCP-47)
... data SC 0..1 DP_base64Binary Data inline, base64ed
Constraints: ksa-mlen-10MB
... size S 0..1 DP_unsignedInt Number of bytes of content (if url provided)
... hash SC 0..1 DP_base64Binary Hash of the data (sha-1, base64ed)
Constraints: ksa-mlen-255
... title 1..1 string Label to display in place of the data
Max Length:250
... creation 1..1 DP_dateTime Date attachment was first created

doco Documentation for this format

Constraints

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

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Attachment C 0..* Attachment Content in a format defined elsewhere
Constraints: att-1, ksa-att-1
... id 0..1 string Unique id for inter-element referencing
... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
... contentType Σ 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
... data SC 0..1 DP_base64Binary Data inline, base64ed
Constraints: ksa-mlen-10MB
... url SΣ 0..1 DP_url Uri where the data can be found
Example General: http://www.acme.com/logo-small.png
... size SΣ 0..1 DP_unsignedInt Number of bytes of content (if url provided)
... hash SΣC 0..1 DP_base64Binary Hash of the data (sha-1, base64ed)
Constraints: ksa-mlen-255
... title Σ 1..1 string Label to display in place of the data
Example General: Official Corporate Logo
Max Length:250
... creation Σ 1..1 DP_dateTime Date attachment was first created

doco Documentation for this format

Terminology Bindings

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.

Constraints

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

 

Other representations of profile: CSV, Excel, Schematron