North West Genomic Medicine Service Alliance
0.0.7 - ci-build United Kingdom flag

North West Genomic Medicine Service Alliance - Local Development build (v0.0.7) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Placer Order Management [LAB-1]

Referenced Standards

This transaction is used by the Order Placer to place an Order Group (FHIR RequestGroup) (i.e., a set of Orders to be tested together for a patient) or a standalone Order to the Order Filler. The transaction enables both Order Placer and Order Filler to notify all subsequent changes of status and/or content of each Order to the other side.

EIP - Command Message

Actor Roles

Regional Placer Order Management [LAB-1] Order Filler NW Genomic Laboratory Hub (LIMS) Order Placer Regional Intermediary NW GLH Regional Integration Engine (RIE) HL7 FHIR MessageLaboratory Order O21 HL7 v2.xOML_O21/(ORM_O01)

Regional Placer Order Management [LAB-1] Component Diagram


Messages

The following messages are used to support creation and updating of the Genomics Test Order aggregation/archetype

Message Purpose EIP Type  
Laboratory Order Sending the initial laboratory-order request. Command Message  
Laboratory Order Acknowledgement Is used to update the order-placer of changes to laboratory-order such as an assigned AccessionNumber Event Message  
Laboratory Order Updates Is used to update master data in the laboratory-order such as changes to Patient and Pracitioner details. Event Message  

Laboratory Order

Order PlacerIntermediaryNW GLH Regional Integration Engine (RIE)Order FillerSelect Test Order FormComplete Test Order FormSubmit Test Order Form(Send HL7 FHIR Message)Laboratory Order O21Validate Messagealt[Successful validation]Response HL7 FHIR MessagePositive acknowledgement (AA)Transform HL7 FHIR to v2 MessageSend HL7 v2 MessageOML_O21/(ORM_O01)Response HL7 v2 MessageORL_O22?[Unsuccessful validation]Response HL7 FHIR MessageApplication Reject (AR/AE)

Regional Placer Order Management [LAB-1] Sequence Diagram


Complete Order Test Form

In many Order Placer applications (i.e. the EPR or Order Comms) the order is captured via a form.

Submit Test Order Form (Send HL7 FHIR Message Laboratory Order)

The laboratory order (O21) is sent to the RIA via the $process-message API

Example payload Bundle ‘Message’ - Genomics Order

Send HL7 v2 Message and Response HL7 v2 Message

The RIE then sends the converted HL7 v2 Message to the Order Filler (LIMS) which responds back with a ORL_O22? message. Depending on the capabilty of the LIMS system this may include a ORC with an accession number (Filler Order Number) and a PID with updated/new identifiers, these can then be converted to a FHIR ServiceRequest and Patient respectively.

Response HL7 FHIR Message

The response message contains a FHIR MessageHeader with a populated response element, the focus element is not populated.

Accepted

For sucessful messages the MessageHeader will have response.code returned will be ok and will look like:

{
  "resourceType" : "MessageHeader",
  ...
  "response" : {
    "identifier" : "9612365d-52a4-4fab-87e7-8a09d753f095",
    "code" : "ok"
  }
}

Where the identifier refers to the Bundle.identifier in the original message. The Bundle may also include modified FHIR Patient or ServiceRequest resources with updated and new identifiers.

Example payload Bundle ‘Message’ - Genomics Order Acknowledgement

Error/Reject

When the RIE is unable to accept the message due to issues such as FHIR Validation issues, the returned MessageHeader will have response.code returned will be error, e.g.:

{
  "resourceType" : "MessageHeader",
  ...
  "response" : {
    "identifier" : "9612365d-52a4-4fab-87e7-8a09d753f095",
    "code" : "fatal-error",
    "details" : {
      🔗 "reference" : "OperationOutcome/operation-outcome-validate"
    }
  }
}

where the details section contains a reference to an included OperationOutcome listing details of the failure.

Transient Response

When FHIR Validation is active on the RIE, the response will be delayed due to the time taken to validate the message. The immediate response will contain a MessageHeader with a response.code of transient-error, e.g.:

{
  "resourceType" : "MessageHeader",
  ...
  "response" : {
    "identifier" : "9612365d-52a4-4fab-87e7-8a09d753f095",
    "code" : "transient-error"
  }
}

The next section details how to retrieve the response.

Asynchronous Message Response

This follows HL7 FHIR Asynchronous Messaging using the RESTful API

The Order Placer (or TIE) FHIR RESTful query to retrieve their response messages.

Example returned search results Bundle ‘SearchSet’ - Genomics Order

Initially, only queries by ODS Code will be supported to support TIE to TIE exchanges.

Acknowledge Asynchronous HL7 FHIR Messages

Messages that have been accepted by the calling Order Place (or TIE) need to be acknowledged and removed from the MessageQueue. This is achieved by sending back the messages with the sender and destination fields reversed, i.e.

