
This document is commercial-in-confidence. The recipient of this document agrees to hold all information presented within as confidential and agree not to use or disclose, or allow to use or disclosure of the said information to unauthorized parties, directly or indirectly, irrespective of the acceptance or rejection of the presentation or at any time before, during or after an agreement has been reached, without prior written consent.
| Version | Date | Who | Comments |
|---|---|---|---|
| v0.1 - Draft | 30th Oct 2025 | Lee Dyson | First draft |
| v1.0 - Release | 30th Oct 2025 | Robert McNaught | Release to customer |
This document describes the MEDILOGIK EMS Patient Demographics Query / Response interface, it’s functionality, configuration and operations.
The interface is based on standard HL7 QRY^A19 and ADR^A19 messaging formats.
The EMS Q/R interface allows a customer’s instance of EMS to search their local EPR for up to date patient demographic details.
The interface implements simple MRN or NHS number ONLY queries.
As this interface operates across a WAN connection (HSCN or Internet), it employs an HTTPS transport, rather than the MLLP / TCP connections more typically employed on LAN interfaces.
The use of HTTPs transport ensures that messages are encrypted in transport and are also easier to route through firewalls, load-balancers and other network infrastructure.
The customer must implement the server portion of this interface in an appropriate HTTPs endpoint. That is the customer’s TIE (or EPR directly) will accept an incoming connection from the EMS servers.
Each query message from EMS is carried in a single HTTP(s) request and the interface expects a timely synchronous response from the customer’s endpoint.
Queries originate from the EMS servers and multiple queries may be issued concurrently. It’s important therefore the customer endpoint is able to handle multiple concurrent connections and multiple concurrent queries.
As this interface operates over a HTTPS connection, the customer’s server process must present a valid TLS server certificate.
| Message Type | Default Action |
|---|---|
| QRY^A19 | Request demographics |
| ADR^A19 | Query response |
[] - Optional
{} - Repeating
MSH
QRD
MSH|^~\&|EMS|EMS|||202510171402||QRY^A19|202510171402004|D|2.4
QRD|202510171402|R|I|202510171402004|||1^RD|1297999|DEM|||T
The EMS Q/R interface expects a response from the customer’s endpoint like the sample message below
MSH
MSA
QRD
PID
PD1
MSH|^~\&|TIE|RRK|EMS|RRK|20251027122026||ADR^A19|65fda5f2-6226-4689-918c-8c43e426808b|T|2.4
MSA|AA|202510171402004
QRD|20251027122026|R|I||||1^RD||DEM|||T
PID|1||1297999^^^RRK^MR~9990275335^^^NHS^NH||Pas-Support^Lillie^^^Lady^^||19960505|I|||Regus, Princes Exchange^2 Princes Square^Leeds^^LS1 4HY^^||02920344617^PRN^PH~07966015885^PRN^CP~cwrwboy+80013@gmail.com^NET^X.400|||||||||||||||||N
PD1|||^^X99999|G9999998||
The following segment definitions apply to messages inbound and outbound. If a field is not documented, then it is not considered mandatory or processed by EMS on inbound messages.
Please Refer to EMS Standard Segment Definitions
Please Refer to EMS Standard Segment Definitions
| Field | Name | Required | Example | Notes |
|---|---|---|---|---|
| 8 | Who Subject filter | Y | 1297999 |
Note:
QRD-8 is the identifier being searched for.
+The EMS Q/R interface only supports searching by patient identifier. It does not support searching by patient demographics.Please Refer to EMS Standard Segment Definitions
Note:
PID segment received in the ADR^A19 response message.Please Refer to EMS Standard Segment Definitions