0% found this document useful (0 votes)
157 views12 pages

HL7 Protocol for Chemical Analyzers

The document describes the communication protocol between a chemical analyzer and a hospital laboratory information system (LIS). It details the structure and fields used in HL7 messages to transmit sample information and test results between the two systems, including the ORU, ACK and DSR message types.

Uploaded by

massimo.cidoni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
157 views12 pages

HL7 Protocol for Chemical Analyzers

The document describes the communication protocol between a chemical analyzer and a hospital laboratory information system (LIS). It details the structure and fields used in HL7 messages to transmit sample information and test results between the two systems, including the ORU, ACK and DSR message types.

Uploaded by

massimo.cidoni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Serial settings: 115200 baud-rate, no parity bit, 8 data bits, 1 stop bit

PC set sends “MSG_ERGODIC” command to the analyzer to get all the packets.
“*” indicates a different place with the standard LIS protocol.

Interface Communication Protocol


The HL7 interface provides a communication channel for the chemical analyzer and LIS of
the hospital. Using the TCP/IP, the function of this interface includes transmission of sample
information and test results. LIS spontaneously sends the sample information to the analyzer, and
then the analyzer tests the sample locally after obtaining the sample information from LIS. After
the test is completed, the analyzer transmits the results to LIS in real time. The transmission
format of the data is created according to the 2.3.1 version of HL7.
The format of the message is “<SB> ddddd <EB> <CR>”, the note is as follows:
<SB> is hexadecimal, <0x0B>;
ddddd = Data (variable number of bytes)
ddddd is message of HL7, and just include hexadecimal data (20~FF) and <CR>.
<EB> is hexadecimal, <0x1C>
<CR> is hexadecimal, <0x0D>
Three types of HL7 messages are used: ORU, ACK and DSR.
Diagrammatic sketches are as follows:
1) transmission of sample information

2) transmission of test results

The specific structure of the message “ORU^R01” is as follows:


MSH headers
PID patient information
OBR sample information
{OBX} test results

The specific structure of the message “ACK^R01” is as follows:


MSH headers
MSA message confirmation
[ERR] error message

The specific structure of the message “DSR^Q03” is as follows:


MSH headers
MSA message confirmation
[ERR] error message
[QAK] query validation
QRD query definition
[QRF] query filter
{DSP} display data
[DSC] continuous pointer

The specific structure of the message “ACK^Q03” is as follows:


MSH headers
MSA message confirmation
[ERR] error message

“[ ]” is optional
“{ }” is repeatable

Below is the structure of fields used by each message section:


First is the message header MSH. “(aaa)” is expressed as a fixed value “aaa”.
No. Field name Length Description
1 Field Separator 1 (|)
2 Encoding Characters 4 (^~\&)
3 Sending Application 180 (MNCHIP)
4 Sending Facility 180 (CelercareM1)
5 Receiving 180
Reserve
Application
6 Receiving Facility 180 Reserve
7 Date/Time Of 26
Call system data and time information
Message
8 Security 40 Reserve
9 Message Type 7 Message type, such as “ORU^R01”
10 20 Message ID, the unique identity of Message. The
Message Control ID first message is “1”, the second message is “2”,
and so on.
11 Processing ID 3 (P )
12 Version ID 60 (2.3.1) Version ID of HL7
13 Sequence Number 21 Reserve
14 Continuation Pointer 180 Reserve
15 Accept 2
Acknowledgment (P) Valid only for “DSR^Q03”
Type
16 Application 2
Acknowledgment (0) Valid only for “ORU^R01”
Type
17 Country Code 2 Reserve
18 Character Set 10 Character set, use ASCII
19 Principal Language 60
Reserve
Of Message
20 Alternate Character 20
Set Handling Reserve
Scheme
Remarks: This section will appear in all messages. When LIS sends a message to the analyzer,
the third and fourth fields are formulated by LIS developer, and the fifth and sixth fields are
respectively "MNCHIP" and "CelercareM1". When LIS automatically sends the sample
information to the biochemical analyzer, the fifteenth field needs to be set to "P".

