0% found this document useful (0 votes)
439 views5 pages

ASTM Protocol M201 LIS

The document outlines an ASTM protocol for transmitting data between EMP devices. It details: 1. The protocol establishes a connection by transmitting <ENQ> and receiving <ACK> or <NAK> in response. 2. Messages are transmitted frame by frame with a header, checksum, and terminators. A message may be split into multiple frames. 3. The receiver responds to each frame with <ACK> or <NAK> and ends the transmission with
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)
439 views5 pages

ASTM Protocol M201 LIS

The document outlines an ASTM protocol for transmitting data between EMP devices. It details: 1. The protocol establishes a connection by transmitting <ENQ> and receiving <ACK> or <NAK> in response. 2. Messages are transmitted frame by frame with a header, checksum, and terminators. A message may be split into multiple frames. 3. The receiver responds to each frame with <ACK> or <NAK> and ends the transmission with
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/ 5

ASTM Protocol for EMP devices

Device series, M201, U2


1. Linking data:
Start bit: 1bit
Data bit: 8 bits
Parity bit: none
Stop bit: 1bit
Baud rate: 9600 Bps (M201= 115200 Bps)

2. Transmitting progress:
1) Establishing
Transmitter: <ENQ> (0x05) enquiry
Receiver: <ACK> (0x06) acknowledgement
<NAK> (0x15) negative acknowledgement
<ENQ> (0x05) enquiry
Notes:
<ACK> means the receiver is ready to receive data.
<NAK> means the receiver cannot receive data immediately.
<ENQ> means the receiver wants to send data too. The device allows the PC to enquire the test results. The PC
transmits the query conditions to the device. If the device has finished a test at same time there would be a contention.
The solution for the contention is:
a. If the PC sends <ENQ> but gets an <ENQ> reply from the device, it would delay the enquiry and prepare to
receive the test result first, then wait and reply the next <ENQ> signal from device.
b. If the device sends <ENQ> but gets an <ENQ> reply from the PC. Before trying again, the device waits for
more than one second. (Device would try 6 times at most.)

2) Transmitting
Frame :Messages are transmitted as frames. (The below characters means ASCⅡ characters)
a. Each frame can have 247 characters at most, including the header. If longer than 240 characters, the
message is divided into two or more frames. (The header needs 7.)
b. Different messages cannot be jointed into one frame. Each message must be transmitted in a new-started
frame.
c. There are two types of frames, mid-frame and end-frame. One message which has less than 240 characters
is transmitted as a single end-frame. A longer message is transmitted as mid-frames, only the last part as
end-frame.
d. Frame structures:
Mid-frame: <STX>FN Text <ETB> C1 C2 <CR> <LF>
End-frame: <STX>FN Text <ETX> C1 C2 <CR> <LF>
Wherein:
<STX>: (0x02) start of text
FN: 0~7 frame number
Text: text the message to be transmitted (see appendix part)
<ETB>: (0x17) end of transmission block
<ETX>: (0x03) end-of-text
C1 0~9, A~F high half-byte of checksum (transferred to ASCII)
C2 0~9, A~F low half-byte of checksum (transferred to ASCII)
Checksum: the last byte of [FN + Text + <ETB>/<ETX>]
<CR>: (0x0D) carriages return (use as record terminator)
<LF>: (0x0A) line feed

3) Responding
After each frame of message, the receiver gives a responding to the transmitter.
<ACK> (0x06) acknowledgement
<NAK> (0x15) negative acknowledgement
<EOT> (0x04) end of transmission
Notes:
<ACK> means the last frame has been received correctly and the receiver is ready to receive the next frame. The
transmitter should increase the FN and transmit a new frame, or send a request to end the transmission.
<NAK> means the last frame has NOT been received correctly and the receiver is ready to receive it again.
<EOT> means the last frame has been received correctly but the transmission is ended by the receiver. The
transmitter should send a new request to establish a transmission.

