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 (Using a Bundle) - JSON Representation

Active as of 2025-08-20

Raw json | Download

{
  "resourceType" : "ExampleScenario",
  "id" : "RegisterNewPatientInBundle",
  "text" : {
    "status" : "extensions",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: ExampleScenario RegisterNewPatientInBundle</b></p><a name=\"RegisterNewPatientInBundle\"> </a><a name=\"hcRegisterNewPatientInBundle\"> </a><p><b>url</b>: <a href=\"ExampleScenario-RegisterNewPatientInBundle.html\">Register New Patient (Using a Bundle)</a></p><p><b>version</b>: 1.0.0</p><p><b>name</b>: RegisterNewPatientInBundle</p><p><b>title</b>: Register New Patient (Using a Bundle)</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>\n</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>\n</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>\n</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 lab order bundle submitted by PoS entity.</p>\n</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 clinical information for the patient included in the request submitted by PoS entity.</p>\n</div></blockquote><blockquote><p><b>instance</b></p><p><b>key</b>: rnp-b.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>\n</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-b.03</p><p><b>structureType</b>: <a href=\"http://hl7.org/fhir/R5/codesystem-fhir-types.html#fhir-types-Bundle\">All FHIR Types Bundle</a>: Bundle</p><p><b>structureProfile</b>: <a href=\"StructureDefinition-lab-orders-bundle.html\">Bundle - Lab Orders</a></p><p><b>title</b>: Lab Order Bundle</p><p><b>description</b>: </p><div><p>The FHIR bundle provided by the PoS entity to create the patient record.</p>\n</div><p><b>content</b>: <a href=\"Bundle-lab-order-with-patient-bundle.html\">Bundle: type = transaction</a></p></blockquote><blockquote><p><b>instance</b></p><p><b>key</b>: rnp-b.04</p><p><b>structureType</b>: <a href=\"http://hl7.org/fhir/R5/codesystem-fhir-types.html#fhir-types-Bundle\">All FHIR Types Bundle</a>: Bundle</p><p><b>structureProfile</b>: <a href=\"StructureDefinition-process-patient-bundle.html\">Bundle - Process Patient in FHIR</a></p><p><b>title</b>: Lab Order Bundle excl. PII</p><p><b>description</b>: </p><div><p>The FHIR bundle after being updated by the IL by replacing the <a href=\"StructureDefinition-bw-patient.html\">Data Supplying Patient Resource</a> with the <a href=\"StructureDefinition-patient-identity-cross-reference.html\">Restricted Patient Resource</a>.</p>\n</div><p><b>content</b>: <a href=\"Bundle-lab-order-with-restricted-patient-bundle.html\">Bundle: type = transaction</a></p></blockquote><blockquote><p><b>instance</b></p><p><b>key</b>: rnp-b.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>: FHIR Validation outcome</p><p><b>description</b>: </p><div><p>The validation outcome as issued by the FHIR server.</p>\n</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-b.06</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>\n</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-b.07</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>\n</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 the Lab Order Bundle which contains the Data Supplying Patient Resource.</p>\n</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>\n</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>\n</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>: Lab order bundle</p><p><b>initiator</b>: PoS</p><p><b>receiver</b>: IL</p><p><b>description</b>: </p><div><p>Patient data contains PII and clinical information</p>\n</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-b.03</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>\n</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>\n</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-b.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-b.05</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>\n</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-b.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-b.06</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>\n</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>\n</div><p><b>postConditions</b>: </p><div><p>FHIR entity has processed the lab order bundle which incl. the Restricted Patient Resource that documents the MPI for re-identification purposes.</p>\n</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>\n</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 Data Supplying Patient Resource</td><td>IL</td><td>IL</td><td><div><p>Remove the Data Supplying Patient Resource from the lab order bundle and replace it with the Restricted Patient Resource</p>\n</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>Add Restricted Patient Resource</td><td>IL</td><td>IL</td><td><div><p>Add the Restricted Patient Resource to the lab order bundle</p>\n</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>\n</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 used as a patient reference in the other resources in the bundle. Note: There can only be one!.</p>\n</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>Lab order bundle is sent to the FHIR server for further processing.</p>\n</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-b.04</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-b.07</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>\n</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>\n</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>\n</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>\n</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>\n</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-b.07</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>\n</div></td><td>true</td></tr></table></blockquote></blockquote></blockquote></blockquote></div>"
  },
  "url" : "http://moh.bw.org/ExampleScenario/RegisterNewPatientInBundle",
  "version" : "1.0.0",
  "name" : "RegisterNewPatientInBundle",
  "title" : "Register New Patient (Using a Bundle)",
  "status" : "active",
  "experimental" : false,
  "date" : "2025-08-20T07:21:53+00:00",
  "publisher" : "Jembi Health Systems",
  "contact" : [
    {
      "name" : "Jembi Health Systems",
      "telecom" : [
        {
          "system" : "url",
          "value" : "https://www.jembi.org"
        },
        {
          "system" : "email",
          "value" : "info@jembi.org"
        }
      ]
    },
    {
      "name" : "Jembi Health Systems",
      "telecom" : [
        {
          "system" : "email",
          "value" : "info@jembi.org",
          "use" : "work"
        }
      ]
    }
  ],
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "urn:iso:std:iso:3166",
          "code" : "BW",
          "display" : "Botswana"
        }
      ]
    }
  ],
  "purpose" : "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" : "ActorDefinition/PIMSActorDefinitionExample"
          }
        },
        {
          "url" : "http://moh.bw.org/StructureDefinition/actor-reference",
          "valueReference" : {
            🔗 "reference" : "ActorDefinition/OpenMRSActorDefinitionExample"
          }
        }
      ],
      "key" : "PoS",
      "type" : "system",
      "title" : "Point of Service",
      "description" : "The entity that registers the patient."
    },
    {
      "extension" : [
        {
          "url" : "http://moh.bw.org/StructureDefinition/actor-reference",
          "valueReference" : {
            🔗 "reference" : "ActorDefinition/InteroperabilityLayerActorDefinitionExample"
          }
        }
      ],
      "key" : "IL",
      "type" : "system",
      "title" : "Interoperability Layer",
      "description" : "The entity that receives the registration request submitted by PoS entity."
    },
    {
      "extension" : [
        {
          "url" : "http://moh.bw.org/StructureDefinition/actor-reference",
          "valueReference" : {
            🔗 "reference" : "ActorDefinition/ClientRegistryActorDefinitionExample"
          }
        }
      ],
      "key" : "CR",
      "type" : "system",
      "title" : "Client Registry",
      "description" : "The entity that stores PII and demographic information for the patient included in the lab order bundle submitted by PoS entity."
    },
    {
      "extension" : [
        {
          "url" : "http://moh.bw.org/StructureDefinition/actor-reference",
          "valueReference" : {
            🔗 "reference" : "ActorDefinition/SHRActorDefinitionExample"
          }
        }
      ],
      "key" : "FHIR",
      "type" : "system",
      "title" : "FHIR Server",
      "description" : "The entity that stores clinical information for the patient included in the request submitted by PoS entity."
    }
  ],
  "instance" : [
    {
      "key" : "rnp-b.01",
      "structureType" : {
        "system" : "http://hl7.org/fhir/fhir-types",
        "code" : "Patient"
      },
      "structureProfileCanonical" : "http://moh.bw.org/StructureDefinition/bw-patient",
      "title" : "Data Supplying Patient Resource",
      "description" : "The Patient involved in the scenario.",
      "content" : {
        🔗 "reference" : "Patient/BwPatientExample"
      }
    },
    {
      "key" : "rnp-b.03",
      "structureType" : {
        "system" : "http://hl7.org/fhir/fhir-types",
        "code" : "Bundle"
      },
      "structureProfileCanonical" : "http://moh.bw.org/StructureDefinition/lab-orders-bundle",
      "title" : "Lab Order Bundle",
      "description" : "The FHIR bundle provided by the PoS entity to create the patient record.",
      "content" : {
        🔗 "reference" : "Bundle/lab-order-with-patient-bundle"
      }
    },
    {
      "key" : "rnp-b.04",
      "structureType" : {
        "system" : "http://hl7.org/fhir/fhir-types",
        "code" : "Bundle"
      },
      "structureProfileCanonical" : "http://moh.bw.org/StructureDefinition/process-patient-bundle",
      "title" : "Lab Order Bundle excl. PII",
      "description" : "The FHIR bundle after being updated by the IL by replacing the [Data Supplying Patient Resource](StructureDefinition-bw-patient.html) with the [Restricted Patient Resource](StructureDefinition-patient-identity-cross-reference.html).",
      "content" : {
        🔗 "reference" : "Bundle/lab-order-with-restricted-patient-bundle"
      }
    },
    {
      "key" : "rnp-b.05",
      "structureType" : {
        "system" : "http://hl7.org/fhir/fhir-types",
        "code" : "Endpoint"
      },
      "structureProfileCanonical" : "http://hl7.org/fhir/StructureDefinition/Endpoint",
      "title" : "FHIR Validation outcome",
      "description" : "The validation outcome as issued by the FHIR server.",
      "content" : {
        🔗 "reference" : "Endpoint/ValidatePatientResourceInFHIR"
      }
    },
    {
      "key" : "rnp-b.06",
      "structureType" : {
        "system" : "http://hl7.org/fhir/fhir-types",
        "code" : "Endpoint"
      },
      "structureProfileCanonical" : "http://hl7.org/fhir/StructureDefinition/Endpoint",
      "title" : "Assigned Master Patient Index identifier",
      "description" : "A Master Patient Index identifier assigned by the CR when new patients are created.",
      "content" : {
        🔗 "reference" : "Endpoint/MPIForPatientIssuedByCR"
      }
    },
    {
      "key" : "rnp-b.07",
      "structureType" : {
        "system" : "http://hl7.org/fhir/fhir-types",
        "code" : "Endpoint"
      },
      "structureProfileCanonical" : "http://hl7.org/fhir/StructureDefinition/Endpoint",
      "title" : "Outcome response",
      "description" : "FHIR issues an outcome response to each CRUD request.",
      "content" : {
        🔗 "reference" : "Endpoint/FHIRResourceProcessResponse"
      }
    }
  ],
  "process" : [
    {
      "title" : "Register Patient in CR",
      "preConditions" : "PoS entity has submitted the Lab Order Bundle which contains the Data Supplying Patient Resource.",
      "postConditions" : "CR entity has stored the patient's personal information and sent a response back to the IL which inlcudes a MPI identifier.",
      "step" : [
        {
          "number" : "1",
          "process" : {
            "title" : "Register Patient in CR",
            "description" : "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" : "1.1",
                "operation" : {
                  "type" : {
                    "system" : "http://hl7.org/fhir/restful-interaction",
                    "code" : "update"
                  },
                  "title" : "Lab order bundle",
                  "initiator" : "PoS",
                  "receiver" : "IL",
                  "description" : "Patient data contains PII and clinical information",
                  "request" : {
                    "instanceReference" : "rnp-b.03"
                  }
                }
              },
              {
                "number" : "1.2",
                "operation" : {
                  "title" : "Get patient data",
                  "initiator" : "IL",
                  "receiver" : "IL",
                  "description" : "Mediator extracts the patient data from the Patient Resource which includes all personal identifiers.",
                  "initiatorActive" : true
                }
              },
              {
                "number" : "1.3",
                "operation" : {
                  "type" : {
                    "system" : "http://hl7.org/fhir/restful-interaction",
                    "code" : "operation"
                  },
                  "title" : "Validate patient data for compliance",
                  "initiator" : "IL",
                  "receiver" : "FHIR",
                  "description" : "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" : "rnp-b.01"
                  },
                  "response" : {
                    "instanceReference" : "rnp-b.05"
                  }
                }
              },
              {
                "number" : "1.4",
                "operation" : {
                  "type" : {
                    "system" : "http://moh.bw.org/CodeSystem/cs-scenario-op-type-codes",
                    "code" : "CREATE"
                  },
                  "title" : "Validation success: Send patient data",
                  "initiator" : "IL",
                  "receiver" : "CR",
                  "description" : "Patient Resource is sent to the CR for processing. The CR associates a MPI with the patient record and stores it.",
                  "request" : {
                    "instanceReference" : "rnp-b.01"
                  },
                  "response" : {
                    "instanceReference" : "rnp-b.06"
                  }
                }
              },
              {
                "number" : "1.5",
                "operation" : {
                  "title" : "Success: Invoke FHIR mediator",
                  "initiator" : "IL",
                  "receiver" : "IL",
                  "description" : "Pass the data to the mediator responsible for calling the endpoint for creating the new patient data in FHIR."
                }
              }
            ]
          }
        }
      ]
    },
    {
      "title" : "Register Patient in FHIR",
      "preConditions" : "CR has provided a MPI identifier in its response sent back to the IL.",
      "postConditions" : "FHIR entity has processed the lab order bundle which incl. the Restricted Patient Resource that documents the MPI for re-identification purposes.",
      "step" : [
        {
          "number" : "2",
          "process" : {
            "title" : "Register Patient in FHIR",
            "description" : "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" : "2.1",
                "operation" : {
                  "title" : "Remove Data Supplying Patient Resource",
                  "initiator" : "IL",
                  "receiver" : "IL",
                  "description" : "Remove the Data Supplying Patient Resource from the lab order bundle and replace it with the Restricted Patient Resource",
                  "initiatorActive" : true
                }
              },
              {
                "number" : "2.2",
                "operation" : {
                  "title" : "Add Restricted Patient Resource",
                  "initiator" : "IL",
                  "receiver" : "IL",
                  "description" : "Add the Restricted Patient Resource to the lab order bundle",
                  "initiatorActive" : false
                }
              },
              {
                "number" : "2.3",
                "operation" : {
                  "title" : "Add the MPI identifier",
                  "initiator" : "IL",
                  "receiver" : "IL",
                  "description" : "Add the MPI assigned by the CR as a business identifier in the Restricted Patient Resource",
                  "initiatorActive" : true
                }
              },
              {
                "number" : "2.4",
                "operation" : {
                  "title" : "Set the Restricted Patient Resource literal ID",
                  "initiator" : "IL",
                  "receiver" : "IL",
                  "description" : "Set the literal ID in the Restricted Patient Resource to the same value as the ID used as a patient reference in the other resources in the bundle. Note: There can only be one!.",
                  "initiatorActive" : false
                }
              },
              {
                "number" : "2.5",
                "operation" : {
                  "title" : "Send data for consumption",
                  "initiator" : "IL",
                  "receiver" : "FHIR",
                  "description" : "Lab order bundle is sent to the FHIR server for further processing.",
                  "receiverActive" : true,
                  "request" : {
                    "instanceReference" : "rnp-b.04"
                  },
                  "response" : {
                    "instanceReference" : "rnp-b.07"
                  }
                }
              },
              {
                "number" : "2.6",
                "operation" : {
                  "title" : "Success: Invoke IL mediator",
                  "initiator" : "IL",
                  "receiver" : "IL",
                  "description" : "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."
                }
              }
            ]
          }
        }
      ]
    },
    {
      "title" : "Respond to Create Patient Request",
      "preConditions" : "FHIR entity has processed the request to create the patient record and has issued an outcome response.",
      "postConditions" : "IL entity has received the outcome response from FHIR and forwarded the response to the PoS system.",
      "step" : [
        {
          "number" : "3",
          "process" : {
            "title" : "Respond to Create Patient Request",
            "description" : "This scenario demonstrates the process for responding to the PoS sytem who issued the create patient request.",
            "step" : [
              {
                "number" : "3.1",
                "operation" : {
                  "title" : "Response",
                  "initiator" : "IL",
                  "receiver" : "PoS",
                  "description" : "Mediator responds to the create patient request.",
                  "request" : {
                    "instanceReference" : "rnp-b.07"
                  }
                }
              },
              {
                "number" : "3.2",
                "operation" : {
                  "title" : "Log the outcome",
                  "initiator" : "PoS",
                  "receiver" : "PoS",
                  "description" : "PoS entity logs the outcome issued by the FHIR entity.",
                  "receiverActive" : true
                }
              }
            ]
          }
        }
      ]
    }
  ]
}