PID section is mainly used to construct the patient's personal information.


No. Field name Length Description
1 Set ID – PID 10 Sample’s unique code
2 Patient ID 20 Patient ID
3 Patient Identifier List 20 Admission number
Alternate Patient ID
4 20 Bed number
– PID
5 Patient Name 48 Patient name
Mother’s Maiden
6 48 Inpatient Area
Name
7 Date/Time of Birth 26 Date of birth
8 Sex 1 Sex: male “M”; female “F”; Other “O”
9 Patient Alias 48 Blood type
10 Race 80 Reserve
11 Patient Address 106 Patient Address
12 County Code 4 County Code
Phone Number -
13 40 Phone Number
Home
Phone Number -
14 40 Reserve
Business
15 Primary Language 60 Reserve
16 Marital Status 80 Reserve
17 Religion 80 Reserve
Patient Account
18 20 inpatient / outpatient / other
Number
SSN Number
19 16 Medical insurance account
-Patient
Driver's License
20 25 Charge type
Number – Patient
21 Mother's Identifier 20 Reserve
22 Ethnic Group 80 Ethnic Group
23 Birth Place 60 Birth Place
Multiple Birth
24 1 Reserve
Indicator
25 Birth Order 2 Reserve
26 Citizenship 80 Remarks
Veterans Military
27 60 Reserve
Status
28 Nationality 80 Nationality
Patient Death Date
29 26 Reserve
and Time
Patient Death
30 1 Reserve
Indicator

The "OBR" section is used to transmit the medical advice and other information of the patient
sample.
No. Field name Length Description
1 Set ID – OBR 10 Distinguish between different “OBR” fields
2 Placer Order Number 22 Sample bar code
3 Filler Order Number 22 Sample test number
4 Universal Service ID 200 (MNCHIP^CelercareM1)
5 Priority 2 Whether emergency, yes “Y”, no “N”
6 Requested Date/time 26 Reserve
7 Observation Date/Time 26 Test time
Observation End
8 26 Reserve
Date/Time
9 Collection Volume 20 Reserve
10 Collector Identifier 60 Reserve
11 Specimen Action Code 1 Reserve
12 Danger Code 60 Reserve
13 Relevant Clinical Info 300 Relevant Clinical Info of patient
Specimen Received
14 26 Specimen Received Date/Time
Date/Time
15 Specimen Source 300 Sample type: whole blood, plasma, serum
16 Ordering Provider 120 Fetch Doctor
Order Callback Phone
17 40 Fetch Department
Number
18 Placer Field 1 60 “icterus”, “hemolysis”, “lipemia”
19 Placer Field 1 60 Blood bag number
20 Filler Field 1 60 Attending doctor
21 Filler Field 2 60 Treatment department
Result Rpt/Status
22 26 Reserve
Change – Date/Time
23 Charge to Practice 40 Reserve
Diagnostic Serv Sect
24 10 Reserve
ID
25 Result Status 1 Reserve
26 Parent Result 200 Reserve
27 Quantity/Timing 200 Reserve
28 Result Copies To 150 Reserve
29 Parent 150 Reserve
30 Transportation Mode 20 Reserve
31 Reason for Study 300 Reserve
Principal Result Reserve
32 200
Interpreter
Assistant Result Reserve
33 200
Interpreter
34 Technician 200 Reserve
35 Transcriptionist 200 Reserve
36 Scheduled Date/Time 26 Reserve
Number of Sample Reserve
37 4
Containers
Transport Logistics Reserve
38 60
of Collected Sample
39 Collector’s Comment 200 Reserve
Transport Arrangement Reserve
40 60
Responsibility
41 Transport Arranged 30 Reserve
42 Escort Required 1 Reserve
Planned Patient Reserve
43 200
Transport Comment
Ordering Facility Reserve
44 60
Name
Ordering Facility Reserve
45 106
Address
Ordering Facility Reserve
46 48
Phone Number
Ordering Provider Reserve
47 106
Address

