<?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_activate_de" targetNamespace="https://itl-software.com/memm/bpmn">
  <bpmn:collaboration id="Collaboration_erezept_activate_de">
    <bpmn:participant id="Participant_PS_Activate" name="Verordnendes PS" processRef="Process_PS_Activate" />
    <bpmn:participant id="Participant_MEMM_Activate" name="MEMM TI-Flow Boundary" processRef="Process_MEMM_Activate" />
    <bpmn:participant id="Participant_FD_Activate" name="TI-Flow Fachdienst" processRef="Process_FD_Activate" />
    <bpmn:messageFlow id="M_PSA_MEMM" name="" sourceRef="Task_PS_Activate" targetRef="Start_MEMM_Activate" />
    <bpmn:messageFlow id="M_MEMM_FDA" name="" sourceRef="Task_MEMM_Activate" targetRef="Start_FD_Activate" />
    <bpmn:messageFlow id="M_FDA_MEMM" name="" sourceRef="Task_FD_Response" targetRef="Catch_MEMM_Response" />
    <bpmn:messageFlow id="M_MEMM_PSA" name="" sourceRef="Task_MEMM_ReturnResponse" targetRef="Task_PS_Status" />
  </bpmn:collaboration>
  <bpmn:process id="Process_PS_Activate" name="Verordnendes Primärsystem – $activate" isExecutable="false">
    <bpmn:startEvent id="Start_PS_Activate" />
    <bpmn:serviceTask id="Task_PS_QES" name="QES Bundle erstellen" />
    <bpmn:sendTask id="Task_PS_Activate" name="$activate senden" />
    <bpmn:receiveTask id="Task_PS_Status" name="Status verarbeiten" />
    <bpmn:endEvent id="End_PS_Activate" />
    <bpmn:sequenceFlow id="PSA1" sourceRef="Start_PS_Activate" targetRef="Task_PS_QES" />
    <bpmn:sequenceFlow id="PSA2" sourceRef="Task_PS_QES" targetRef="Task_PS_Activate" />
    <bpmn:sequenceFlow id="PSA3" sourceRef="Task_PS_Activate" targetRef="Task_PS_Status" />
    <bpmn:sequenceFlow id="PSA4" sourceRef="Task_PS_Status" targetRef="End_PS_Activate" />
  </bpmn:process>
  <bpmn:process id="Process_MEMM_Activate" name="MEMM TI-Flow Boundary – $activate" isExecutable="false">
    <bpmn:startEvent id="Start_MEMM_Activate" name="$activate">
      <bpmn:messageEventDefinition />
    </bpmn:startEvent>
    <bpmn:sendTask id="Task_MEMM_Activate" name="Aktivierungskontext → FHIR" />
    <bpmn:intermediateCatchEvent id="Catch_MEMM_Response" name="Antwort">
      <bpmn:messageEventDefinition />
    </bpmn:intermediateCatchEvent>
    <bpmn:sendTask id="Task_MEMM_ReturnResponse" name="Antwort zurückgeben" />
    <bpmn:endEvent id="End_MEMM_Activate" />
    <bpmn:sequenceFlow id="MA1" sourceRef="Start_MEMM_Activate" targetRef="Task_MEMM_Activate" />
    <bpmn:sequenceFlow id="MA2" sourceRef="Task_MEMM_Activate" targetRef="Catch_MEMM_Response" />
    <bpmn:sequenceFlow id="MA3" sourceRef="Catch_MEMM_Response" targetRef="Task_MEMM_ReturnResponse" />
    <bpmn:sequenceFlow id="MA4" sourceRef="Task_MEMM_ReturnResponse" targetRef="End_MEMM_Activate" />
  </bpmn:process>
  <bpmn:process id="Process_FD_Activate" name="TI-Flow Fachdienst – $activate" isExecutable="false">
    <bpmn:startEvent id="Start_FD_Activate" name="$activate">
      <bpmn:messageEventDefinition />
    </bpmn:startEvent>
    <bpmn:serviceTask id="Task_FD_Activate" name="Task aktivieren" />
    <bpmn:sendTask id="Task_FD_Response" name="Task / OperationOutcome" />
    <bpmn:endEvent id="End_FD_Activate" />
    <bpmn:sequenceFlow id="FDA1" sourceRef="Start_FD_Activate" targetRef="Task_FD_Activate" />
    <bpmn:sequenceFlow id="FDA2" sourceRef="Task_FD_Activate" targetRef="Task_FD_Response" />
    <bpmn:sequenceFlow id="FDA3" sourceRef="Task_FD_Response" targetRef="End_FD_Activate" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="Diagram_erezept_activate_de">
    <bpmndi:BPMNPlane id="Plane_erezept_activate_de" bpmnElement="Collaboration_erezept_activate_de">
      <bpmndi:BPMNShape id="DI_Participant_PS_Activate" bpmnElement="Participant_PS_Activate" isHorizontal="true">
        <dc:Bounds x="30" y="30" width="1540" height="140" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Participant_MEMM_Activate" bpmnElement="Participant_MEMM_Activate" isHorizontal="true">
        <dc:Bounds x="30" y="190" width="1540" height="160" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Participant_FD_Activate" bpmnElement="Participant_FD_Activate" isHorizontal="true">
        <dc:Bounds x="30" y="370" width="1540" height="160" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Start_PS_Activate" bpmnElement="Start_PS_Activate">
        <dc:Bounds x="245" y="82" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Task_PS_QES" bpmnElement="Task_PS_QES">
        <dc:Bounds x="300" y="60" width="230" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Task_PS_Activate" bpmnElement="Task_PS_Activate">
        <dc:Bounds x="580" y="60" width="230" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Task_PS_Status" bpmnElement="Task_PS_Status">
        <dc:Bounds x="1240" y="60" width="230" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_End_PS_Activate" bpmnElement="End_PS_Activate">
        <dc:Bounds x="1510" y="82" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Start_MEMM_Activate" bpmnElement="Start_MEMM_Activate">
        <dc:Bounds x="650" y="252" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Task_MEMM_Activate" bpmnElement="Task_MEMM_Activate">
        <dc:Bounds x="705" y="225" width="300" height="90" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Catch_MEMM_Response" bpmnElement="Catch_MEMM_Response">
        <dc:Bounds x="1240" y="252" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Task_MEMM_ReturnResponse" bpmnElement="Task_MEMM_ReturnResponse">
        <dc:Bounds x="1295" y="225" width="230" height="90" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_End_MEMM_Activate" bpmnElement="End_MEMM_Activate">
        <dc:Bounds x="1540" y="252" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Start_FD_Activate" bpmnElement="Start_FD_Activate">
        <dc:Bounds x="850" y="432" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Task_FD_Activate" bpmnElement="Task_FD_Activate">
        <dc:Bounds x="875" y="405" width="250" height="90" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_Task_FD_Response" bpmnElement="Task_FD_Response">
        <dc:Bounds x="1170" y="410" width="300" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DI_End_FD_Activate" bpmnElement="End_FD_Activate">
        <dc:Bounds x="1510" y="432" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="DI_PSA1" bpmnElement="PSA1">
        <di:waypoint x="281" y="100" />
        <di:waypoint x="300" y="100" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_PSA2" bpmnElement="PSA2">
        <di:waypoint x="530" y="100" />
        <di:waypoint x="580" y="100" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_PSA3" bpmnElement="PSA3">
        <di:waypoint x="810" y="100" />
        <di:waypoint x="1240" y="100" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_PSA4" bpmnElement="PSA4">
        <di:waypoint x="1470" y="100" />
        <di:waypoint x="1510" y="100" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_MA1" bpmnElement="MA1">
        <di:waypoint x="686" y="270" />
        <di:waypoint x="705" y="270" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_MA2" bpmnElement="MA2">
        <di:waypoint x="1005" y="270" />
        <di:waypoint x="1240" y="270" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_MA3" bpmnElement="MA3">
        <di:waypoint x="1276" y="270" />
        <di:waypoint x="1295" y="270" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_MA4" bpmnElement="MA4">
        <di:waypoint x="1525" y="270" />
        <di:waypoint x="1540" y="270" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_FDA1" bpmnElement="FDA1">
        <di:waypoint x="886" y="450" />
        <di:waypoint x="875" y="450" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_FDA2" bpmnElement="FDA2">
        <di:waypoint x="1125" y="450" />
        <di:waypoint x="1170" y="450" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_FDA3" bpmnElement="FDA3">
        <di:waypoint x="1470" y="450" />
        <di:waypoint x="1510" y="450" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_M_PSA_MEMM" bpmnElement="M_PSA_MEMM">
        <di:waypoint x="695" y="140" />
        <di:waypoint x="695" y="185" />
        <di:waypoint x="668" y="185" />
        <di:waypoint x="668" y="252" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_M_MEMM_FDA" bpmnElement="M_MEMM_FDA">
        <di:waypoint x="855" y="315" />
        <di:waypoint x="855" y="365" />
        <di:waypoint x="868" y="365" />
        <di:waypoint x="868" y="432" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_M_FDA_MEMM" bpmnElement="M_FDA_MEMM">
        <di:waypoint x="1325" y="410" />
        <di:waypoint x="1325" y="350" />
        <di:waypoint x="1258" y="350" />
        <di:waypoint x="1258" y="288" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DI_M_MEMM_PSA" bpmnElement="M_MEMM_PSA">
        <di:waypoint x="1410" y="225" />
        <di:waypoint x="1410" y="180" />
        <di:waypoint x="1355" y="180" />
        <di:waypoint x="1355" y="140" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
