RIS PD163 CRIS HL7 Inbound Interface Specification

RIS PD163 CRIS HL7 Inbound Interface Specification

RIS_PD163_CRIS_HL7_ Inbound_ Interface Specification

Contents

1Introduction

1.1.Purpose

1.2.Audience

2Implementation Model

2.1.Overview

2.2.Application Data Flow

2.3.HL7 version

3Message and Activity Mapping

3.1.Find CRIS Patient ID

3.2.Retrieve CRIS event details

3.3.Create / update an attendance

3.4.Create / Update a report

3.5.IEP Sending

4Message Transport

4.1Connections

4.2Transport level Acknowledgements

4.3Framing Characters

5Error Handling

6Data Mappings - General

6.1Patient Identifiers

6.2Time Stamp values

7Data Mappings – Inbound Results

7.1ORU^R01 Result

7.2ACK^R01 Acknowledgement

8Data Mappings – Inbound Events

8.1OMG^O19 Order

8.2ORG^O20 Order Acknowledgement

9Data Mappings – Inbound IEP

9.1OMG^O19 Order

9.2Field mappings

10Data Mappings – Patient Query

10.1QRY^Q01 Query

10.2DSR^Q01 Query Response

11QBP^Z01 Event Query Conformance Statement

11.1Overview

11.2Query Grammar

11.3Response Grammar

12QBP^Z02 Patient Query Conformance Statement

12.1Overview

12.2Query Grammar

12.3Response Grammar

13Sample Messages

13.1Results inbound

13.2QRY^Q01

13.3QBP^Z01

13.4QBP^Z02

14Configuration Questionnaire

1Introduction

1.1.Purpose

This document intends to define the transport protocols, message mappings and definitions for integration of CRIS with another system for the purpose receiving radiological results and or event details via HL7.

The functionality described in this document may be used in conjunction with the HL7 outbound interface document as a solution for several requirements such as:

a)Inbound results feed to receive results from an imaging contractor for events previously booked on CRIS. Typically the HL7 Outbound feed would be used to deliver patient and order details to the external system which would deliver result messages in return.

b)Inbound Result and Event Feed to receive details of events that have been performed at another hospital. The external system would use the patient query functionality to identify the patient, and then send order messages followed by result messages.

c)Integration with an external scheduling system. The external system would send order messages to create and update events. Changes, status updates and results would be returned by the HL7 outbound interface.

This version of the specification applies to CRIS interface release 2.09.10t1b and onwards.

1.2.Audience

This document is intended for system integrators, third party suppliers and potential customers. The reader is assumed to be familiar with the HL7 standard.

2Implementation Model

2.1.Overview

The remote system sends HL7 messages in order to create or update events and results.

As each incoming message is processed by CRIS an application layer acknowledgement is generated and returned to the sending system.

2.2.Application Data Flow

Messages flow from the remote system to CRIS. Application level acknowledgements flow from CRIS to the remote system. All messages are transmitted over TCP/IP using HL7 MLLP.

2.3.HL7 version

All messages referenced in this document conform to the 2.4 version of the HL7 standard. Message transport is HL7 MLLP over TCP/IP.

3Message and Activity Mapping

3.1.Find CRIS Patient ID

Given an NHS number the CRIS identifier of a patient may be determined by sending a QRY^Q01 message. CRIS will respond with a DSR^Q01 containing the CRIS patient id.

Alternatively a QBP^Z02 message may be sent which CRIS will respond to with an RSP^Z02 containing the demographic details and patient identifiers known on CRIS.

The QBP^Z02 message may be sent with

a)NHS Number

b)Hospital Number

c)CRIS Number

d)Patients surname, forenames, DOB and gender

For QBP^Z02 messages, if ExactNHSMatch is set to true then an NHS search will only return the patient if there is a match with the surname, forenames, DOB and gender sent in the message. It will search for PAS patients and for CRIS only patients with a local event as determined by LocalSitesForQuery.

3.2.Retrieve CRIS event details

Given either an accession number or CRIS exam key the order and result details may be queried by sending a QBP^Z01 message. CRIS will respond to this with an RSP^Z01 message containing the order and report details.

3.3.Create / update an attendance