“OBX” is used to send the test results. One patient can have more than one “OBX”.
No. Field name Length Description
1 Set ID – OBX 10 Distinguish between different “OBX” fields
2 Value Type 3 “NM” (numeric) represents quantitative projects
3 Observation Identifier 590 Observation identifier, used as test item ID
4 Observation Sub-ID 20 Observation Sub-ID,used as test item name
5 Observation Value 65536 Test result
6 Units 90 Unit of test items
7 References Range 90 References Range
Determine whether the test results in the reference
range
8 Abnormal Flags 5 “L” - Low
“H” - High
“N” - normal
9 Probability 5 Reserve
Nature of Abnormal
10 2 Reserve
Test
11# Observe Result Status 1 Reserve
Date Last Observe
12 26 Reserve
Normal Values
User Defined
13 20 Reserve
Access Checks
Date/Time of the
14 28 Test time
Observation
15 Producer's ID 60 Reserve
Responsible
16 80 Responsible Observer, test physician
Observer
17 Observation Method 60 Reserve
18* Lower limit 20 Linear lower bound
19* Upper limit 20 Linear upper bound

Below is the structure of fields used by “MSA” section:


No. Field name Length Description
Fixed “AA”. “AA” is acceptance; “AE” is error;
1 Acknowledgment Code 2
“AR” is rejection
Message control ID, be same with the sender’s
2 Message Control ID 20
“MSH-10”
When error or rejection appears, a text description
3 Text Message 80 of the event. Corresponding to the sixth field. Can
be used to write error log.
Expected Sequence
4 15 Reserve
Number
Delayed
5 1 Reserve
Acknowledgment Type
6 Error Condition 100 Status code

Note: MSA-6 field status table


Status code(MSA-6) Text Message(MSA-3) Description
Succeed: AA
0 Message accepted Succeed
Error status code: AE
The segment sequence of the message is
100 Segment sequence error
not correct
101 Required field missing Some required field missing
102 Data type error Data type error
Table value not found, temporarily not
103 Table value not found
used
Rejection 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
205 Duplicate key identifier Duplicate key identifier
206 Application record locked Such as Database locked
207 Application internal error Other internal errors

“ERR” section is used to add an error note in the confirmation message:


No. Field name Length Description
1 Error Code and Location 80 Error code and location

The “QAK” section contains some information about the following query response:
No. Field name Length Description
1 Query Tag 32 (SR), representing the sample information
“OK”: Data found, no errors
“NF”: No data found, no errors
2 Query Response Status 2
“AE”: Application error
“AR”: Application reject

Below is the structure of fields used by “QRD” section. “(aaa)” is expressed as a fixed value
“aaa”.
No. Field name Length Description
1 Query Date/Time 26 The query time, call system time
2 Query Format Code 1 (R)
3 Query Priority 1 (D)
4 Query ID 10 Query ID
5 Deferred Response Type 1 Reserve
Deferred Response
6 26 Reserve
Date/Time
7 Quantity Limited Request 10 (RD)
8 Who Subject Filter 60 Sample bar code
9 What Subject Filter 60 (OTH)
What Department
10 60 Reserve
Data Code
What Data Code Value
11 20 Reserve
Qual
12 Query Results Level 1 Reserve

“QRF” and “QRD” sections are together used to further refine the original query content.
“(aaa)” is expressed as a fixed value “aaa”.
No. Field name Length Description
1 Where Subject Filter 20 (CelercareM1)
When Data Start
2 26 Starting Specimen Received Date/Time
Date/Time
When Data End
3 26 Ending Specimen Received Date/Time
Date/Time
4 What User Qualifier 60 Reserve
Other QRY Subject
5 60 Reserve
Filter
Which Date/Time
6 12 (RCT)
Qualifier
Which Date/Time
7 12 (COR)
Status Qualifier
Date/Time Selection
8 12 (ALL)
Qualifier
When Quantity/Timing
9 60 Reserve
Qualifier

