FHIR © HL7.org  |  Server Home  |  XIG Home  |  XIG Stats  |  Server Source  |  FHIR  

FHIR IG Statistics: StructureMap/MedComMessagingMessage2ehmiSbdh-transform

Packagedk-ehmi-sbdh
Resource TypeStructureMap
IdMedComMessagingMessage2ehmiSbdh-transform
FHIR VersionR4
Sourcehttp://medcomehmi.dk/ig/dk-ehmi-sbdh/https://build.fhir.org/ig/medcomdk/dk-ehmi-sbdh/StructureMap-MedComMessagingMessage2ehmiSbdh-transform.html
URLhttp://medcomehmi.dk/ig/dk-ehmi-sbdh/StructureMap/MedcomMessagingMessage2Sbdh-transform
Version1.0.2
Statusdraft
Date2025-06-24T12:01:28+00:00
NameMedcomMessagingMessage2SbdhTransform
TitleTransformation specification of a MedcomMessagingMessage to an ehmiSBDH-Envelope
Realmdk
DescriptionTransform from a MedCom Messaging Messsage to an ehmiSBDH-Envelope

Resources that use this resource

No resources found


Resources that this resource uses

No resources found


Narrative

Note: links and images are rebased to the (stated) source

Generated Narrative: StructureMap MedComMessagingMessage2ehmiSbdh-transform

map "http://medcomehmi.dk/ig/dk-ehmi-sbdh/StructureMap/MedcomMessagingMessage2Sbdh-transform" = "MedcomMessagingMessage2SbdhTransform"

// Transform from a MedCom Messaging Messsage to an ehmiSBDH-Envelope

uses "http://medcomfhir.dk/ig/messaging/StructureDefinition/medcom-messaging-message" as source
uses "https://build.fhir.org/ig/medcomdk/dk-ehmi-sbdh/ehmiSBDH/StandardBusinessDocumentHeader.xsd" as target

group HeaderVersion(source source : Bundle, target target : StandardBusinessDocumentHeader) {
  source default "1.0" as HeaderVersion -> target.StandardBusinessDocumentHeader/HeaderVersion = create() "HeaderVersion";
}

group SbdhSender(source source : Organization, target target : Sender) {
  source.[Bundle.entry[0].resource.sender.reference.resolve().identifier.where(system = 'https://www.gs1.org/gln').value] -> target.StandardBusinessDocumentHeader/Sender/identifier = copy() "SbdhSenderIdentifierValue";
  source default "iso6523-actorid-upis" as SbdhSenderIdentifierAuthority -> target.StandardBusinessDocumentHeader/Sender/identifier@Authority = create() "SbdhSenderIdentifierAuthority";
}

group SbdhReceiver(source source : Organization, target target : Receiver) {
  source.[Bundle.entry[0].resource.destination.receiver.reference.resolve().identifier.where(system = 'https://www.gs1.org/gln').value] -> target.StandardBusinessDocumentHeader/Receiver/identifier = copy() "SbdhIdentifierValue";
  source default "iso6523-actorid-upis" as IdentifierAuthority -> target.StandardBusinessDocumentHeader/Receiver/identifier@Authority = create() "SbdhReceiverIdentifierAuthority";
}

group SbdhDocumentIdentification(source source : MessageHeader, target target : DocumentIdentification) {
  source.MessageHeader.definition[pre|] -> target.StandardBusinessDocumentHeader/DocumentIdentification/Standard = copy() "SbdhDocumentIdentificationStandard";
  source.MessageHeader.definition[post|] -> target.StandardBusinessDocumentHeader/DocumentIdentification/TypeVersion = copy() "SbdhDocumentIdentificationTypeVersion";
  source as SbdhEnvelopeIdentifier -> target = copy() "SbdhDocumentIdentificationInstanceIdentifier";
  source default "Bundle" as SbdhDocumentIdentificationType -> target.StandardBusinessDocumentHeader/DocumentIdentification/Type = copy() "SbdhDocumentIdentificationType";
}

group SbdhDocumentIdentificationCreationDateAndTime(source source : Provenance, target target : DocumentIdentification) {
  source.Provenance.recorded -> target.StandardBusinessDocumentHeader/DocumentIdentification/CreationDateAndTime = copy() "SbdhDocumentIdentificationCreationDateAndTime";
}

