<?xml version='1.0' encoding='UTF-8'?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_erezept_create_de" targetNamespace="https://itl-software.com/memm/bpmn">
  <bpmn:collaboration id="Collaboration_erezept_create_de">
    <bpmn:documentation>Illustrativer erfolgreicher $create-Aufruf, kein ausführbarer Fachdienst. Das Primärsystem übermittelt workflowType. Der Fachdienst liefert einen Task im Status draft mit Task-ID gleich PrescriptionID und AccessCode. Der AccessCode bleibt für das anschließende $activate im geschützten Integrationskontext. Quelle: TI-Flow Core IG 2.0.0, IG-TIFLOW-CORE-A223/A224, https://gemspec.gematik.de/ig/fhir/tiflow/2.0.0/op-create-req-fd.html.</bpmn:documentation><bpmn:participant id="Participant_PS_Create" name="Verordnendes PS" processRef="Process_PS_Create"/>
    <bpmn:participant id="Participant_MEMM_Create" name="MEMM TI-Flow Boundary" processRef="Process_MEMM_Create"/>
    <bpmn:participant id="Participant_FD_Create" name="TI-Flow Fachdienst" processRef="Process_FD_Create"/>
    <bpmn:messageFlow id="M_PSC_MEMM" name="" sourceRef="Task_PS_Create" targetRef="Start_MEMM_Create"/>
    <bpmn:messageFlow id="M_MEMM_FDC" name="" sourceRef="Task_MEMM_Create" targetRef="Start_FD_Create"/>
    <bpmn:messageFlow id="M_FDC_MEMM" name="" sourceRef="Task_FD_ReturnId" targetRef="Task_MEMM_ReceiveId"/>
    <bpmn:messageFlow id="M_MEMM_PSC" name="" sourceRef="Task_MEMM_ReturnId" targetRef="Task_PS_ReceiveId"/>
  </bpmn:collaboration>
  <bpmn:process id="Process_PS_Create" name="Verordnendes Primärsystem – $create" isExecutable="false">
    <bpmn:startEvent id="Start_PS_Create"/>
    <bpmn:sendTask id="Task_PS_Create" name="$create senden&#10;workflowType"/>
    <bpmn:receiveTask id="Task_PS_ReceiveId" name="Task (draft) empfangen&#10;Task-ID + AccessCode"/>
    <bpmn:endEvent id="End_PS_Create"/>
    <bpmn:sequenceFlow id="PSC1" sourceRef="Start_PS_Create" targetRef="Task_PS_Create"/>
    <bpmn:sequenceFlow id="PSC2" sourceRef="Task_PS_Create" targetRef="Task_PS_ReceiveId"/>
    <bpmn:sequenceFlow id="PSC3" sourceRef="Task_PS_ReceiveId" targetRef="End_PS_Create"/>
  </bpmn:process>
  <bpmn:process id="Process_MEMM_Create" name="MEMM TI-Flow Boundary – $create" isExecutable="false">
    <bpmn:startEvent id="Start_MEMM_Create" name="$create">
      <bpmn:messageEventDefinition/>
    </bpmn:startEvent>
    <bpmn:sendTask id="Task_MEMM_Create" name="Host-Vertrag → FHIR"/>
    <bpmn:receiveTask id="Task_MEMM_ReceiveId" name="Task (draft) empfangen&#10;Task-ID + AccessCode"/>
    <bpmn:sendTask id="Task_MEMM_ReturnId" name="Task (draft) zurückgeben&#10;Task-ID + AccessCode"/>
    <bpmn:endEvent id="End_MEMM_Create"/>
    <bpmn:sequenceFlow id="MC1" sourceRef="Start_MEMM_Create" targetRef="Task_MEMM_Create"/>
    <bpmn:sequenceFlow id="MC2" sourceRef="Task_MEMM_Create" targetRef="Task_MEMM_ReceiveId"/>
    <bpmn:sequenceFlow id="MC3" sourceRef="Task_MEMM_ReceiveId" targetRef="Task_MEMM_ReturnId"/>
    <bpmn:sequenceFlow id="MC4" sourceRef="Task_MEMM_ReturnId" targetRef="End_MEMM_Create"/>
  </bpmn:process>
  <bpmn:process id="Process_FD_Create" name="TI-Flow Fachdienst – $create" isExecutable="false">
    <bpmn:startEvent id="Start_FD_Create" name="$create">
      <bpmn:messageEventDefinition/>
    </bpmn:startEvent>
    <bpmn:serviceTask id="Task_FD_Create" name="Task in draft erzeugen&#10;AccessCode generieren"/>
    <bpmn:sendTask id="Task_FD_ReturnId" name="Task (draft) zurückgeben&#10;Task-ID + AccessCode"/>
    <bpmn:endEvent id="End_FD_Create"/>
    <bpmn:sequenceFlow id="FDC1" sourceRef="Start_FD_Create" targetRef="Task_FD_Create"/>
    <bpmn:sequenceFlow id="FDC2" sourceRef="Task_FD_Create" targetRef="Task_FD_ReturnId"/>
    <bpmn:sequenceFlow id="FDC3" sourceRef="Task_FD_ReturnId" targetRef="End_FD_Create"/>
  </bpmn:process>
  <bpmndi:BPMNDiagram id="Diagram_erezept_create_de">
    <bpmndi:BPMNPlane id="Plane_erezept_create_de" bpmnElement="Collaboration_erezept_create_de">
      <bpmndi:BPMNShape id="DI_Participant_PS_Create" bpmnElement="Participant_PS_Create" isHorizontal="true">
        <dc:Bounds x="30" y="30" width="1540" height="140"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Participant_MEMM_Create" bpmnElement="Participant_MEMM_Create" isHorizontal="true">
        <dc:Bounds x="30" y="190" width="1540" height="160"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Participant_FD_Create" bpmnElement="Participant_FD_Create" isHorizontal="true">
        <dc:Bounds x="30" y="370" width="1540" height="160"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Start_PS_Create" bpmnElement="Start_PS_Create">
        <dc:Bounds x="252" y="82" width="36" height="36"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Task_PS_Create" bpmnElement="Task_PS_Create">
        <dc:Bounds x="300" y="60" width="230" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Task_PS_ReceiveId" bpmnElement="Task_PS_ReceiveId">
        <dc:Bounds x="1240" y="60" width="230" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_End_PS_Create" bpmnElement="End_PS_Create">
        <dc:Bounds x="1510" y="82" width="36" height="36"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Start_MEMM_Create" bpmnElement="Start_MEMM_Create">
        <dc:Bounds x="350" y="252" width="36" height="36"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Task_MEMM_Create" bpmnElement="Task_MEMM_Create">
        <dc:Bounds x="405" y="225" width="300" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Task_MEMM_ReceiveId" bpmnElement="Task_MEMM_ReceiveId">
        <dc:Bounds x="950" y="225" width="220" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Task_MEMM_ReturnId" bpmnElement="Task_MEMM_ReturnId">
        <dc:Bounds x="1200" y="225" width="240" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_End_MEMM_Create" bpmnElement="End_MEMM_Create">
        <dc:Bounds x="1490" y="252" width="36" height="36"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Start_FD_Create" bpmnElement="Start_FD_Create">
        <dc:Bounds x="520" y="432" width="36" height="36"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Task_FD_Create" bpmnElement="Task_FD_Create">
        <dc:Bounds x="575" y="405" width="260" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Task_FD_ReturnId" bpmnElement="Task_FD_ReturnId">
        <dc:Bounds x="950" y="410" width="220" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_End_FD_Create" bpmnElement="End_FD_Create">
        <dc:Bounds x="1210" y="432" width="36" height="36"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="DI_PSC1" bpmnElement="PSC1">
        <di:waypoint x="288" y="100"/>
        <di:waypoint x="300" y="100"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_PSC2" bpmnElement="PSC2">
        <di:waypoint x="530" y="100"/>
        <di:waypoint x="1240" y="100"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_PSC3" bpmnElement="PSC3">
        <di:waypoint x="1470" y="100"/>
        <di:waypoint x="1510" y="100"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_MC1" bpmnElement="MC1">
        <di:waypoint x="386" y="270"/>
        <di:waypoint x="405" y="270"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_MC2" bpmnElement="MC2">
        <di:waypoint x="705" y="270"/>
        <di:waypoint x="950" y="270"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_MC3" bpmnElement="MC3">
        <di:waypoint x="1170" y="270"/>
        <di:waypoint x="1200" y="270"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_MC4" bpmnElement="MC4">
        <di:waypoint x="1440" y="270"/>
        <di:waypoint x="1490" y="270"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_FDC1" bpmnElement="FDC1">
        <di:waypoint x="556" y="450"/>
        <di:waypoint x="575" y="450"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_FDC2" bpmnElement="FDC2">
        <di:waypoint x="835" y="450"/>
        <di:waypoint x="950" y="450"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_FDC3" bpmnElement="FDC3">
        <di:waypoint x="1170" y="450"/>
        <di:waypoint x="1210" y="450"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_M_PSC_MEMM" bpmnElement="M_PSC_MEMM">
        <di:waypoint x="415" y="140"/>
        <di:waypoint x="415" y="185"/>
        <di:waypoint x="368" y="185"/>
        <di:waypoint x="368" y="252"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_M_MEMM_FDC" bpmnElement="M_MEMM_FDC">
        <di:waypoint x="555" y="315"/>
        <di:waypoint x="555" y="365"/>
        <di:waypoint x="538" y="365"/>
        <di:waypoint x="538" y="432"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_M_FDC_MEMM" bpmnElement="M_FDC_MEMM">
        <di:waypoint x="1060" y="410"/>
        <di:waypoint x="1060" y="350"/>
        <di:waypoint x="1060" y="315"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_M_MEMM_PSC" bpmnElement="M_MEMM_PSC">
        <di:waypoint x="1320" y="225"/>
        <di:waypoint x="1320" y="180"/>
        <di:waypoint x="1355" y="180"/>
        <di:waypoint x="1355" y="140"/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