The “DSP” section is used to give a display sample information and patient information,
which can be repeated.
No. Field name Length Description
1 Set ID - DSP 4 “DSP” section ID
2 Display Level 4 Display level
3 Data Line 300 300 Data rows, the query contents
4 Logical Break Point 2 Logical break point
5 Result ID 20 Result ID

Remarks: The third field "Line Data" is used to display the sample information downloaded
from the LIS server. The details of the sample information are shown in the following table.
No. Content Type and value
1 Admission Number String
2 Bed Number String
3 Patient Name String
4 Date of Birth String, format is: “YYYYMMDDHHmmSS”
(year/month/day/hour/minute/second) for example:
20061122130540. All time fields are in this format.
5 Sex String, Sex: male “M”; female “F”; Other “O”
6 Patient Alias String, blood type: “O”, “A”, “B”, “AB”
7 Race Reserve
8 Patient Address String
9 County Code String
10 Home Phone Number String
11 Business Phone Number Reserve
12 Primary Language Reserve
13 Marital Status Reserve
14 Religion Reserve
15 Patient Account Number String, “outpatient”, “inpatient”, “Other”
16 Social Security Number String
17 Driver License Number String, Charge type: “own”, “insurance”
18 Ethnic Group String
19 Birth Place String
20 Nationality String
21 Bar Code String
22 Sample ID int
23 Sample Time String
String, Whether emergency, yes “Y”, no “N”, blank
24 Priority
“N”.
25 Collection Volume Float, blank
26 Sample Type String, “serum”, “plasma”, “whole blood”
27 Fetch Doctor String
28 Fetch Department String
Test ID^TestName^Unit^Normal String^string^string^string
29
Range

The “DSC” section is used to indicate the last data in the sending sample information.
No. Field name Length Description
1 Continuation pointer 180 Continuation pointer
Note: because there is only sample information, the “DSC” section in the “DSR” message is
empty.

Communication use case


(1) LIS sends the information of a patient to the analyzer, using the “DSR^Q03” message, the
patient information is as follows:
Field name Information data
Patient Identifier List 8
Patient Name John Smith
Date/Time of Birth 2005.10.03
Sex male
Patient type Inpatient
Sample type Serum
Fetch Department Surgery

The message is:


<SB>MSH|^~\&|||MNCHIP|CelercareM1|20121026132318||DSR^Q03|1|p|2.3.1|||P|||ASCII|||
<CR>
MSA|AA|1|Message accepted|||0|<CR>
ERR|0|<CR>
QAK|SR|OK|<CR>
QRD|20121026132318|R|D|1|||RD||OTH|||T|<CR>
QRF|CelercareM1|20121026122321|20121026122321|||RCT|COR|ALL||<CR>
DSP|1||8|||<CR>
DSP|2|||||<CR>
DSP|3||John Smith|||<CR>
DSP|4||20051003000000|||<CR>
DSP|5||M|||<CR>DSC||<CR>
DSP|6|||||<CR>
DSP|7|||||<CR>
DSP|8|||||<CR>
DSP|9|||||<CR>
DSP|10|||||<CR>
DSP|11|||||<CR>
DSP|12|||||<CR>
DSP|13|||||<CR>
DSP|14|||||<CR>
DSP|15||Inpatient|||<CR>
DSP|16|||||<CR>
DSP|17|||||<CR>
DSP|18|||||<CR>
DSP|19|||||<CR>
DSP|20|||||<CR>
DSP|21|||||<CR>
DSP|22|||||<CR>
DSP|23|||||<CR>
DSP|24|||||<CR>
DSP|25|||||<CR>
DSP|26||Serum|||<CR>
DSP|27|||||<CR>
DSP|28||Surgery|||<CR>
DSP|29|||||<CR><EB><CR>

The whole data packet is transmitted to the analyzer by data flow. After received the
“DSR^Q03” message, if the data is complete, the analyzer will make a reply confirmation. The
message is:
<SB>MSH|^~\&|MNCHIP|CelercareM1|||20121026132420||ACK^Q03|1|P|2.3.1||||||ASCII|||<
CR>
MSA|AA|1|Message accepted|||0|<CR>ERR|0|<CR><EB><CR>

