Professional Documents
Culture Documents
1-way communication: the communication between LIS and MRFlow is unidirectional, which
means LIS only receives and processes results sent by MRFlow, but does not send any
message to MRFlow. For MRFlow, it does not receive or process any command from the
outside
2-way communication: the communication between LIS and MRFlow is bi-directional, which
means LIS can receive data from MRFlow, as well as send certain sample information to
MRFlow. In this case, MRFlow can automatically obtain the panel and patient information of
the sample, reducing the repeated work of entering sample information. For MRFlow, it can
receive and correctly process the commands from LIS, and respond accordingly.
The LIS system which support bi-directional communication is called 2-way LIS, while the one
only supports uni-directional communication is called 1-way LIS. As for MRFlow, to support the
2-way communication between the instrument and the system, it should be able to receive and
send messages from LIS or other external system.
1-Way Communication Mode
The figure below shows the routine sample analysis workflow in 1-way communication mode.
Sample
(Collected at Send to Technician
Laboratory Test Order
sample collection (Sign for receival)
center)
Check or
other
measures
Analysis
Instrument
Send results No (run the sample
to HIS on the instrument)
HIS System
Yes
Checked? LIS System
Test Report
Print
The figure below shows the routine sample analysis workflow in 2-way communication mode.
C-1
In this workflow, MRFlow can get sample information (e.g. panel, patient information, etc.) by
sending request or receiving messages.
Scenarios description:
Compared with worklist downloading mode, in request mode, the software first identify the
sample, and send a worklist request to the external system using the sample ID or other
related information.
Workflow:
Sample Arrival
Request for
Analysis
sample test panel
LIS System Instrument
Send back (Sample
response to request identification)
C-2
memory. For example, at this time, the worklists are ready in the LIS system connected to the
flow cytometer.
Exception handling:
After the sample is identified, the software sends a request to search for the panel of the
sample using the sample ID. If the request fails (sample ID unidentifiable, or no match), do as
follows:
Scenarios description:
In this scenario, the instrument does not receive any order from the external system. When a
clinician issues a sample analysis order, the order is printed and sent to the laboratory, after
which the contents in the printed order will be entered in MRFlow.
Workflow:
Enter worklist
information
Analysis Instrument manually
Send test
results to
LIS Sample
arrival
Barcode
Analysis Instrument scanning, tube
position, or
(Sample identification)
manual entry
Analysis Instrument
(Sample analysis)
Exception handling:
If the worklist information of a sample is not entered into the instrument after the instrument
identified this sample, do as follows
C-3
1˅ Skip this sample or stop the current operation.
9˅ Support previous versions of the communication protocol: both the old version and
new version are applicable after update.
2˅ IP address: when MRFlow servers as the client, fill in with the IP address of the LIS
server; when MRFlow serves as the server, the address will be ignored.
3˅ Port: when MRFlow servers as the client, fill in the LIS server port; when MRFlow
serves as the server, fill in with the listening port name of the PC.
4˅ Protocol type: select the protocol and code type from "HL7" and "ASTM.
5˅ ACK synchronous communication: if this check box is selected, MRFlow will wait for
ACK after sending a sample result message, and send the next one until it receives
the ACK or an error message; if it is not selected, MRFlow sends the next message
immediately after the previous one is sent, and ignores the ACK messages sent from
LIS.
6˅ ACK timeout: this setting takes effect at the same time with the ACK synchronous
communication setting. It is the maximum time MRFlow waiting for the ACK message
after sending out a result message.
7˅ 2-way LIS/HIS: if this check box is selected, the software will request for sample
C-4
information after saving changed worklist, or before starting a count.
8˅ Auto transmit after check: if this check box is selected, the sample results will be
automatically transmitted after it is checked. (only checked sample can be
transmitted)
The OBR-4 (Universal Serview ID) field of HL7 is used to identify the type of the analysis result.
See the following table.
The PID (Patient Identification) segment of HL7 contains the patient demographic information.
The PV1 (Patient Visit) segment of HL7 contains the patient visit information. See the following
tables for the definitions.
C-5
Table 3 PV1 Field Definitions
The OBR (Observation Request) segment contains the test report information.
See the following table for field definitions in use.
C-6
BLDV: venous blood
BLDC: capillary blood
Results TS 26 Result report/Status
Rpt/Status
change - Tie.
Chng -
Date/Time + Used as the time of
validation.
Diagnostic Serv ID 10 Diagnosis maker ID; HM
Sect ID value: "HM" (means
Hematology)
Result Copies XCN 150 Copy the result to.
To Used as the person
who validate the
sample results.
Principal Result CM 200 Principal result Mindray
Interpreter +
interpreter.
Used as the operator
of the sample analysis
in sample messages.
Used as the operator
of the QC count in QC
messages.
The OBX (Observation/Result) segment contains the parameter information of each test result.
See the following table for the communication data.
HL7
Type Code Encode Example of
Data Name
(OBX (ID) Sys OBX-3 field
-2)
Non-parameter Data Items
08001^Project
Panel IS 05007 Project Type 99MRC
Type^99MRC
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
Custom patient ST 01009 Custom 99MRC 01009^Custom
C-7
information 1 patient info 1 patient info
1^99MRC
01010^Custom
Custom patient Custom
ST 01010 99MRC patient info
information 2 patient info 2
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
Parameter Result Items
731~- 731-0^LYM#^LN
LYM NM LYM# LN
0
20599 20599-7^T%^LN
T_PER NM T% LN
~-7
20598 20598-9^T#^LN
T NM T# LN
~-9
20593 20593-0^B%^LN
B_PER NM B% LN
~-0
20592 20592-2^B#^LN
B NM B# LN
~-2
20620 20620-1^NK%^LN
NK_PER NM NK% LN
~-1
26561 26561-1^NK#^LN
NK NM NK# LN
~-1
32516 32516-7^CD4+T%
CD4_T_PER_PER NM CD4+T%% LN
~-7 %^LN
32515 32515-9^CD4_T%
CD4_T_PER NM CD4+T%# LN
~-9 #^LN
32518 32518-3^CD8+T%
CD8_T_PER_PER NM CD8+T%% LN
~-3 %^LN
32517 32517-5^CD8+T%
CD8_T_PER NM CD8+T%# LN
~-5 #^LN
20607 CD4+T/CD8+ 20607-8^CD4+T/C
CD4_CD8_T NM LN
~-8 T D8+T^LN
26028 26028-1^HLA-B27
HLA-B27 NM HLA-B27 LN
~-1 ^LN
15000^
MFI(shift) NM 25000 MFI(shift) 99MRC
MFI(shift)^99MRC
B27-Cutoff NM 25001 B27-Cutoff 99MRC 15001^ B27-Cutoff
C-8
^99MRC
17146 CD4+CD8+% 17146-2^
CD4+CD8+%% NM LN
-2 % CD4+CD8+%%^LN
51755 51755-7^
CD4-CD8-%% NM CD4-CD8-%% LN
-7 CD4-CD8-%%^LN
C-9
C.2 Connection Control
C.2.1 MRFlow as TCP Server
The TCP server starts monitoring after the MRFlow is started up or the communication setup is
modified. It can accept one LIS connection which sustains until message transmission fails,
the communication setup is modified or the MRFlow is closed.
C-10
characters (like ENQ, ACK, NAK, EOT, etc.). To reduce the responding time, it is suggest
disabling the "No Delay" function.
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 MRFlow to LIS.
After the connection between MRFlow and LIS is established successfully, the MRFlow starts
sending data frames to LIS, and LIS responds with ACK if it has received data, or with NAK if it
wants MRFlow to resend the data. The EOT control character will be sent after the
communication is finished.
For transmission from LIS to MRFlow, the roles of the sender and receiver reverse. 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
C-11
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 MRFlow send a request message to LIS which is the same as that in the "sending
C-12
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 that in the "sending message" process.
C-13
C.3 HL7 Communication Protocol
C.3.1 Overview
The LIS/HIS communication function of the MRFlow enabled the communication between the
cytometer 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 C.5
HL7 Low-Level Message Protocol
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:
C-14
Duplex Communication Process
1) The MRFlow directly sends the analysis results (or QC data) to LIS, as shown in the
figure below.
ORU^R01
MRFlow LIS
ACK^R01
ORM^O01
MRFlow LIS
ORR^O02
ORU^R01 message: it is mostly used for the transmission of the analysis results
and QC data.
ORU Observational Results (Unsolicited) Description
C-15
date of birth, etc.
[PV1] Patient visit information, including patient type, department, bed No. and
payer*, etc.
{
OBR sample information, including sample No., operator and time of
analysis, etc.
{[OBX]} analysis data, including analysis results and mode of
analysis, etc.
}
}
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
MRFlow requests LIS/HIS to re-fill the order message.
ORM General Order Message Dexription
C-16
C.3.4 HL7 Segment Definitions
The tables in this section provide detailed definitions of the fields in all the message segments.
Each row provides the information of one field, and the content of each column is described as
follows:
1. No.: the HL7 message begins with the segment name of 3 characters followed by the fields
which are separated by delimiters. "No." refers to the order of the field in the HL7
message segment.
E.g.
PID |1 | |7393670^^^^MR||^Liu||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|^~\&| MRFlow |Mindray|||20130419104618||ORU^R01|1|P|2.3.1||||||UNICODE
See the following table for definition of each field in MSH segment.
C-17
2 Encoding ST 4 Includes component ^~\&
Characters delimiters, repetition
delimiters, escape
delimiters and
subcomponent delimiters.
3 Sending EI 180 Application of sending MRFlow
application terminal.
4 Sending EI 180 Device of sending terminal. Mindray
Facility Value: Mindray
7 Date/Time TS 26 Time of creating the 2013041910461
Of message (in the format of 8
Message YYYY[MM[DD[HH[MM[SS]
]]]]), using the system time
9 Message CM 7 Message type, in the ORU^R01
Type format of "message
type^event type".
10 Message ST 20 Message control ID, used 1
Control ID as the unique identifier of a
message.
11 Processing PT 3 Message processing ID. P
ID
Value:
"P": sample and worklist
request message;
"Q": QC analysis result
message;
In Ack messages, it is
consistent with the
previously received
message.
12 Version ID VID 60 HL7 version number. 2.3.1
Value: "2.3.1".
18 Character ID 10 Character set. UNICODE
Set Value: "UNICODE", which
means the message in
communication is
expressed in UTF-8
strings.
MSA
C-18
Table 7 MSA Field Definitions
C-19
207 Application internal Other unknown error of the application
error
PID
The PID (Patient Identification) segment contains the patient demographic information.
Message example:
PID|1||C1^^^^MR||^Liu||20130419104618|F
See Table 4 for field definitions in use.
PV1
The PV1 (Patient Visit) segment contains the patient visit information.
C-20
Message example:
PV1|1|Outpatient|Medicine^^BN1|||||||||||||||||MedicalInsurance
See the following table for field definitions in use.
OBR
The OBR (Observation Request) segment contains the test report information.
Message example:
OBR|1|| TestSampleID1|00001^Automated Count^99MRC||20121207080000|201212071600
00|||Li|||Influenza|20121207083000||||||||||HM||||||||Mindray
See the following table for field definitions in use.
C-21
analysis results.
See the
configuration files
and C.7 Appendix:
Message Coding
Definition for values.
6 Requested TS 26 Draw time. 20121207080000
Date/time Used as the time
when the blood
sample is drawn.
7 Observation TS 26 Time of analysis. 20121207160000
Date/Time #
10 Collector XCN 60 Analysis orderer Li
Identifier * Here indicates the
person who orders
the analysis.
13 Relevant ST 300 Relevant clinical Influenza
Clinical Info.
information.
Can be used as the
clinical diagnostic
information of
patient information.
14 Specimen TS 26 Time when the 20121207083000
Received
sample is received.
Date/Time *
Used as the time
when the analysis is
ordered.
15 Specimen CM 300 Source of the
Source *
sample.
Value definitions in
HL7:
BLDV: venous blood
BLDC: capillary
blood
22 Results TS 26 Result report/Status
Rpt/Status
change - Tie.
Chng -
Date/Time + Used as the time of
validation.
24 Diagnostic ID 10 Diagnosis maker ID; HM
Serv Sect ID value: "HM" (means
Hematology)
28 Result Copies XCN 150 Copy the result to.
To Used as the person
who validate the
sample results.
32 Principal CM 200 Principal result Mindray
Result
interpreter.
C-22
Interpreter + Used as the
operator of the
sample analysis in
sample messages.
Used as the
operator of the QC
count in QC
messages.
OBX
The OBX (Observation/Result) segment contains the parameter information of each test result.
Message example:
OBX|8|NM|6690-2^WBC^LN||2.20|10*9/L|4.00-10.00|L~A|||F
See the following table for field definitions in use.
C-23
analysis parameters,
while Name is for
description purpose
rather than
identification.
5 Observatio * 65535 Analysis result data, 2.20
n Value which can be
numeric, string,
enumeration value,
binary data, etc. See
C.7 Appendix:
Message Coding
Definition for detailed
value definitions
(Binary data like
histogram or
scattergram are
converted to codes
using the Base64
coding method. See
C.8 Appendix:
Base64 Encoding
Process for the
coding method).
6 Units CE 90 Unit of analysis items. 10*9/L
Use ISO standard
units. See C.7
Appendix: Message
Coding Definition for
units used in
communication.
7 References ST 90 Reference range of 4.00~-10.00
Range analysis results, in the
form of "lower
limit-higher limit",
"<upper limit" or
">lower limit".
8 Abnormal ID 5 Analysis result flags. L~A
Flags
Value definitions:
"N": normal
"A": abnormal
"H": higher than upp
er limit
"L": lower than lower
limit
Note: The flag for
normal or abnormal
and that for high or
low result may appear
in this field at the
same time. In this
case, the two types of
flags are connected
by a “~”, e.g. “H~A”
C-24
11 Observ ID 1 Status of the analysis F
Result result. "F": final result.
Status
13 User ST 20 User-defined. For
Defined flags of reagent
Access expiration or
Checks modification, etc. In
the form of
"Flag1~Flag2".
There are 6 types of
flags in all:
O – reagent
expiration
E – result edited flag
e – result changed
due to the manual
editing of another
parameter result
based on which it is
calculated
C ̢ result corrected
flag
V ̢ result beyond
linear range flag
T ̢ temperature
alarm flag
ORC
The ORC (Common Order) segment contains the common information of order.
Message example:
ORC|RF||SampleID||IP
See Table 8 for field definitions.
C-25
2 Placer EI 22 Code for order placer.
Order In ORM message, the
Number value is null. In ORR
message, the value is
the sample ID.
3 Filler EI 22 Code for order receiver. SampleID
OrderNum In ORM message, the
value is the sample ID.
In ORR message, the
value is null.
5 Order ID 2 Order status. IP
Status In ORM message of
worklist information
searching
communication, the
value is "IP", which
means "the order is
being processed, but
has no result yet"; in
ORR message, the
value is null.
MSH|^~\&|MRFlow|Mindray|||20130424094913||ORU^R01|1|P|2.3.1||||||UNICODE
PID|1||200456^^^^MR||^smith||20120430173815|male
PV1|1|patienttype|dept^^205||||||||||||||||| chargetype
OBR|1||1|00001^Automated
Count^99MRC||20130415173815|20130420125148|||sender|||Cold|20130416173815|samplet
ype|||||||20130424094852||HM||||Admin||||Admin
OBX|1|IS|05007^Project Type^99MRC||T/B/NK-Auto||||||F
OBX|2|NM|30525-0^Age^LN||1|yr|||||F
OBX|3|NM|20598-9^T#^LN||37037.000| events /ul|||||F
OBX|4|NM|20599-7^T%^LN||100.00|%|||||F
OBX|5|NM|20592-2^B#^LN||0.000| events /ul|||||F
OBX|6|NM|20593-0^B%^LN||0.00|%|||||F
BX|7|NM|20620-1^NK%^LN||0.00|%|||||F
OBX|8|NM|32515-9^CD4+T%#^LN||37037.000|events/ul|||||F
OBX|9|NM|32516-7^CD4+T%%^LN||100.00|%|||||F
OBX|10|NM|32517-5^CD8+T%#^LN||37025.000|events/ul|||||F
OBX|11|NM|32518-3^CD8+T%%^LN||99.97|%|||||F
OBX|12|NM|20607-8^CD4+T/CD8+T^LN||1.00||||||F
Sample Response Message
C-26
message which contains two segments: MSH and MSA. To send a correct response message,
take into consideration that: the MSH-9 field should be ACK^R01 which indicates that it is a
sample response message; If the value in the MSA-2 field is the same with the MSH-10 value
of the received analysis result, it indicates that this response message is corresponding to the
sent analysis result. The MSA-2 value in the following example is 1
MSH|^~\&|LIS||||20130424095049||ACK^R01|1|P|2.3.1||||||UNICODEMSA|AA|1
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|^~\&|MRFlow|Mindray|||20130424095111||ORM^O01|2|P|2.3.1||||||UNICODEORC|R
F||1||IP
2-Way LIS/HIS Request Response Message
When the LIS received a request message, it needs to send back a 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 a 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
C-27
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
C-28
C.4 ASTM Communication Protocol
C.4.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 MRFlow and LIS.
Frame structure:
<STX> FN Text [<ETB>|<ETX>] C1 C2 <CR><LF>
C-29
STX: text transmission start control character;
FN: serial number of the frame, use numbers from 0 to 7 in turn (starting from 1) to identify
different frames;
Text: content of the message;
ETB: end character for text in the middle frame;
ETX: end character for text in the end frame;
C1: first-4-bit value of the check sum, expressed by 0-9 and A-F;
C2: last-4-bit value of the check sum, expressed by 0-9 and A-F;
CR: frame end "carriage return" control character
LF: frame end "line feed" control character;
Control Character
Middle Frame
C-30
In the frame <STX> FN text [<ETB>|<ETX>] C1 C2 <CR> <LF>, add every
character value from FN to text(note: do not add <STX>, [<ETB>|<ETX>], C1, C2, <CR> and
<LF>), divide the sum by 256, get the remainder, and convert it to 8bit where the 4 most
significant bits (first 4 bits) are C1, and the 4 least significant bits (last 4 bits) are C2. E.g.
01111010, convert it to hexadecimal, that is 7A, then C1 = "7", C2 = "A".
For example, “<STX>1L|1|N<CR><ETB>01<CR><LF>”, FN corresponds to the stringĀ1ā
ˈtext
corresponds to the string ĀL|1|N<CR>ā; If utf8 code system and hexadecimal are adoptedˈ
the value of FN is 0x31ˈand the value of text is: 0x4Cˈ0x7Cˈ0x31ˈ0x7Cˈ0x4E and 0x0D.
The sum is 0x201ˈwhich is divided by 256 and the remainder is 0x01. According to ASTM
protocol, 0x01will be converted to ASCII codeˈthus C1=‘0’ˈC2=‘1’. Note that ‘0’and ‘1’are
chars and the hexadecimal values are 0x30 and 0x31.
Message
Record 00 Record 01 Record
##
Field 00 Field Field 00 Field …
## ##
Component … Component ... Component …… Component … …
00 ## 00 ##
z Message: a set of records from message header record (H) to message terminator record
(T).
z 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.
z Field: a set of components. The description of special property of the record, e.g. date of
birth in patient information.
z 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
C-31
Supported characters: 7, 9, 11, 12, 13, 32-126, 128-254
Unsupported characters: 0-6, 8, 10, 14-31, 127, 255
In the communication process, it is not allowed to use the following characters since they are
used as control characters:
<STX>, <EOT>, <ENQ>, <ACK>, <NAK>, <ETB>, <ETX>, <CR>, <LF>.
Considering communication between different platforms, the characters which are not in ASCII
standard character set are coded using UTF-8.
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 uses the following ASCII characters:
Record end character <CR> Carriage return character (invisible)
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
C-32
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:
Escape sequence Delimiter Remarks
&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.
C-33
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 "Orecords, 3 "R
records in a message, then the sequence number of the first "Orecord 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.
C-34
Message Header and terminator Records
C-35
Termination Code 3 N Termination code; value: "N"; fixed
A complete message terminator record is shown as follows:
L|1|N<CR>
Mainly includes patient ID, patient name, date of birth, age, physician, department, etc.
Used in sample analysis result message and worklist request response message.
The record of analysis sequence number, usually followed by result record. Commonly , a Test
C-36
Order Record contains sample sequence number and related information of analysis result
messages (including both sample analysis results and QC results)
C-37
Contains sample analysis result/QC result/extend information.
Since the default fields of Patient Information Record and Test Order Record cannot meet our
requirements of sample information/patient information/sample result/QC information
transmission, Result Record is used to bring extra fields for transmission. See C.4.4Message
Code for extended codes. For extended information items, only message ID and result are
needed.
Result Record is used in messages other than worklist searching messages.
C-38
Result corrected flag C C - Result corrected flag
Null if not corrected
Out of linearity range V V - out of linearity range
flag Null if within range
Complete record example:
R|14|^WBC^^6690-2|2.30|10&S&9/L|4.00^12.00|L^e^N^O^T^C^V<CR>
1) Record Structure
Record Structure:
1 Header
2 Patient
3 Order
4 Result1
5 Result2
6 Result3
......
C-39
n Message Terminator
C-40
received
16: sample type Sample type What displayed on
screen
Sample source Reserved; null
17: operator Operator What displayed on
screen
19: validater Validater What displayed on
screen
20: time of Checked at: YYYYMMDDHHMMSS;
validation what displayed on
screen
23: Report time Report time YYYYMMDDHHMMSS;
what displayed on
screen
26: report type Result F, fixed
R Inspection Item 2: ID ID See C.7 Table 16 Data
type and Coding
system
ID See C.7 Table 16 Data
type and Coding
system
4: result Panel See C.7 Table 18 HL7
and ASTM Enumeration
Definitions
5: unit Null
6: reference Null
range
7: flag Null
R Payer 4: result, value displayed on screen; value same as above
R Patient type 4: result, value displayed on screen; value same as above
R LYM: Lymphocyte 2: ID; format same as above; see data type and coding system
number in C.7 for the value
4: result Sample Analysis What displayed on
Result screen
5: unit Unit of sample What displayed on
analysis result screen
6: reference Upper limit What displayed on
range screen
Lower limit What displayed on
screen
7: flag Null
R T_PER# T Lymphocyte %: value same as above
R T T Lymphocyte Absolute Count: value same as above
C-41
R B_PER B Lymphocyte %: value same as above
R B B Lymphocyte Absolute Count: value same as above
R NK_PER NK Lymphocyte %: value same as above
R NK NK Lymphocyte Absolute Count: value same as above
R CD4_T_PER_PER T Helper Lymphocyte %: value same as above
R CD4_T_PER T Helper Lymphocyte Absolute Count: value same as above
R CD8_T_PER_PER T Suppressor Lymphocyte %: value same as above
R CD8_T_PER T Suppressor Lymphocyte Absolute Count: value same as
above
R CD4_CD8_T T Helper/ Suppressor Ratio: value same as above
R HLA-B27 #B27 negative: value same as above
1) Record Structure
Record Structure:
1 Header
2 Request
3 Message Terminator
C-42
Record Record Field Position: Component Value Value Description
Type Value Content
H Message 3: message ID Message ID Message ID, which is
Header also used in analysis
Record result messages
12: message type Worklist search See the table of OBR-4
code*
Q Request 3: Sample ID Sample ID What displayed on
information screen
7: time of request Time of request YYYYMMDDHHMMSS;
time when the message
is generated
request^00010|P|LIS2-A2|20130425092450<CR><ETX>AD<CR><LF><STX>2Q|1|1||||2013042509245
0<CR><ETX>9F<CR><LF><STX>3L|1|N<CR><ETX>03<CR><LF>
2-Way LIS Response Message
1) Record Structure
Record Structure:
1 Header
2 Patient
3 Order
4 Result1
5 Result2
6 Result3
......
n Message Terminator
C-43
8: date of birth Date of birth YYYYMMDDHHMMSS
Age
Age unit Available age units: null,
Y, M, W, D, and H,
indicating null, year,
month, week, day, and
hour respectively
9: gender Gender What displayed on
screen
25: department Department What displayed on
screen
26: location Inpatient zone What displayed on
screen
Bed No. What displayed on
screen
O Sample 3: Sample ID Sample ID ID of the requested
Information sample
8: Time of sample Time of sample YYYYMMDDHHMMSS
collection collection
11: The person The person who String in UI
who ordered the ordered the
analysis analysis
14: clinical Clinical diagnosis What displayed on
diagnosis screen
15: Date/Time Date/Time when YYYYMMDDHHMMSS;
when the the specimen is what displayed on
specimen is received screen
received
16: sample type Sample type What displayed on
screen
Sample source Reserved; null
26: report type Result of request Q – result of request is
found
Y – result of request is
not found
R Panel 2: ID ID See C.7 Table 16 Data
type and Coding system
ID See C.7 Table 16 Data
type and Coding
system
4: result Panel See C.7 Table 18 HL7
and ASTM Enumeration
Definitions
5: unit Null
C-44
6: reference range Null
7: flag Null
R Remarks 4: result, value displayed on screen; value same as above
R Payer 4: result, value displayed on screen; value same as above
R Patient type 4: result, value displayed on screen; value same as above
C-45
C.5 Appendix: HL7 Protocol Overview
C.5.1 Message Constructing Principles
Every HL7 message consists of several segments, each of which ends up with the <CR>
(0x0D).
Each segment consists of the segment name of three characters and a number of fields, and
each field consists of some components and subcomponents. For each message, the
delimiters of the fields, components and subcomponents are defined in the MSH segment.
E.g.
MSH|^~\&| MRFlow| Mindray|||20060427194802||ORU^R01|1|P|2.3.1||||||UNICODE
Among which:
The five characters following MSH define the delimiters used between fields, components and
subcomponents. Although they can be any non-text characters, HL7 standard recommends
you use the characters in the table below:
Character Meaning
| Field delimiter
^ Component delimiter
& Subcomponent delimiter
~ Repetition delimiter
\ ESC
The first two fields of MSH contain 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 segments which can repeat once or more.
C-46
for escape character conversion for HL7 interface are as follows:
ESC Sequence Original Character
\F\ Field delimiter
\S\ Component delimiter
\T\ Subcomponent delimiter
\R\ Repetition delimiter
\E\ Escape delimiter
\.br\ <CR>, segment end character.
Note: the "\" in the escape sequence represents the ESC delimiter, whose value is defined in
the MSH segment.
C-47
C.6 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
Format defined by the field.
ED – Encapsulate Data
<source application˄HD˅> ^ <type of data˄ID˅> ^ <data sub type˄ID˅> ^ <encoding˄ID˅>
^ <data˄ST˅>
EI - Entity Identifier
<entity identifier (ST)> ^ <namespace ID (IS)> ^ <universal ID (ST)> ^ <universal ID type (ID)>
FC – Financial Class
<financial class˄IS˅> ^ <effective date˄TS˅>
HD - Hierarchic designator
<namespace ID (IS)> ^ <universal ID (ST)> ^ <universal ID type (ID)>
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.
C-48
NM - Numeric
A number represented as a series of ASCII numeric characters consisting of an optional
leading sign (+ or -), the digits and an optional decimal point.
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
<processing ID (ID)> ^ <processing mode (ID)>
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
C-49
C.7 Appendix: Message Coding Definition
1. In HL communication messages, the OBR-4 (Universal Serview ID) field, in the form of
“ID^Name^EncodeSys”, is used to identify the type of the analysis result (e.g. sample analysis
result, microscopic examination result, QC result, etc.). The following table lists all the codes of
this field.
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 16 lists the HL7 type and code identifier of each communication data item. Table 17 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
08001^Project
Panel IS 05007 Project Type 99MRC
Type^99MRC
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
C-50
01009^Custom
Custom patient Custom
ST 01009 99MRC patient info
information 1 patient info 1
1^99MRC
01010^Custom
Custom patient Custom
ST 01010 99MRC patient info
information 2 patient info 2
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
Parameter Result Items
LYM NM 731-0 LYM# LN 731-0^LYM#^LN
20599 20599-7^T%^LN
T_PER NM T% LN
-7
20598 20598-9^T#^LN
T NM T# LN
-9
20593 20593-0^B%^LN
B_PER NM B% LN
-0
20592 20592-2^B#^LN
B NM B# LN
-2
20620 20620-1^NK%^LN
NK_PER NM NK% LN
-1
26561 26561-1^NK#^LN
NK NM NK# LN
-1
32516 32516-7^CD4+T%
CD4_T_PER_PER NM CD4+T%% LN
-7 %^LN
32515 32515-9^CD4_T%
CD4_T_PER NM CD4+T%# LN
-9 #^LN
32518 32518-3^CD8+T%
CD8_T_PER_PER NM CD8+T%% LN
-3 %^LN
32517 32517-5^CD8+T%
CD8_T_PER NM CD8+T%# LN
-5 #^LN
20607 CD4+T/CD8+ 20607-8^CD4+T/C
CD4_CD8_T NM LN
-8 T D8+T^LN
26028 26028-1^HLA-B27
HLA-B27 NM HLA-B27 LN
-1 ^LN
15000^
MFI_SHIFT NM 25000 MFI(shift) 99MRC
MFI(shift)^99MRC
B27_CUT_OFF NM 25001 B27-Cutoff 99MRC 15001^ B27-Cutoff
C-51
^99MRC
CD4_CD8_POS_P 17146 CD4+CD8+% 17146-2^
NM LN
ER -2 % CD4+CD8+%%^LN
CD4_CD8_NEG_P 51755 51755-7^
NM CD4-CD8-%% LN
ER -7 CD4-CD8-%%^LN
3. Some OBX messages use 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 MRFlow
UI).
C-52
C.8 Appendix: Base64 Encoding Process
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 the
following table.
C-53
Data obtained after complementing 00001010 00001011 00000000
6-bit groups obtained after dividing 000010 10 0000 101100 000000
Corresponding codes 02H 20H 2CH 00H
Corresponding characters C g s =
C-54