C3510 Communication Protocol 2.0
C3510 Communication Protocol 2.0
Sending Message
Before data transmission, the sender needs to send ENQ to the receiver asking for
establishing a connection. The receiver will send back ACK if it is ready to receive data;
otherwise it will send NAK. When the sender receives ACK, it will get ready to send data
since the connection is successfully established; otherwise, it will end the data transmission.
Figure 5shows the complete process of message transmission from MPCoagu to LIS.
When MPCoagu receives ACK, it starts sending data frames as the connection is established;
if the response is NAK, it means the connection is not established and the communication is
failed.
After the connection between MPCoagu and LIS is established successfully, the MPCoagu
starts sending data frames to LIS, and LIS responds with ACK if it is ready to receive data, or
with NAK if it wants MPCoagu to resend the data. The EOT control character will be sent after
the communication is finished.
For transmission from LIS to IPU, the roles of the sender and receiver reverses. LIS sends
ENQ asking for establishing a connection, sends data frames after receiving ACK response,
and then waits for the ACK message for successful transmission.
A transmission refers to the transmission of one message (see C.4 for message definitions).
The data frames of a message consist of middle frame(s) and end frame. The end frame
refers to the last frame of the message; while the middle frame refers to other data frame(s)
except the end frame.
The response waiting time is 4 seconds. If there is no response within 4s, the connection
establishing is regarded as failed, and the communication ends.
Resending Message
In the process of data transmission, if LIS requires a data resending since there is error in the
received data frames or for other reasons, it will respond with NAK; if the sender still receives
NAK after resending the same data frame, the transmission will be regarded as failed and it
will end.
2-Way LIS
First, the MPCoagu send a request message to LIS which is the same as that in the "sending
message" process; and then it waits the LIS to respond (see C.4 for message definitions) for
4s. The LIS responding process is the same as as that in the "sending message" process.
A.2 HL7 Communication Protocol
A.2.1 Overview
The LIS/HIS communication function of the MPCoagu enabled the communication between
the analyzer and the PC in laboratory through Ethernet, including sending analysis results to
and receiving worklist from lab PC.
This communication protocol is defined based on the HL7 Standards. HL7 is a series of
electronic data exchange standards for healthcare industry, which is originally defined by the
US and is now adopted worldwide. This protocol is defined based on HL7 v2.3.1. For details
of HL7 standards, see HL7 Interface Standards Version 2.3.1.
See A.4
HL7 of high-level protocol is based on messages. The function of terminating the message is
not provided. In order to determine the message boundary, the MLLP low-level protocol is
used (see HL7 Interface Standards Version 2.3.1).
Communication Level
Messages are transmitted in the following format:
<SB>ddddd<EB><CR>
among which:
1)The MPCoagu directly sends the analysis results (or QC data) to LIS, as shown in the
figure below.
ORU^R01 message: it is mostly used for the transmission of the analysis results
and QC data.
ORU Observational Results (Unsolicited) Description
MSHMessage header
MSAmessage acknowledgment, describing whether it has received the
transmitted message
ORM^O01 message: Common order message, all the actions related to order basically
use the message of this type. For example, create a new order or cancel an order. Here, the
MPCoagu requests LIS/HIS to re-fill the order message.
ORM General Order Message Dexription
MSHMessage header
{ORC}Common message of Order, including the ID information of the sample
searched
MSHMessage header
MSA Message acknowledgment
[PIDpatient information
[PV1]]patient visit information
{
ORCCommon message of Order, including the sample ID
[
OBRSample information
{[OBX]}Data of other sample information, including analysis mode, etc.
]
}
E.g.
PID |1 | |7393670^^^^MR||^Liu Jia||19950804000000|Female
↑ ↑ ↑
Segment name Field 1 Field 3
Note: for MSH segment, the field delimiter subsequential to the segment name is considered
to be the first field, used to define the field delimiter values of the whole message.
3. Data type: the data type based on HL7 standards. See C.5 for details;
4. Recommended max length: the recommended max length based on HL7 standards. But
during the communication process, the data length may be longer than recommended,
in which case the fields shall be identified by delimiters while analyzing the message
segment.
MSH
MSH (Message Header) segment contains basic information of HL7 messages, including
delimiter value, message type and coding method etc. It is the first field of every HL7
message.
Message example:
MSH|^~\&| MPCoagu |Mindray|||20130419104618||ORU^R01|1|P|2.3.1||||||UNICODE
See Table 1 for definition of each field in MSH segment.
MSA
102 Data type error Segment data type error, e.g. data type is
character instead of numeric
103 Table value not found Table value not found; not used temporarily
Rejected status AR
code:
200 Unsupported Message type not supported
message type
201 Unsupported event Event code not supported
code
202 Unsupported Processing ID not supported
processing id
PID
The PID (Patient Identification) segment contains the patient demographic information.
Message example:
PID|1||7393670^^^^MR||^Liu Jia||19950804000000|Female
See Table 4 for field definitions in use.
Table 4 PID Field Definitions
PV1
The PV1 (Patient Visit) segment contains the patient visit information.
Message example:
PV1|1|Outpatient|Internal Medicine|||||||||||||||||Patient
See Table 5 for field definitions in use.
OBR
The OBR (Observation Request) segment contains the test report information.
Message example:
OBR|1||20121207011|00001^Automated Count^99MRC||20121207080000|201212071
60000|||Mindray|||Influenza|20121207083000||||||||||HM||||||||Mindray
See Table 6 for field definitions in use.
OBX
The OBX (Observation/Result) segment contains the parameter information of each test
result.
Message example:
OBX|6|NM|6690-2^WBC^LN||4.63|10*9/L|11.00-12.00|L|||F||E
See Table 7 for field definitions in use.
ORC
The ORC (Common Order) segment contains the common information of order.
Message example:
ORC|RF||SampleID||IP
See Table 8 for field definitions.
MSH|^~\&|MPCoagu|Mindray|||20130424094913||ORU^R01|1|P|2.3.1||||||UNICODEPID|1||2
00456^^^^MR||^smith||20120430173815|malePV1|1|patienttype|dept^^205|||||||||||||||||Patient
OBR|1||1|00001^Automated
Count^99MRC||20130415173815|20130420125148|||sender|||Influenza|20130416173815|sa
mpletype|||||||20130424094852||HM||||Admin||||AdminOBX|1|IS|05007^Project
Type^99MRC||T/B/NK-Auto||||||FOBX|2|NM|30525-0^Age^LN||1|yr|||||FOBX|3|NM|20598-9^T
#^LN||37037.000| 个
/ul|||||FOBX|4|NM|20599-7^T%^LN||100.00|%|||||FOBX|5|NM|20592-2^B#^LN||0.000| 个
/ul|||||FOBX|6|NM|20593-0^B%^LN||0.00|%|||||FOBX|7|NM|20620-1^NK%^LN||0.00|%|||||FO
BX|8|NM|32515-9^CD4+T%#^LN||37037.000| 个
/ul|||||FOBX|9|NM|32516-7^CD4+T%%^LN||100.00|%|||||FOBX|10|NM|32517-5^CD8+T%#^L
N||37025.000| 个
/ul|||||FOBX|11|NM|32518-3^CD8+T%%^LN||99.97|%|||||FOBX|12|NM|20607-8^CD4+T/CD8
+T^LN||1.00||||||F
A 2-way LIS/HIS request message contains a sample ID. After the LIS/HIS received the
request message, it will search for the corresponding patient and sample information to
provide a response.
A request response message contains two segments: MSH and ORC. The MSH segment is
almost the same with that of the analysis result message, except that the MSH-9 value is
ORM^O01. The ORC-3 field should be filled with the receiver code (in this case, the sample
ID; where in the following sample, it is SampleID1). Note that in the autoloading analysis, if
there is a barcode scanning error while sending a request message, the sample ID will be
“Invalid”.
An example of the request message is shown as follows:
MSH|^~\&|MPCoagu|Mindray|||20130424095111||ORM^O01|2|P|2.3.1||||||UNICODEOR
C|RF||1||IP
2-Way LIS/HIS Request Response Message
When the LIS received an request message, it needs to send back an request response
message. The first two message segments of the request response message are MSH and
MSA. The MSH-9 message type field (indicating the type of the segment) is filled with
ORR^O02, while the MSA segment should be filled up as shown in the following example of
the request response message. If the LIS/HIS gets searching results for the request, there
will be PID, PV1, ORC, OBR and OBX message segments after the two heading segments to
provide the patient and sample information, in the same way as the sample data message
does. The ORC segment is indispensable for an request response message with searching
results, in which the ORC-1 value is AF, and ORC-2 is the key searching field(the sample ID).
Note that the OBR-2 field indicates the sample ID, which should be the same as in the ORC-2
field; otherwise, the message will be regarded as incorrect.
An example of the request response message with searching results is shown as follows:
MSH|^~\&|LIS|LISSimulator|||20130424095815||ORR^O02|0|P|2.3.1||||||UNICODE
MSA|AA|1||||
PID|1||20123^^^^MR||LastName^fisrtName||20120422192223|male
PV1|1|waike|dept45^^234|||||||||||||||||gongfei
ORC|AF|1
OBR|1|1||00001^Automated
Count^99MRC||20130422091323||||sender||||20130422185915||||||||||HM
OBX|1|IS|05007^Project Type^99MRC||CD348||||||F
OBX|2|NM|30525-0^Age^LN||12|d|||||F
OBX|3|ST|01001^Remark^99MRC||||||||F
An example of the request response message with no search result is shown as follows, in
which the MSA-2 field indicates the result of the response. In this example, the MSA-2 value
is “AR”, indicating the request was rejected; if it is “AE", then there is an error in the request
process.
MSH|^~\&|LIS||||20130424095815||ORR^O02|1|P|2.3.1||||||UNICODEMSA|AR|9
A.3 Appendix: ASTM Communication Protocol
A.3.1 ASTM Protocol Overview
See the ASTM protocol documents for details of the protocol:
NCCLS LIS1-A (formerly ASTM 1381- 02): Data Link Protocol
NCCLS LIS2-A (formerly 1394- 97): Message Structure Protocol
Note: the characters used in ASTM protocol are standard ASCII characters (ISO 8859-1 :
1987) unless there is a note for exception.
Message: A complete data package is called message. It is a set of information, which can be
a sample analysis result, QC result or request information. Message is the unit of a call for
communication.
Frame: the component of a message which is the unit of communication control and
communication error identification.
The ASTM communication protocol is a protocol based on TCP/IP protocol and serial port
communication control. ASTM protocol has two layers: the low-level protocol for message
transmission, and message level protocol between MPCoagu and LIS.
Control Character
Middle Frame
Message
Record 00 Record 01 Record
##
Field 00 Field Field 00 Field …
## ##
Component … Component ... Component …… Component … …
00 ## 00 ##
Message: a set of records from message header record (H) to message terminator record
(T).
Record: a set of fields. It has information about a certain subject, e.g. patient information.
The first field of each record is the record type field.
Field: a set of components. The description of special property of the record, e.g. date of
birth in patient information.
Component: basic unit of message data. E.g. for patient name, it consists of two basic units,
Last Name and First Name which are separated by component delimiter.
Message Coding
delimiter
In a complete message, all the records shall be ended with <CR> (carriage return).
To identify different components, fields, or repeated texts in a record, different delimiters are
used between fields, components, and repeated texts.
ASTM use the following ASCII characters:
Field delimiter |
Repetition delimiter \
Component delimiter ^
1)Transmission of delimiter:
The delimiter definition is in the second field of the message header record, normally in the
format "H | \ˆ & |", where H is the record type identifier, followed by 4 delimiter definitions, and
the last '|' is a field delimiter, indicating what follows is another field. The delimiters are in the
following order: field delimiter, repetition delimiter, component delimiter and escape delimiter.
2)Null delimiter:
For null field or component, if it is the last one, delimiter is not needed; if not, a delimiter for
this field/component is needed to separate it from the following field/component. That is to
say, in a record, the position of a field or a component matters. So even if a field/component is
null, the position shall be reserved by using a delimiter.
Note: according to the ASTM standard, the position of a null field/component shall be
reserved rather than being omitted.
Escape Character
While transmitting data, there may be protocol control characters or other characters that are
not allowed to transmit. In this case, these characters need to be converted to escape
character.
According to the escape character conversion rules in the ASTM standard, the escape
characters needed in message transmission are shown as follows:
&X5& <ENQ>
&X4& <EOT>
&X2& <STX>
&X17& <ETB>
&X3& <ETX>
&XD& <CR>
&XA& <LF>
&X6& <ACK>
&X15& <NAK>
Note: in a message, the record terminator character (<CR>) is the protocol control character
which does not need to be converted.
Record Type
Special Notice
1. Time:
Format of time:
Date: YYYYMMDD
Date+Time: YYYYMMDDHHMMSS
2. Record sequence number:
In the message level protocol, all records except message header records begin with two
fields: "Record Type ID" and "Sequence Number".
Record Type ID: record type identifier. E.g. the record type ID for patient information is "P".
Sequence Number: record sequence number, numeric string, indicating the sequence
number of the record among all records of the same type. E.g.: if there are 2 "O" records, 3
"R" records in a message, then the sequence number of the first "O" record is "1", and the
second one "2"; the sequence number of the first, second and third "R" records are "1", "2"
and "3" respectively. If there are more records of the same type, the sequence number
increases accordingly.
Mainly includes patient ID, patient name, date of birth, age, physician, department, etc.
Used in sample analysis result message and worklist request response message.
1)Record Structure
Record Structure:
1 Header
2 Patient
3 Order
4 Result1
5 Result2
6 Result3
......
n Message Terminator
1)Record Structure
Record Structure:
1 Header
2 Request
3 Message Terminator
Q|1|1||||20141114115214
L|1|N
1)Record Structure
Record Structure:
1 Header
2 Patient
3 Order
4 Result1
5 Result2
6 Result3
......
n Message Terminator
Character Meaning
| Field delimiter
^ Component delimiter
~ Repetition delimiter
\ ESC
The first two fields of MSH contains all the delimiters. Some fields behind are null because
they are optional and not used by Mindray HL7 interface. Details about field definition and
selection will be stated in the following sections.
For message of any type, the segments behind MSH appear in a fixed order. The order will
be described in the following sections and the following grammar is used to organize the
segments in proper order.
[] encloses optional segments.
{ } encloses segmetns which can repeat once or more.
Note: the "\" in the escapq sequence represents the ESC delimiter, whose value is defined in
the MSH segment.
A.5 Appendix: HL7 Data Type Definition
CE - Code Element
<identifier (ST)> ^ <text (ST)> ^ <name of coding system (ST)> ^ <alternate identifier (ST)> ^
<alternate text (ST)> ^ <name of alternate coding system (ST)>
CM - Composite
<ID (ST)> ^ <check digit (ST)> ^ <code identifying the check digit scheme employed (ID)> ^ <
assigning authority (HD)> ^ <identifier type code (IS)> ^ < assigning facility (HD)>
ED – Encapsulate Data
EI - Entity Identifier
FC – Financial Class
HD - Hierarchic designator
FT - Formatted text
This data type is derived from the string data type by allowing the addition of embedded
formatting instructions. These instructions are limited to those that are intrinsic and
independent of the circumstances under which the field is being used.
The value of such a field follows the formatting rules for an ST field except that it is drawn
from a site-defined (or user-defined) table of legal values. There shall be an HL7 table
number associated with IS data types.
The value of such a field follows the formatting rules for an ST field except that it is drawn
from a table of legal values. There shall be an HL7 table number associated with ID data
types.
NM - Numeric
PL - Person location
<point of care (IS )> ^ <room (IS )> ^ <bed (IS)> ^ <facility (HD)> ^ < location status (IS )>
^ <person location type (IS)> ^ <building (IS )> ^ <floor (IS )> ^ <location description (ST)>
PT - Processing type
SI - Sequence ID
A non-negative integer in the form of an NM field. The uses of this data type are defined in the
chapters defining the segments and messages in which it appears.
ST – String
TS - Time stamp
In Version 2.3, use instead of the CN data type. <ID number (ST)> ^ <family name
(ST)>&<last_name_prefix (ST) ^ <given name (ST)> ^ <middle initial or name (ST)> ^ <suffix
(e.g., JR or III) (ST)> ^ <prefix (e.g., DR) (ST)> ^ <degree (e.g., MD) (ST)> ^ <source table
(IS)> ^ <assigning authority (HD)> ^ <name type code (ID)> ^ <identifier check digit (ST)> ^
<code identifying the check digit scheme employed (ID)> ^ <identifier type code (IS)> ^
<assigning facility (HD)> ^ <name representation code (ID)>
In Version 2.3, replaces the PN data type. <family name (ST)> ^ <given name
(ST)>&<last_name_prefix (ST)> ^ <middle initial or name (ST)> ^ <suffix (e.g., JR or III)
(ST)> ^ <prefix (e.g., DR) (ST)> ^ <degree (e.g., MD) (IS)> ^<name type code (ID) > ^ <name
representation code (ID)>
2. Each OBX segment contains information of one analysis parameter or non-parameter data
item. It consists of the following fields: OBX-2, indicating the type of the HL7 data contained;
OBX-3 (Observation Identifier), the identifier of the data in the form of “ID^Name^EncodeSys”;
OBX-5, containing the value of the data; OBX-6, containing the unit for the parameter, (in the
standard unit recommended by HL7).
Table 11 lists the HL7 type and code identifier of each communication data item. Table 12 lists
all the units for parameters in the communication.
HL7
Type Code Encode Example of
Data Name
(OBX (ID) Sys OBX-3 field
-2)
Non-parameter Data Items
30525 30525-0^Age^LN
Age NM Age LN
~-0
01001^Remark^99
Remarks ST 01001 Remark 99MRC
MRC
01007^Sample
Sample type IS 01007 Sample Type 99MRC
Type^99MRC
01008^Patient
Inpatient zone IS 01008 Patient Area 99MRC
Area^99MRC
01009^Custom
Custom patient Custom
ST 01009 99MRC patient info
information 1 patient info 1
1^99MRC
Custom patient Custom 01010^Custom
ST 01010 99MRC
information 2 patient info 2 patient info
2^99MRC
01011^Custom
Custom patient Custom
ST 01011 99MRC patient info
information 3 patient info 3
3^99MRC
01014^Report
Report time ST 01014 Report Time 99MRC
Time^99MRC
01015^Charger
Payer ST 01015 Charger type 99MRC
type^99MRC
01016^Patient
Patient type ST 01016 Patient type 99MRC
type^99MRC
3. Some OBX messages uses custom enumeration values. See Table 13 for the meaning of
the values.
4. Communication of patient age: the age of the patient is transmitted in an OBX segment
which contains an integer and a unit. The age could be "<1" day (same as the MPCoagu
UI).
A.7 Appendix: Base64 Encoding Process
1. 1. Select the 3 adjacent bytes (i.e. 24 bit) from the data stream to be encoded; from left to
right, divide them into 4 6-bit groups; and then, the ASCII string is obtained by mapping
based on Table 14. below.