AiideraSigneradHandlingBinary
type: StructureDefinition
node role: treeRoot
resource.id:
  value: AiideraSigneradHandlingBinary
domain resource.text:
  narrative.status:
    value: extensions
  narrative.div: Generated Narrative: StructureDefinition AiideraSigneradHandlingBinary Name Flags Card. Type Description & Constraints Binary 0..* Binary Pure binary content defined by a format other than FHIR #xD; contentType 1..1 code MimeType of the binary content Fixed Value: application/fhir+json #xD; securityContext 0..0 Identifies another resource to use as proxy when enforcing access control #xD; data 1..1 base64Binary The actual content #xD; Documentation for this format
structure definition.url:
  value: https://fhir.aiidera.se/StructureDefinition/AiideraSigneradHandlingBinary
structure definition.version:
  value: 0.1.0
structure definition.name:
  value: AiideraSigneradHandlingBinary
structure definition.title:
  value: Aiidera signerad handling — original
structure definition.status:
  value: draft
structure definition.date:
  value: 2026-08-09T22:23:18+00:00
structure definition.publisher:
  value: Aiidera
structure definition.description:
  value: De exakta bytes som signerades, lagrade som Binary. ADR-5 beslut 1.
structure definition.purpose:
  value: Byte för byte in, byte för byte ut. Servern varken tolkar eller skriver om innehållet, för den ser bara base64 — det är hela skälet till lagringsformen, se spike 3 §3.1.
structure definition.fhir version:
  value: 4.0.1
structure definition.mapping:
  index: 0
  structure definition.mapping.identity:
    value: rim
  structure definition.mapping.uri:
    value: http://hl7.org/v3
  structure definition.mapping.name:
    value: RIM Mapping
structure definition.kind:
  value: resource
structure definition.abstract:
  value: false
structure definition.type:
  value: Binary
structure definition.base definition:
  value: http://hl7.org/fhir/StructureDefinition/Binary
  link: http://hl7.org/fhir/StructureDefinition/Binary
structure definition.derivation:
  value: constraint
structure definition.snapshot:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version
    extension.value string:
      value: 4.0.1
  structure definition.snapshot.element:
    index: 0
    element.id:
      value: Binary
    element definition.path:
      value: Binary
    element definition.short:
      value: Pure binary content defined by a format other than FHIR
    element definition.definition:
      value: 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.
    element definition.comment:
      value: 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).
    element definition.min:
      value: 0
    element definition.max:
      value: *
    element definition.base:
      element definition.base.path:
        value: Binary
      element definition.base.min:
        value: 0
      element definition.base.max:
        value: *
    element definition.is modifier:
      value: false
    element definition.is summary:
      value: false
    element definition.mapping:
      index: 0
      element definition.mapping.identity:
        value: rim
      element definition.mapping.map:
        value: Entity. Role, or Act
    element definition.mapping:
      index: 1
      element definition.mapping.identity:
        value: rim
      element definition.mapping.map:
        value: ED
  structure definition.snapshot.element:
    index: 1
    element.id:
      value: Binary.id
    element definition.path:
      value: Binary.id
    element definition.short:
      value: Logical id of this artifact
    element definition.definition:
      value: The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
    element definition.comment:
      value: The only time that a resource does not have an id is when it is being submitted to the server using a create operation.
    element definition.min:
      value: 0
    element definition.max:
      value: 1
    element definition.base:
      element definition.base.path:
        value: Resource.id
      element definition.base.min:
        value: 0
      element definition.base.max:
        value: 1
    element definition.type:
      index: 0
      element.extension:
        index: 0
      element definition.type.code:
        value: http://hl7.org/fhirpath/System.String
    element definition.is modifier:
      value: false
    element definition.is summary:
      value: true
  structure definition.snapshot.element:
    index: 2
    element.id:
      value: Binary.meta
    element definition.path:
      value: Binary.meta
    element definition.short:
      value: Metadata about the resource
    element definition.definition:
      value: 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.
    element definition.min:
      value: 0
    element definition.max:
      value: 1
    element definition.base:
      element definition.base.path:
        value: Resource.meta
      element definition.base.min:
        value: 0
      element definition.base.max:
        value: 1
    element definition.type:
      index: 0
      element definition.type.code:
        value: Meta
    element definition.constraint:
      index: 0
      element definition.constraint.key:
        value: ele-1
      element definition.constraint.severity:
        value: error
      element definition.constraint.human:
        value: All FHIR elements must have a @value or children
      element definition.constraint.expression:
        value: hasValue() or (children().count() > id.count())
      element definition.constraint.xpath:
        value: @value|f:*|h:div
      element definition.constraint.source:
        value: http://hl7.org/fhir/StructureDefinition/Element
        link: http://hl7.org/fhir/StructureDefinition/Element
    element definition.is modifier:
      value: false
    element definition.is summary:
      value: true
  structure definition.snapshot.element:
    index: 3
    element.id:
      value: Binary.implicitRules
    element definition.path:
      value: Binary.implicitRules
    element definition.short:
      value: A set of rules under which this content was created
    element definition.definition:
      value: 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.
    element definition.comment:
      value: 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.
    element definition.min:
      value: 0
    element definition.max:
      value: 1
    element definition.base:
      element definition.base.path:
        value: Resource.implicitRules
      element definition.base.min:
        value: 0
      element definition.base.max:
        value: 1
    element definition.type:
      index: 0
      element definition.type.code:
        value: uri
    element definition.constraint:
      index: 0
      element definition.constraint.key:
        value: ele-1
      element definition.constraint.severity:
        value: error

