Prévia do material em texto
1
1.1 Copyright
Rayto Life and Analytical Sciences Co., Ltd.2013
Version: 1.0
Issuing date: July 31, 2013
Representation
Shenzhen Rayto Life and Analytical Sciences Co., Ltd. (Rayto Company) reserves the
copyright for this non published communication protocol specification, and has the right to
treat it as confidential data. This representation is only used as the reference data of
operating, maintaining and repairing Rayto products.
This representation and all the intellectual property rights (including copyright) belong to
Rayto Company. Without the prior written permission of Rayto, no one shall use, disclose
or permit other people to obtain all or part of this representation by unjust means. Without
the prior written permission of Rayto, no one shall photocopy, duplicate or translate all or
part of this representation into other languages.
Rayto company provides no warranty of any kind for this data, including (but not limited to)
the implicit merchantable and suitable guarantee liability proposed for particular purposes.
Rayto company assumes no responsibility for the mistakes included in this data, or the
incidental or indirect damages caused by the offering, actual performance and usage.
2
Version Revising reason and content Location page Revising date
1.0 Issued for the first time July 31, 2013
3
HL7 Communication Protocol
1.1 Copyright ................................................................................................................................... 1
1 Overview of Communication Interface ................................................................................ 4
1.1 Purpose .......................................................................................................................... 4
1.2 Scope of application ...................................................................................................... 4
1.3 Communication protocol specification ......................................................................... 4
1.3.1 Supported information of HL7 interface protocol ............................................. 4
1.3.2 Underlying transport layer protocol .............................................................. 4
1.3.3 HL7 Message layer protocol ......................................................................... 5
2 HL7 Introduction ..................................................................................................................... 7
2.1 HL7 Basic syntax .......................................................................................................... 7
2.2 HL7 Data type ............................................................................................................... 8
3 Duplex communication .......................................................................................................... 9
3.1 Supported HL7 message ............................................................................................... 9
3.2 Definition of HL7 segments involved ......................................................................... 10
3.3 Sample of complete message ...................................................................................... 27
4 Definition of HL7 Data Type Used ...................................................................................... 35
5 Message Coding Definition ................................................................................................. 37
6 Base64 Coding process ...................................................................................................... 41
7 Reference Books .................................................................................................................. 43
4
1 Overview of Communication Interface
1.1 Purpose
This representation mainly illustrates the communication of Hemaray83/86/89 PC
operating software or data management software.
1.2 Scope of application
This application is only applicable for the PC operating software for Hemaray83/86/89
instrument of Shenzhen Rayto Life and Analytical Sciences Co., Ltd.
1.3 Communication protocol specification
1.3.1 Supported information of HL7 interface protocol
The LIS function of PC operating software of automated hematology analyzer of Rayto
company provides the capacity of communicating through Ethernet and laboratory
computer, the inspection results of the instruments can be sent to laboratory computer
and accept worksheet through laboratory computer.
This communication protocol is defined based on HL7 standards. HL7 is the electronic
data interchange standard of healthcare field, it initially is defined by the United States and
adopted by many counties now. This protocol is defined based on HL7 v2.3.1. Please
refer to HL7 Interface Standards Version 2.3.1 for the detailed content of HL7.
1.3.2 Underlying transport layer protocol
The PC operating software transfers information through TCP connection, and the
communication process can be divided into 3 stages:
Connecting stage
After starting the PC operating software, it will initiatively connect to LIS server according
to software settings, it will continue to try to reconnect if the connection is not successful,
and it will stay connected after the connection is successful to ensure the data can be sent
at any time, it will try to reconnect if the connection is found disconnected during the
operating process.
Data transmission
Communication of counting results and quality control data recording
In addition to send data records in bulk in list review and quality control interface, if the
automatic communication switch of counting results has been set up; the PC operating
software will also send communication information at the same time of producing new
sample counting results. Furthermore, the communication of counting results and quality
control data records in the PC software can be set up as synchronous or non-synchronous
communication.
Synchronous communication
5
The sending and receiving of message for both batched communication and automatic
communication are synchronous, that is waiting for a confirmation message for each
message sent, the sending process of a message is only completed when the
confirmation message is received within 10s and then send next message; if confirmation
message is not received after waiting for 10s, then this message is considered failed to be
sent and jump it to send next message directly.
Quality control data recording communication is similar with counting results, click quality
control or quality control history review interface to send message. Wait for confirmation
for each quality control data message sent, the communication is considered successful if
a confirmation message is received within 10s, otherwise it would be considered failed.
Continue to send next message when confirmation message is received or timeout.
Non-synchronous communication
Directly send all the results or recordings in turn instead of waiting for response during
transmission for communications of counting results and quality control data recordings.
Two-way LIS query information
Two-way LIS query message communication is different. When the PC operating software
turns on two-way LIS communication switch, query message will be sent before saving
worksheet or counting, the query message includes sample number. LIS inquires sample
information according to sample number, and response in HL7 message form, PC
operating software fills the worksheet information according to responding information or
conducts counting. The query will be considered failed when response message is not
received within 10s after sending two-way LIS query information.
DisconnectIt will shut down the communication connection when exit out PC operating software. The
current connection will be disconnected and set the connection according to new setting
when changing the software communication settings.
1.3.3 HL7 Message layer protocol
HL7 Upper layer message protocol
Sample results and other data message are communicated in the form of UTF-8 coded
string.
Express method of message coded strings shall be organized according to HL7 standard,
namely multiple segments are included in one message, each segment can be divided
into multiple fields, one field may be divided into multiple components and each
component may be divided into multiple sub components. The content of segment, field,
component and sub component are divided according to separators.
The following is the part message example for HL7:
MSH|^~\&| | |||20130228105625||ACK^R01|201302281|P|2.3.1||||0||UNICODE|||
PID|1|1|20121212||INLXL||19860101|M|||||||26Y||||||||||||||||
OBR|1|||||20121212|20121212||||||2D|20121212
09:57:12|S222|D2222||M22222|B2222|Sc22|C2|0|0|3||0|1|
……
6
HL7 Underlying message protocol
TCP/IP is a byte stream protocol, it doesn’t provide message boundaries. As upper-layer
protocol, HL7 is based on message and doesn’t provide message termination mechanism.
In order to determine the message boundaries, we adopt MLLP underlying protocol
(There is corresponding description for this in HL7 Interface Standards Version 2.3.1.)
Communication layer
Message is transferred in the following form:
<SB> ddddd <EB><CR>
Including:
<SB> = Start Block character, the value is 0x0B.
ddddd = Data (variable number of bytes), it is effective data of HL7 message,
represented in character string.
<EB> = End Block character, the value is 0x1C.
<CR> = Carriage Return, the value is 0x0D.
7
2 HL7 Introduction
2.1 HL7 Basic syntax
Message construction rules
Each HL7 message is composed of some segments; each segment is ended with <CR>
character.
Each segment is composed of section name of three characters and variable number of
fields, each field is composed of component and subcomponent. Define the separators of
field, component and subcomponent at the MSH segment of each message.
For example:
MSH|^~\&|Rayto|HEMARAY86|||20060427194802||ORU^R01|1|P|2.3.1||||||UNICOD
E
Including:
The five characters after MSH shall be used to differentiate the separators of each field,
component and subcomponent. Although these characters can be any non-textual
characters, but the HL7 recommends the characters in the following table:
Character Meaning
| Field separator
^ Component separator
& Subcomponent separator
~ Repeating separator
\ Escape character
The first field of MSH includes each separator. The following some fields are empty
because they are optional and not adopted by HL7 interface, detailed field definition and
selection will be explained later.
For any kind of message, the segments after MSH segment have fixed appearing order,
these order will be specifically described in the following sections, these syntactic
structures are adopted to represent the order of segments:
The segments appeared in [] are optional.
The segments in { } can be repeated once or several times.
Escape rules of character string
In the field data in ST, TX, FT, CF and other types, escape separators may appear in
character string data, such as remark, diagnostic message and user defined gender etc,
escape the separators in original character string into escape character sequence, and
then restore them while decoding. HL7 interface adopts the following escape rules:
8
Escape character
sequence
Original character
\F\ Field separator
\S\ Component separator
\T\ Subcomponent separator
\R\ Repeating separator
\E\ Escape character
\.br\ <CR> means ending
character of segment
Note: the ‘\’ in escape character string sequence means escape separator, its value is
defined in MSH segment.
2.2 HL7 Data type
All the data messages are represented as different HL7 type fields, present
communication protocol has only adopted part of the types that provided by HL7
standards, see “using HL7 data type definition” for detailed introduction.
9
3 Duplex communication
3.1 Supported HL7 message
Duplex communication process
1. The mainframe sends inspection results (or quality control data message) to LIS, as
shown in figure 1.
Figure 1 Communication process diagram of inspection results and quality control data
2. Worksheet message query
Worksheet belongs to order message, relevant HL7 message can be used: ORM
(General Order Message) and ORR (General Order Response Message), the
communication process is as shown in figure 2.
Figure 2 Communication process diagram worksheet query
Mainly used message
ORU^R01 Message: mainly used in the transformation of inspection results and
quality control data.
ORU Observational Results (Unsolicited) Description
MSH message header is necessary, including the communication of message number,
sending time, message separator, coding scheme and other communication messages
{
PC Terminal
LIS System
ORM^O01
ORR ^O02
PC Terminal
LIS System
ORU^R01
ACK ^R01
10
PID Patient’s basic information, including patient’s name, sex, medical record number
and birthday etc
{
OBR Sample information, including sample number, inspector and inspecting time etc
{[OBX]} Inspection data item, including inspection parameters results etc.
}
}
ACK^R01 Message: Confirm the received ORU^R01 message.
ACK Acknowledgment Description
MSH message header
MSA message confirmation, described the communication message has been
successfully received or not
ORM^O01 Message: general Order message, basically all the relevant movements
related to Order adopt this message type, such as create a new order, cancel an order
etc., it refers to mainframe requires LIS to refill the order message here.
ORM General Order Message Description
MSH Message header
{ORC}General message of Order, including all the number message of the sample
queried.
ORR^O02 Message: confirmation of ORM^O01 message, it return the complete
information of order (worksheet)
ORR^O02 General Order Response Message Description
MSH Message header
MSA Message confirmation
[PID Patient information
{
[
OBR Sample information
{[OBX]} Other sample information data, including sample work mode etc.
]
}
3.2 Definition of HL7 segments involved
The detailed definition of the fields included in each segment will be illustrated in the list
below, each line of the table corresponds to a field in the segments, and the meaning of
each line of the table is as following:
1. Serial number: the beginning of HL7 segment is a segment name of 3 characters, each
subsequent field separator is followed with the content of one field, and serial number is
the ordinal position of field in HL7 message segment.
11
For example:
PID | 1 | 1 |20121212||INLXL||19860101|M|||||||26Y||||||||||||||||
↑ ↑ ↑
Message segment name Field 1 Field 3
Note: MSH message segments are slightly different, the closely followed field separator
after message segment name is considered as the first field, it is used to describe the
value of field separators adopted in the whole message.
2. Field name: the logical meaning of the field, the field explanation provided by HL7.
3. Data type: HL7 standard type of field, its structure will be described in the “used HL7
data type definition”.
4. HL7 recommended maximum length: HL7 standard recommended length. Butin the
actual message transmission process, the actual transformed length will exceed this value;
therefore, separator is adopted as the symbol to read the message field while parsing the
message.
5. Description: the description of the actual value content of the content.
6. Sample: Sample of the actual value of the field
Note: for the future expansion need of the operating software, no field in
the message segment shall be omitted in the HL7 interface
protocol support, if there is no value in this field, leave it blank.
MSH
MSH (Message Header) message segment contains the basic information of HL7
message, including the message separator value, message type and the coding scheme
of the message, it is the first field of each HL7 message.
Message sample:
MSH|^~\&|Hemaray86|Rayto|||20130328150307||ORU^R01|201303281|P|2.3.1||||0||UNI
CODE|||
See table 1 for the definition of the fields used in MSH message segment.
Table 1 MSH fields definition table
Serial
number
Field name
Data
type
HL7
recommend
maximum
length
Description Sample
1
Field
Separator
ST 1
Including the first
segment separator after
the message segment
name, is used to specify
the segment separator
|
12
values of the rest of the
message.
2
Encoding
Characters
ST 4
Including component
separator, repeating
separator, escape
separator and
subcomponent separator
^~\&
3
Sending
Application
HD 180
Transmitting terminal
application
Rayto
4
Sending
Facility
HD 180
Transmitting terminal
facility
Hemaray86
5
Receiving
Application
HD 180
Blank, reserved.
Receiving end
application program
6
Receiving
Facility
HD 180
Blank, reserved.
Receiving end equipment
7
Date/Time
Of
Message
TS 26
Time of current
message. Invoke the
time information of the
system.
8 Security ST 40 Blank, reserved. Security
9
Message
Type
CM 7 Message type ORU^R01
10
Message
Control ID
ST 20
Message control ID, the
only message identified,
progressively increase
with the message
number, the format is
date + number
201303281
13
11
Processing
ID
PT 3
Processing ID, always
adopts P to represent
products
P
12 Version ID VID 60
Version ID, HL7 protocol
version
2.3.1
13
Sequence
Number
NM 15
Blank, reserved.
Sequence number
14
Continuatio
n Pointer
ST 180
Blank, reserved.
Continuation pointer
15
Accept
Acknowled
gment
Type
ID 2
Blank, reserved. Accept
acknowledgment type
16
Application
Acknowled
gment
Type
ID 2
Application
acknowledgment type, as
the sending results type.
S: (Sample) patient
sample inspection result,
C (Calibration) calibration
result, Q (QC Result)
quality control result
S
17
Country
Code
ID 2
Blank, reserved. Country
code
18
Character
Set
ID 10 Character set UNICODE
19
Principal
Language
Of
Message
CE 60
Blank, reserved.
Principal language Of
message
14
20
Alternate
Character
Set
Handling
Scheme
ID 20
Blank, reserved.
Alternate character set
handling scheme
MSA
MSA (Message Acknowledgement) Message segment contains message
confirmation information.
Message sample:
MSA|AA|201303281|||||
See table 2 for the definition of fields used.
Table 2 MSA field definition table
Seri
al
num
ber
Field name
Dat
a
typ
e
HL7
recommen
d
maximum
length
Description Sample
1
Acknowledgm
ent Code
ID 2
Acknowledgment code, AA means
accept; AE means error; AR
means reject.
AA
2
Message
Control ID
ST 20
Message control ID, same as the
MSH-10 of sender.
201303281
3 Text Message ST 80
Text message, it is a text
description of the event when
error occurs or reject. Correspond
to the sixth field and can be used
to write the error log.
4
Expected
Sequence
Number
NM 15
Blank, reserved. Expected
sequence number
15
5
Delayed
Acknowledgm
ent Type
ID 1
Blank, reserved. Delayed
acknowledgment type
6
Error
Condition
CE 100
Error condition (status code)
Table 3 Error code table of MSA-6 field
Status code
(MSA-6)
Status text (MSA-3) Description/Remark
Succeed AA
Message accepted Succeed
Error status code: AE
100 Segment sequence error
Segment sequence error in the
message, or required segment is
missing
101 Required field missing Required field in a segment is missing
102 Data type error
Data type error of field, such as
numbers become characters
103 Table value not found
Table value is not found, not used for
the time being.
Reject status code: AR
200
Unsupported message
type
Unsupported message type
201 Unsupported event code Unsupported event code
202
Unsupported processing
id
Unsupported processing ID
203 Unsupported version id Unsupported version ID
204 Unknown key identifier
Unknown key identifier, such as
transfer a nonexistent patient
information
16
205 Duplicate key identifier Existed duplicated key identifier
206 Application record locked
The transaction can’t be performed in
the application storage level, such as
application record is locked
207 Application internal error
Other unknown application internal
error
PID
PID (Patient Identification) segment includes the basic information of the patient.
Message sample:
PID|1|20121206RTS001|||Ling Xiaozhong||1990504|M|||||||22Y||||||||||||||||
See table 4 for the definition of the field used.
Table 4 PID field definition table
Seri
al
num
ber
Field name
Dat
a
typ
e
HL7
recommen
d
maximum
length
Description Sample
1 Set ID – PID SI 10
Serial number, is used in the different
PID message segments of the same
message
1
2 Patient ID CX 20
It is sample number in the sample
results, It is quality control batch
number in the quality control
20121206R
TS001
3
Patient
Identifier List
CX 20 Blank, reserved. Patient identifier list
4
Alternate
Patient ID –
PID
CX 20
Blank, reserved. Alternate patient ID –
PID
5 Patient Name XP 48 It is name in sample result; it is quality Ling
17
N control name in quality control result. Xiaozhong
6
Mother’s
Maiden Name
XP
N
48
Blank, reserved. Mother’s maiden
name
7
Date/Time of
Birth
TS 26
It is date of birth, the form is
YYYY[MM[DD[HH]]
It is period of validity in L-J, X-R quality
control.
19900504
8 Sex IS 1
Sex: male, send M; female, send F;
other, send O.
Leave blank and reserved in the quality
control result.
M
9 Patient Alias
XP
N
48 Blank, reserved. Patient alias
10 Race CE 80 Blank, reserved. Race
11
Patient
Address
XA
D
106 Blank, reserved. Patient address
12 County Code IS 4 Blank, reserved. Country code
13
Phone
Number-
Home
XT
N
40 Blank, reserved. Phone number-Home
14
Phone
Number -
Business
XT
N
40
Blank, reserved. Phone number -
Business
15
Primary
Language
CE 60
Age, with units. Y means year, M
means month, D means day, H means
hour. Leave blank and reserved in the
quality control results.
22Y
16 Marital Status CE 80 Blank, reserved. Marital status
17 Religion CE 80 Blank, reserved. Religion
18
18
Patient
Account
Number
CX 20
Blank, reserved. Patient account
number
19
SSN
Number-Patie
nt
ST 16 Blank, reserved. SSN Number-Patient
20
Driver's
License
Number –
Patient
DL
N
25
Blank, reserved. Driver's license
number – Patient
21
Mother's
Identifier
CX 20 Blank, reserved. Mother's identifier
22 Ethnic Group CE 80 Blank, reserved. Ethic group
23 Birth Place ST 60 Blank, reserved. Birth place
24
Multiple Birth
Indicator
ID 1 Blank, reserved. Multiple birth indicator
25 Birth Order NM 2 Blank, reserved. Birth order
26 Citizenship CE 80 Blank, reserved.Citizenship
27
Veterans
Military Status
CE 60
Blank, reserved. Veterans military
status
28 Nationality CE 80 Blank, reserved. Nationality
29 Patient Death TS 26
Blank, reserved. Date and time of
patient death
30
Patient Death
Indicator
ID 1
Blank, reserved. Patient death
indicator
OBR
OBR (Observation Request) message segment mainly includes inspection report
information.
Message sample:
OBR|1||20071207011|00001^AutomatedCount^99MRC||20071207080000|20071207
19
160000|||Rayto|||Cold|20071207083000||||||||||HM||||||||Rayto
See table 5 for the definition of the field used.
Table 5 OBR field definition table
Seri
al
num
ber
Field name
Dat
a
typ
e
HL7
recommend
maximum
length
Description Sample
1 Set ID – OBR SI 10
Serial number, used to determine the
different OBR segments in the
message.
1
2
Placer Order
Number
EI 22
It is sample number in the response
message of worksheet query, namely
ORC^O02.
3
Filler Order
Number
EI 22
Blank, reserved. Filler order number. It
is document number in quality control
message.
01
4
Universal
Service ID
CE 200
Left blank and reserved in sample
results. Universal service ID.
Used to identify different quality control
settings or counting results in quality
control results, the values is one of the
LJ QCS (LJ Quality control setting), LJ
QCR (LJ Quality control result) ,XB QCS
(XB Quality control setting),XB QCR(XB
Quality control result), XR QCS (XR
Quality control setting), XR QCR (XR
Quality control result).
5 Priority ID 2 Blank, reserved. Priority
6
Requested
Date/time
TS 26
Left blank and reserved in sample
results. It is requested date/time in the
20
quality control result.
7
Observation
Date/Time
TS 26 Observation date/time
8
Observation
End
Date/Time
TS 26
Blank, reserved. Observe the end
date/time.
9
Collection
Volume
CQ 20 Blank, reserved. Collection volume
10
Collector
Identifier
XC
N
60 Blank, reserved. Collector identifier
11
Specimen
Action Code
ID 1 Blank, reserved. Specimen action code
12 Danger Code CE 60 Blank, reserved. Danger code
13
Relevant
Clinical Info.
ST 300
It is relevant clinical information in
sample results, left blank and reserved
in quality control results.
Cold
14
Specimen
Received
Date/Time
TS 26
Received date/time in specimen results,
left blank and reserved in quality control
results.
15
Specimen
Source
CM 300
It is specimen source in specimen
results, left blank and reserved in quality
control results.
16
Ordering
Provider
XC
N
120
It is department in specimen results, left
blank and reserved in quality control
results.
17
Order
Callback
Phone
Number
XT
N
40 Blank, reserved.
18 Placer Field1 ST 60
It is medical record number in specimen
results, left blank and reserved in quality
control results.
19 Placer Field 2 ST 60
It is medical bed number in specimen
results, left blank and reserved in quality
21
control results.
20 Filler Field1 ST 60
It is tester in specimen results, setter or
tester in quality control results.
21 Filler Field2 ST 60
It is auditor in specimen results, left
blank and reserved in quality control
results.
22
Result
Rpt/Status
Change
–Date/Time
TS 15
Blank, reserved. Result report /Status
change –Date/Time
23
Charge to
Practice
CM 40
It is charge type in specimen results, O
(Own), I (Insurance), P (Public), and U
(Unknown), left blank and reserved in
quality control results.
O
24
Diagnostic
Serve Sect ID
ID 10
It is patient type in specimen results, Cl
(Clinic), Ho (Hospitalize), Em
(Emergency), Ex (examination), Un
(Unknown)
Cl
25 Result Status ID 1
It is sample introduction mode in
specimen results, O (Open), A (Auto), C
(Closed), U (Unknown)
A
26 Parent Result CM 200
Blood sample mode
W (Whole), P (Pre-diluted), U
(Unknown)
W
27
Quantity/Timin
g 2
TQ 00
Test mode
CBC+DIFF, CBC, U(Unknown)
CBC+DI
FF
28
Result Copies
To
XC
N
150
It is reference scope group in specimen
results, such as adult man, adult
woman, child and custom.
It is quality control level in quality control
result, value is L(Low), N(Normal),
H(High)
Adult
man
29 Parent CM 150
Automatic injection mode is test tube
rack number, other mode is 0.
7
30
Transportation
Mode
ID 20
Automatic injection mode is test tube
position number, other mode is 0.
10
31
Reason for
Study
CE 300 Blank, reserved. Reason for study
22
32
Principal
Result
Interpreter
CM 200
Blank, reserved. Principal result
interpreter
33
Assistant
Result
Interpreter
CM 200
Blank, reserved. Assistant result
interpreter
34 Technician CM 200 Blank, reserved. Technician
35
Transcriptionis
t
CM 200 Blank, reserved. Transcriptionist
36
Scheduled
Date/Time
TS 26 Blank, reserved. Scheduled date/time
37
Number of
Sample
Containers
NM 4
Blank, reserved. Number of sample
containers
38
Transport
Logistics of
Collected
Sample
CE 60
Blank, reserved. Transport logistics of
collected sample
39
Collector’s
Comment
CE 200 Blank, reserved. Collector’s comment
40
Transport
Arrangement
Responsibilit
y
CE 60
Blank, reserved. Transport arrangement
responsibility
41
Transport
Arranged
ID 30
Blank, reserved. Transport arranged or
not
42
Escort
Required
ID 1 Blank, reserved. Escort required
43 Planned CE 200
Blank, reserved. Planned patient
transport comment
23
Patient
Transport
Comment
44
Ordering
Facility Name
CE 60 Blank, reserved. Ordering facility name
45
Ordering
Facility
Address
CE 106
Blank, reserved. Ordering facility
address
46
Ordering
Facility Phone
Number
CE 48
Blank, reserved. Ordering facility phone
number
47
Ordering
Provider
Address
CE 106 Remark
OBX
OBX (Observation/Result) message segment mainly includes the parameter information
of each inspection result.
Message sample:
OBX|1|NM|WBC||5.73|10*9/L|4-10|N|||F|||||||
See table 6 for the definition of the field used.
Table 6 OBX field definition table
Seri
al
num
ber
Field name
Dat
a
typ
e
HL7
recommen
d
maximum
length
Description Sample
1 Set ID – OBX SI 4
Serial number, used to identify the
different OBX segments in the
message.
1
2 Value Type ID 2 Data type of inspection results, the NM
24
values are “ST”, “NM”, “ED” and
“IS” etc.
3
Observation
Identifier
CE 250 Inspection item identifier. WBC
4
Observation
Sub-ID
ST 20
Leave the specimen results and
quality control result blank and
reserved. Observation Sub-ID
L-J, X-B Quality control setting, R
(Reference), L (Limit) , X-R
Quality control result, X (Mean), R
(Range)
5
Observation
Value
* 65536
The inspection result values can
be numbers, character string,
enumerated values and binary
data etc. (The binary data for
histogram and scatter diagram
adopts Base64 coding scheme for
transition, see Base64 coding
process for coding scheme.)
Invalid value is “ ”
4.95
6 Units CE 250
Units for inspection items. ISO
standard units are adopted to
represent.
10*9/L
7
References
Range
ST 60
Inspection results range, the form
is: “Reference range lower
limit—reference range upper limit”
4.00-10.00
8
Abnormal
Flags
IS 5
Inspection results signals
N (Normal), H (High) the results
are higher than reference range
N
25
upper limit, L (Low) the results are
lower than reference range lower
limit
9 Probability NM 5 Blank, reserved. Probability
10
Nature of
Abnormal Test
ID 2
Blank, reserved. Nature of
abnormal test
11
Observe
Result Status
ID1
Observe result status. F: Final
Result; L-J, X-B Quality control
data is blank.
F
12
Date Last
Observe
Normal Values
TS 26
Blank, reserved. Date of last
observe normal values
13
User Defined
Access
Checks
ST 20
Blank, reserved. User defined
access checks.
14
Date/Time of
the
Observation
TS 26
Blank, reserved. Date/Time of the
observation
15 Producer’s ID CE 250 Blank, reserved. Producer’s ID
16
Responsible
Observer
XC
N
250
Blank, reserved. Responsible
observer
17
Observation
Method
CE 250
Blank, reserved. Observation
method
ORC
ORC (Common Order) message segment mainly includes the general information of order
Message sample:
ORC|RF||20121206RTS001||IP||||||||||||||||
See table 7 for the field definition.
Table 7 ORC field definition table
26
Serial
number
Field name
Data
type
HL7
recommend
maximum
length
Description Sample
1 Order Control ID 2
Order control word.
ORM message contains RF
(refill the order request)
ORR message contains AF
(order refill confirmation)
RF
2
Placer Order
Number
EI 22
Initiator order number
ORM message is blank,
ORR message contains
specimen number.
3
Filler Order
Number
EI 22
Filler order number.
ORM message contains
specimen number.
ORR message is blank.
2012120
6RTS00
1
4
Placer Group
Number
EI 22 Blank, reserved.
5 Order Status ID 2
Order status.
It is fixed as IP in the
worksheet information
query communication ORM
message (Order is in
processing, but no results
have been obtained)
ORR message is blank;
IP
6 Response Flag ID 1
Blank, reserved. Response
flag
7 Quantity/Timing TQ 200
Blank, reserved.
Quantity/Timing
8 Parent CM 200
Blank, reserved. Father
order.
9
Date/Time of
Transaction
TS 26
Blank, reserved. Date/Time
of transaction
27
10 Entered By XCN 120
Blank, reserved. Entered
By
11 Verified By XCN 120 Blank, reserved. Verified By
12
Ordering
Provider
XCN 120
Blank, reserved. Ordering
provider
13
Enterer’s
Location
PL 80
Blank, reserved. Enterer’s
location
14
Call Back
Phone Number
XTN 40
Blank, reserved. Call back
phone number
15
Order Effective
Date/Time
TS 26
Blank, reserved. Order
effective date/time
16 Order Control
Code Reason CE 200
Blank, reserved. Control
code for request reason
17 Entering
Organization CE 60
Blank, reserved. Entering
organization
18 Entering Device CE 60
Blank, reserved. Entering
device
19 Action By XCN 120 Blank, reserved. Action by
20
Advanced
Beneficiary
Notice Code
CE 40
Blank, reserved. Advanced
beneficiary notice code.
3.3 Sample of complete message
Sample massage
The previous OBX message segment of graph data in sample message represents the
original document length of graph without Base64 encoding.
Such as:
OBX|28|NM|RBC Histogram Data Length||84294||||||F|||||||
OBX|29|ED|RBC Histogram||BMP^……RBC Histogram data……||||||F|||||||
84294 in first segment represents the original length of data between BMP^ to separator |
without Base64 encoding (the above example is BMP document).
Below is a sample calculation result message sample:
MSH|^~\&|Hemaray86|Rayto|||20130401172806||ORU^R01|201304011|P|2.3.1||||S||UNI
CODE|||
PID|1|20121206RTS001|||Ling Xiaozhong||19900504|M|||||||22Y||||||||||||||||
OBR|1||||||||||||Diagnosis||Inspector| Division ||Medical Record Number| Bed Number| Tester| Auditor
||O|Ex|O|W|CBC+DIFF| Adult Man|7|10|||||||||||||||||Remark|
OBX|1|NM|WBC||4.65|10*9/L|4-10|
OBX|2|NM|NEUTP||63.2|%|50-70|N|||F|||||||
OBX|3|NM|LYMP||32.6|%|20-40|N|||F|||||||
OBX|4|NM|MONP||2.8|%|3-12|N|||F|||||||
28
OBX|5|NM|EOSP||1.1|%|0.5-5|N|||F|||||||
OBX|6|NM|BASP||0.3|%|0-1|N|||F|||||||
OBX|7|NM|NEUTA||2.94|10*9/L|2-7|N|||F|||||||
OBX|8|NM|LYMA||1.52|10*9/L|0.8-4|N|||F|||||||
OBX|9|NM|MONA||0.13|10*9/L|0.12-1.2|N|||F|||||||
OBX|10|NM|EOSA||0.05|10*9/L|0.02-0.5|N|||F|||||||
OBX|11|NM|BASA||0.01|10*9/L|0-0.1|N|||F|||||||
OBX|12|NM|RBC||5.46|10*12/L|3.5-5.5|N|||F|||||||
OBX|13|NM|HGB||178|g/L|110-160|N|||F|||||||
OBX|14|NM|MCHC||358|g/L|320-360|N|||F|||||||
OBX|15|NM|MCH||32.6|pg|27-34|N|||F|||||||
OBX|16|NM|MCV||103.9|fL|80-100|N|||F|||||||
OBX|17|NM|RDWCV||12|%|11-16|N|||F|||||||
OBX|18|NM|RDWSD||46.3|fL|35-56|N|||F|||||||
OBX|19|NM|HCT||49.7|%|37-54|N|||F|||||||
OBX|20|NM|PLT||202|10*9/L|100-300|N|||F|||||||
OBX|21|NM|MPV||7.9|fL|6.5-12|N|||F|||||||
OBX|22|NM|PDW||16.3|%|10-18|N|||F|||||||
OBX|23|NM|PCT||0.60|%|0.108-0.282|N|||F|||||||
OBX|24|NM|PLCR||24.3|%|11-45|N|||F|||||||
OBX|25|TX|WBCFlag||Lymphocyte is too high||||||F|||||||
OBX|26|TX|RBCFlag||Hemoglobin?||||||F|||||||
OBX|27|TX|PLTFlag||Big platelet is too low! ||||||F|||||||
OBX|28|NM|RBC Histogram Data Length||84294||||||F|||||||
OBX|29|ED|RBC Histogram||BMP^……RBC Histogram Data……||||||F|||||||
OBX|30|NM|RBC Start Line||25||||||F|||||||
OBX|31|NM|RBC End Line||220||||||F|||||||
OBX|32|NM|PLT Histogram Data Length||83353||||||F|||||||
OBX|33|ED|PLT Histogram||BMP^……PLT Histogram Data……||||||F|||||||
OBX|34|NM|PLT Start Line||2||||||F|||||||
OBX|35|NM|PLT End Line||25||||||F|||||||
OBX|36|NM|Main Scattergram Data Length||65536||||||F|||||||
OBX|37|ED|Main Scattergram ||DAT^……Main Scatter Diagram Data……||||||F|||||||
OBX|38|NM|Sub Scattergram Data Length||65536||||||F|||||||
OBX|39|ED|Sub Scattergram ||DAT^……Sub Scatter Diagram Data……||||||F|||||||
Sample reply message
One sample reply message shall be responded for each sample result received. Sample
reply message includes two segments MSH and MSA. Two points should be paid
attention to for correct reply message: ACK^R01 needs to be filled in the content of
MSH-9 content, means the type of this message is sample reply message. The value of
MSA-2 segment is the same with that of MSH-10 segment, which has received counting
results, means that this reply message corresponds to the already sent counting results,
the value of MSA-2 segment is 201304011 is this example.
MSH|^~\&|LIS||||20130401172902||ACK^RO1| 1|P|2.3.1||||S||UNICODE|||
29
MSA|AA|201304011|||||
Quality control message
PC operating software currently supports 3 quality control methods, L-J, X-B and X-R. The
content and form of quality control result message are different from that of sample
counting result message: the MSH-16 value of quality control message is Q, means the
message type is quality control data; each quality control result message corresponds to
one quality control point of PC terminal operating software, multiple results might be
included, one L-J and X-B1 quality control message includes one counting result, and one
X-R quality control message includes one average calculation result and one range result
obtained through calculating, point out average calculation result (X) or range result (R) in
OBX-4 segment of the message. There are quality control set messages for L-J and X-B
quality control, one quality control message contains reference value and deviation value,
point out reference value ® or deviation value (L).
Quality control result message is composed of one MSH message header and multiple
counting results, each counting result starts with PID and OBR segments that contains
sample messages, there are multiple OBX segments used for carrying parameter results
and other messages. Determine it is L-J quality control setting, counting result, X-B quality
control setting or X-R quality control through OBR-4 segment.
Quality control reply message
There is only one difference between quality control reply message and counting result
reply message: the value of MSH-16 segment is Q.
Samples of quality control message and reply message:
L-J quality control setting message:
MSH|^~\&|Hemaray86|Rayto|||20130517164906||ORU^R01|201305171|P|2.3.1||||Q||UNICODE|||
PID|1|20130402001|||LJ Quality Control||20140401||||||||||||||||||||||||
OBR|1||01|LJ QCS||20130517|||||||||||||| Setter |||||O|W|CBC+DIFF|N||||||||||||||||||||
OBX|1|NM|WBC|R|8|10*9/L||||||||||||
OBX|2|NM|NEUTP|R|61.9|%||||||||||||
OBX|3|NM|LYMP|R|25.4|%||||||||||||
OBX|4|NM|MONP|R|5.7|%||||||||||||
OBX|5|NM|EOSP|R|5.8|%||||||||||||
OBX|6|NM|BASP|R|1.4|%||||||||||||
OBX|7|NM|NEUA|R|4.99|10*9/L||||||||||||
OBX|8|NM|LYMA|R|2.03|10*9/L||||||||||||
OBX|9|NM|MONA|R|0.46|10*9/L||||||||||||
OBX|10|NM|EOSA|R|0.46|10*9/L||||||||||||
OBX|11|NM|BASA|R|0.11|10*9/L||||||||||||
OBX|12|NM|RBC|R|4.525|10*12/L||||||||||||
OBX|13|NM|HGB|R|134|g/L||||||||||||
OBX|14|NM|MCHC|R|333|g/L||||||||||||
1 X-B quality control of Rayto five classification blood cell analyzer only includes three items, MCHC, MCH and
MCV, and it means that X-B quality control message only has 3 OBX segments.
30
OBX|15|NM|MCH|R|30|pg|N||||||||||
OBX|16|NM|MCV||104|fL||||||||||||
OBX|17|NM|RDWCV|R|12|%||||||||||||
OBX|18|NM|RDWSD|R|45|L||||||||||||
OBX|19|NM|HCT|R|40.0|%||||||||||||
OBX|20|NM|PLT|R|231.5|10*9/L||||||||||||
OBX|21|NM|MPV|R|7.9|fL||||||||||||
OBX|22|NM|PDW|R|16.3|%||||||||||||
OBX|23|NM|PCT|R|0.60|%||||||||||||
OBX|24|NM|PLCR|R|24.0|%||||||||||||
OBX|25|NM|WBC|L|0.8|10*9/L||||||||||||
OBX|26|NM|NEUTP|L|10|%||||||||||||
OBX|27|NM|LYMP|L|10|%||||||||||||
OBX|28|NM|MONP|L|4|%||||||||||||
OBX|29|NM|EOSP|L|4|%||||||||||||
OBX|30|NM|BASP|L|1.2|%||||||||||||
OBX|31|NM|NEUA|L|1|10*9/L||||||||||||
OBX|32|NM|LYMA|L|1|10*9/L||||||||||||
OBX|33|NM|MONA|L|0.4|10*9/L||||||||||||
OBX|34|NM|EOSA|L|0.4|10*9/L||||||||||||
OBX|35|NM|BASA|L|0.1|10*9/L||||||||||||
OBX|36|NM|RBC|L|0.4|10*12/L||||||||||||
OBX|37|NM|HGB|L|6|g/L||||||||||||
OBX|38|NM|MCHC|L|30|g/L||||||||||||
OBX|39|NM|MCH|L|3|pg||||||||||||
OBX|40|NM|MCV|L|5|FL||||||||||||
OBX|41|NM|RDWCV|L|3|%||||||||||||
OBX|42|NM|RDWSD|L|10|L||||||||||||
OBX|43|NM|HCT|L|3|%||||||||||||
OBX|47|NM|PLT|L|40|10*9/L||||||||||||
OBX|48|NM|MPV|L|3|FL||||||||||||
OBX|46|NM|PDW|L|3|%||||||||||||
OBX|47|NM|PCT|L|0.1|%||||||||||||
OBX|48|NM|PLCR|L|8|%||||||||||||
Reply message:
MSH|^~\&|LIS||||20130517165005||ACK^R01|2|P|2.3.1||||||UNICODE|||
MSA|AA|201305171|||||
L-J Quality control result message:
MSH|^~\&|Hemaray86|Rayto|||20130401172906||ORU^R01|201305171|P|2.3.1||||Q||UNI
CODE|||
PID|1|20130402001|||LJ Quality Control||20140401||||||||||||||||||||||||
OBR|1||01|LJQCR||20130402||||||||||||||ExaminingPhysician|||||O|W|CBC+DIFF|N||||||||||||||||
||||
31
OBX|1|NM|WBC||4.65|10*9/L|||||F|||||||
OBX|2|NM|NEUTP||63.2|%|||||F|||||||
OBX|3|NM|LYMP||32.6|%|||||F|||||||
OBX|4|NM|MONP||2.8|%|||||F|||||||
OBX|5|NM|EOSP||1.1|%|||||F|||||||
OBX|6|NM|BASP||0.3|%|||||F|||||||
OBX|7|NM|NEUTA||2.94|10*9/L |||||F|||||||
OBX|8|NM|LYMA||1.52|10*9/L|||||F|||||||
OBX|9|NM|MONA||0.13|10*9/L|||||F|||||||
OBX|10|NM|EOSA||0.05|10*9/L|||||F|||||||
OBX|11|NM|BASA||0.01|10*9/L|||||F|||||||
OBX|12|NM|RBC||5.46|10*12/L|||||F|||||||
OBX|13|NM|HGB||178|g/L|||||F|||||||
OBX|14|NM|MCHC||358|g/L|||||F|||||||
OBX|15|NM|MCH||32.6|pg|||||F|||||||
OBX|16|NM|MCV||104|fL||||F|||||||
OBX|17|NM|RDWCV||12|%|||||F|||||||
OBX|18|NM|RDWSD||46.3|fL|||||F|||||||
OBX|19|NM|HCT||49.7|%|||||F|||||||
OBX|20|NM|PLT||202|10*9/L|||||F|||||||
OBX|21|NM|MPV||7.9|fL|||||F|||||||
OBX|22|NM|PDW||16.3|%|||||F|||||||
OBX|23|NM|PCT||0.60|%|||||F|||||||
OBX|24|NM|PLCR||24.3|%|||||F|||||||
Reply message:
MSH|^~\&|LIS||||20130517165005||ACK^R01|3|P|2.3.1||||||UNICODE|||
MSA|AA|201305171|||||
X-B Quality control setting message:
MSH|^~\&|Hemaray86|Rayto|||20130517165306||ORU^R01|201305172|P|2.3.1||||Q||UNI
CODE|||
OBR||||XB QCS||20130517|||||||||||||| Setter ||||||||||||||||||||||||||||
OBX|1|NM|MCHC|R|344|g/L||||||||||||
OBX|2|NM|MCH|R|29|pg||N||||||||||
OBX|3|NM|MCV|R|84.3|fL||||||||||||
OBX|4|NM|MCHC|L|30|g/L||||||||||||
OBX|5|NM|MCH|L|2|pg||||||||||||
OBX|6|NM|MVC|L|6|fL||||||||||||
Reply message:
MSH|^~\&|LIS||||20130517165006||ACK^R01|4|P|2.3.1||||||UNICODE|||
MSA|AA|201305172|||||
X-B Quality control result message:
MSH|^~\&|Hemaray86|Rayto|||20130520145612||ORU^R01|201305203|P|2.3.1||||Q||UNI
32
CODE|||
OBR|1||01|XB QCR||20130517|||||||||||||| Examining Physician ||||||||||||||||||||||||||||
OBX|1|NM|MCHC||321|g/L|||||F|||||||
OBX|2|NM|MCH||28.5|pg|||||F|||||||
OBX|3|NM|MCV||87.9|fL|||||F|||||||
Reply message:
MSH|^~\&|LIS||||20130520145708||ACK^R01|5|Q|2.3.1||||||UNICODE|||
MSA|AA|201305203|||||
X-R Quality control setting message:
MSH|^~\&|Hemaray86|Rayto|||20130520160615||ORU^R01|2013052011|P|2.3.1||||Q||UN
ICODE|||
PID|1|20130402001|||XR Quality Control||20140401||||||||||||||||||||||||
OBR|1||01|XR QCS||20130402|||||||||||||| Setter |||||O|W|CBC+DIFF|N||||||||||||||||||||
Reply message:
MSH|^~\&|LIS||||20130520160708||ACK^R01|6|P|2.3.1||||||UNICODE|||
MSA|AA|2013052011|||||
X-R Quality control result message:
MSH|^~\&|Hemaray86|Rayto|||20130520160615||ORU^R01|2013052012|P|2.3.1||||Q||UN
ICODE|||
PID|1|20130402001|||XR Quality Control||20140401||||||||||||||||||||||||
OBR|1||01|XRQCR||20130402||||||||||||||ExaminingPhysician|||||O|W|CBC+DIFF|N|||||||||||||||
|||||
OBX|1|NM|WBC|X|5.2|10*9/L|||||F|||||||
OBX|2|NM|NEUTP|X|60|%|||||F|||||||
OBX|3|NM|LYMP|X|32|%|||||F|||||||
OBX|4|NM|MONP|X|5|%|||||F|||||||
OBX|5|NM|EOSP|X|2.1|%|||||F|||||||
OBX|6|NM|BASP|X|0.9|%|||||F|||||||
OBX|7|NM|NEUTA|X|3.12|10*9/L|||||F|||||||
OBX|8|NM|LYMA|X|1.66|10*9/L|||||F|||||||
OBX|9|NM|MONA|X|0.26|10*9/L|||||F|||||||
OBX|10|NM|EOSA|X|0.11|10*9/L|||||F|||||||
OBX|11|NM|BASA|X|0.05|10*9/L|||||F|||||||
OBX|12|NM|RBC|X|5.5|10*12/L|||||F|||||||
OBX|13|NM|HGB|X|151|g/L|||||F|||||||
OBX|14|NM|MCHC|X|324|g/L|||||F|||||||
OBX|15|NM|MCH|X|32.6|pg|||||F|||||||
OBX|16|NM|MCV|X|94|fL|||||F|||||||
OBX|17|NM|RDWCV|X|12|%|||||F|||||||
OBX|18|NM|RDWSD|X|42.3|fL|||||F|||||||
OBX|19|NM|HCT|X|46.8|%|||||F|||||||
33
OBX|20|NM|PLT|X|268|10*9/L|||||F|||||||
OBX|21|NM|MPV|X|8.2|fL|||||F|||||||
OBX|22|NM|PDW|X|16.3|%|||||F|||||||
OBX|23|NM|PCT|X|0.60|%|||||F|||||||
OBX|24|NM|PLCR|X|24.3|%|||||F|||||||
OBX|25|NM|WBC|R|0.5|10*9/L|||||F|||||||
OBX|26|NM|NEUTP|R|6|%|||||F|||||||
OBX|27|NM|LYMP|R|2|%|||||F|||||||
OBX|28|NM|MONP|R|0.4|%|||||F|||||||
OBX|29|NM|EOSP|R|0.3|%|||||F|||||||
OBX|30|NM|BASP|R|0.1|%|||||F|||||||
OBX|31|NM|NEUTA|R|0.5|10*9/L|||||F|||||||
OBX|32|NM|LYMA|R|0.1|10*9/L|||||F|||||||
OBX|33|NM|MONA|R|0.03|10*9/L|||||F|||||||
OBX|34|NM|EOSA|R|0.02|10*9/L|||||F|||||||
OBX|35|NM|BASA|R|0.01|10*9/L|||||F|||||||
OBX|36|NM|RBC|R|0.4|10*12/L|||||F|||||||
OBX|37|NM|HGB|R|8|g/L|||||F|||||||
OBX|38|NM|MCHC|R|11|g/L|||||F|||||||
OBX|39|NM|MCH|R|3|pg|||||F|||||||
OBX|40|NM|MCV|R|4|fL|||||F|||||||
OBX|41|NM|RDWCV|R|2|%|||||F|||||||
OBX|42|NM|RDWSD|R|6|fL|||||F|||||||
OBX|43|NM|HCT|R|3|%|||||F|||||||
OBX|44|NM|PLT|R|34|10*9/L|||||F|||||||
OBX|45|NM|MPV|R|2|fL|||||F|||||||
OBX|46|NM|PDW|R|1.5|%|||||F|||||||
OBX|47|NM|PCT|R|0.1|%|||||F|||||||
OBX|48|NM|PLCR|R|4.8|%|||||F|||||||
Reply message:
MSH|^~\&|LIS||||20130520160708||ACK^R01|7|P|2.3.1||||||UNICODE|||
MSA|AA|2013052012|||||
Two-way LIS query request sample
Two-way LIS query request message includes sample number. When the LIS receive the
request, it will reply with corresponding patient and sample information that be queried.
Query request message includes 2 segments: MSH and ORC. MSH segment basically is
the same as sample counting result segment, except for the value of MSH-9 message
type segment is ORM^O01. Fill receiver number for ORC-3, and fill sample number here,
fill SampleID1 for this segment in the sample, note that when built-in barcode scanning
error occurs during automatic sample countingquery, the value of sample number
segment is Invalid.
Below is query request message sample.
MSH|^~\&|Hemaray86|Rayto|||20130401173016||ORM^O01|2013040113|P|2.3.1||||S||UN
ICODE |||
34
ORC|RF||20121206RTS001||IP||||||||||||||||
Two-way LIS query request reply sample
A query result reply message needs to be responded for LIS received query request
message. The first two segments of query reply message are MSH and MSA. Fill
ORR^O02 in MSH-9 message type segment. See the message reply sample part for the
way of writing characters of MSA segment. If query message succeeds, it will contain PID,
ORC and OBR segments, patient description and sample message, the information
description method is the same as that of sample data communication message. The
ORC segment in successful query message is indispensable, the value of ORC——1 is
AF, fill query major key for ORC-2 segment, namely sample number. Note that OBR-2
segment is sample number information, the value should be in consistent with ORC-2
segment, and otherwise it will be considered as an error message.
Below is a message sample with successful query result:
MSH|^~\&|LIS||||20130520161058||ORR^O02|7|P|2.3.1||||||UNICODE|||
MSA|AA|2013040113|||||
PID|1|20121206RTS001||| Ling Xiaozhong||19900504|M|||||||22Y||||||||||||||||
ORC|AF|20121206RTS001|||
OBR|1||||||||||||Diagnosis||Inspector| Division ||Medical Record Number| Bed Number| Tester| Auditor
||O|Ex|O|W|CBC | Adult Man|7|10|||||||||||||||||Remark|
Below is a reply message sample for failed query, MSA-2 segment indicates reply results,
the value here is AR, means reject the query operation, the value also can be AE, means
query operation processing error:
MSH|^~\&|LIS||||20130520161108||ORR^O02|8|P|2.3.1||||||UNICODE|||
MSA|AR|2013040115|||||
35
4 Definition of HL7 Data Type Used
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
The format is defined by specific segment.
CX - Extended composite ID with check digit
<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
<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)>
Used only as part of EI and other data types.
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.
IS - Coded value for user-defined tables
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.
ID - Coded values for HL7 tables
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
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
36
<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
YYYY[MM[DD[HHMM[SS[.S[S[S[S]]]]]]]][+/-ZZZZ] ^ <degree of precision>
XCN - Extended composite ID number and name
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)>
XPN - Extended person name
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)>
VID - Version identifier
<version ID (ID)> ^ <internationalization code (CE)> ^ <international version ID (CE)>
37
5 Message Coding Definition
1. See the table below for the value meaning of the custom enumerated values in MSH
segment:
Table 8 MSH Custom Enumerated Values
MSH-16
S – Sample
C - Calibration
Q - QC
2. See the table below for the value meaning of the custom enumerated values in MSA
segment:
Table 9 MSH Custom Enumerated Values
MSA-1
AA - Accept
AE – Error
AR – Refuse
3. See the table below for the value meaning of the custom enumerated values in PID
segment:
Table 10 PID Custom Enumerated Values
PID-8
M - Man
F – Female
O - Other
PID-15
Y - Year
M - Month
D – Day
H – Hour
O - Other
4. See the table below for the value meaning of the custom enumerated values in OBR
segment:
Table 11 OBR Custom Enumerated Values
OBR-23
O - Own
I - Insurance
P - Public
U - Unknown
38
OBR-24
Cl – Clinic
Ho - Hospitalize
Em - Emergency
Ex - Examination
Un - Unknown
OBR-25
O - Open
A - Auto
C - Close
U - Unknown
OBR-26
W - Whole
P - Pre-diluted
U - Unknown
OBR-27
CBC+DIFF
CBC
U - Unknown
OBR-28
L - Low level QC
N - Normal level QC
H - High level QC
5. See the table below for the value meaning of the custom enumerated values in OBX
segment:
Table 12 OBR Custom Enumerated Values
OBX-4
L-J, X-B quality control setting message:
R – Reference
L - Limit
X-R quality control result message:
X – Mean
R - Range
OBX-5 ----- - Invalid value
OBX-8 N - Normal
39
H - High, higher than the upper limit of reference
range
L - Low, lower than the low limit of reference
range
6. Histogram and scatter diagram can be generated by PC terminal operating software,
histogram is generated according to the impedance channel of the instrument, including
WBC histogram, RBC histogram and PLT histogram, scatter diagram adopts FL and FS
directional light electric signal sampling values respectively as abscissa and ordinate to
generate main scatter diagram (FLFS) according to 3 receiving directions of the laser,
adopts SS and FS directional light electric signal sampling values respectively as
abscissa and ordinate to generate sub scatter diagram (SSFS), there are two kinds of
scatter diagrams in total, CBC measure mode transfers WBC, RBC and PLT, CBC+DIFF
measure mode transfers RBC and PLT histogram and two scatter diagrams. The following
circumstances of graph data transmission exist according to software settings:(1) No transmission of graph data.
(2) Transfer bitmap graph data, the data type field value in OBX segment is “ED”, the data
field value format like “BMP^……bitmap data……”, “BMP” (This value also may be other
type, such as JPG, PNG etc) means histogram data is in transmission, and the data has
been conducted Base64 encoding.
(3) Transfer graph data in binary form, the data type field value in OBX segment is “ED”,
the data field value format like “DAT^……binary graph data……”, DAT (or BIN) indicates
the binary data type defined by the application, and the data has been conducted Base64
encoding. There are three histograms, each histogram is divided into 256 channels, each
channel is represented by a byte of data, there are 256 bytes in total, there is data for two
graphs while transferring the binary graph data of scatter diagram, respectively are
chromatic index data for main scatter diagram and sub scatter diagram.
Chromatic index data has defined a scatter diagram includes color type information and
brightness information, there are 256 lines and 256 rows for each diagram, each byte
represents one point. Scatter diagram is divided into areas of different types by color type
information (such as GHOST, RRBC, NEUT, LYMPH, MONO, EOS and BASO), while
brightness information reflects the shading degree of each color.
Color type and brightness value of the given chromatic value can be obtained by the
following ways:
NColorTypealueChromaticVB
alueChromaticV
C
Rounding
Level rightness
N
1
Typeolor
N = 10, it means color depth (or brightness level)
40
Table 12 is chromatic index data which adopts N=10 as the example.
Table 13 Chromatic index data
Area type Color type Chromatic
value
Background 0 0
GHOST ID_GHOST = 1 11~20
RRBC ID_RRBC = 2 21~30
NEUT ID_NEUT = 3 31~40
LYMPH ID_LYMPH = 4 41~50
MONO ID_MONO = 5 51~60
EOS ID_EOS = 6 61~70
BASO ID_BASO = 7 71~80
41
6 Base64 Coding process
(1) Select 3 adjacent bytes that need to be coded in the data flow (24bit), divide them into
4 groups of 6-bit according to the order from left to right, then get the corresponding
ASCII character string according to table 12 by mapping. As shown below:
Original data (16 hexadecimal) 0x30 0x82 0x02
Binary data 00110000 10000010 00000010
6-bit group obtained through partition 001100 011010 001101 001011
Corresponding coding value 12 8 8 2
Corresponding character M a N L
Table 14 Base64 Mapping table
Value Code Value Code Value Code Value Code
0 A 16 Q 32 g 48 w
1 B 17 R 33 h 49 x
2 C 18 S 34 i 50 y
3 D 19 T 35 j 51 z
4 E 20 U 36 k 52 0
5 F 21 V 37 l 53 1
6 G 22 W 38 m 54 2
7 H 23 X 39 n 55 3
8 I 24 Y 40 o 56 4
9 J 25 Z 41 p 57 5
10 K 26 a 42 q 58 6
11 L 27 b 43 r 59 7
12 M 28 c 44 s 60 8
13 N 29 d 45 t 61 9
14 O 30 e 46 u 62 +
15 P 31 f 47 v 63 /
(2) Continuously repeat step (1) to conduct coding until data flow coding is completed.
If the left data is less than 3 bytes, fill 0 in the right to stuff, if the all the 6-bit groups are
composed of paddling bits, then map them to ‘=’ character. It can be known that when 1
byte is left in the data, there are two ‘=’ characters in the coding character string obtained,
when 2 bytes are left in the data, there is one ‘=’ character in the coding character string
obtained. Below are the samples for these two situations:
①Original data 0AH
00001010
Data obtained through stuffing 00001010 00000000 00000000
6-bit group obtained through partition 000010 100000 000000 000000
Corresponding data value 02H 20H 00H 00H
Corresponding character C g = =
42
②Original data 0AH 0BH
00001010 00001011
Data obtained through stuffing 00001010 00001011 00000000
6-bit group obtained through partition 000010 100000 101100 000000
Corresponding data value 02H 20H 2CH 00H
Corresponding character C g s =
43
7 Reference Books
1.《HL7 Interface Standards Version 2.3.1》
2. Base64 Code and Decode