If the data is not correct, the analyzer will send the error code. The message is:
<SB>MSH|^~\&|MNCHIP|CelercareM1|||20121026132420||ACK^Q03|1|P|2.3.1||||||ASCII|||<
CR>
MSA|AE|1|Segment sequence error|||100|<CR> <EB><CR>

When received the error code, LIS will resend the data.
(2) After the test being done, the test data will be sent to LIS, using the "ORU^R01" message, the
test data is as follows:
Field name Information data
Patient Identifier List 8
Patient Name John Smith
Date/Time of Birth 2005.10.03
Sex male
Patient type Inpatient
Sample type Serum
Fetch Department Surgery

Test item name TP, ALB, TBIL, ALT, AST, GGT, UREA, CRE, GLU
Test result 72.6, 50.5, 15.0, 5.1, 10.3, 53.3, 4.23, 59.7, 2.51
Unit of test items g/L, g/L, μmol/L, U/L, U/L, U/L, mmol/L, μmol/L, mmol/L
References Range 64-83, 34-48, 3.4-17.1, 5-40, 8-40, 11-50, 2.9-8.2, 54-109, 3.9-6.1
Linear range 0-1000, 0-1000, 0-1000, 0-1000, 0-1000, 0-1000, 0-1000, 0-1000, 0-1000
The “ORU^R01” message which the analyzer sends to LIS is:
<SB>MSH|^~\&|MNCHIP|CelercareM1|||20121026132318||ORU^R01|1|p|2.3.1||||0||ASCII|||
<CR>
PID|1||8||John Smith||20051003000000|M||||||||||Inpatient|||||||||||||<CR>
OBR|1|||MNCHIP^CelercareM1|||20121026132153||||||||Serum||Surgery|||||||||||||||||||||||||||||||<CR>
OBX|1|NM||TP|72.6|g/L|65-85|N|||||72.6|20121026132153||||0|1000|<CR>
OBX|2|NM||ALB|50.5|g/L|40-55|N|||||50.5|20121026132153||||0|1000|<CR>
OBX|3|NM||GLO|27.4|g/L|20-40|N|||||27.4|20121026132153||||0|1000|<CR>
OBX|4|NM||A/G|1.6/1||1.2-2.4/1|N|||||1.6/1|20121026132153||||0|1000|<CR>
OBX|5|NM||TBIL|15.1|μmol/L|3.4-17.1|N|||||15.1|20121026132153||||0|1000|<CR>
OBX|6|NM||ALT|20|U/L|9-50|N|||||20|20121026132153||||0|1000|<CR>
OBX|7|NM||AST|16.3|U/L|15-40|N|||||16.3|20121026132153||||0|1000|<CR>
OBX|8|NM||GGT|63.3|U/L|10-60|H|||||63.3|20121026132153||||0|1000|<CR>
OBX|9|NM||UREA|4.23|mmol/L|2.9-8.2|N|||||4.23|20121026132153||||0|1000|<CR>
OBX|10|NM||CRE|90|μmol/L|54-109|N|||||90|20121026132153||||0|1000|<CR>
OBX|11|NM||GLU|3.63|mmol/L|3.9-6.1|L|||||3.63|20121026132153||||0|1000|<CR><EB><C
R>

The whole data packet is transmitted to LIS by data flow.


After received the “ORU^R01” message, if the data is correct, LIS will make a reply
confirmation. The message is:
<SB>MSH|^~\&|||MNCHIP|CelercareM1|20121026132420||ACK^R01|1|P|2.3.1||||||ASCII|||<
CR>
MSA|AA|1|Message accepted|||0|<CR>ERR|0|<CR><EB><CR>

If the data is not correct, LIS will send the error code. The message is:
<SB>MSH|^~\&|||MNCHIP|CelercareM1|20121026132420||ACK^Q03|1|P|2.3.1||||||ASCII|||<
CR>
MSA|AE|1|Segment sequence error|||100|<CR> <EB><CR>

When received the error code, the analyzer will resend the data.

You might also like