Document
type: StructureDefinition
node role: treeRoot
id:
  v: Document
text:
  status:
    v: extensions
  div: Generated Narrative: StructureDefinition Document Name Flags Card. Type Description & Constraints Binary 0..* Binary Pure binary content defined by a format other than FHIR Documentation for this format
url:
  v: https://fhir.nhs.uk/England/RAD/StructureDefinition/Document
version:
  v: 0.0.1-current
name:
  v: Document
title:
  v: Document
status:
  v: draft
date:
  v: 2025-06-10T07:39:07+00:00
publisher:
  v: NHS England
contact:
  telecom:
    system:
      v: url
    value:
      v: https://www.ihe.net/ihe_domains/it_infrastructure/
contact:
  telecom:
    system:
      v: email
contact:
  name:
    v: NHS England
  telecom:
    system:
      v: email
description:
  v: Is a **logical representation** of a variety of structured data entities which are normally made available by a repository. For unstructured data items this is classed as a `Binary` and will be in traditional document formats such as pdf or jpeg. Within NHS England this is also known as a `Health Record` and this is what a `pointer` points to. Structured Data Items (documents) in this project include: - [Imaging Report (FHIR DiagnosticReport)](StructureDefinition-ImagingReport.html) - [Imaging Study](StructureDefinition-ImagingStudy.html) - [Image](StructureDefinition-Image.html)
jurisdiction:
  coding:
    system:
      v: urn:iso:std:iso:3166
    code:
      v: GB
    display:
      v: United Kingdom of Great Britain and Northern Ireland
fhir version:
  v: 4.0.1
mapping:
  identity:
    v: rim
  uri:
    v: http://hl7.org/v3
  name:
    v: RIM Mapping
kind:
  v: resource
abstract:
  v: false
type:
  v: Binary
base definition:
  v: http://hl7.org/fhir/StructureDefinition/Binary
  link: http://hl7.org/fhir/StructureDefinition/Binary
derivation:
  v: constraint
snapshot:
  extension:
    url:
      v: http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version
    value: string
      v: 4.0.1
  element:
    id:
      v: Binary
    path:
      v: Binary
    short:
      v: Pure binary content defined by a format other than FHIR
    definition:
      v: A resource that represents the data of a single raw artifact as digital content accessible in its native format. A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.
    comment:
      v: Typically, Binary resources are used for handling content such as: * CDA Documents (i.e. with XDS) * PDF Documents * Images (the Media resource is preferred for handling images, but not possible when the content is already binary - e.g. XDS).
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: Binary
      min:
        v: 0
      max:
        v: *
    is modifier:
      v: false
    is summary:
      v: false
    mapping:
      identity:
        v: rim
      map:
        v: Entity. Role, or Act
    mapping:
      identity:
        v: rim
      map:
        v: ED
  element:
    id:
      v: Binary.id
    path:
      v: Binary.id
    short:
      v: Logical id of this artifact
    definition:
      v: The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
    comment:
      v: The only time that a resource does not have an id is when it is being submitted to the server using a create operation.
    min:
      v: 0
    max:
      v: 1
    base:
      path:
        v: Resource.id
      min:
        v: 0
      max:
        v: 1
    type:
      extension:
        value: url
      code:
        v: http://hl7.org/fhirpath/System.String
    is modifier:
      v: false
    is summary:
      v: true
  element:
    id:
      v: Binary.meta
    path:
      v: Binary.meta
    short:
      v: Metadata about the resource
    definition:
      v: The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.
    min:
      v: 0
    max:
      v: 1
    base:
      path:
        v: Resource.meta
      min:
        v: 0
      max:
        v: 1
    type:
      code:
        v: Meta
    constraint:
      key:
        v: ele-1
      severity:
        v: error
      human:
        v: All FHIR elements must have a @value or children
      expression:
        v: hasValue() or (children().count() > id.count())
      xpath:
        v: @value|f:*|h:div
      source:
        v: http://hl7.org/fhir/StructureDefinition/Element
        link: http://hl7.org/fhir/StructureDefinition/Element
    is modifier:
      v: false
    is summary:
      v: true
  element:
    id:
      v: Binary.implicitRules
    path:
      v: Binary.implicitRules
    short:
      v: A set of rules under which this content was created
    definition:
      v: A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.
    comment:
      v: Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.
    min:
      v: 0
    max:
      v: 1
    base:
      path:
        v: Resource.implicitRules
      min:
        v: 0
      max:
        v: 1

url
v: id

code:
  v: uri

key:
  v: ele-1
severity:
  v: error
human:
  v: All FHIR elements must have a @value or children
expression:
  v: hasValue() or (children().count() > id.count())
xpath:
  v: @value|f:*|h:div
source:
  v: http://hl7.org/fhir/StructureDefinition/Element
  link: http://hl7.org/fhir/StructureDefinition/Element

v: true

v: This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation

v: true

id:
  v: Binary.language
path:
  v: Binary.language
short:
  v: Language of the resource content
definition:
  v: The base language in which the resource is written.
comment:
  v: Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.language
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet
    value: canonical
      v: http://hl7.org/fhir/ValueSet/all-languages
      link: http://hl7.org/fhir/ValueSet/all-languages
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: Language
  strength:
    v: preferred
  description:
    v: A human language.
  value set:
    v: http://hl7.org/fhir/ValueSet/languages
    link: http://hl7.org/fhir/ValueSet/languages

id:
  v: Binary.contentType
path:
  v: Binary.contentType
short:
  v: MimeType of the binary content
definition:
  v: MimeType of the binary content represented as a standard MimeType (BCP 13).
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Binary.contentType
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: MimeType
  strength:
    v: required
  description:
    v: The mime type of an attachment. Any valid mime type is allowed.
  value set:
    v: http://hl7.org/fhir/ValueSet/mimetypes|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: rim
  map:
    v: ED.mediaType

id:
  v: Binary.securityContext
path:
  v: Binary.securityContext
short:
  v: Identifies another resource to use as proxy when enforcing access control
definition:
  v: This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.
comment:
  v: Very often, a server will also know of a resource that references the binary, and can automatically apply the appropriate access rules based on that reference. However, there are some circumstances where this is not appropriate, e.g. the binary is uploaded directly to the server without any linking resource, the binary is referred to from multiple different resources, and/or the binary is content such as an application logo that has less protection than any of the resources that reference it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Binary.securityContext
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Resource
    link: http://hl7.org/fhir/StructureDefinition/Resource
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Binary.data
path:
  v: Binary.data
short:
  v: The actual content
definition:
  v: The actual content, base64 encoded.
comment:
  v: If the content type is itself base64 encoding, then this will be base64 encoded twice - what is created by un-base64ing the content must be the specified content type.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Binary.data
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: base64Binary
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: ED.data

element:
  id:
    v: Binary
  path:
    v: Binary