group BusinessScopeEdeliveryMessageCommunication(source source : Bundle, target target : sbdhBusinessScope) {
  source default "DOCUMENTID" -> target.Scope[DOCUMENTID]/Type = create() "ScopeDocumentType";
  source.Bundle.id -> target.Scope[DOCUMENTID]/InstanceIdentifier = copy() "ScopeDocumentInstanceIdentifier";
  source default "dk-medcom-messaging" -> target.Scope[DOCUMENTID]/Identifier = create() "ScopeDocumentIdentifier";
  source default "PROCESSID" -> target.Scope[PROCESSID]/Type = create() "ScopeProcessIdType";
  source default "sdn-emergence" -> target.Scope[PROCESSID]/InstanceIdentifier = create() "ScopeProcessIdInstanceIdentifier";
  source default "dk-medcom-messaging" -> target.Scope[PROCESSID]/Identifier = create() "ScopeProcessIdIdentifier";
}

group BusinessScopeHealthMessageCommunication(source source : Bundle, target target : sbdhBusinessScope) {
  source default "PATIENTID" -> target.Scope[PATIENTID]/Type = create() "ScopePatientIdType";
  source.MedComMessagingMessage(Bundle.entry.resource.ofType(Patient).identifier -> target.Scope[PATIENTID]/InstanceIdentifier = copy() "ScopePatientIdInstanceIdentifier";
  source default "dk-medcom-messaging" -> target.Scope[PATIENTID]/Identifier = create() "ScopePatientIdIdentifier";
  source default "SENDERID" -> target.Scope[SENDERID]/Type = create() "ScopeSenderIdType";
  source.MedComMessagingMessage(Bundle.entry.resource.ofType(SenderOrganization).identifier[SOR-ID].value -> target.Scope[SENDERID]/InstanceIdentifier = copy() "ScopeSenderIdInstanceIdentifier";
  source default "dk-medcom-messaging" -> target.Scope[SENDERID]/Identifier = create() "ScopeSenderIdIdentifier";
  source default "RECEIVERID" -> target.Scope[RECEIVERID]/Type = create() "ScopeReceiverIdType";
  source.MedComMessagingMessage(Bundle.entry.resource.ofType(ReceiverOrganization).identifier[SOR-ID].value -> target.Scope[RECEIVERID]/InstanceIdentifier = copy() "ScopeReceiverIdInstanceIdentifier";
  source default "dk-medcom-messaging" -> target.Scope[RECEIVERID]/Identifier = create() "ScopeReceiverIdIdentifier";
  source default "MESSAGEIDENTIFIER" -> target.Scope[MESSAGEIDENTIFIER]/Type = create() "ScopeMessageIdentiferType";
  source.MedComMessagingMessage(Bundle.entry[0].resource.id -> target.Scope[MESSAGEIDENTIFIER]/InstanceIdentifier = copy() "ScopeMessageIdentiferInstanceIdentifier";
  source default "dk-medcom-messaging" -> target.Scope[MESSAGEIDENTIFIER]/Identifier = create() "ScopeMessageIdentiferIdentifier";
  source default "MESSAGEENVELOPEIDENTIFIER" -> target.Scope[MESSAGEENVELOPEIDENTIFIER]/Type = create() "ScopeMessageEnvelopeIdentiferType";
  source.Bundle.id -> target.Scope[MESSAGEENVELOPEIDENTIFIER]/InstanceIdentifier = copy() "ScopeMessageEnvelopeIdentiferInstanceIdentifier";
  source default "dk-medcom-messaging" -> target.Scope[MESSAGEENVELOPEIDENTIFIER]/Identifier = create() "ScopeMessageEnvelopeIdentiferIdentifier";
  source default "ORIGINALMESSAGEIDENTIFIER" -> target.Scope[ORIGINALMESSAGEIDENTIFIER]/Type = create() "ScopeOriginalMessageIdentiferType";
  source.Bundle.id -> target.Scope[ORIGINALMESSAGEIDENTIFIER]/InstanceIdentifier = copy() "ScopeOriginalMessageIdentiferInstanceIdentifier";
  source default "dk-medcom-messaging" -> target.Scope[ORIGINALMESSAGEIDENTIFIER]/Identifier = create() "ScopeOriginalMessageIdentiferIdentifier";
  source default "ORIGINALENVELOPEIDENTIFIER" -> target.Scope[ORIGINALENVELOPEIDENTIFIER]/Type = create() "ScopeOriginalEnvelopeIdentiferType";
  source.Bundle.id -> target.Scope[ORIGINALENVELOPEIDENTIFIER]/InstanceIdentifier = copy() "ScopeOriginalEnvelopeIdentiferInstanceIdentifier";
  source default "dk-medcom-messaging" -> target.Scope[ORIGINALENVELOPEIDENTIFIER]/Identifier = create() "ScopeOriginalEnvelopeIdentiferIdentifier";
  source default "ORIGINALMESSAGESTANDARD" -> target.Scope[ORIGINALMESSAGESTANDARD]/Type = create() "ScopeOriginalMessageStandardType";
  source.Bundle.id -> target.Scope[ORIGINALMESSAGESTANDARD]/InstanceIdentifier = copy() "ScopeOriginalMessageStandardInstanceIdentifier";
  source default "dk-medcom-messaging" -> target.Scope[ORIGINALMESSAGESTANDARD]/Identifier = create() "ScopeOriginalMessageStandardIdentifier";
  source default "ORIGINALMESSAGEVERSION" -> target.Scope[ORIGINALMESSAGEVERSION]/Type = create() "ScopeOriginalMessageVersionType";
  source.Bundle.id -> target.Scope[ORIGINALMESSAGEVERSION]/InstanceIdentifier = copy() "ScopeOriginalMessageVersionInstanceIdentifier";
  source default "dk-medcom-messaging" -> target.Scope[ORIGINALMESSAGEVERSION]/Identifier = create() "ScopeOriginalMessageVersionIdentifier";
}

group BusinessScopeXdsMetadata(source source : Bundle, target target : sbdhBusinessScope) {
  source default "XDS-METADATA" -> target.Scope[XDS-METADATA]/Type = create() "ScopeXdsMetadataType";
  source.Bundle.id -> target.Scope[XDS-METADATA]/InstanceIdentifier = copy() "ScopeXdsMetadataInstanceIdentifier";
  source default "dk-medcom-messaging" -> target.Scope[XDS-METADATA]/Identifier = create() "ScopeXdsMetadataIdentifier";
}

group BusinessScopeSbdhReliableMessaging(source source : Bundle, target target : sbdhBusinessScopeReliableMessaging) {
  source default "EHMI-ReceiptAcknowledgement" -> target.Scope[ReceiptAcknowledgement]/Type = create() "ScopeReceiptAcknowledgement";
  source default "Request" -> target.Scope[ReceiptAcknowledgement]/InstanceIdentifier = create() "ScopeReceiptAcknowledgementInstanceIdentifier";
  source default "dk-medcom-messaging" -> target.Scope[ReceiptAcknowledgement]/Identifier = create() "ScopeReceiptAcknowledgementIdentifier";
  source default "RequestingDocumentCreationDateTime" -> target.CorrelationInformation/RequestingDocumentCreationDateTime = create() "CorrelationInformationRequestingDocumentCreationDateTime";
  source default "RequestingDocumentInstanceIdentifier" -> target.CorrelationInformation/RequestingDocumentInstanceIdentifier = create() "CorrelationInformationRequestingDocumentInstanceIdentifier";
  source default "ExpectedResponseDateTime" -> target.CorrelationInformation/ExpectedResponseDateTime = create() "CorrelationInformationExpectedResponseDateTime";
}

group BusinessServicesRequest(source source : Bundle, target target : sbdhBusinessScopeBusinessServices) {
  source default "EHMI-ReceiptAcknowledgement-Request" -> target.BusinessService/ServiceName = create() "BusinessServiceReceiptAcknowledgementRequest";
  source default "RequestingServiceTransaction" -> target.BusinessService/ServiceTransaction/TypeOfServiceTransaction = create() "ServiceTransactionTypeOfServiceTransaction";
  source default "false" -> target.BusinessService/ServiceTransaction/IsNonRepudiationRequired = create() "ServiceTransactionIsNonRepudiationRequired";
  source default "false" -> target.BusinessService/ServiceTransaction/IsAuthenticationRequired = create() "ServiceTransactionIsAuthenticationRequired";
  source default "false" -> target.BusinessService/ServiceTransaction/IsNonRepudiationOfReceiptRequired = create() "ServiceTransactionIsNonRepudiationOfReceiptRequired";
  source default "false" -> target.BusinessService/ServiceTransaction/IsIntelligibleCheckRequired = create() "ServiceTransactionIsIntelligibleCheckRequired";
  source default "false" -> target.BusinessService/ServiceTransaction/IsApplicationErrorResponseRequested = create() "ServiceTransactionIsApplicationErrorResponseRequested";
  source default "300000" -> target.BusinessService/ServiceTransaction/TimeToAcknowledgeReceipt = create() "ServiceTransactionTimeToAcknowledgeReceipt";
  source default "0" -> target.BusinessService/ServiceTransaction/TimeToAcknowledgeAcceptance = create() "ServiceTransactionTimeToAcknowledgeAcceptance";
  source default "0" -> target.BusinessService/ServiceTransaction/TimeToPerform = create() "ServiceTransactionTimeToPerform";
  source default "0" -> target.BusinessService/ServiceTransaction/Recurrence = create() "ServiceTransactionRecurrence";
}


Source

{
  "resourceType": "StructureMap",
  "id": "MedComMessagingMessage2ehmiSbdh-transform",
  "text": {
    "status": "generated",
    "div": "<!-- snip (see above) -->"
  },
  "url": "http://medcomehmi.dk/ig/dk-ehmi-sbdh/StructureMap/MedcomMessagingMessage2Sbdh-transform",
  "version": "1.0.2",
  "name": "MedcomMessagingMessage2SbdhTransform",
  "title": "Transformation specification of a MedcomMessagingMessage to an ehmiSBDH-Envelope ",
  "status": "draft",
  "date": "2025-06-24T12:01:28+00:00",
  "publisher": "MedCom",
  "contact": [
    {
      "name": "MedCom",
      "telecom": [
        {
          "system": "url",
          "value": "http://medcom.dk"
        }
      ]
    }
  ],
  "description": "Transform from a MedCom Messaging Messsage to an ehmiSBDH-Envelope",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "urn:iso:std:iso:3166",
          "code": "DK",
          "display": "Denmark"
        }
      ]
    }
  ],
  "structure": [
    {
      "url": "http://medcomfhir.dk/ig/messaging/StructureDefinition/medcom-messaging-message",
      "mode": "source"
    },
    {
      "url": "https://build.fhir.org/ig/medcomdk/dk-ehmi-sbdh/ehmiSBDH/StandardBusinessDocumentHeader.xsd",
      "mode": "target"
    }
  ],
  "group": [
    {
      "name": "HeaderVersion",
      "typeMode": "none",
      "input": [
        {
          "name": "source",
          "type": "Bundle",
          "mode": "source"
        },
        {
          "name": "target",
          "type": "StandardBusinessDocumentHeader",
          "mode": "target"
        }
      ],
      "rule": [
        {
          "name": "HeaderVersion",
          "source": [
            {
              "context": "source",
              "defaultValueString": "1.0",
              "variable": "HeaderVersion"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "StandardBusinessDocumentHeader/HeaderVersion",
              "transform": "create"
            }
          ]
        }
      ]
    },
    {
      "name": "SbdhSender",
      "typeMode": "none",
      "input": [
        {
          "name": "source",
          "type": "Organization",
          "mode": "source"
        },
        {
          "name": "target",
          "type": "Sender",
          "mode": "target"
        }
      ],
      "rule": [
        {
          "name": "SbdhSenderIdentifierValue",
          "source": [
            {
              "context": "source",
              "element": "[Bundle.entry[0].resource.sender.reference.resolve().identifier.where(system = 'https://www.gs1.org/gln').value]"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "StandardBusinessDocumentHeader/Sender/identifier",
              "transform": "copy"
            }
          ]
        },
        {
          "name": "SbdhSenderIdentifierAuthority",
          "source": [
            {
              "context": "source",
              "defaultValueString": "iso6523-actorid-upis",
              "variable": "SbdhSenderIdentifierAuthority"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "StandardBusinessDocumentHeader/Sender/identifier@Authority",
              "transform": "create"
            }
          ]
        }
      ]
    },
    {
      "name": "SbdhReceiver",
      "typeMode": "none",
      "input": [
        {
          "name": "source",
          "type": "Organization",
          "mode": "source"
        },
        {
          "name": "target",
          "type": "Receiver",
          "mode": "target"
        }
      ],
      "rule": [
        {
          "name": "SbdhIdentifierValue",
          "source": [
            {
              "context": "source",
              "element": "[Bundle.entry[0].resource.destination.receiver.reference.resolve().identifier.where(system = 'https://www.gs1.org/gln').value]"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "StandardBusinessDocumentHeader/Receiver/identifier",
              "transform": "copy"
            }
          ]
        },
        {
          "name": "SbdhReceiverIdentifierAuthority",
          "source": [
            {
              "context": "source",
              "defaultValueString": "iso6523-actorid-upis",
              "variable": "IdentifierAuthority"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "StandardBusinessDocumentHeader/Receiver/identifier@Authority",
              "transform": "create"
            }
          ]
        }
      ]
    },
    {
      "name": "SbdhDocumentIdentification",
      "typeMode": "none",
      "input": [
        {
          "name": "source",
          "type": "MessageHeader",
          "mode": "source"
        },
        {
          "name": "target",
          "type": "DocumentIdentification",
          "mode": "target"
        }
      ],
      "rule": [
        {
          "name": "SbdhDocumentIdentificationStandard",
          "source": [
            {
              "context": "source",
              "element": "MessageHeader.definition[pre|]"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "StandardBusinessDocumentHeader/DocumentIdentification/Standard",
              "transform": "copy"
            }
          ]
        },
        {
          "name": "SbdhDocumentIdentificationTypeVersion",
          "source": [
            {
              "context": "source",
              "element": "MessageHeader.definition[post|]"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "StandardBusinessDocumentHeader/DocumentIdentification/TypeVersion",
              "transform": "copy"
            }
          ]
        },
        {
          "name": "SbdhDocumentIdentificationInstanceIdentifier",
          "source": [
            {
              "context": "source",
              "variable": "SbdhEnvelopeIdentifier"
            }
          ],
          "target": [
            {
              "id": "StandardBusinessDocumentHeader/DocumentIdentification/InstanceIdentifier",
              "context": "target",
              "contextType": "variable",
              "transform": "copy"
            }
          ]
        },
        {
          "name": "SbdhDocumentIdentificationType",
          "source": [
            {
              "context": "source",
              "defaultValueCode": "Bundle",
              "variable": "SbdhDocumentIdentificationType"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "StandardBusinessDocumentHeader/DocumentIdentification/Type",
              "transform": "copy"
            }
          ]
        }
      ]
    },
    {
      "name": "SbdhDocumentIdentificationCreationDateAndTime",
      "typeMode": "none",
      "input": [
        {
          "name": "source",
          "type": "Provenance",
          "mode": "source"
        },
        {
          "name": "target",
          "type": "DocumentIdentification",
          "mode": "target"
        }
      ],
      "rule": [
        {
          "name": "SbdhDocumentIdentificationCreationDateAndTime",
          "source": [
            {
              "context": "source",
              "element": "Provenance.recorded"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "StandardBusinessDocumentHeader/DocumentIdentification/CreationDateAndTime",
              "transform": "copy"
            }
          ]
        }
      ]
    },
    {
      "name": "BusinessScopeEdeliveryMessageCommunication",
      "typeMode": "none",
      "input": [
        {
          "name": "source",
          "type": "Bundle",
          "mode": "source"
        },
        {
          "name": "target",
          "type": "sbdhBusinessScope",
          "mode": "target"
        }
      ],
      "rule": [
        {
          "name": "ScopeDocumentType",
          "source": [
            {
              "context": "source",
              "defaultValueString": "DOCUMENTID"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[DOCUMENTID]/Type",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeDocumentInstanceIdentifier",
          "source": [
            {
              "context": "source",
              "element": "Bundle.id"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[DOCUMENTID]/InstanceIdentifier",
              "transform": "copy"
            }
          ]
        },
        {
          "name": "ScopeDocumentIdentifier",
          "source": [
            {
              "context": "source",
              "defaultValueString": "dk-medcom-messaging"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[DOCUMENTID]/Identifier",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeProcessIdType",
          "source": [
            {
              "context": "source",
              "defaultValueString": "PROCESSID"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[PROCESSID]/Type",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeProcessIdInstanceIdentifier",
          "source": [
            {
              "context": "source",
              "defaultValueString": "sdn-emergence"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[PROCESSID]/InstanceIdentifier",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeProcessIdIdentifier",
          "source": [
            {
              "context": "source",
              "defaultValueString": "dk-medcom-messaging"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[PROCESSID]/Identifier",
              "transform": "create"
            }
          ]
        }
      ]
    },
    {
      "name": "BusinessScopeHealthMessageCommunication",
      "typeMode": "none",
      "input": [
        {
          "name": "source",
          "type": "Bundle",
          "mode": "source"
        },
        {
          "name": "target",
          "type": "sbdhBusinessScope",
          "mode": "target"
        }
      ],
      "rule": [
        {
          "name": "ScopePatientIdType",
          "source": [
            {
              "context": "source",
              "defaultValueString": "PATIENTID"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[PATIENTID]/Type",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopePatientIdInstanceIdentifier",
          "source": [
            {
              "context": "source",
              "element": "MedComMessagingMessage(Bundle.entry.resource.ofType(Patient).identifier"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[PATIENTID]/InstanceIdentifier",
              "transform": "copy"
            }
          ]
        },
        {
          "name": "ScopePatientIdIdentifier",
          "source": [
            {
              "context": "source",
              "defaultValueString": "dk-medcom-messaging"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[PATIENTID]/Identifier",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeSenderIdType",
          "source": [
            {
              "context": "source",
              "defaultValueString": "SENDERID"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[SENDERID]/Type",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeSenderIdInstanceIdentifier",
          "source": [
            {
              "context": "source",
              "element": "MedComMessagingMessage(Bundle.entry.resource.ofType(SenderOrganization).identifier[SOR-ID].value"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[SENDERID]/InstanceIdentifier",
              "transform": "copy"
            }
          ]
        },
        {
          "name": "ScopeSenderIdIdentifier",
          "source": [
            {
              "context": "source",
              "defaultValueString": "dk-medcom-messaging"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[SENDERID]/Identifier",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeReceiverIdType",
          "source": [
            {
              "context": "source",
              "defaultValueString": "RECEIVERID"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[RECEIVERID]/Type",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeReceiverIdInstanceIdentifier",
          "source": [
            {
              "context": "source",
              "element": "MedComMessagingMessage(Bundle.entry.resource.ofType(ReceiverOrganization).identifier[SOR-ID].value"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[RECEIVERID]/InstanceIdentifier",
              "transform": "copy"
            }
          ]
        },
        {
          "name": "ScopeReceiverIdIdentifier",
          "source": [
            {
              "context": "source",
              "defaultValueString": "dk-medcom-messaging"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[RECEIVERID]/Identifier",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeMessageIdentiferType",
          "source": [
            {
              "context": "source",
              "defaultValueString": "MESSAGEIDENTIFIER"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[MESSAGEIDENTIFIER]/Type",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeMessageIdentiferInstanceIdentifier",
          "source": [
            {
              "context": "source",
              "element": "MedComMessagingMessage(Bundle.entry[0].resource.id"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[MESSAGEIDENTIFIER]/InstanceIdentifier",
              "transform": "copy"
            }
          ]
        },
        {
          "name": "ScopeMessageIdentiferIdentifier",
          "source": [
            {
              "context": "source",
              "defaultValueString": "dk-medcom-messaging"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[MESSAGEIDENTIFIER]/Identifier",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeMessageEnvelopeIdentiferType",
          "source": [
            {
              "context": "source",
              "defaultValueString": "MESSAGEENVELOPEIDENTIFIER"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[MESSAGEENVELOPEIDENTIFIER]/Type",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeMessageEnvelopeIdentiferInstanceIdentifier",
          "source": [
            {
              "context": "source",
              "element": "Bundle.id"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[MESSAGEENVELOPEIDENTIFIER]/InstanceIdentifier",
              "transform": "copy"
            }
          ]
        },
        {
          "name": "ScopeMessageEnvelopeIdentiferIdentifier",
          "source": [
            {
              "context": "source",
              "defaultValueString": "dk-medcom-messaging"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[MESSAGEENVELOPEIDENTIFIER]/Identifier",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeOriginalMessageIdentiferType",
          "source": [
            {
              "context": "source",
              "defaultValueString": "ORIGINALMESSAGEIDENTIFIER"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[ORIGINALMESSAGEIDENTIFIER]/Type",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeOriginalMessageIdentiferInstanceIdentifier",
          "source": [
            {
              "context": "source",
              "element": "Bundle.id"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[ORIGINALMESSAGEIDENTIFIER]/InstanceIdentifier",
              "transform": "copy"
            }
          ]
        },
        {
          "name": "ScopeOriginalMessageIdentiferIdentifier",
          "source": [
            {
              "context": "source",
              "defaultValueString": "dk-medcom-messaging"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[ORIGINALMESSAGEIDENTIFIER]/Identifier",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeOriginalEnvelopeIdentiferType",
          "source": [
            {
              "context": "source",
              "defaultValueString": "ORIGINALENVELOPEIDENTIFIER"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[ORIGINALENVELOPEIDENTIFIER]/Type",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeOriginalEnvelopeIdentiferInstanceIdentifier",
          "source": [
            {
              "context": "source",
              "element": "Bundle.id"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[ORIGINALENVELOPEIDENTIFIER]/InstanceIdentifier",
              "transform": "copy"
            }
          ]
        },
        {
          "name": "ScopeOriginalEnvelopeIdentiferIdentifier",
          "source": [
            {
              "context": "source",
              "defaultValueString": "dk-medcom-messaging"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[ORIGINALENVELOPEIDENTIFIER]/Identifier",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeOriginalMessageStandardType",
          "source": [
            {
              "context": "source",
              "defaultValueString": "ORIGINALMESSAGESTANDARD"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[ORIGINALMESSAGESTANDARD]/Type",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeOriginalMessageStandardInstanceIdentifier",
          "source": [
            {
              "context": "source",
              "element": "Bundle.id"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[ORIGINALMESSAGESTANDARD]/InstanceIdentifier",
              "transform": "copy"
            }
          ]
        },
        {
          "name": "ScopeOriginalMessageStandardIdentifier",
          "source": [
            {
              "context": "source",
              "defaultValueString": "dk-medcom-messaging"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[ORIGINALMESSAGESTANDARD]/Identifier",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeOriginalMessageVersionType",
          "source": [
            {
              "context": "source",
              "defaultValueString": "ORIGINALMESSAGEVERSION"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[ORIGINALMESSAGEVERSION]/Type",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeOriginalMessageVersionInstanceIdentifier",
          "source": [
            {
              "context": "source",
              "element": "Bundle.id"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[ORIGINALMESSAGEVERSION]/InstanceIdentifier",
              "transform": "copy"
            }
          ]
        },
        {
          "name": "ScopeOriginalMessageVersionIdentifier",
          "source": [
            {
              "context": "source",
              "defaultValueString": "dk-medcom-messaging"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[ORIGINALMESSAGEVERSION]/Identifier",
              "transform": "create"
            }
          ]
        }
      ]
    },
    {
      "name": "BusinessScopeXdsMetadata",
      "typeMode": "none",
      "input": [
        {
          "name": "source",
          "type": "Bundle",
          "mode": "source"
        },
        {
          "name": "target",
          "type": "sbdhBusinessScope",
          "mode": "target"
        }
      ],
      "rule": [
        {
          "name": "ScopeXdsMetadataType",
          "source": [
            {
              "context": "source",
              "defaultValueString": "XDS-METADATA"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[XDS-METADATA]/Type",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeXdsMetadataInstanceIdentifier",
          "source": [
            {
              "context": "source",
              "element": "Bundle.id"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[XDS-METADATA]/InstanceIdentifier",
              "transform": "copy"
            }
          ]
        },
        {
          "name": "ScopeXdsMetadataIdentifier",
          "source": [
            {
              "context": "source",
              "defaultValueString": "dk-medcom-messaging"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[XDS-METADATA]/Identifier",
              "transform": "create"
            }
          ]
        }
      ]
    },
    {
      "name": "BusinessScopeSbdhReliableMessaging",
      "typeMode": "none",
      "input": [
        {
          "name": "source",
          "type": "Bundle",
          "mode": "source"
        },
        {
          "name": "target",
          "type": "sbdhBusinessScopeReliableMessaging",
          "mode": "target"
        }
      ],
      "rule": [
        {
          "name": "ScopeReceiptAcknowledgement",
          "source": [
            {
              "context": "source",
              "defaultValueString": "EHMI-ReceiptAcknowledgement"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[ReceiptAcknowledgement]/Type",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeReceiptAcknowledgementInstanceIdentifier",
          "source": [
            {
              "context": "source",
              "defaultValueString": "Request"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[ReceiptAcknowledgement]/InstanceIdentifier",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ScopeReceiptAcknowledgementIdentifier",
          "source": [
            {
              "context": "source",
              "defaultValueString": "dk-medcom-messaging"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "Scope[ReceiptAcknowledgement]/Identifier",
              "transform": "create"
            }
          ]
        },
        {
          "name": "CorrelationInformationRequestingDocumentCreationDateTime",
          "source": [
            {
              "context": "source",
              "defaultValueString": "RequestingDocumentCreationDateTime"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "CorrelationInformation/RequestingDocumentCreationDateTime",
              "transform": "create"
            }
          ]
        },
        {
          "name": "CorrelationInformationRequestingDocumentInstanceIdentifier",
          "source": [
            {
              "context": "source",
              "defaultValueString": "RequestingDocumentInstanceIdentifier"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "CorrelationInformation/RequestingDocumentInstanceIdentifier",
              "transform": "create"
            }
          ]
        },
        {
          "name": "CorrelationInformationExpectedResponseDateTime",
          "source": [
            {
              "context": "source",
              "defaultValueString": "ExpectedResponseDateTime"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "CorrelationInformation/ExpectedResponseDateTime",
              "transform": "create"
            }
          ]
        }
      ]
    },
    {
      "name": "BusinessServicesRequest",
      "typeMode": "none",
      "input": [
        {
          "name": "source",
          "type": "Bundle",
          "mode": "source"
        },
        {
          "name": "target",
          "type": "sbdhBusinessScopeBusinessServices",
          "mode": "target"
        }
      ],
      "rule": [
        {
          "name": "BusinessServiceReceiptAcknowledgementRequest",
          "source": [
            {
              "context": "source",
              "defaultValueString": "EHMI-ReceiptAcknowledgement-Request"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "BusinessService/ServiceName",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ServiceTransactionTypeOfServiceTransaction",
          "source": [
            {
              "context": "source",
              "defaultValueString": "RequestingServiceTransaction"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "BusinessService/ServiceTransaction/TypeOfServiceTransaction",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ServiceTransactionIsNonRepudiationRequired",
          "source": [
            {
              "context": "source",
              "defaultValueString": "false"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "BusinessService/ServiceTransaction/IsNonRepudiationRequired",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ServiceTransactionIsAuthenticationRequired",
          "source": [
            {
              "context": "source",
              "defaultValueString": "false"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "BusinessService/ServiceTransaction/IsAuthenticationRequired",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ServiceTransactionIsNonRepudiationOfReceiptRequired",
          "source": [
            {
              "context": "source",
              "defaultValueString": "false"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "BusinessService/ServiceTransaction/IsNonRepudiationOfReceiptRequired",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ServiceTransactionIsIntelligibleCheckRequired",
          "source": [
            {
              "context": "source",
              "defaultValueString": "false"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "BusinessService/ServiceTransaction/IsIntelligibleCheckRequired",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ServiceTransactionIsApplicationErrorResponseRequested",
          "source": [
            {
              "context": "source",
              "defaultValueString": "false"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "BusinessService/ServiceTransaction/IsApplicationErrorResponseRequested",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ServiceTransactionTimeToAcknowledgeReceipt",
          "source": [
            {
              "context": "source",
              "defaultValueString": "300000"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "BusinessService/ServiceTransaction/TimeToAcknowledgeReceipt",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ServiceTransactionTimeToAcknowledgeAcceptance",
          "source": [
            {
              "context": "source",
              "defaultValueString": "0"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "BusinessService/ServiceTransaction/TimeToAcknowledgeAcceptance",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ServiceTransactionTimeToPerform",
          "source": [
            {
              "context": "source",
              "defaultValueString": "0"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "BusinessService/ServiceTransaction/TimeToPerform",
              "transform": "create"
            }
          ]
        },
        {
          "name": "ServiceTransactionRecurrence",
          "source": [
            {
              "context": "source",
              "defaultValueString": "0"
            }
          ],
          "target": [
            {
              "context": "target",
              "contextType": "variable",
              "element": "BusinessService/ServiceTransaction/Recurrence",
              "transform": "create"
            }
          ]
        }
      ]
    }
  ]
}