Orignial Message Header
{
  "resourceType" : "MessageHeader",
  ...
  "destination" : [
    {
      "endpoint" : "http://www.acme.org/endpoint/HIVE",
      "receiver" : {
        "identifier" : {
          "system" : "https://fhir.nhs.uk/Id/ods-organization-code",
          "value" : "R0A"
        },
        "display" : "MANCHESTER UNIVERSITY NHS FOUNDATION TRUST"
      }
    }
  ],
  "sender" : {
    "identifier" : {
      "system" : "https://fhir.nhs.uk/Id/ods-organization-code",
      "value" : "699X0"
    },
    "display" : "NORTH WEST GLH"
  },
  ...
  "response" : {
    "identifier" : "9612365d-52a4-4fab-87e7-8a09d753f095",
    "code" : "fatal-error",
    "details" : {
      🔗 "reference" : "OperationOutcome/operation-outcome-validate"
    }
  }
}
Message Header for returned update
{
  "resourceType" : "MessageHeader",
  ...
  "destination" : [
    {
      "endpoint" : "http://www.acme.org/endpoint/HIVE",
      "receiver" : {
        "identifier" : {
          "system" : "https://fhir.nhs.uk/Id/ods-organization-code",
          "value" : "R0A"
        },
        "display" : "MANCHESTER UNIVERSITY NHS FOUNDATION TRUST"
      }
    }
  ],
  "sender" : {
    "identifier" : {
      "system" : "https://fhir.nhs.uk/Id/ods-organization-code",
      "value" : "699X0"
    },
    "display" : "NORTH WEST GLH"
  },
  ...
  "response" : {
    "identifier" : "9612365d-52a4-4fab-87e7-8a09d753f095",
    "code" : "fatal-error",
    "details" : {
      🔗 "reference" : "OperationOutcome/operation-outcome-validate"
    }
  }
}

This update is sent back to the RIE as a FHIR Transaction

{
  "resourceType" : "Bundle",
  "id" : "TransactionGenomicsOrderReplyAck",
  "type" : "transaction",
  "timestamp" : "2024-10-13T10:33:00+00:00",
  "entry" : [
    {
      "fullUrl" : "Bundle/GenomicsOrderMessageReplyAcknowledge",
      "resource" : {
        "resourceType" : "Bundle",
        "id" : "GenomicsOrderMessageReplyAcknowledge",
        "identifier" : {
          "system" : "urn:ietf:rfc:3986",
          "value" : "urn:uuid:9612365d-52a4-4fab-87e7-8a09d753f095"
        },
        "type" : "message",
        "timestamp" : "2024-10-13T10:33:00+00:00",
        "entry" : [
          {
            "fullUrl" : "urn:uuid:9a7e9fd9-d774-42ef-bd23-4397a1ba1b63",
            "resource" : {
              "resourceType" : "MessageHeader",
              "id" : "MessageHeaderGenomicOrderReplyFatalAcknowledge",
              "meta" : {
                "lastUpdated" : "2025-01-29T10:40:26+00:00"
              },
              "eventCoding" : {
                "system" : "http://terminology.hl7.org/CodeSystem/v2-0003",
                "code" : "O21"
              },
              "destination" : [
                {
                  "endpoint" : "http://www.acme.org/endpoint/RIE",
                  "receiver" : {
                    "identifier" : {
                      "system" : "https://fhir.nhs.uk/Id/ods-organization-code",
                      "value" : "699X0"
                    },
                    "display" : "NORTH WEST GLH"
                  }
                }
              ],
              "sender" : {
                "identifier" : {
                  "system" : "https://fhir.nhs.uk/Id/ods-organization-code",
                  "value" : "R0A"
                },
                "display" : "MANCHESTER UNIVERSITY NHS FOUNDATION TRUST"
              },
              "source" : {
                "software" : "NW GLH",
                "endpoint" : "http://www.acme.org/endpoint/HIVE"
              },
              "response" : {
                "identifier" : "9612365d-52a4-4fab-87e7-8a09d753f095",
                "code" : "fatal-error",
                "details" : {
                  🔗 "reference" : "OperationOutcome/operation-outcome-validate"
                }
              }
            }
          }
        ]
      },
      "request" : {
        "method" : "POST",
        "url" : "Bundle"
      }
    }
  ]
}

Validate Message

The incoming order is checked for validity, this may include FHIR Validation against this Implementation Guide. If the message is accepted it is then transformed to a HL7 v2 Message, else a Response HL7 FHIR Message is returned listing the issues in a FHIR OperationOutcome resource.

Transform FHIR to HL7 v2 Message

NOT FOR OPERATIONAL USE

Transform HL7 v2 FHIR Message

NOT FOR OPERATIONAL USE