4) Ending
<EOT> (0x04) end of transmission
<ACK> (0x06) acknowledgement
After all messages being successfully transmitted, the transmitter sends <EOT> to the receiver. The receiver
responds <ACK>.Then the transmission would be ended.

3. Example:
As an example, we try to get the result record with sample number 032989326.

Step 1 Establishing
The PC: <ENQ>
Device: < ACK> (/ <NAK> / <ENQ>)

Step 2 transmit the message header


The PC: <STX>FN Text <ETX> C1 C2 <CR> <LF>
Device: < ACK> (/ <NAK>)
Text: H|\^&<CR>
That is, transmit “H|\^&<CR>” as a message. (In fact, the complete format is longer, but this is enough.) “H” is the
message type.

Step 3 send query (one query in one time)


The PC: <STX>FN Text <ETB> (/ <ETX>) C1 C2 <CR> <LF>
Device: < ACK> (/ <NAK>)
Text format: message Type | sequence number | start sample number | end sample number | test | time type | start
time | end time <CR>
e.g. 1 if we want all the test records of sample number 023989326, the text should be:
Q|1|032989326||ALL<CR>
e.g. 2 if we want all the test records whose sample number is between 023989326 and 023989328, and test time
is between 2009-01-14 and 2008-01-14, the text should be:
Q|1|032989326|032989328|ALL|R|20090114|20080114<CR>
p.s. time type: R result-recorded time (test time); S sample-sent time.

Step 4 transmit stop message


The PC: L|1<CR>
Device: < ACK> (/ <NAK>)
That is, transmit “L|1<CR>” as a message. “L” is the message type. “1” is the sequence number

Step 5 ending the transmission


The PC: <EOT>
Device: < ACK>

Step 6 Establishing
Device: <ENQ>
The PC: < ACK> (/ <NAK> / <ENQ>)

Step7 transmit the message header


Device: <STX>FN Text <ETX> C1 C2 <CR> <LF>
The PC: < ACK> (/ <NAK>)
Text: H|\^&|| | |||||||P|1394-97<CR>
Wherein, P stands for “completely according to the Protocol”, 1394-97 is the edition of the protocol.

Step 8 transmit sample information


Device: <STX>FN Text <ETX> C1 C2 <CR> <LF>
The PC: < ACK> (/ <NAK>)
Text format: message Type | sequence number | sample number ||| patient name ||| sex <CR>
e.g. P|1|032989326|||Jill|||F<CR>
p.s. sex: F female, M male, U unknown.

Step 9 transmit category message


Device: <STX>FN Text <ETX> C1 C2 <CR> <LF>
The PC: < ACK> (/ <NAK>)
Text format: message Type | sequence number | sample number || test/ template name | priority || time || deliverer
doctor <CR>
e.g. O|1|032989326||^^^ALT|S||20080114154251||Jim<CR>
p.s. this time is sample-sent time.

Step 10 transmit the test result


Device: <STX>FN Text <ETX> (/ <ETB>) C1 C2 <CR> <LF>
The PC: < ACK> (/ <NAK>)
Text format: message Type | test name | result | unit | lower limit of reference to upper limit of reference| appraisal
|||| assayer doctor | test start time | test end time <CR>
e.g.R|1|^^^ALT|30.000|U/L|0.000 to 40.000|N||||Tom|20080114154251|20080114154251<CR>
p.s. the time is test time. Usually, result-recorded time is the test end time.

Step 11 transmit stop message


Device: L|1|F<CR>
The PC: < ACK> (/ <NAK>)
That is, transmit “L|1|F<CR>” as a message. “L” is the message type; “1” is the sequence number; “F” means it is the
final request of the whole process.

Step 5 ending the transmission


Device: <EOT>
The PC: < ACK>

Generally:
Message type in using: H header, Q query, P patient, O order, R result, L last,
Time format: YYYYMMDD or YYYYMMDDHHMMSS

Please consult standard ASTM E1394-97 if you need more information.


Appendix
Available text characters
(From ISO 8859-1)

You might also like