value: id

value: All FHIR elements must have a @value or children

value: hasValue() or (children().count() > id.count())

value: @value|f:*|h:div

value: true

value: 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

value: true

index: 4
element.id:
  value: Binary.language
element definition.path:
  value: Binary.language
element definition.short:
  value: Language of the resource content
element definition.definition:
  value: The base language in which the resource is written.
element definition.comment:
  value: 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).
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Resource.language
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: code
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet
    extension.value canonical:
      value: http://hl7.org/fhir/ValueSet/all-languages
      link: http://hl7.org/fhir/ValueSet/all-languages
  element.extension:
    index: 1
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: Language
  element definition.binding.strength:
    value: preferred
  element definition.binding.description:
    value: A human language.
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/languages|4.0.1
    link: 4.0
    link: .1

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

index: 6
element.id:
  value: Binary.securityContext
element definition.path:
  value: Binary.securityContext
element definition.short:
  value: Identifies another resource to use as proxy when enforcing access control
element definition.definition:
  value: 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.
element definition.comment:
  value: 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.
element definition.min:
  value: 0
element definition.max:
  value: 0
element definition.base:
  element definition.base.path:
    value: Binary.securityContext
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: http://hl7.org/fhir/StructureDefinition/Resource|4.0.1
    index: 0
    link: 4.0
    link: .1
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a

index: 7
element.id:
  value: Binary.data
element definition.path:
  value: Binary.data
element definition.short:
  value: The actual content
element definition.definition:
  value: The actual content, base64 encoded.
element definition.comment:
  value: 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.
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Binary.data
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: base64Binary
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ED.data

structure definition.differential.element:
  index: 0
  element.id:
    value: Binary
  element definition.path:
    value: Binary
structure definition.differential.element:
  index: 1
  element.id:
    value: Binary.contentType
  element definition.path:
    value: Binary.contentType
  element definition.fixed code:
    value: application/fhir+json
structure definition.differential.element:
  index: 2
  element.id:
    value: Binary.securityContext
  element definition.path:
    value: Binary.securityContext
  element definition.max:
    value: 0
structure definition.differential.element:
  index: 3
  element.id:
    value: Binary.data
  element definition.path:
    value: Binary.data
  element definition.min:
    value: 1