If the remote system has details for an externally ordered and processed attendance it may send an OMG^O19 message to CRIS. CRIS will return an ORG^O20 message in response containing the CRIS exam key.

The remote system may also update the status of an existing attendance from SC -scheduled to IP – in progress.

This functionality is currently intended for use with two different types of application. These are not mutually exclusive and may be combined on one CRIS system.

External Booking of CRIS attendances / Appointments

In this application an external system manages booking of all CRIS attendances and appointments.

Each Order message will contain the patient ID from the local PAS system. The processing on CRIS is as follows

  1. The CRIS orders table is checked for the order ID in case we have received a duplicate message.
  2. The PAS patient record referenced in the order is checked for a link to the CRIS database.
  3. If a link does not exist a new CRIS patient record is created from the PAS details and linked to the PAS record
  4. The order is stored as an event / exam directly on CRIS.
  5. The order is also stored as an accepted order against the PAS record.

Import of attendances from another trust

In this application the external system receives attendance and image details from another trust which it needs to deliver to CRIS and PACS. The processing is as follows.

  1. If the external system holds an NHS number it sends a query message to CRIS which will respond with the CRIS ID if found.
  2. The external system sends an order containing NHS number and CRIS number if known.
  3. If the CRIS number is not present on the order CRIS will again attempt to find the patient by NHS number (if present) on both the CRIS and PAS databases. If the patient is found just on the PAS database CRIS will register the patient on CRIS. If ExactNHSMatch is true the patient will only be matched if all demographic details match and a CRIS only patient must have a local event.
  4. If the patient is still not identified CRIS will attempt to find the patient based on an exact match of surname, forenames, DOB and postcode.
  5. If the patient is still not found a new patient will be registered based on the details in the PID segment.
  6. The order is stored as an event / exam directly on CRIS.
  7. An order message is sent to the PACS

3.4.Create / Update a report

When the remote system has report data it sends an ORU^R01 message to CRIS. CRIS creates and updates report data as necessary.

The report message should reference a CRIS exam key which will either have been obtained from the acknowledgement of a previously sent attendance or in the case of an attendance booked directly on CRIS from an order message sent out by CRIS.

Once a report has been marked as final it may only be updated with a report marked as changed.

3.5.IEP Sending

When an event is sent from a remote system via IEP, an OMG^O19 is received by CRIS. CRIS creates or updates the event as appropriate.

A report may or may not be sent as part of the message and each message will have a send reason to inform the receiving system of why the message was sent.

4Message Transport

All Messages are transmitted over TCP/IP using MLLP.

4.1Connections

One socket connection is used for messages originating from the remote system. A further socket connection is used for application level acknowledgement messages from CRIS. The port numbers to be used will be decided by mutual agreement. The system sending the message will initiate the connection (The remote system will initiate the connection for report/order/query messages, CRIS will initiate the connection for application level acknowledgements).

4.2Transport level Acknowledgements

Each message will be acknowledged by the receiving system prior to delivery of the next message. Messages that are NAK’d will by logged by CRIS and should also be logged by the receiving system.

4.3Framing Characters

Standard HL7 MLLP framing characters will be used, these are

<0B> start of message

<1C> end of message

In addition MLLP requires that each message be followed by the segment delimiter which is carriage return <0D>

5Error Handling

CRIS logs errors that are encountered when generating and processing messages as well as any error messages in the MSA segments received in response to outbound messages. It is expected that the connected system will also maintain its own logs.

6Data Mappings - General

6.1Patient Identifiers

Where required patient identifiers should be present in the PID:3 field. Each identifier should have an assigning authority and an identifier type code present. The following table shows the expected assigning authority and identifier type codes for various patient identifiers.

Patient Identifier / Assigning Authority / Identifier Type Code
CRIS number. This is the internal primary key for patients held on CRIS. / CRIS / PI
NHS Number. / NHS / NH
CHI Number. This is the Community Health Index number used in Scotland. / CHI / NH
Trust wide patient identifier / Three letter NACS code identifying the trust. / MR
Hospital/Case note number / Five letter NACS code identifying the hospital. / MR
Internal primary key for another system. / Code to identify the system. / PI

6.2Time Stamp values

