Botswana FHIR Implementation Guide
1.0.0 - ci-build Botswana flag

Botswana FHIR Implementation Guide, published by Jembi Health Systems. This guide is not an authorized publication; it is the continuous build for version 1.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/jembi/botswana-hie-fhir-ig/ and changes regularly. See the Directory of published versions

: Register New Patient - XML Representation

Active as of 2025-08-20

Raw xml | Download


<ExampleScenario xmlns="http://hl7.org/fhir">
  <id value="RegisterNewPatient"/>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: ExampleScenario RegisterNewPatient</b></p><a name="RegisterNewPatient"> </a><a name="hcRegisterNewPatient"> </a><p><b>url</b>: <a href="ExampleScenario-RegisterNewPatient.html">Register New Patient</a></p><p><b>version</b>: 1.0.0</p><p><b>name</b>: RegisterNewPatient</p><p><b>title</b>: Register New Patient</p><p><b>status</b>: Active</p><p><b>experimental</b>: false</p><p><b>date</b>: 2025-08-20 07:21:53+0000</p><p><b>publisher</b>: Jembi Health Systems</p><p><b>contact</b>: Jembi Health Systems: <a href="https://www.jembi.org">https://www.jembi.org</a>,<a href="mailto:info@jembi.org">info@jembi.org</a>, Jembi Health Systems: <a href="mailto:info@jembi.org">info@jembi.org</a></p><p><b>jurisdiction</b>: <span title="Codes:{urn:iso:std:iso:3166 BW}">Botswana</span></p><p><b>purpose</b>: </p><div><p>This serves to demonstrate the creation of a patient record, when using a Client Registry (CR) and a FHIR datastore.</p>
