PackagesCanonicalsLogsProblems
    Packages
    rs/medcom.fhir.dk.messaging@2.1.0
    http://medcomfhir.dk/ig/messaging/StructureDefinition/medcom-messaging-messageHeader
description: MessageHeader for MedCom messages
package_name: rs/medcom.fhir.dk.messaging
derivation: constraint
name: MedComMessagingMessageHeader
type: MessageHeader
elements:
  id: {short: Each message shall include a globally unique id., mustSupport: true, index: 0}
  text: {short: A summary of the resource content. The narrative text shall always be included when exchanging a MedCom message. All MustSupport elements and extensions shall be included., mustSupport: true, index: 1}
  event:
    short: The event element shall contain a value from MedComMessagingMessageTypes
    mustSupport: true
    choices: [eventCoding]
    index: 3
  eventCoding: {type: Coding, short: The event element shall contain a value from MedComMessagingMessageTypes, mustSupport: true, choiceOf: event, index: 4}
  event[x]:
    elements:
      code: {index: 5}
    required: [code]
  destination:
    index: 6
    extensions:
      use: {url: 'http://medcomfhir.dk/ig/messaging/StructureDefinition/medcom-messaging-destinationUseExtension', min: 1, max: 1, type: Extension, mustSupport: true, index: 8}
    elements:
      extension:
        index: 7
        slicing:
          rules: open
          ordered: false
          discriminator:
          - {path: url, type: value}
          min: 1
          slices:
            use:
              match: {url: null}
              schema: {type: Extension, mustSupport: true, url: 'http://medcomfhir.dk/ig/messaging/StructureDefinition/medcom-messaging-destinationUseExtension', index: 8}
              min: 1
              max: 1
    required: [extension]
    slicing:
      rules: closed
      discriminator:
      - {path: $this.extension.value, type: value}
      min: 1
      slices:
        primary:
          match:
            $this:
              extension: {value: null}
          schema:
            mustSupport: true
            _required: true
            index: 9
            extensions:
              use:
                url: http://medcomfhir.dk/ig/messaging/StructureDefinition/medcom-messaging-destinationUseExtension
                type: Extension
                mustSupport: true
                index: 10
                elements:
                  value:
                    pattern:
                      type: Coding
                      value: {code: primary, system: 'http://medcomfhir.dk/ig/terminology/CodeSystem/medcom-messaging-destinationUse'}
                    choices: []
                    type: Coding
                    index: 12
            elements:
              extension:
                type: Extension
                mustSupport: true
                url: http://medcomfhir.dk/ig/messaging/StructureDefinition/medcom-messaging-destinationUseExtension
                index: 10
                slicing:
                  slices:
                    use:
                      match: {}
                      schema:
                        type: Extension
                        mustSupport: true
                        url: http://medcomfhir.dk/ig/messaging/StructureDefinition/medcom-messaging-destinationUseExtension
                        index: 10
                        elements:
                          value:
                            pattern:
                              type: Coding
                              value: {code: primary, system: 'http://medcomfhir.dk/ig/terminology/CodeSystem/medcom-messaging-destinationUse'}
                            choices: []
                            type: Coding
                            index: 12
              endpoint: {mustSupport: true, index: 13}
              receiver:
                type: Reference
                short: The primary reciever of the message
                mustSupport: true
                refers: ['http://medcomfhir.dk/ig/messaging/StructureDefinition/medcom-messaging-organization']
                index: 14
            required: [receiver]
        cc:
          match:
            $this:
              extension: {value: null}
          schema:
            array: true
            index: 15
            extensions:
              use:
                url: http://medcomfhir.dk/ig/messaging/StructureDefinition/medcom-messaging-destinationUseExtension
                type: Extension
                mustSupport: true
                index: 16
                elements:
                  value:
                    pattern:
                      type: Coding
                      value: {code: cc, system: 'http://medcomfhir.dk/ig/terminology/CodeSystem/medcom-messaging-destinationUse'}
                    choices: []
                    type: Coding
                    index: 18
            elements:
              extension:
                type: Extension
                mustSupport: true
                url: http://medcomfhir.dk/ig/messaging/StructureDefinition/medcom-messaging-destinationUseExtension
                index: 16
                slicing:
                  slices:
                    use:
                      match: {}
                      schema:
                        type: Extension
                        mustSupport: true
                        url: http://medcomfhir.dk/ig/messaging/StructureDefinition/medcom-messaging-destinationUseExtension
                        index: 16
                        elements:
                          value:
                            pattern:
                              type: Coding
                              value: {code: cc, system: 'http://medcomfhir.dk/ig/terminology/CodeSystem/medcom-messaging-destinationUse'}
                            choices: []
                            type: Coding
                            index: 18
              endpoint: {mustSupport: true, index: 19}
              receiver:
                type: Reference
                short: The carbon copy reciever of the message. Is only used when a message has multiple recievers.
                mustSupport: true
                refers: ['http://medcomfhir.dk/ig/messaging/StructureDefinition/medcom-messaging-organization']
                index: 20
            required: [receiver]
  sender:
    type: Reference
    short: The actual sender of the message
    mustSupport: true
    refers: ['http://medcomfhir.dk/ig/messaging/StructureDefinition/medcom-messaging-organization']
    index: 21
  source:
    short: Contains the information about the target for the Acknowledgement message.
    mustSupport: true
    index: 22
    elements:
      endpoint: {mustSupport: true, index: 23}
package_version: 2.1.0
class: profile
kind: resource
url: http://medcomfhir.dk/ig/messaging/StructureDefinition/medcom-messaging-messageHeader
base: http://hl7.org/fhir/StructureDefinition/MessageHeader
version: 2.1.0
required: [destination, id, sender]