CRIS generally requires time stamps be precise at least to the minute. However if a timestamp containing only the date is received the time will be assumed to be midnight.

7Data Mappings – Inbound Results

7.1ORU^R01 Result

This message is sent by the remote system when a report is available. It should contain the following segments:

  • MSH
  • PID (Optional – depending upon configuration)
  • ORC
  • OBR (Optional)
  • OBX (Multiple)

MSH

Position / Name / Notes
1 / Field Separator / Should be Populated with “|”. CRIS does not support the use of non-standard field separators.
2 / Encoding Characters / Should Populated with “^~\&”. CRIS does not support the use of non-standard field separators
9 / Message Type / Should be set to “ORU^R01”
10 / Message Control ID / This value will be returned in the acknowledgement message.
12 / Version ID / Should be set to “2.4”

PID

PID is required if CRIS is configured to check that order exists on CRIS for the specified patient.

Position / Name / Notes
3 / Patient ID (Internal ID) / Should contain the CRIS patient ID with an assigning authority of “CRIS” and an identifier type code of “PI”. This is only required if CRIS is configured to check that the received order id is attached to the specified patient.

ORC

Position / Name / Notes
2 / Placer Order Number / One of these fields should contain the CRIS exam key of the study being reported. By default CRIS will use ORC:3 – Filler order number. However for some applications it may seem to make more sense to use Placer order number in which case CRIS may be configured to use this field instead.
3 / Filler Order Number

OBR

Position / Name / Notes
24 / Diagnostic Serv Sect ID / Modality Type as defined in CRIS (CRISMODL). Typically a single character code.
For Example ‘P’ for PET-CT.
32 / Principal Result Interpreter / Name should identify the radiologist responsible for the report. If this is not provided CRIS will insert a default value of “EXTERNAL” which may also be overridden at configuration time.
The radiologist identified should exist in the CRIS radiologist table.
Start Date/Time should contain the date and time that the report was created. If this is not present the date and time of observation from the OBX segment(s) is used.
33 / Assistant Result Interpreter / Name should identify the radiologist responsible for the report. If this is not provided CRIS leave this field blank, however a default may be provided at configuration time.
The radiologist identified should exist in the CRIS radiologist table.
35 / Transcriptionist / Start Date/Time should contain the date and time that the report was typed. If this is not present the date and time of observation from the OBX segment(s) is used.

OBX

OBX contains the report text and should be present on ORU^R01 messages. The remote system may choose to send multiple OBX segments (in which case each segment implies a line feed terminator) or a single segment.

The text may contain HL7 line break sequences (\.br\).

CRIS has no limit to line length, long lines are wrapped on the display and represented as paragraphs.

Please note:Only one exam report per message can be accepted. Likewise if a report has data against the SUMMARY and REPORT tags then this must be sent as separate messages otherwise all the report data will be stored against the SUMMARY in CRIS.

Position / Name / Notes
2 / Value Type / Should be TX
3 / Observation Identifier / May be used to specify the type of report. Expected values are
“REPORT” – Normal report for an examination
“SUMMARY” – Summary report for the whole attendance.
If this field is not populated or none of the above values are present CRIS will assume a value of “REPORT”.
Note : Only one type is expected per report message (see previous note above)
5 / Observation Value / Report Text
11 / Observation Result Status / If set to “F” or “C” the report is marked as verified. Otherwise the report is marked as provisional.
If a verified report already exists on CRIS for this examination the report message will be rejected unless this field is set to “C”.
CRIS will prefix changed reports with the text “THIS REPORT HAS BEEN CHANGED”
14 / Date/Time of the observation / Should specify when the report was created. If the date/time values specified above in OBR are not present this value is used instead. If this value is also blank today’s date is used.

7.2ACK^R01 Acknowledgement

This message is sent by CRIS in response to ORU^R01 messages. It will contain the following segments:

  • MSH
  • MSA

MSH

