<?xml version="1.0" encoding="UTF-8"?>

<ExampleScenario xmlns="http://hl7.org/fhir">
  <id value="InpatientLeaveAndDischarge"/>
  <language value="en"/>
  <text>
    <status value="extensions"/><div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: ExampleScenario InpatientLeaveAndDischarge</b></p><a name="InpatientLeaveAndDischarge"> </a><a name="hcInpatientLeaveAndDischarge"> </a><p><b>url</b>: <a href="ExampleScenario-InpatientLeaveAndDischarge.html">InpatientLeaveAndDischarge</a></p><p><b>version</b>: 0.1.0</p><p><b>name</b>: InpatientLeaveAndDischarge</p><p><b>status</b>: Draft</p><p><b>date</b>: 2026-11-24 08:50:11+0000</p><p><b>publisher</b>: NHS North West Genomics</p><p><b>contact</b>: <a href="https://www.nwgenomics.nhs.uk/contact-us">https://www.nwgenomics.nhs.uk/contact-us</a></p><p><b>jurisdiction</b>: <span title="Codes:{urn:iso:std:iso:3166 GB}">United Kingdom of Great Britain and Northern Ireland</span></p><blockquote><p><b>actor</b></p><p><b>actorId</b>: patient</p><p><b>type</b>: Person</p><p><b>name</b>: Patient - Mrs Editestpatient</p><p><b>description</b>: </p><div><p>EDITESTPATIENT TEN (test NHS Number 9999999557), registered with the Malton GP Practice</p>