</div><blockquote><p><b>actor</b></p><p><b>Actor Reference</b>: <a href="ActorDefinition-PIMSActorDefinitionExample.html">ActorDefinition Patient Information Management System (PIMS)</a></p><p><b>Actor Reference</b>: <a href="ActorDefinition-OpenMRSActorDefinitionExample.html">ActorDefinition OpenMRS</a></p><p><b>key</b>: PoS</p><p><b>type</b>: System</p><p><b>title</b>: Point of Service</p><p><b>description</b>: </p><div><p>The entity that registers the patient.</p>
</div></blockquote><blockquote><p><b>actor</b></p><p><b>Actor Reference</b>: <a href="ActorDefinition-InteroperabilityLayerActorDefinitionExample.html">ActorDefinition Interoperability Layer (IL)</a></p><p><b>key</b>: IL</p><p><b>type</b>: System</p><p><b>title</b>: Interoperability Layer</p><p><b>description</b>: </p><div><p>The entity that receives the registration request submitted by PoS entity.</p>
</div></blockquote><blockquote><p><b>actor</b></p><p><b>Actor Reference</b>: <a href="ActorDefinition-ClientRegistryActorDefinitionExample.html">ActorDefinition Client Registry (CR)</a></p><p><b>key</b>: CR</p><p><b>type</b>: System</p><p><b>title</b>: Client Registry</p><p><b>description</b>: </p><div><p>The entity that stores PII and demographic information for the patient included in the Patient Resource submitted by the PoS entity.</p>
</div></blockquote><blockquote><p><b>actor</b></p><p><b>Actor Reference</b>: <a href="ActorDefinition-SHRActorDefinitionExample.html">ActorDefinition Shared Health Record (SHR)</a></p><p><b>key</b>: FHIR</p><p><b>type</b>: System</p><p><b>title</b>: FHIR Server</p><p><b>description</b>: </p><div><p>The entity that stores a restricted version of the Patient Resource submitted by the PoS entity.</p>
</div></blockquote><blockquote><p><b>instance</b></p><p><b>key</b>: rnp.01</p><p><b>structureType</b>: <a href="http://hl7.org/fhir/R5/codesystem-fhir-types.html#fhir-types-Patient">All FHIR Types Patient</a>: Patient</p><p><b>structureProfile</b>: <a href="StructureDefinition-bw-patient.html">Patient - Botswana Patient</a></p><p><b>title</b>: Data Supplying Patient Resource</p><p><b>description</b>: </p><div><p>The Patient involved in the scenario.</p>
</div><p><b>content</b>: <a href="Patient-BwPatientExample.html">Mark Adams  Male, DoB: 2000-11-11 ( http://moh.bw.org/identifier/mrn#MRN12345671)</a></p></blockquote><blockquote><p><b>instance</b></p><p><b>key</b>: rnp.02</p><p><b>structureType</b>: <a href="http://hl7.org/fhir/R5/codesystem-fhir-types.html#fhir-types-Patient">All FHIR Types Patient</a>: Patient</p><p><b>structureProfile</b>: <a href="StructureDefinition-patient-identity-cross-reference.html">Patient - Patient Identity Cross Reference</a></p><p><b>title</b>: Restricted Patient Resource</p><p><b>description</b>: </p><div><p>The restricted Patient Resource excl. all PII.</p>
</div><p><b>content</b>: <a href="Patient-RestrictedPatientExample1.html">Anonymous Patient (no stated gender), DoB Unknown ( http://moh.bw.org/identifier/mpi#some id value)</a></p></blockquote><blockquote><p><b>instance</b></p><p><b>key</b>: rnp.03</p><p><b>structureType</b>: <a href="http://hl7.org/fhir/R5/codesystem-fhir-types.html#fhir-types-Endpoint">All FHIR Types Endpoint</a>: Endpoint</p><p><b>structureProfile</b>: <a href="http://hl7.org/fhir/R5/endpoint.html">Endpoint</a></p><p><b>title</b>: FHIR Validation outcome</p><p><b>description</b>: </p><div><p>The validation outcome as issued by the FHIR server.</p>
</div><p><b>content</b>: <a href="Endpoint-ValidatePatientResourceInFHIR.html">Endpoint $validate</a></p></blockquote><blockquote><p><b>instance</b></p><p><b>key</b>: rnp.04</p><p><b>structureType</b>: <a href="http://hl7.org/fhir/R5/codesystem-fhir-types.html#fhir-types-Endpoint">All FHIR Types Endpoint</a>: Endpoint</p><p><b>structureProfile</b>: <a href="http://hl7.org/fhir/R5/endpoint.html">Endpoint</a></p><p><b>title</b>: Assigned Master Patient Index identifier</p><p><b>description</b>: </p><div><p>A Master Patient Index identifier assigned by the CR when new patients are created.</p>
</div><p><b>content</b>: <a href="Endpoint-MPIForPatientIssuedByCR.html">Endpoint: status = active; connectionType = Interoperability Layer; description = The Client Registry's Patient endpoint that initiated the request for a MPI to be generated.; address = https://openhim-core:5001</a></p></blockquote><blockquote><p><b>instance</b></p><p><b>key</b>: rnp.05</p><p><b>structureType</b>: <a href="http://hl7.org/fhir/R5/codesystem-fhir-types.html#fhir-types-Endpoint">All FHIR Types Endpoint</a>: Endpoint</p><p><b>structureProfile</b>: <a href="http://hl7.org/fhir/R5/endpoint.html">Endpoint</a></p><p><b>title</b>: Outcome response</p><p><b>description</b>: </p><div><p>FHIR issues an outcome response to each CRUD request.</p>
</div><p><b>content</b>: <a href="Endpoint-FHIRResourceProcessResponse.html">Endpoint: status = active; connectionType = Interoperability Layer; description = FHIR issues an outcome response to each request.; address = https://openhim-core:5001</a></p></blockquote><blockquote><p><b>process</b></p><p><b>title</b>: Register Patient in CR</p><p><b>preConditions</b>: </p><div><p>PoS entity has submitted a create patient request which contains the Data Supplying Patient Resource.</p>
</div><p><b>postConditions</b>: </p><div><p>CR entity has stored the patient's personal information and sent a response back to the IL which inlcudes a MPI identifier.</p>
</div><blockquote><p><b>step</b></p><p><b>number</b>: 1</p><blockquote><p><b>process</b></p><p><b>title</b>: Register Patient in CR</p><p><b>description</b>: </p><div><p>This scenario demonstrates the process of storing the patient's personal information in the CR, acquired from the Patient Resource and returning a Master Patient Index (MPI) identifier for the patient.</p>
</div><blockquote><p><b>step</b></p><p><b>number</b>: 1.1</p><blockquote><p><b>operation</b></p><p><b>type</b>: <a href="http://hl7.org/fhir/R5/codesystem-restful-interaction.html#restful-interaction-update">FHIR Restful Interactions update</a>: update</p><p><b>title</b>: Patient resource</p><p><b>initiator</b>: PoS</p><p><b>receiver</b>: IL</p><p><b>description</b>: </p><div><p>Patient personal information</p>
</div><h3>Requests</h3><table class="grid"><tr><td style="display: none">-</td><td><b>InstanceReference</b></td></tr><tr><td style="display: none">*</td><td>rnp.01</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><p><b>number</b>: 1.2</p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Title</b></td><td><b>Initiator</b></td><td><b>Receiver</b></td><td><b>Description</b></td><td><b>InitiatorActive</b></td></tr><tr><td style="display: none">*</td><td>Get patient data</td><td>IL</td><td>IL</td><td><div><p>Mediator extracts the patient data from the Patient Resource which includes all personal identifiers.</p>
</div></td><td>true</td></tr></table></blockquote><blockquote><p><b>step</b></p><p><b>number</b>: 1.3</p><blockquote><p><b>operation</b></p><p><b>type</b>: <a href="http://hl7.org/fhir/R5/codesystem-restful-interaction.html#restful-interaction-operation">FHIR Restful Interactions operation</a>: operation</p><p><b>title</b>: Validate patient data for compliance</p><p><b>initiator</b>: IL</p><p><b>receiver</b>: FHIR</p><p><b>description</b>: </p><div><p>Request for FHIR's $validate operation to check that the supplied data is compliant with the Data Supplying Patient Resource Profile. FHIR's $validate operation validates the message structure and its data to ensure that the supplied data is compliant with the Data Supplying Patient Resource Profile.</p>
</div><h3>Requests</h3><table class="grid"><tr><td style="display: none">-</td><td><b>InstanceReference</b></td></tr><tr><td style="display: none">*</td><td>rnp.01</td></tr></table><h3>Responses</h3><table class="grid"><tr><td style="display: none">-</td><td><b>InstanceReference</b></td></tr><tr><td style="display: none">*</td><td>rnp.03</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><p><b>number</b>: 1.4</p><blockquote><p><b>operation</b></p><p><b>type</b>: <a href="CodeSystem-cs-scenario-op-type-codes.html#cs-scenario-op-type-codes-CREATE">Scenario Operation Type Codes CREATE</a>: CREATE</p><p><b>title</b>: Validation success: Send patient data</p><p><b>initiator</b>: IL</p><p><b>receiver</b>: CR</p><p><b>description</b>: </p><div><p>Patient Resource is sent to the CR for processing. The CR associates a MPI with the patient record and stores it.</p>
</div><h3>Requests</h3><table class="grid"><tr><td style="display: none">-</td><td><b>InstanceReference</b></td></tr><tr><td style="display: none">*</td><td>rnp.01</td></tr></table><h3>Responses</h3><table class="grid"><tr><td style="display: none">-</td><td><b>InstanceReference</b></td></tr><tr><td style="display: none">*</td><td>rnp.04</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><p><b>number</b>: 1.5</p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Title</b></td><td><b>Initiator</b></td><td><b>Receiver</b></td><td><b>Description</b></td></tr><tr><td style="display: none">*</td><td>Success: Invoke FHIR mediator</td><td>IL</td><td>IL</td><td><div><p>Pass the data to the mediator responsible for calling the endpoint for creating the new patient data in FHIR.</p>
</div></td></tr></table></blockquote></blockquote></blockquote></blockquote><blockquote><p><b>process</b></p><p><b>title</b>: Register Patient in FHIR</p><p><b>preConditions</b>: </p><div><p>CR has provided a MPI identifier in its response sent back to the IL.</p>
</div><p><b>postConditions</b>: </p><div><p>FHIR entity has processed the Restricted Patient Resource that documents the MPI for re-identification purposes.</p>
</div><blockquote><p><b>step</b></p><p><b>number</b>: 2</p><blockquote><p><b>process</b></p><p><b>title</b>: Register Patient in FHIR</p><p><b>description</b>: </p><div><p>This scenario demonstrates the process of storing a restricted version of the Patient Resource which excludes all PII to ensure patient privacy. This Patient Resource includes the MPI identifier issued by the CR so that the IL can reassociate the clinical information (FHIR) with the PII (CR) during GET requests.</p>
</div><blockquote><p><b>step</b></p><p><b>number</b>: 2.1</p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Title</b></td><td><b>Initiator</b></td><td><b>Receiver</b></td><td><b>Description</b></td><td><b>InitiatorActive</b></td></tr><tr><td style="display: none">*</td><td>Remove all PII and business identifiers</td><td>IL</td><td>IL</td><td><div><p>Remove all demographic information and business identifiers from the Patient Resource as required by the Restricted Patient Resource Profile.</p>
</div></td><td>true</td></tr></table></blockquote><blockquote><p><b>step</b></p><p><b>number</b>: 2.2</p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Title</b></td><td><b>Initiator</b></td><td><b>Receiver</b></td><td><b>Description</b></td><td><b>InitiatorActive</b></td></tr><tr><td style="display: none">*</td><td>Update Resource.meta</td><td>IL</td><td>IL</td><td><div><p>Replace the existing meta.profile value with the structure definition URL for the Restricted Patient Resource Profile.</p>
</div></td><td>false</td></tr></table></blockquote><blockquote><p><b>step</b></p><p><b>number</b>: 2.3</p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Title</b></td><td><b>Initiator</b></td><td><b>Receiver</b></td><td><b>Description</b></td><td><b>InitiatorActive</b></td></tr><tr><td style="display: none">*</td><td>Add the MPI identifier</td><td>IL</td><td>IL</td><td><div><p>Add the MPI assigned by the CR as a business identifier in the Restricted Patient Resource.</p>
</div></td><td>true</td></tr></table></blockquote><blockquote><p><b>step</b></p><p><b>number</b>: 2.4</p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Title</b></td><td><b>Initiator</b></td><td><b>Receiver</b></td><td><b>Description</b></td><td><b>InitiatorActive</b></td></tr><tr><td style="display: none">*</td><td>Set the Restricted Patient Resource literal ID</td><td>IL</td><td>IL</td><td><div><p>Set the literal ID in the Restricted Patient Resource to the same value as the ID that was included in the Patient Resource that was submitted by the PoS entity.</p>
</div></td><td>false</td></tr></table></blockquote><blockquote><p><b>step</b></p><p><b>number</b>: 2.5</p><blockquote><p><b>operation</b></p><p><b>title</b>: Send data for consumption</p><p><b>initiator</b>: IL</p><p><b>receiver</b>: FHIR</p><p><b>description</b>: </p><div><p>Patient Resource is sent to the FHIR server for further processing.</p>
</div><p><b>receiverActive</b>: true</p><h3>Requests</h3><table class="grid"><tr><td style="display: none">-</td><td><b>InstanceReference</b></td></tr><tr><td style="display: none">*</td><td>rnp.02</td></tr></table><h3>Responses</h3><table class="grid"><tr><td style="display: none">-</td><td><b>InstanceReference</b></td></tr><tr><td style="display: none">*</td><td>rnp.05</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><p><b>number</b>: 2.6</p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Title</b></td><td><b>Initiator</b></td><td><b>Receiver</b></td><td><b>Description</b></td></tr><tr><td style="display: none">*</td><td>Success: Invoke IL mediator</td><td>IL</td><td>IL</td><td><div><p>Pass the data to the mediator responsible for calling the endpoint that must send a response back the PoS system who initiated the create patient request.</p>
</div></td></tr></table></blockquote></blockquote></blockquote></blockquote><blockquote><p><b>process</b></p><p><b>title</b>: Respond to Create Patient Request</p><p><b>preConditions</b>: </p><div><p>FHIR entity has processed the request to create the patient record and has issued an outcome response.</p>
</div><p><b>postConditions</b>: </p><div><p>IL entity has received the outcome response from FHIR and forwarded the response to the PoS system.</p>
</div><blockquote><p><b>step</b></p><p><b>number</b>: 3</p><blockquote><p><b>process</b></p><p><b>title</b>: Respond to Create Patient Request</p><p><b>description</b>: </p><div><p>This scenario demonstrates the process for responding to the PoS sytem who issued the create patient request.</p>
</div><blockquote><p><b>step</b></p><p><b>number</b>: 3.1</p><blockquote><p><b>operation</b></p><p><b>title</b>: Response</p><p><b>initiator</b>: IL</p><p><b>receiver</b>: PoS</p><p><b>description</b>: </p><div><p>Mediator responds to the create patient request.</p>
</div><h3>Requests</h3><table class="grid"><tr><td style="display: none">-</td><td><b>InstanceReference</b></td></tr><tr><td style="display: none">*</td><td>rnp.05</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><p><b>number</b>: 3.2</p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Title</b></td><td><b>Initiator</b></td><td><b>Receiver</b></td><td><b>Description</b></td><td><b>ReceiverActive</b></td></tr><tr><td style="display: none">*</td><td>Log the outcome</td><td>PoS</td><td>PoS</td><td><div><p>PoS entity logs the outcome issued by the FHIR entity.</p>
</div></td><td>true</td></tr></table></blockquote></blockquote></blockquote></blockquote></div>
  </text>
  <url value="http://moh.bw.org/ExampleScenario/RegisterNewPatient"/>
  <version value="1.0.0"/>
  <name value="RegisterNewPatient"/>
  <title value="Register New Patient"/>
  <status value="active"/>
  <experimental value="false"/>
  <date value="2025-08-20T07:21:53+00:00"/>
  <publisher value="Jembi Health Systems"/>
  <contact>
    <name value="Jembi Health Systems"/>
    <telecom>
      <system value="url"/>
      <value value="https://www.jembi.org"/>
    </telecom>
    <telecom>
      <system value="email"/>
      <value value="info@jembi.org"/>
    </telecom>
  </contact>
  <contact>
    <name value="Jembi Health Systems"/>
    <telecom>
      <system value="email"/>
      <value value="info@jembi.org"/>
      <use value="work"/>
    </telecom>
  </contact>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="BW"/>
      <display value="Botswana"/>
    </coding>
  </jurisdiction>
  <purpose
           value="This serves to demonstrate the creation of a patient record, when using a Client Registry (CR) and a FHIR datastore."/>
  <actor>
    <extension url="http://moh.bw.org/StructureDefinition/actor-reference">
      <valueReference>🔗 
        <reference value="ActorDefinition/PIMSActorDefinitionExample"/>
      </valueReference>
    </extension>
    <extension url="http://moh.bw.org/StructureDefinition/actor-reference">
      <valueReference>🔗 
        <reference value="ActorDefinition/OpenMRSActorDefinitionExample"/>
      </valueReference>
    </extension>
    <key value="PoS"/>
    <type value="system"/>
    <title value="Point of Service"/>
    <description value="The entity that registers the patient."/>
  </actor>
  <actor>
    <extension url="http://moh.bw.org/StructureDefinition/actor-reference">
      <valueReference>🔗 
        <reference
                   value="ActorDefinition/InteroperabilityLayerActorDefinitionExample"/>
      </valueReference>
    </extension>
    <key value="IL"/>
    <type value="system"/>
    <title value="Interoperability Layer"/>
    <description
                 value="The entity that receives the registration request submitted by PoS entity."/>
  </actor>
  <actor>
    <extension url="http://moh.bw.org/StructureDefinition/actor-reference">
      <valueReference>🔗 
        <reference
                   value="ActorDefinition/ClientRegistryActorDefinitionExample"/>
      </valueReference>
    </extension>
    <key value="CR"/>
    <type value="system"/>
    <title value="Client Registry"/>
    <description
                 value="The entity that stores PII and demographic information for the patient included in the Patient Resource submitted by the PoS entity."/>
  </actor>
  <actor>
    <extension url="http://moh.bw.org/StructureDefinition/actor-reference">
      <valueReference>🔗 
        <reference value="ActorDefinition/SHRActorDefinitionExample"/>
      </valueReference>
    </extension>
    <key value="FHIR"/>
    <type value="system"/>
    <title value="FHIR Server"/>
    <description
                 value="The entity that stores a restricted version of the Patient Resource submitted by the PoS entity."/>
  </actor>
  <instance>
    <key value="rnp.01"/>
    <structureType>
      <system value="http://hl7.org/fhir/fhir-types"/>
      <code value="Patient"/>
    </structureType>
    <structureProfileCanonical
                               value="http://moh.bw.org/StructureDefinition/bw-patient"/>
    <title value="Data Supplying Patient Resource"/>
    <description value="The Patient involved in the scenario."/>
    <content>🔗 
      <reference value="Patient/BwPatientExample"/>
    </content>
  </instance>
  <instance>
    <key value="rnp.02"/>
    <structureType>
      <system value="http://hl7.org/fhir/fhir-types"/>
      <code value="Patient"/>
    </structureType>
    <structureProfileCanonical
                               value="http://moh.bw.org/StructureDefinition/patient-identity-cross-reference"/>
    <title value="Restricted Patient Resource"/>
    <description value="The restricted Patient Resource excl. all PII."/>
    <content>🔗 
      <reference value="Patient/RestrictedPatientExample1"/>
    </content>
  </instance>
  <instance>
    <key value="rnp.03"/>
    <structureType>
      <system value="http://hl7.org/fhir/fhir-types"/>
      <code value="Endpoint"/>
    </structureType>
    <structureProfileCanonical
                               value="http://hl7.org/fhir/StructureDefinition/Endpoint"/>
    <title value="FHIR Validation outcome"/>
    <description
                 value="The validation outcome as issued by the FHIR server."/>
    <content>🔗 
      <reference value="Endpoint/ValidatePatientResourceInFHIR"/>
    </content>
  </instance>
  <instance>
    <key value="rnp.04"/>
    <structureType>
      <system value="http://hl7.org/fhir/fhir-types"/>
      <code value="Endpoint"/>
    </structureType>
    <structureProfileCanonical
                               value="http://hl7.org/fhir/StructureDefinition/Endpoint"/>
    <title value="Assigned Master Patient Index identifier"/>
    <description
                 value="A Master Patient Index identifier assigned by the CR when new patients are created."/>
    <content>🔗 
      <reference value="Endpoint/MPIForPatientIssuedByCR"/>
    </content>
  </instance>
  <instance>
    <key value="rnp.05"/>
    <structureType>
      <system value="http://hl7.org/fhir/fhir-types"/>
      <code value="Endpoint"/>
    </structureType>
    <structureProfileCanonical
                               value="http://hl7.org/fhir/StructureDefinition/Endpoint"/>
    <title value="Outcome response"/>
    <description
                 value="FHIR issues an outcome response to each CRUD request."/>
    <content>🔗 
      <reference value="Endpoint/FHIRResourceProcessResponse"/>
    </content>
  </instance>
  <process>
    <title value="Register Patient in CR"/>
    <preConditions
                   value="PoS entity has submitted a create patient request which contains the Data Supplying Patient Resource."/>
    <postConditions
                    value="CR entity has stored the patient's personal information and sent a response back to the IL which inlcudes a MPI identifier."/>
    <step>
      <number value="1"/>
      <process>
        <title value="Register Patient in CR"/>
        <description
                     value="This scenario demonstrates the process of storing the patient's personal information in the CR, acquired from the Patient Resource and returning a Master Patient Index (MPI) identifier for the patient."/>
        <step>
          <number value="1.1"/>
          <operation>
            <type>
              <system value="http://hl7.org/fhir/restful-interaction"/>
              <code value="update"/>
            </type>
            <title value="Patient resource"/>
            <initiator value="PoS"/>
            <receiver value="IL"/>
            <description value="Patient personal information"/>
            <request>
              <instanceReference value="rnp.01"/>
            </request>
          </operation>
        </step>
        <step>
          <number value="1.2"/>
          <operation>
            <title value="Get patient data"/>
            <initiator value="IL"/>
            <receiver value="IL"/>
            <description
                         value="Mediator extracts the patient data from the Patient Resource which includes all personal identifiers."/>
            <initiatorActive value="true"/>
          </operation>
        </step>
        <step>
          <number value="1.3"/>
          <operation>
            <type>
              <system value="http://hl7.org/fhir/restful-interaction"/>
              <code value="operation"/>
            </type>
            <title value="Validate patient data for compliance"/>
            <initiator value="IL"/>
            <receiver value="FHIR"/>
            <description
                         value="Request for FHIR's $validate operation to check that the supplied data is compliant with the Data Supplying Patient Resource Profile. FHIR's $validate operation validates the message structure and its data to ensure that the supplied data is compliant with the Data Supplying Patient Resource Profile."/>
            <request>
              <instanceReference value="rnp.01"/>
            </request>
            <response>
              <instanceReference value="rnp.03"/>
            </response>
          </operation>
        </step>
        <step>
          <number value="1.4"/>
          <operation>
            <type>
              <system
                      value="http://moh.bw.org/CodeSystem/cs-scenario-op-type-codes"/>
              <code value="CREATE"/>
            </type>
            <title value="Validation success: Send patient data"/>
            <initiator value="IL"/>
            <receiver value="CR"/>
            <description
                         value="Patient Resource is sent to the CR for processing. The CR associates a MPI with the patient record and stores it."/>
            <request>
              <instanceReference value="rnp.01"/>
            </request>
            <response>
              <instanceReference value="rnp.04"/>
            </response>
          </operation>
        </step>
        <step>
          <number value="1.5"/>
          <operation>
            <title value="Success: Invoke FHIR mediator"/>
            <initiator value="IL"/>
            <receiver value="IL"/>
            <description
                         value="Pass the data to the mediator responsible for calling the endpoint for creating the new patient data in FHIR."/>
          </operation>
        </step>
      </process>
    </step>
  </process>
  <process>
    <title value="Register Patient in FHIR"/>
    <preConditions
                   value="CR has provided a MPI identifier in its response sent back to the IL."/>
    <postConditions
                    value="FHIR entity has processed the Restricted Patient Resource that documents the MPI for re-identification purposes."/>
    <step>
      <number value="2"/>
      <process>
        <title value="Register Patient in FHIR"/>
        <description
                     value="This scenario demonstrates the process of storing a restricted version of the Patient Resource which excludes all PII to ensure patient privacy. This Patient Resource includes the MPI identifier issued by the CR so that the IL can reassociate the clinical information (FHIR) with the PII (CR) during GET requests."/>
        <step>
          <number value="2.1"/>
          <operation>
            <title value="Remove all PII and business identifiers"/>
            <initiator value="IL"/>
            <receiver value="IL"/>
            <description
                         value="Remove all demographic information and business identifiers from the Patient Resource as required by the Restricted Patient Resource Profile."/>
            <initiatorActive value="true"/>
          </operation>
        </step>
        <step>
          <number value="2.2"/>
          <operation>
            <title value="Update Resource.meta"/>
            <initiator value="IL"/>
            <receiver value="IL"/>
            <description
                         value="Replace the existing meta.profile value with the structure definition URL for the Restricted Patient Resource Profile."/>
            <initiatorActive value="false"/>
          </operation>
        </step>
        <step>
          <number value="2.3"/>
          <operation>
            <title value="Add the MPI identifier"/>
            <initiator value="IL"/>
            <receiver value="IL"/>
            <description
                         value="Add the MPI assigned by the CR as a business identifier in the Restricted Patient Resource."/>
            <initiatorActive value="true"/>
          </operation>
        </step>
        <step>
          <number value="2.4"/>
          <operation>
            <title value="Set the Restricted Patient Resource literal ID"/>
            <initiator value="IL"/>
            <receiver value="IL"/>
            <description
                         value="Set the literal ID in the Restricted Patient Resource to the same value as the ID that was included in the Patient Resource that was submitted by the PoS entity."/>
            <initiatorActive value="false"/>
          </operation>
        </step>
        <step>
          <number value="2.5"/>
          <operation>
            <title value="Send data for consumption"/>
            <initiator value="IL"/>
            <receiver value="FHIR"/>
            <description
                         value="Patient Resource is sent to the FHIR server for further processing."/>
            <receiverActive value="true"/>
            <request>
              <instanceReference value="rnp.02"/>
            </request>
            <response>
              <instanceReference value="rnp.05"/>
            </response>
          </operation>
        </step>
        <step>
          <number value="2.6"/>
          <operation>
            <title value="Success: Invoke IL mediator"/>
            <initiator value="IL"/>
            <receiver value="IL"/>
            <description
                         value="Pass the data to the mediator responsible for calling the endpoint that must send a response back the PoS system who initiated the create patient request."/>
          </operation>
        </step>
      </process>
    </step>
  </process>
  <process>
    <title value="Respond to Create Patient Request"/>
    <preConditions
                   value="FHIR entity has processed the request to create the patient record and has issued an outcome response."/>
    <postConditions
                    value="IL entity has received the outcome response from FHIR and forwarded the response to the PoS system."/>
    <step>
      <number value="3"/>
      <process>
        <title value="Respond to Create Patient Request"/>
        <description
                     value="This scenario demonstrates the process for responding to the PoS sytem who issued the create patient request."/>
        <step>
          <number value="3.1"/>
          <operation>
            <title value="Response"/>
            <initiator value="IL"/>
            <receiver value="PoS"/>
            <description
                         value="Mediator responds to the create patient request."/>
            <request>
              <instanceReference value="rnp.05"/>
            </request>
          </operation>
        </step>
        <step>
          <number value="3.2"/>
          <operation>
            <title value="Log the outcome"/>
            <initiator value="PoS"/>
            <receiver value="PoS"/>
            <description
                         value="PoS entity logs the outcome issued by the FHIR entity."/>
            <receiverActive value="true"/>
          </operation>
        </step>
      </process>
    </step>
  </process>
</ExampleScenario>