Position / Name / Notes
1 / Field Separator / Always Populated with “|”
2 / Encoding Characters / Always Populated with “^~\&”
3 / Sending Application / Defaults to “CRIS” may be configured to send any fixed value.
4 / Sending Facility / Defaults to “LIVE” may be configured to send any fixed value.
5 / Receiving Application / Default is empty, may be configured to send any fixed value.
6 / Receiving Facility / Default is empty, may be configured to send any fixed value.
7 / Date Time of Message / Populated with the date and time that the message was generated. Century, year, month, day, hour, minute, second, millisecond and time zone offset are all present.
9 / Message Type / Set to “ACK^R01”
10 / Message Control ID / Populated with a unique id for the message. This is generated by taking the unique id of the inbound message and adding the prefix “RESPONSE”
11 / Processing ID / Set to “P”
12 / Version ID / Set to “2.4”

MSA

Position / Name / Notes
1 / Acknowledgement Code / Set to “AE” for error responses where the incoming message failed to be processed. Set to “AA” for success responses.
2 / Message Control ID / The message control ID of the message being responded to.
3 / Text Message / Contains further information regarding processing of the message. Typically this will be the reason that a message was rejected or (for a successful message) blank.

8Data Mappings – Inbound Events

8.1OMG^O19 Order

This message is sent by the remote system to add an attendance directly to CRIS. It should contain the following segments:

  • MSH
  • PID
  • ORC
  • OBR
  • OBX (Optional, Multiple)

MSH

Position / Name / Notes
1 / Field Separator / Should be Populated with “|”. CRIS does not support the use of non-standard field separators.
2 / Encoding Characters / Should Populated with “^~\&”. CRIS does not support the use of non-standard field separators
9 / Message Type / Should be set to “OMG^O19”
10 / Message Control ID / This value will be returned in the acknowledgement message.
12 / Version ID / Should be set to “2.4”

PID

Position / Name / Notes
3 / Patient ID (Internal ID) / Should identify the patient that the event is to be attached to.
If a CRIS ID is known this field should contain the CRIS patient ID with an assigning authority of “CRIS” and an identifier type code of “PI”.
If a PAS unique ID is known this field should contain the PAS id with an appropriate assigning authority and identifier type code. This functionality requires CRIS to be configured in advance with the assigning authority to be used.

ORC

Position / Name / Max Width / Usage
1 / Order Control / 2 / Identifies the type of order message. Possible values are
“NW” New Order
“CA” Cancel Order
“XC” Change Order
“SC” Status Change
2 / Placer Order Number / 30 / Unique order ID allocated by the sending system. This field is required for New order messages.
By default CRIS does not persist this value and it is merely returned in the OMG^O20 response message. However CRIS may optionally be configured to persist this value as an order id.
Only <Entity Identifier> is used.
3 / Filler Order Number / 10 / Unique order ID allocated by CRIS. Unless CRIS has been configured to persist the placer order number this field should be populated on all order change or cancel messages. For New order messages it should be blank.
5 / Order Status / 2 / Status of the event.
CRIS accepts the following three status codes
SC – Scheduled, used for an appointment.
IP – In progress. Used when the patient attends.
CM – Completed. Used for delivering historical attendance data collected on an external system.
12 / Ordering Provider / 15 / The clinician responsible for entering the request, this field maps to the referrer field on CRIS. Only <id number> is used.
13 / Enterers Location / 15 / This maps to the ward field on CRIS. Only <point of care> is used.
17 / Entering Organization / 8 / <identifier> should contain the specialty of the ordering clinician.
19 / Action By / Should identify the person who initiated the event that triggered this message, In the case of a NW order this would be the same person identified in ORC:10, in the case of a CA it would be the person who cancelled the order. CRIS does not currently make use of this field
21 / Ordering facility Name / 9 / <id number> should contain the code identifying the hospital / gp practice etc. that the request was made from. In the case of a ward request CRIS can default this value based on the ward code.

OBR

Position / Name / Max Width / Usage
4 / Universal Service ID / 8 / The examination being requested. Only <identifier> is used.
20 / Filler Field 1 / 20 / Accession Number. If present on a new order the accession number of the created exam will be set to this value, otherwise CRIS will generate an accession number.
27 / Quantity/Timing / 26 / <start date/time> should contain the date and time the examination is required. <priority> should contain the priority of the order, this component may need translation.
30 / Transportation Mode / 1 / Transportation mode for this patient.
This field may require translation, refer the CRIS installation on site for actual values.

OBX