</div></blockquote><blockquote><p><b>actor</b></p><p><b>actorId</b>: pas</p><p><b>type</b>: System</p><p><b>name</b>: Hospital PAS - York Hospital</p><p><b>description</b>: </p><div><p><a href="ActorDefinition-PatientEncounterSupplier.html">Patient Encounter Supplier</a>. The PAS of York and Scarborough Teaching Hospitals NHS Foundation Trust (RCB), which records the admission, leave, pending discharge and discharge</p>
</div></blockquote><blockquote><p><b>actor</b></p><p><b>actorId</b>: engine</p><p><b>type</b>: System</p><p><b>name</b>: Integration Engine</p><p><b>description</b>: </p><div><p>The Trust integration engine, addressed as ROUTE in MSH-5/MSH-6. It acts as a Patient Encounter Consumer to the PAS and as a Patient Encounter Supplier to the downstream systems, and decides which events each system receives</p>
</div></blockquote><blockquote><p><b>actor</b></p><p><b>actorId</b>: gp</p><p><b>type</b>: System</p><p><b>name</b>: GP Practice - Malton GP Practice</p><p><b>description</b>: </p><div><p><a href="ActorDefinition-PatientEncounterConsumer.html">Patient Encounter Consumer</a>. The GP clinical system of the Malton GP Practice (Y06601), where the patient is registered (PD1-3)</p>
</div></blockquote><blockquote><p><b>actor</b></p><p><b>actorId</b>: socialcare</p><p><b>type</b>: System</p><p><b>name</b>: Social Care - Local Authority</p><p><b>description</b>: </p><div><p><a href="ActorDefinition-PatientEncounterConsumer.html">Patient Encounter Consumer</a>. The adult social care system of the patient's local authority, which plans any care and support needed after discharge</p>
</div></blockquote><blockquote><p><b>instance</b></p><p><b>resourceId</b>: SpellEncounter</p><p><b>resourceType</b>: Encounter</p><p><b>name</b>: Hospital Provider Spell 5000123</p><p><b>description</b>: </p><div><p>The inpatient stay. PV1-19 5000123^^^RCB^AN. Encounter/inpatient-spell-5000123 in every FHIR Message</p>
</div><blockquote><p><b>version</b></p><p><b>versionId</b>: 1</p><p><b>description</b>: </p><div><p>Admitted to Ward OBS1 under Dr Darwin, General Medicine. status in-progress</p>
</div></blockquote><blockquote><p><b>version</b></p><p><b>versionId</b>: 2</p><p><b>description</b>: </p><div><p>On leave of absence. status onleave</p>
</div></blockquote><blockquote><p><b>version</b></p><p><b>versionId</b>: 3</p><p><b>description</b>: </p><div><p>Back on the ward. status in-progress</p>
</div></blockquote><blockquote><p><b>version</b></p><p><b>versionId</b>: 4</p><p><b>description</b>: </p><div><p>Pending discharge. status in-progress with expected discharge date/time 12 November 2026 11:00</p>
</div></blockquote><blockquote><p><b>version</b></p><p><b>versionId</b>: 5</p><p><b>description</b>: </p><div><p>Discharged to usual place of residence. status finished with period.end</p>
</div></blockquote></blockquote><blockquote><p><b>instance</b></p><p><b>resourceId</b>: Admission</p><p><b>resourceType</b>: Bundle</p><p><b>name</b>: Admission (ADT^A01)</p><p><b>description</b>: </p><div><p>Emergency admission on referral from the GP</p>
</div><blockquote><p><b>version</b></p><p><b>R5: Label for instance version (new)</b>: PAM FHIR Message A01</p><p><b>R5: Example instance version data (new)</b>: <a href="Bundle-scenario-a01.html">Bundle: identifier = SCN0000001; type = message; timestamp = 2026-11-02 14:30:00+0000</a></p><p><b>versionId</b>: 1</p><p><b>description</b>: </p><div><p>Carries version 1 of the Hospital Provider Spell Encounter. ADT^A01 2 November 2026 14:30</p>
</div></blockquote></blockquote><blockquote><p><b>instance</b></p><p><b>resourceId</b>: Leave</p><p><b>resourceType</b>: Bundle</p><p><b>name</b>: Leave of absence (ADT^A21)</p><p><b>description</b>: </p><div><p>The patient goes home on leave</p>
</div><blockquote><p><b>version</b></p><p><b>R5: Label for instance version (new)</b>: PAM FHIR Message A21</p><p><b>R5: Example instance version data (new)</b>: <a href="Bundle-scenario-a21.html">Bundle: identifier = SCN0000002; type = message; timestamp = 2026-11-06 10:00:00+0000</a></p><p><b>versionId</b>: 1</p><p><b>description</b>: </p><div><p>Carries version 2 of the Hospital Provider Spell Encounter. ADT^A21 6 November 2026 10:00</p>
</div></blockquote></blockquote><blockquote><p><b>instance</b></p><p><b>resourceId</b>: Return</p><p><b>resourceType</b>: Bundle</p><p><b>name</b>: Return from leave of absence (ADT^A22)</p><p><b>description</b>: </p><div><p>The patient returns from leave</p>
</div><blockquote><p><b>version</b></p><p><b>R5: Label for instance version (new)</b>: PAM FHIR Message A22</p><p><b>R5: Example instance version data (new)</b>: <a href="Bundle-scenario-a22.html">Bundle: identifier = SCN0000003; type = message; timestamp = 2026-11-08 18:00:00+0000</a></p><p><b>versionId</b>: 1</p><p><b>description</b>: </p><div><p>Carries version 3 of the Hospital Provider Spell Encounter. ADT^A22 8 November 2026 18:00</p>
</div></blockquote></blockquote><blockquote><p><b>instance</b></p><p><b>resourceId</b>: PendingDischarge</p><p><b>resourceType</b>: Bundle</p><p><b>name</b>: Pending discharge (ADT^A16)</p><p><b>description</b>: </p><div><p>Expected discharge date/time in PV2-9</p>
</div><blockquote><p><b>version</b></p><p><b>R5: Label for instance version (new)</b>: PAM FHIR Message A16</p><p><b>R5: Example instance version data (new)</b>: <a href="Bundle-scenario-a16.html">Bundle: identifier = SCN0000004; type = message; timestamp = 2026-11-10 09:00:00+0000</a></p><p><b>versionId</b>: 1</p><p><b>description</b>: </p><div><p>Carries version 4 of the Hospital Provider Spell Encounter. ADT^A16 10 November 2026 09:00</p>
</div></blockquote></blockquote><blockquote><p><b>instance</b></p><p><b>resourceId</b>: Discharge</p><p><b>resourceType</b>: Bundle</p><p><b>name</b>: Discharge (ADT^A03)</p><p><b>description</b>: </p><div><p>Discharge date/time and discharge destination</p>
</div><blockquote><p><b>version</b></p><p><b>R5: Label for instance version (new)</b>: PAM FHIR Message A03</p><p><b>R5: Example instance version data (new)</b>: <a href="Bundle-scenario-a03.html">Bundle: identifier = SCN0000005; type = message; timestamp = 2026-11-12 11:30:00+0000</a></p><p><b>versionId</b>: 1</p><p><b>description</b>: </p><div><p>Carries version 5 of the Hospital Provider Spell Encounter. ADT^A03 12 November 2026 11:30</p>
</div></blockquote></blockquote><blockquote><p><b>process</b></p><p><b>title</b>: Inpatient admission, leave and discharge</p><p><b>description</b>: </p><div><p>Each event is sent by the PAS to the integration engine and routed to the GP practice and, for discharge planning, to social care. Every message is acknowledged (ACK) by its receiver.</p>
</div><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 1</p><p><b>type</b>: create</p><p><b>name</b>: Admit patient</p><p><b>initiator</b>: pas</p><p><b>receiver</b>: engine</p><p><b>description</b>: </p><div><p>ITI-31 Basic Subset. HL7 v2 ADT^A01^ADT_A01</p>
</div><h3>Requests</h3><table class="grid"><tr><td style="display: none">-</td><td><b>ResourceId</b></td><td><b>VersionId</b></td></tr><tr><td style="display: none">*</td><td>Admission</td><td>1</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 2</p><p><b>type</b>: create</p><p><b>name</b>: Notify GP of admission</p><p><b>initiator</b>: engine</p><p><b>receiver</b>: gp</p><p><b>description</b>: </p><div><p>The GP practice knows its patient is in hospital</p>
</div><h3>Requests</h3><table class="grid"><tr><td style="display: none">-</td><td><b>ResourceId</b></td><td><b>VersionId</b></td></tr><tr><td style="display: none">*</td><td>Admission</td><td>1</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 3</p><p><b>type</b>: create</p><p><b>name</b>: Patient goes on leave</p><p><b>initiator</b>: pas</p><p><b>receiver</b>: engine</p><p><b>description</b>: </p><div><p>ITI-31 Advanced Encounter Management Option. HL7 v2 ADT^A21^ADT_A21</p>
</div><h3>Requests</h3><table class="grid"><tr><td style="display: none">-</td><td><b>ResourceId</b></td><td><b>VersionId</b></td></tr><tr><td style="display: none">*</td><td>Leave</td><td>1</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 4</p><p><b>type</b>: create</p><p><b>name</b>: Notify GP of leave</p><p><b>initiator</b>: engine</p><p><b>receiver</b>: gp</p><p><b>description</b>: </p><div><p>The patient is at home, under the care of the hospital</p>
</div><h3>Requests</h3><table class="grid"><tr><td style="display: none">-</td><td><b>ResourceId</b></td><td><b>VersionId</b></td></tr><tr><td style="display: none">*</td><td>Leave</td><td>1</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 5</p><p><b>type</b>: create</p><p><b>name</b>: Patient returns from leave</p><p><b>initiator</b>: pas</p><p><b>receiver</b>: engine</p><p><b>description</b>: </p><div><p>ITI-31 Advanced Encounter Management Option. HL7 v2 ADT^A22^ADT_A21</p>
</div><h3>Requests</h3><table class="grid"><tr><td style="display: none">-</td><td><b>ResourceId</b></td><td><b>VersionId</b></td></tr><tr><td style="display: none">*</td><td>Return</td><td>1</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 6</p><p><b>type</b>: create</p><p><b>name</b>: Notify GP of return</p><p><b>initiator</b>: engine</p><p><b>receiver</b>: gp</p><p><b>description</b>: </p><div/><h3>Requests</h3><table class="grid"><tr><td style="display: none">-</td><td><b>ResourceId</b></td><td><b>VersionId</b></td></tr><tr><td style="display: none">*</td><td>Return</td><td>1</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 7</p><p><b>type</b>: create</p><p><b>name</b>: Pending discharge</p><p><b>initiator</b>: pas</p><p><b>receiver</b>: engine</p><p><b>description</b>: </p><div><p>ITI-31 Pending Event Management Option. HL7 v2 ADT^A16^ADT_A16</p>
</div><h3>Requests</h3><table class="grid"><tr><td style="display: none">-</td><td><b>ResourceId</b></td><td><b>VersionId</b></td></tr><tr><td style="display: none">*</td><td>PendingDischarge</td><td>1</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 8</p><p><b>type</b>: create</p><p><b>name</b>: Notify social care of pending discharge</p><p><b>initiator</b>: engine</p><p><b>receiver</b>: socialcare</p><p><b>description</b>: </p><div><p>Social care arranges any care and support needed at home before the expected discharge date</p>
</div><h3>Requests</h3><table class="grid"><tr><td style="display: none">-</td><td><b>ResourceId</b></td><td><b>VersionId</b></td></tr><tr><td style="display: none">*</td><td>PendingDischarge</td><td>1</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 9</p><p><b>type</b>: create</p><p><b>name</b>: Discharge patient</p><p><b>initiator</b>: pas</p><p><b>receiver</b>: engine</p><p><b>description</b>: </p><div><p>ITI-31 Basic Subset. HL7 v2 ADT^A03^ADT_A03</p>
</div><h3>Requests</h3><table class="grid"><tr><td style="display: none">-</td><td><b>ResourceId</b></td><td><b>VersionId</b></td></tr><tr><td style="display: none">*</td><td>Discharge</td><td>1</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 10</p><p><b>type</b>: create</p><p><b>name</b>: Notify GP of discharge</p><p><b>initiator</b>: engine</p><p><b>receiver</b>: gp</p><p><b>description</b>: </p><div><p>The GP practice knows its patient is home</p>
</div><h3>Requests</h3><table class="grid"><tr><td style="display: none">-</td><td><b>ResourceId</b></td><td><b>VersionId</b></td></tr><tr><td style="display: none">*</td><td>Discharge</td><td>1</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 11</p><p><b>type</b>: create</p><p><b>name</b>: Notify social care of discharge</p><p><b>initiator</b>: engine</p><p><b>receiver</b>: socialcare</p><p><b>description</b>: </p><div><p>Social care confirms the discharge and starts the planned care and support</p>
</div><h3>Requests</h3><table class="grid"><tr><td style="display: none">-</td><td><b>ResourceId</b></td><td><b>VersionId</b></td></tr><tr><td style="display: none">*</td><td>Discharge</td><td>1</td></tr></table></blockquote></blockquote></blockquote></div>
  </text>
  <url value="https://fhir.ihe-uk.org/ITI/PAM/ExampleScenario/InpatientLeaveAndDischarge"/>
  <version value="0.1.0"/>
  <name value="InpatientLeaveAndDischarge"/>
  <status value="draft"/>
  <date value="2026-11-24T08:50:11+00:00"/>
  <publisher value="NHS North West Genomics"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="https://www.nwgenomics.nhs.uk/contact-us"/>
    </telecom>
  </contact>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="GB"/>
      <display value="United Kingdom of Great Britain and Northern Ireland"/>
    </coding>
  </jurisdiction>
  <actor>
    <actorId value="patient"/>
    <type value="person"/>
    <name value="Patient - Mrs Editestpatient"/>
    <description value=" EDITESTPATIENT TEN (test NHS Number 9999999557), registered with the Malton GP Practice "/>
  </actor>
  <actor>
    <actorId value="pas"/>
    <type value="entity"/>
    <name value="Hospital PAS - York Hospital"/>
    <description value=" [Patient Encounter Supplier](ActorDefinition-PatientEncounterSupplier.html). The PAS of York and Scarborough Teaching Hospitals NHS Foundation Trust (RCB), which records the admission, leave, pending discharge and discharge "/>
  </actor>
  <actor>
    <actorId value="engine"/>
    <type value="entity"/>
    <name value="Integration Engine"/>
    <description value=" The Trust integration engine, addressed as ROUTE in MSH-5/MSH-6. It acts as a Patient Encounter Consumer to the PAS and as a Patient Encounter Supplier to the downstream systems, and decides which events each system receives "/>
  </actor>
  <actor>
    <actorId value="gp"/>
    <type value="entity"/>
    <name value="GP Practice - Malton GP Practice"/>
    <description value=" [Patient Encounter Consumer](ActorDefinition-PatientEncounterConsumer.html). The GP clinical system of the Malton GP Practice (Y06601), where the patient is registered (PD1-3) "/>
  </actor>
  <actor>
    <actorId value="socialcare"/>
    <type value="entity"/>
    <name value="Social Care - Local Authority"/>
    <description value=" [Patient Encounter Consumer](ActorDefinition-PatientEncounterConsumer.html). The adult social care system of the patient's local authority, which plans any care and support needed after discharge "/>
  </actor>
  <instance>
    <resourceId value="SpellEncounter"/>
    <resourceType value="Encounter"/>
    <name value="Hospital Provider Spell 5000123"/>
    <description value=" The inpatient stay. PV1-19 5000123^^^RCB^AN. Encounter/inpatient-spell-5000123 in every FHIR Message "/>
    <version>
      <versionId value="1"/>
      <description value=" Admitted to Ward OBS1 under Dr Darwin, General Medicine. status in-progress "/>
    </version>
    <version>
      <versionId value="2"/>
      <description value=" On leave of absence. status onleave "/>
    </version>
    <version>
      <versionId value="3"/>
      <description value=" Back on the ward. status in-progress "/>
    </version>
    <version>
      <versionId value="4"/>
      <description value=" Pending discharge. status in-progress with expected discharge date/time 12 November 2026 11:00 "/>
    </version>
    <version>
      <versionId value="5"/>
      <description value=" Discharged to usual place of residence. status finished with period.end "/>
    </version>
  </instance>
  <instance>
    <resourceId value="Admission"/>
    <resourceType value="Bundle"/>
    <name value="Admission (ADT^A01)"/>
    <description value=" Emergency admission on referral from the GP "/>
    <version>
      <extension url="http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.title">
        <valueString value="PAM FHIR Message A01"/>
      </extension>
      <extension url="http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.content">
        <valueReference>
          <reference value="Bundle/scenario-a01"/>
        </valueReference>
      </extension>
      <versionId value="1"/>
      <description value=" Carries version 1 of the Hospital Provider Spell Encounter. ADT^A01 2 November 2026 14:30 "/>
    </version>
  </instance>
  <instance>
    <resourceId value="Leave"/>
    <resourceType value="Bundle"/>
    <name value="Leave of absence (ADT^A21)"/>
    <description value=" The patient goes home on leave "/>
    <version>
      <extension url="http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.title">
        <valueString value="PAM FHIR Message A21"/>
      </extension>
      <extension url="http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.content">
        <valueReference>
          <reference value="Bundle/scenario-a21"/>
        </valueReference>
      </extension>
      <versionId value="1"/>
      <description value=" Carries version 2 of the Hospital Provider Spell Encounter. ADT^A21 6 November 2026 10:00 "/>
    </version>
  </instance>
  <instance>
    <resourceId value="Return"/>
    <resourceType value="Bundle"/>
    <name value="Return from leave of absence (ADT^A22)"/>
    <description value=" The patient returns from leave "/>
    <version>
      <extension url="http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.title">
        <valueString value="PAM FHIR Message A22"/>
      </extension>
      <extension url="http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.content">
        <valueReference>
          <reference value="Bundle/scenario-a22"/>
        </valueReference>
      </extension>
      <versionId value="1"/>
      <description value=" Carries version 3 of the Hospital Provider Spell Encounter. ADT^A22 8 November 2026 18:00 "/>
    </version>
  </instance>
  <instance>
    <resourceId value="PendingDischarge"/>
    <resourceType value="Bundle"/>
    <name value="Pending discharge (ADT^A16)"/>
    <description value=" Expected discharge date/time in PV2-9 "/>
    <version>
      <extension url="http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.title">
        <valueString value="PAM FHIR Message A16"/>
      </extension>
      <extension url="http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.content">
        <valueReference>
          <reference value="Bundle/scenario-a16"/>
        </valueReference>
      </extension>
      <versionId value="1"/>
      <description value=" Carries version 4 of the Hospital Provider Spell Encounter. ADT^A16 10 November 2026 09:00 "/>
    </version>
  </instance>
  <instance>
    <resourceId value="Discharge"/>
    <resourceType value="Bundle"/>
    <name value="Discharge (ADT^A03)"/>
    <description value=" Discharge date/time and discharge destination "/>
    <version>
      <extension url="http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.title">
        <valueString value="PAM FHIR Message A03"/>
      </extension>
      <extension url="http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.content">
        <valueReference>
          <reference value="Bundle/scenario-a03"/>
        </valueReference>
      </extension>
      <versionId value="1"/>
      <description value=" Carries version 5 of the Hospital Provider Spell Encounter. ADT^A03 12 November 2026 11:30 "/>
    </version>
  </instance>
  <process>
    <title value="Inpatient admission, leave and discharge"/>
    <description value="Each event is sent by the PAS to the integration engine and routed to the GP practice and, for discharge planning, to social care. Every message is acknowledged (ACK) by its receiver."/>
    <step>
      <operation>
        <number value="1"/>
        <type value="create"/>
        <name value="Admit patient"/>
        <initiator value="pas"/>
        <receiver value="engine"/>
        <description value=" ITI-31 Basic Subset. HL7 v2 ADT^A01^ADT_A01 "/>
        <request>
          <resourceId value="Admission"/>
          <versionId value="1"/>
        </request>
      </operation>
    </step>
    <step>
      <operation>
        <number value="2"/>
        <type value="create"/>
        <name value="Notify GP of admission"/>
        <initiator value="engine"/>
        <receiver value="gp"/>
        <description value=" The GP practice knows its patient is in hospital "/>
        <request>
          <resourceId value="Admission"/>
          <versionId value="1"/>
        </request>
      </operation>
    </step>
    <step>
      <operation>
        <number value="3"/>
        <type value="create"/>
        <name value="Patient goes on leave"/>
        <initiator value="pas"/>
        <receiver value="engine"/>
        <description value=" ITI-31 Advanced Encounter Management Option. HL7 v2 ADT^A21^ADT_A21 "/>
        <request>
          <resourceId value="Leave"/>
          <versionId value="1"/>
        </request>
      </operation>
    </step>
    <step>
      <operation>
        <number value="4"/>
        <type value="create"/>
        <name value="Notify GP of leave"/>
        <initiator value="engine"/>
        <receiver value="gp"/>
        <description value=" The patient is at home, under the care of the hospital "/>
        <request>
          <resourceId value="Leave"/>
          <versionId value="1"/>
        </request>
      </operation>
    </step>
    <step>
      <operation>
        <number value="5"/>
        <type value="create"/>
        <name value="Patient returns from leave"/>
        <initiator value="pas"/>
        <receiver value="engine"/>
        <description value=" ITI-31 Advanced Encounter Management Option. HL7 v2 ADT^A22^ADT_A21 "/>
        <request>
          <resourceId value="Return"/>
          <versionId value="1"/>
        </request>
      </operation>
    </step>
    <step>
      <operation>
        <number value="6"/>
        <type value="create"/>
        <name value="Notify GP of return"/>
        <initiator value="engine"/>
        <receiver value="gp"/>
        <description value=" "/>
        <request>
          <resourceId value="Return"/>
          <versionId value="1"/>
        </request>
      </operation>
    </step>
    <step>
      <operation>
        <number value="7"/>
        <type value="create"/>
        <name value="Pending discharge"/>
        <initiator value="pas"/>
        <receiver value="engine"/>
        <description value=" ITI-31 Pending Event Management Option. HL7 v2 ADT^A16^ADT_A16 "/>
        <request>
          <resourceId value="PendingDischarge"/>
          <versionId value="1"/>
        </request>
      </operation>
    </step>
    <step>
      <operation>
        <number value="8"/>
        <type value="create"/>
        <name value="Notify social care of pending discharge"/>
        <initiator value="engine"/>
        <receiver value="socialcare"/>
        <description value=" Social care arranges any care and support needed at home before the expected discharge date "/>
        <request>
          <resourceId value="PendingDischarge"/>
          <versionId value="1"/>
        </request>
      </operation>
    </step>
    <step>
      <operation>
        <number value="9"/>
        <type value="create"/>
        <name value="Discharge patient"/>
        <initiator value="pas"/>
        <receiver value="engine"/>
        <description value=" ITI-31 Basic Subset. HL7 v2 ADT^A03^ADT_A03 "/>
        <request>
          <resourceId value="Discharge"/>
          <versionId value="1"/>
        </request>
      </operation>
    </step>
    <step>
      <operation>
        <number value="10"/>
        <type value="create"/>
        <name value="Notify GP of discharge"/>
        <initiator value="engine"/>
        <receiver value="gp"/>
        <description value=" The GP practice knows its patient is home "/>
        <request>
          <resourceId value="Discharge"/>
          <versionId value="1"/>
        </request>
      </operation>
    </step>
    <step>
      <operation>
        <number value="11"/>
        <type value="create"/>
        <name value="Notify social care of discharge"/>
        <initiator value="engine"/>
        <receiver value="socialcare"/>
        <description value=" Social care confirms the discharge and starts the planned care and support "/>
        <request>
          <resourceId value="Discharge"/>
          <versionId value="1"/>
        </request>
      </operation>
    </step>
  </process>
</ExampleScenario>