Detailed LIS Communication Protocol: // A Query Record
Detailed LIS Communication Protocol: // A Query Record
According to astm Protocols, Application layers virtually exchange messages (e.g. test
results), and a message is divided into multiple records at Presentation Layer, finally each
record is further divided into one or more frame at data link layer. One frame consists of
max. 240 record letters (bytes) and 7 bytes of delimiter and checksum data, so if a record
contains more than 240 letters, it has to be put into multiple frames.
The letters inside the brackets are record identifier. One record contains multiple fields
separated by separators(Generally the letter of ‘|’).
Each message should contain Header record and Terminator record, marking the
beginning and the end of the message, respectively.
Every kind of record starts with corresponding record identifier, and ends with [CR], as
described below:
// A Query record
Each Frame has a form as described below:
Here are the descriptions of how each kind of message is divided into multiple
records and the details of the dialogue between SF8000 and the server when exchanging
data.
SF8000 [STX]3O|1|^------000143254||^^^APTT\^^^PT--\^^^PT%-\^^^INR-
[CR][ETX][C1][C2][CR][LF] // Send the third frame, i.e., the Order record
Server [ACK]// successfully received
Exception descriptions:
The communication situations listed above are normal situations. Exceptions are listed
below:
When SF8000 is sending:
After SF8000 has sent one Frame, it waits for the reply from the server. If the server replies
[NAK], SF8000 will re-send current Frame. This cycle is repeated until a "Number of On
Error Retries" of six is reached. At this point SF8000 will send an [EOT] notifying the
server that the communication is aborted and displays an error message of
communication failure meaning that the communication circuit should be checked and
possibly needs to be repaired. After the communication circuit repaired, the action of
sending message may be re-started.
After SF8000 has sent one Frame, it waits for the reply from the server. If there is no reply
within 15 seconds, SF8000 will send an [EOT] notifying the server that the communication
is aborted and displays an error message of communication failure meaning that the
communication circuit should be checked and possibly needs to be repaired. After the
communication circuit repaired, the action of sending message may be re-started.
When SF8000 is Receiving:
If a complete frame is received it is checked for the right frame number and a correct
checksum. If a valid frame is received SF8000 will answer an [ACK], waiting for the arrival
of the next frame. If an Invalid frame is received SF8000 will answer a [NAK], waiting for
the arrival of current frame.
After SF8000 responded with an [ACK] or a [NAK], it waits for the arrival of the
next frame or the current frame, respectively. If, within 30s, neither Reception of a frame is
completed nor an [EOT] is received, SF8000 will generate an alarm notifying the operator
that the communication circuit should be checked and possibly needs to be repaired. After
the communication circuit repaired, SF8000 will be in the state of waiting for the arrival of
messages from the server.
If a [EOT] is received before the arrival of the Terminator record ,SF8000 will
generate an alarm notifying the operator that the server might have encountered a
technical failure, and discards the incomplete message, finally it enters a state of waiting
for the arrival of messages from the server.