This document describes the hardware and software interfaces for connecting the Konelab clinical chemistry analyzer to a laboratory information management system (LIMS) or laboratory automation system (LAS). It provides details on installing and configuring the ASTM and Konelab Online communication protocols for bidirectional data transfer with a LIMS. It also describes the message record formats, error handling processes, and examples of communication sequences between the Konelab and an external system.
This document describes the hardware and software interfaces for connecting the Konelab clinical chemistry analyzer to a laboratory information management system (LIMS) or laboratory automation system (LAS). It provides details on installing and configuring the ASTM and Konelab Online communication protocols for bidirectional data transfer with a LIMS. It also describes the message record formats, error handling processes, and examples of communication sequences between the Konelab and an external system.
This document describes the hardware and software interfaces for connecting the Konelab clinical chemistry analyzer to a laboratory information management system (LIMS) or laboratory automation system (LAS). It provides details on installing and configuring the ASTM and Konelab Online communication protocols for bidirectional data transfer with a LIMS. It also describes the message record formats, error handling processes, and examples of communication sequences between the Konelab and an external system.
INTERFACES Code: 895304-4301 Manual version: H Date: 1.10.2003 The CE mark attached on Konelab indicates the conformity with the EMC (electromagnetic compatibility) directive 89/336/EC. Thermo Electron Oy, Clinical Diagnostics Clinical Chemistry & Automation Systems Ratastie 2, P.O. Box 100 FIN-01621 VANTAA, Finland Tel.: +358 9 329 100 Fax: +358 9 3291 0300 www.thermo.com/konelab Information in this manual is subject to change without prior notice. Konelab LIMS and LAS Interfaces 23.04.03 895304-4301 1 I LIMS INTERFACE 1. HARDWARE INTERFACE .......................................................................................................... 1 1.1 HOW TO INSTALL AND CONFIGURE THE ASTM SOFTWARE ..............................................2 1.1.1 INSTALLATION..........................................................................................................................2 1.1.2 CONFIGURATION.....................................................................................................................3 2. Konelab ONLINE (=KONE ONLINE) PROTOCOL................................................................... 4 2.1 BI-DIRECTIONAL MODE ...............................................................................................................4 2.1.1 COMMUNICATION RECORDS ................................................................................................5 2.1.1.1 INITIALISATION RECORDS..............................................................................................................5 2.1.1.2 PATIENT INFORMATION RECORD .................................................................................................6 2.1.1.3 SAMPLE INFORMATION RECORD..................................................................................................7 2.1.1.4 TEST ANALYSIS RECORD ................................................................................................................7 2.1.1.5 RESULT RECORD................................................................................................................................8 2.1.1.6 FINISHING RECORD...........................................................................................................................8 2.1.2 BI-DIRECTIONAL PROTOCOLS ..............................................................................................9 2.1.3 DATA VALIDITY CHECK........................................................................................................14 2.1.3.1 CHECK SUM ......................................................................................................................................14 2.1.4 TIMING REQUIREMENTS......................................................................................................14 2.2 EXAMPLES OF COMMUNICATION ...........................................................................................15 2.2.1 SAMPLE AND TEST DATA ENTRY.........................................................................................15 2.2.2 RECEIVING NEW READY RESULTS......................................................................................16 2.2.3 RECEIVING ALL READY RESULTS .......................................................................................17 2.2.4 RECEIVING RESULTS FOR A SPECIFIC SAMPLE ..............................................................17 2.2.5 SENDING TEST DATA FOR OLD SAMPLES .........................................................................18 2.2.6 ENQUIRING TESTS IN USE IN THE ANALYSER ..................................................................19 2.3 ERROR HANDLING.......................................................................................................................20 2.3.1 ERROR RECORD.....................................................................................................................20 2.3.2 RESULT ERROR CODES.........................................................................................................21 2.3.3 COMMUNICATION ERROR CODES......................................................................................21 2.3.4 ON LINE ERROR CODES........................................................................................................22 2.3.5 EXAMPLES OF ERROR HANDLING......................................................................................24 2.4 REQUESTING A CALCULATED TEST .......................................................................................25 3. ASTM PROTOCOL ................................................................................................................... 27 3.1 FEATURES......................................................................................................................................27 3.2 ASTM IN KONELAB..........................................................................................................................28 3.2.1 ASTM 1394 91 STRUCTURE OF MESSAGES .....................................................................28 3.2.1.1 Header record (level 0).........................................................................................................................28 3.2.1.2 Message terminator record (level 0).....................................................................................................29 3.2.1.3 Patient information record (level 1) .....................................................................................................29 3.2.1.4 Test order record (level 2)....................................................................................................................31 3.2.1.5 Result record (level 3)..........................................................................................................................33 3.2.1.6 Comment record (level 4) used with the Result Record.......................................................................35 3.2.1.7 Comment record (level 3) used with transmission related error conditions .........................................36 3.2.1.8 Request information record (level 1)....................................................................................................37 3.2.2 FIELD LENGTHS USED BY Konelab .....................................................................................38 3.2.3 EXAMPLES OF COMMUNICATION BETWEEN Konelab AND THE HOST COMPUTER.............................................................................................................................................39 Konelab LIMS and LAS Interfaces 23.04.03 895304-4301 2 II LAS INTERFACE 4. KONELAB / LAS INTERFACE .................................................................................................. 44 4.1 HARDWARE INTERFACE ............................................................................................................44 4.2 GENERAL DESCRIPTION.............................................................................................................44 4.2.1 MESSAGE RECORD FORMAT ...............................................................................................44 4.2.2 CALCULATION OF CHECKSUM...........................................................................................45 4.2.3 SEQUENCE FOR INITIALISING THE COMMUNICATION INTERFACE............................46 4.2.4 ANALYSER BOOT SEQUENCE...............................................................................................46 4.2.5 KUSTI STATES AND ERROR RECOVERY .............................................................................47 4.3. COMMUNICATION RECORDS....................................................................................................49 4.3.1 INITIALISATION RECORD.....................................................................................................49 4.3.2 ILLEGAL COMMAND RECORD.............................................................................................49 4.3.3 ANALYSER STATUS QUERY RECORD..................................................................................49 4.3.4 ANALYSER STATUS RECORD................................................................................................50 4.3.5 ASPIRATE SAMPLE RECORD................................................................................................50 4.3.6 SAMPLE DISPENSING COMPLETE RECORD......................................................................51 4.3.7 REINITIALISE COMMUNICATION RECORD .......................................................................51 4.4 COMMUNICATION EXAMPLES .................................................................................................52 4.4.1 INITIALISATION SEQUENCE.................................................................................................52 4.4.2 SAMPLE ASPIRATION SEQUENCE FOR TWO SAMPLES ...................................................52 4.4.3 SAMPLE ASPIRATION FAILS, RECOVERY SUCCESSFUL 1...............................................53 4.4.4 SAMPLE ASPIRATION FAILS, RECOVERY SUCCESSFUL 2...............................................54 4.4.5 SAMPLE ASPIRATION FAILS, RECOVERY UNSUCCESSFUL ............................................55 Konelab LIMS and LAS Interfaces 29.09.03 895304-4301 1 1. HARDWARE INTERFACE The Konelab LIMS hardware interface works through serial communication channel. Figure 1: The connectors for serial communication channels are at the back of the Konelab workstation. The connectors are 9-pin male D-connectors. The channel (COM1,COM2) as well as the LIMS protocol (Konelab Online or ASTM) and communication parameters (baud rate, number of bits in character, number of start and stop bits and the use of parity) to be used can be configured in the Konelab LIMS Configuration window. LIMS Configuration Main window F8/F1 Configuration Configuration F7 LIMS Configuration LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 2 The signals needed at the Konelab end of cable Pin 2 Receive Data Pin 3 Transmit Data Pin 5 Ground An example of the cabling between Konelab and LIMS Konelab and a PC (RS-232) Konelab PC Pin 2 RxD--------------------------- TxD Pin 3 TxD----------------------------- RxD Pin 5 Gnd ----------------------------- Gnd 1.1 HOW TO INSTALL AND CONFIGURE THE ASTM SOFTWARE 1.1.1 INSTALLATION The ASTM software can be taken into use after the Konelab V3.0 software is installed. If Konelab application is running, close the application by selecting Management and Exit. Select Start->Programs->Konelab Lims Selection and select ASTM from there. Now the LIMS interface will use ASTM software instead of Konelab Online software. The ASTM configurations should be checked after starting the Konelab application again, because the configuration file is updated in start of the application. The cable should be made according to the documentation of LIMS system in use. This example describes the minimum cable connections needed. Some computer systems may require some additional signals connected locally within connector. Please refer to your LIMS documentation for further information. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 3 1.1.2 CONFIGURATION ASTM software has additional configurations as compared to Konelab Online software. The configuration file is Konelab.ini and it is in folder C:\Konelab\Config. The changes to the configuration are: LimsProtocol = ASTM - This is a new choice for protocol. LimsAutomaticResultSending = YES - When YES the new results are automatically send to Laboratory computer. LimsThreadPriority = LOW - This enables the Lims thread to use lower priority and give other software processes more time. LimsInterruptible = NO - When YES the ASTM protocol allows the receiver to ask for interruption of sending information. LimsHostQuery =YES - When YES the Konelab software will automatically send a query for sample information and requests when new sample is introduced into Konelab. SentryWaitsLimsRequests = YES - When YES the sample entry function waits for the response to a query when new sample is introduced. ASTMControlResultSending = NO - When YES the new control sample analysis results are automatically send to Laboratory computer. ASTMStandardResultSending = NO - When YES the new calibrator sample analysis results are automatically send to Laboratory computer. SampleIdSendingDelay = 0 - If value is not 0, Konelab will use this delay between successive sending of new sample Id's. This can be used to ease the burden on Laboratory computer when e.g. a full segment with 14 samples is introduced. The value is expressed in milliseconds. ResultSendingDelay = 0 - If value is not 0, Konelab will use this delay between successive sending of new sample results. This can be used to ease the burden on Laboratory computer. The value is expressed in milliseconds. In order to take ASTM protocol in use the configuration file should be edited manually. Close the Konelab application by selecting MANAGEMENT and EXIT from there. Wait for the Konelab application to shut down. Start Windows NT Explorer by selecting Start-> Programs->Windows NT Explorer. Select the folder C:\Konelab\Config and on the right side of Explorer display should be seen files Konelab and UserText. Double click with mouse on Konelab file. Now the Notepad program should open with the Konelab.ini file. Change the configuration manually and after that save the modified file selecting File->Save. Now the Konelab software can be started again with ASTM configurations. The ASTM software supports sending results on ready sample or on ready request basis. The sending of results on ready request basis will load the interface heavily and it is recommended that sending results by ready sample should be used. This selection can be done through the Konelab Configuration function. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 4 2. Konelab ONLINE (=KONE ONLINE) PROTOCOL 2.1 BI-DIRECTIONAL MODE Konelab uses bi-directional data communication between the analyser and the external computer i.e. both an external computer and the analyser can communicate with each other. For example, the external computer can send test requests to Konelab and the analyser can send completed results to the computer. Bi-directional mode consists of seven different functions: F Function 1 is used when Patient data, Sample data and Test data is sent to the analyser. F Function 2 is used to send Sample and Test data only to the analyser. Control and Calibrator sample data can also be sent to the analyser using this function. F Function 3 is used when a laboratory computer wishes to receive all newly completed results which have not already been sent. F Function 4 is used when a laboratory computer wishes to receive all results completed that day. F Function 5 is used when a laboratory computer wishes to receive all results for a particular sample. Complete and incomplete tests are sent by the analyser. F Function 6 is used for request inquiry i.e. a laboratory computer wishes to know which patient samples exist in the database of the analyser. The laboratory computer can then send new requests. F Function 7 is used when a laboratory computer wishes to know which tests exist in the database of the analyser. These functions are activated using the initialisation records. Refer to section 2.1.1.1. The analyser is always acting as co-operator and the computer is the host. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 5 2.1.1 COMMUNICATION RECORDS The following records are used when the analyser and the host computer communicates with each other. 2.1.1.1 INITIALISATION RECORDS Initialisation records are activating commands which the host computer sends to the analyser when the communication begins. INITIALISATION RECORD 1 This record is used when Patient data, Sample data and Test data is sent to the analyser. :I:PR1/C/ C = check sum, refer to section 2.1.3.1. INITIALISATION RECORD 2 This record is used to send Sample and Test data only to the analyser. Control and Calibrator sample data can also be sent to the analyser using this initialisation record. :I:PR2/C/ INITIALISATION RECORD 3 This record is used when a laboratory computer wishes to receive all newly completed results which have not already been sent. :I:PR3/C/ INITIALISATION RECORD 4 This record is used when a laboratory computer wishes to receive all results completed that day. :I:PR4/C/ INITIALISATION RECORD 5 This record is used when a laboratory computer wishes to receive all results for a particular sample. Complete and incomplete tests are sent by the analyser. :I:PR5/C/ INITIALISATION RECORD 6 This record is used when a laboratory computer wishes to know which patient samples exist on the database of the analyser. The laboratory computer can then send new requests. :I:PR6/C/ LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 6 INITIALISATION RECORD 7 This record is used when a laboratory computer wishes to know which tests exist on the database of the analyser. :I:PR7/C/ 2.1.1.2 PATIENT INFORMATION RECORD :P:nn..n/ii..i/M or F/A or C/b..b/ss..s/n or o/C/ P - identifies the record to be a Patient Information Record nn..n - Patient Name (up to 24 characters) ii..i - Patient Identification (up to 16 characters) M - Male (M) or Female (F) Konelab ignores this; reference class is always 0 A - Adult (A) or Child (C) Konelab ignores this; reference class is always 0 bb..b - Age or Date of Birth (up to 8 characters) ss..s - Sender name (up to 24 characters) n or o - New (n) or Old (o) (1 character) C - check sum, refer to section 2.1.3.1. The slash (/) must be entered into the string, since it is the field delimiter. This means that the number of slashes in a record is always constant. Note that the slash is a forbidden character inside a field. For example, if no sender information and no age information is sent, the Data String looks like: :P:nn..n/ii..i/M/A///n or o/C/ New or Old: If the switch is N or n - the analyser expects the patient to be new. If already present, an error message is sent to the computer. If the switch is O or o and the patient does not exist in the analyser, again an error message is sent. If the switch is omitted the patient is accepted in either case LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 7 2.1.1.3 SAMPLE INFORMATION RECORD :S:ii..i/pn/pp/st/nn/dd..d/tt..t/rrr/n or o/C/ S - identifies the record to be a sample information record ii..i - sample identification (up to 16 characters) pn - sample segment number (up to 2 characters) pp - sample segment position (up to 3 characters) st - sample type (up to 2 characters) nn - sample note data e.g. icteric (ic), haemolysed (HE), a user defined character code, handled only as an information string (up to 2 characters) dd..d - collection date, a user defined character code, handled only as an information string (up to 8 characters) tt..t - collection time, a user defined character code, handled only as an information string (up to 5 characters) rrr - dilution ratio (format is 1 + rrr) (up to 3 characters) n or o - new/old (1 character) C - check sum, refer to section 2.1.3.1. 2.1.1.4 TEST ANALYSIS RECORD :A:xx..x/!/yy..y/..../C/ A - identifies the record to be the test analysis record ! - STAT identifier for following request (1 character) xx..x yy..y,etc - test identification (up to 8 characters) C - Check sum, refer to section 2.1.3.1. The STAT identifier indicates that the following request must be performed urgently. This is valid only for one request following the STAT identifier. If there is a STAT profile to be sent, each test identification must have its separate STAT identifier. If the '!' is omitted then the request is performed routinely, i.e. :A:xx..x/yy..y/.../C/ Sample Type: If the type is @S, a calibrator name (i.e. S0...S19) is expected as the id. If the identification is not a calibrator name, an error message will be sent. If the type is @C, a control name (i.e. C1...C19) is expected as the id. If the identification is not a control name, an error message will be sent. New or Old: If the switch is N or n - the analyser expects the sample to be new. If already present, an error message is sent to the computer. If the switch is O or o and the sample does not exist in the analyser, again an error message is sent. If the switch is omitted, the sample is accepted in either case. Use the same test identification as in test's parameters. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 8 2.1.1.5 RESULT RECORD :R:ii..i/aa..a/rr..r/ddd/ee..e/aa..a/rr..r///.../C/ R - identifies the record to be a result type record ii..i - sample identification, a shorter identification is filled with blanks by the analyser (16 characters) aa..a - analysis identification, a shorter identification is filled with blanks by the analyser (8 characters) rr..r - result, right justified, field is filled with blanks by the analyser. A possible minus sign is leading the most significant character. The 6 characters might include a decimal point which position is defined by the parameter 'Number of decimals' in the TEST DEFINITION window. (6 characters) ddd - dilution ratio (format is 1+ddd), total dilution including both manual and automatic dilution (up to 3 characters) ee..e - result error codes, refer to section 2.3.2. (up to 10 characters) If the result was obtained without a dilution, the dilution field is skipped (/ remains). If the result has no error, the error field is skipped, (/ remains). 2.1.1.6 FINISHING RECORD Finishing record is used in data sending as the last record to indicate to receiver that communication is over. The receiver must always acknowledge finishing record by <ACK>. Finishing record has always the same format: :F:PR/C/ where C is the check sum. Refer to section 2.1.3.1 for the calculation of the check sum. SPECIAL NOTE: The most significant digit is lost if the result includes more than 6 characters. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 9 2.1.2 BI-DIRECTIONAL PROTOCOLS PROTOCOL FOR SENDING PATIENT, SAMPLE AND TEST DATA TO THE ANALYSER *A number of Test Analysis records may follow, which must be acknowledged by (ACK) LABORATORY COMPUTER ANALYSER (Initialization record 1)(CR)(LF) (ACK) (Patient info record)(CR)(LF) (ACK) (Sample info record)(CR)(LF) (ACK) (Test analysis record)*(CR)(LF) (ACK) (Sample info record)(CR)(LF) (ACK) (Test analysis record)*(CR)(LF) (ACK) (Patient info record)(CR)(LF) (ACK) (Sample info record)(CR)(LF) (ACK) (Test analysis record)*(CR)(LF) (ACK) (Finishing record)(CR)(LF) (ACK) LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 10 PROTOCOL FOR SENDING SAMPLE AND TEST DATA TO THE ANALYSER * A number of Test Analysis records may follow, which must be acknowledged by (ACK). PROTOCOL FOR RECEIVING NEWLY COMPLETED RESULTS FROM THE ANALYSER * A number of Result Records may follow, which must be acknowledged by (ACK). LABORATORY COMPUTER ANALYSER (Initialization record 3)(CR)(LF) (ACK) (Result record)*(CR)(LF) (ACK) (Finishing record)(CR)(LF) (ACK) LABORATORY COMPUTER ANALYSER (Initialization record 2)(CR)(LF) (ACK) (Sample info record)(CR)(LF) (ACK) (Test analysis record)*(CR)(LF) (ACK) (Sample info record)(CR)(LF) (ACK) (Test analysis record)*(CR)(LF) (ACK) (Finishing record)(CR)(LF) (ACK) LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 11 PROTOCOL FOR RECEIVING ALL COMPLETED RESULTS FROM THE ANALYSER, I.E. RECOVERY WHEN THE ANALYSER OR COMPUTER GOES DOWN * A number of Result Records may follow, which must be acknowledged by (ACK). LABORATORY COMPUTER ANALYSER (Initialization record 4)(CR)(LF) (ACK) (Result record)*(CR)(LF) (ACK) (Finishing record)(CR)(LF) (ACK) LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 12 PROTOCOL FOR RECEIVING RESULTS ON A SPECIFIC SAMPLE, I.E. STAT SAMPLE * A number of Result Records may follow, which must be acknowledged by (ACK). ** A short delay (10 ms) must exist in these phases. LABORATORY COMPUTER ANALYSER (Initialization record 5)(CR)(LF) (ACK) (Sample info record)(CR)(LF) (ACK) (Result record)*(CR)(LF) (ACK) (Finishing record)(CR)(LF) (ACK) *** (Sample info record)(CR)(LF) (ACK) (Result record)*(CR)(LF) (ACK) (Finishing record)(CR)(LF) (ACK) *** (Finishing record)(CR)(LF) (ACK) LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 13 PROTOCOL FOR SENDING REQUESTS FOR OLD SAMPLES * A number of Test Analysis Records may follow, which must be acknowledged by (ACK). ** A short delay must exist in these phases. PROTOCOL FOR ENQUIRING TESTS IN USE IN THE ANALYSER * A number of Test Analysis Records may follow, which must be acknowledged by (ACK). LABORATORY COMPUTER ANALYSER (Initialization record 6)(CR)(LF) (ACK) = = 1 = = (Sample info record)*(CR)(LF) (ACK) ** (Test analysis record)(CR)(LF) (ACK) (Finishing record)(CR)(LF) (ACK) = = 2 = = (Finishing record)(CR)(LF) (ACK) Sample info record is identical to the record used by the laboratory computer to send sample info. The part between '== 1 ==' and '== 2 ==' is repeated until all the samples in the analyser's database have been processed, excluding calibrators and controls. LABORATORY COMPUTER ANALYSER (Initialization record 7)(CR)(LF) (ACK) (Test analysis record)*(CR)(LF) (ACK) (Finishing record)(CR)(LF) (ACK) Test analysis record is identical to the record used by the host to send requests, except it never contains the STAT identifier ('!'). LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 14 2.1.3 DATA VALIDITY CHECK The communication is full duplex and ASCII characters are used, but the user can select the number of data bits, stop bits, parity and speed in the Configuration window. Each record begins with a colon ':' and ends with a check character 'C' followed by a slash '/', carriage return and line feed. Maximum record length is 132, including check sum. 2.1.3.1 CHECK SUM The check sum is calculated from the colon to the last slash before the check sum character. The check sum is defined by the following formula (decimal system): C = i
(C i - 32) mod 64
+ 32 where C i = each character EXAMPLE OF CALCULATING A CHECK SUM String without check sum : I : P R 2 / ASCII VALUE 58 73 58 80 82 50 47 SUBTRACT 32 26 41 26 48 50 18 15 TOTAL 26 67 93 141 191 209 224 MODULUS 64 26 3 29 13 63 17 32 ADD 32 64 CHARACTER @ String with check sum and delimiter : I : P R 2 / @ / 2.1.4 TIMING REQUIREMENTS The host computer has max. 60 seconds time for answering by (ACK) or (NAK). Otherwise the protocol has to be restarted. The time the analyser needs for validation of a record depends on the situation and in the worst case it may take few minutes. Recommended time out value is at least 3 minutes when waiting the response from the analyser. When the host computer asks results from the analyser with certain intervals, the recommended minimum time between consecutive asking is at least 5 minutes. The string begins with the : character and includes all characters up to, and including, the / character before the check sum character. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 15 2.2 EXAMPLES OF COMMUNICATION This section gives brief examples of the protocol as it would be used in practice. The examples are only intended to give an indication of the stages involved in each operation, the data transmitted is arbitrary. The direction in which the message is going. means from the computer to the analyser means from the analyser to the computer 2.2.1 SAMPLE AND TEST DATA ENTRY WITH PATIENT DATA LABORATORY COMPUTER ANALYSER :I:PR1/?/ ACK :P:SMITH JOHN/4///30/2/N/8/ ACK :S:6///PL/HA/97-12-18/12:13/0/N/7/ ACK :A:ISE/ALB/ALK.PH/ALT/DBIL/GGT/PROT/T/ ACK :P:JONES SUSAN/23423///97-12-08/3/O/_/ ACK :S:12/2/1/SE//97-12-07/09:45/0/O/)/ ACK :A:!/ALB/!/ALK.PH/!/ALT/!/DBIL/!/GGT/@/ ACK :F:PR/+/ ACK LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 16 WITHOUT PATIENT DATA 2.2.2 RECEIVING NEW READY RESULTS LABORATORY COMPUTER ANALYSER :I:PR2/@/ ACK :S:6///PL/HA/97-12-18/12:13/0/N/7/ ACK :A:ISE/ALB/ALK.PH/ALT/DBIL/GGT/PROT/T/ ACK :S:12/2/1/SE//97-12-07/09:45/0/O/)/ ACK :A:!/ALB/!/ALK.PH/!/ALT/!/DBIL/!/GGT/@/ ACK :F:PR/+/ ACK Sample number 12 has been allocated to position 1 on segment 2, but sample number 6 will be allocated to a position when the sample is entered to the analyser. Also, the tests for sample number 12 are to be performed as STAT tests. LABORATORY COMPUTER ANALYSER :I:PR3/A/ ACK :R:2/ K / 4.7///NA /136//102; 137/CL///002;/-/ ACK :R:2 /ALB / 43.3///PROT / 48.4//102; 60/^/ ACK :F:PR/+/ ACK Results which had been transmitted previously will not be sent again. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 17 2.2.3 RECEIVING ALL READY RESULTS 2.2.4 RECEIVING RESULTS FOR A SPECIFIC SAMPLE LABORATORY COMPUTER ANALYSER :I:PR4/B/ ACK :R:1/ LDH / 600/5.0//CREA /67///G/ ACK :R:2 /K / 4.7///NA / 136//102; 137/CL ///002;/-/ ACK :R3 /ALB / 43.3///PROT / 48.4//102; 60/^/ ACK :F:PR/+/ ACK The results for sample 1 had been transmitted previously but were sent again along with new results for samples 2 and 3. LABORATORY COMPUTER ANALYSER :I:PR5/C/ ACK :S:6/// PL/HA/97-12-18/12:13/0/N/7/ ACK :R:6 /ALB ///001;/PROT / 4 8.4//102; 60.0/C/ ACK :F:PR/+/ ACK :F:PR/+/ ACK The error message against the ALB test indicates that the result is not ready. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 18 2.2.5 SENDING TEST DATA FOR OLD SAMPLES LABORATORY COMPUTER ANALYSER :I:PR6/D/ ACK :S:6 / 1/ 19/PL/HA/97-12-19/14:55/ 0//D/ ACK :A:GLUC/CREA/CA/ALB/CHOL/_/ ACK :F:PR/+/ ACK :S:12 / 1/20/SE/CO/97-12-13/11:35/ 0//N/ ACK :A:CA/ALB/CHOL/;/ ACK :F:PR/+/ ACK :F:PR/+/ ACK LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 19 2.2.6 ENQUIRING TESTS IN USE IN THE ANALYSER LABORATORY COMPUTER ANALYSER :I:PR7/E/ ACK :A:ALT /ALB / ALP /AMYL / AST /CA /CHOL /CL /CPK /CREA /CRP / FE / GGT /F/ ACK :A:GLUC /K /LDH /LI / MG /NA /P /PH / TBIL/ TPROT / TRIGLY /UR AC /J/ ACK :F:PR/+/ ACK LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 20 2.3 ERROR HANDLING In the event of an error in the data transmission, the analyser returns an error record instead of ACK. This situation could arise for instance when the laboratory computer sends a test analysis record for a test which does not exist in the analyser. For example: When the laboratory computer receives an error record, the analyser expects a finishing record to be sent back to acknowledge the error situation. The analyser acknowledges this by sending back an ACK. After this, the protocol begins again with the laboratory computer starting the bidding with the initialisation record. All data up to the ACK sent by the analyser prior to the error is saved in the analyser, including also the requests at the beginning of an analysis record up to the wrong test identification. 2.3.1 ERROR RECORD :E:xx..x/C/ E - identifies the record to be an error record xx..x - communication error code, refer to section 2.3.3 (up to 30 characters) LABORATORY COMPUTER ANALYSER (Initialization record 1)(CR)(LF) (ACK) (Patient info record)(CR)(LF) (ACK) (Sample info record)(CR)(LF) (ACK) (Test analysis record)(CR)(LF) - error in this record (Error record)(CR)(LF) (ACK) (Finishing record)(CR)(LF) (ACK) LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 21 2.3.2 RESULT ERROR CODES ERROR CODE EXPLANATION 001; result not ready, in this case result is skipped in result record 002; result rejected, result will never come, e.g. one ISE electrode was disabled 003; screening test not measurable, condition due to screening test rejection 101;xx..x result over reference, xx..x is the limit 102;xx..x result under reference, xx..x is the limit 2.3.3 COMMUNICATION ERROR CODES ERROR CODES EXPLANATION 001; format error, this error occurs when the laboratory computer has three times sent a record which either has wrong check sum or is too long (> 132 characters) 003; invalid initialisation record 004; invalid record identification 005; protocol error 101;x..xx invalid sender identification, x..xx means the invalid sender id 103;x..xx invalid sample identification, x..xx means the invalid sample id 104;x..xx invalid sample plate position, x..xx means the invalid position 105;x..xx invalid analysis identification, x..xx means the invalid id 106;x..xx calibrator or control name does not exist, x..xx is the name 107;x..xx invalid sample type, x..xx is the type - this error occurs when @C or @S is the sample type when initialisation record 1 is used 108; number of samples / patient exceeded, max nbr is 10 201;x..xx sample segment position is reserved, x..xx is the sample segment position 210;x..xx patient already exists, x..xx is the patient name 211;x..xx patient does not exist, x..xx is the patient name 220;x..xx sample already exists, x..xx is the sample id 221;x..xx sample does not exist, x..xx is the sample id LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 22 2.3.4 ON LINE ERROR CODES The message 'Online' is given on the Main window during data transmission. If there are errors on the transmission, error messages are given via the analyser. 32 WRONG DATA FROM AN OTHER PROCESS (LIMS) F Internal software problem in the database. Restart the workstation. 401 SERIAL LINE PARAMETER ERROR (LIMS) F Check the serial interface parameters in the Configuration window. 402 WRONG SERIAL PORT (LIMS) F Check the serial interface parameters in the Configuration window. 403 WRITE ERROR (LIMS) 407 TRANSMISSION ERROR (LIMS) 409 MESSAGE BUFFER ERROR (LIMS) External computer has received the data but transmission has been detected to be incorrect. F Possible causes E.g. electronic malfunction, software error, initialisation error or power failure. Check the cable and cable connection. If the problem persists, print the reports and call service. 404 READ ERROR (LIMS) The analyser has received the data but transmission has been recognised to be incorrect. F Possible causes E.g. electronic malfunction, software error, initialisation error or power failure. Check the cable and cable connection. If the problem persists, print the reports and call service. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 23 405 SYNCRONIZATION ERROR (LIMS) The analyser received a data record 1 while it was expecting an ACK character or it received ACK/NAK while expecting a data record. F Possible causes E.g. faulty cable, electronic malfunction, software error. Check the cable and cable connection. If the problem persists, print the reports and call service. 1 )
A data record is a string of any characters beginning with ':' and ending with (0D hex) or a string of any characters whose length exceeds the size of input buffer (currently 132). 406 COMMUNICATION TIMEOUT (LIMS) External computer did not answer in the allowed time. F Possible causes E.g. faulty cable, electronic malfunction or wrong initialisation data. Check the cable and cable connection. If the problem persists, print the reports and call service. 408 ERROR WHEN DOING DATABASE OPERATION (LIMS) F Warning about internal software problem in the database. Analysis continues. If the problem persists restart the workstation. 410 LIMS TYPE MISMATCH BETWEEN LIMS PROCESS AND KONELAB.INI F To continue using the Konelab program, first exit from it by selecting F8/F3 in the Management window. Then select the correct LIMS process from Start: Programs: lims selection. Finally, start the Konelab program again by clicking the konelab icon. 999 LIMS ERROR MESSAGE (%u) - %u MEANS THE ERROR NUMBER - Software problem. Analysis continues. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 24 2.3.5 EXAMPLES OF ERROR HANDLING INVALID CHECK SUM ERROR IN DATA TRANSMITTED LABORATORY COMPUTER ANALYSER :I:PR2/?/ NAK :I:PR2/@/ ACK The check sum in the first message was incorrect, so the analyser requested the message to be sent again. LABORATORY COMPUTER ANALYSER :I:PR2/@/ ACK :S:126///SE//97-12-18/12:13/0/N/O/ ACK :A:XXX/PROT/@/ :E:105;XXX /A/ ACK :F:PR/+/ ACK The analyser does not recognise XXX as a valid test id and so it sends error message 105 which the computer acknowledges. The computer would probably now try to send the other tests for samples and inform the user of the problem. LIMS AND LAS INTERFACES Konelab 29.09.03 895304-4301 25 2.4 REQUESTING A CALCULATED TEST Calculated tests can be requested online. All needed test requests belonging to the calculated test are generated automatically. The analyser is trying to use the latest introduced samples. If it doesn't success in that it uses the older ones. The following requirements for requesting calculated tests online must be fulfilled: 1) Tests All tests including into the calculated test and the calculated test itself must be defined in use. All tests including into the calculated test and the calculated test itself must have the online name. This concerns also external tests belonging to the calculated test. To define a calculated test refer to Konelab Reference manual, chapter 4.1.4. 2) Samples First introduce samples with the right sample types, after that give the test request for the calculated test. The right sample type here means the sample type belonging to the calculated test request. A B A B If requirements are not fulfilled the error message '105: Analysing error' is appearing. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 26 An example of requesting a calculated (patient) test (=CC) and a calculated (sample) test (=LDL) via LIMS: :I:PR1/?/ :P:Patient1///////3/ :S:Sample1///S//////4/ :S:Sample2///U//////7/ :A:CC/J/ :F:PR/+/ :I:PR2/@/ :S:Sample3///S//////6/ :A:LDL/@/ :F:PR/+/ Reporting Reporting gives result of calculated (patient) test according to a patient. In addition the external test is reported according to a patient. Results of tests including into the calculated test are reported separately according to samples. When a calculated (patient) test has been requested there must be a PR1-record or the patient must have been introduced in the Patient entry window in the user interface. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 27 3. ASTM PROTOCOL The ASTM Laboratory Information Management System interface is based on the following ASTM standards: ASTM 1394-91 "Standard Specification for Transferring Information Between Clinical Instruments and Computer Systems" and ASTM 1381-95 "Standard Specification for Low-Level Protocol to Transfer Messages Between Clinical Laboratory Instruments and Computer Systems. 3.1 FEATURES The physical transmission layer is implemented according to ASTM 1381. The cable connector is a 9-pin male connector instead of the standard 25-pin male connector. The logical layer contains selected portions of ASTM 1394. The detailed record structure is described in section 3.2.1 ASTM in Konelab: ASTM 1394-91 Structure of messages. The main features are: - automatic request for sample information when new sample is introduced to the instrument (configurable ON/OFF) - automatic sending of results either on ready sample or ready request basis (configurable reporting basis and ON/OFF) - automatic sending of control sample results (configurable ON/OFF) - automatic sending of calibrator sample results (configurable ON/OFF) - response to sample information requests from Laboratory computer - response to control sample information requests from Laboratory computer - response to sample information received from Laboratory computer - cancelling of requests through ASTM by Laboratory computer - error situation management LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 28 3.2 ASTM in Konelab 3.2.1 ASTM 1394 91 STRUCTURE OF MESSAGES Following sections show the ASTM records used by Konelab. The tables in sections include field name and number, next two fields has the information about the fields usage by the host or the instrument, and a comment on use of the field. If the field is optional the mark at usage information is between brackets. Host can send all fields, but only the ones with mark are processed. 3.2.1.1 Header record (level 0) Field Name No Host Instr. Comment Record type ID 1 X X Always H. Starts every message. Note: no delimiter between the first and the second field Delimiter definition 2 X X Field, repeat, component and escape delimiters Message control ID 3 - - Access password 4 - - Sender name or ID 5 - - - X X X Instrument type 60/30/20 ^instrument ID InstrumentData.iId ^software version Get_version ? Sender street address 6 - - Reserved field 7 - - Sender telephone number 8 - - Characteristic s of sender 9 - - Receiver ID 10 - - Comment or special instructions 11 - - Processing ID 12 X X X X X X X X P production T training D debugging Q QC Version No. 13 - - Date and time of message 14 - (X) Form YYYYMMDDHHMMSS. Only in debug mode LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 29 3.2.1.2 Message terminator record (level 0) Field Name No Host Instr. Comment Record type ID 1 X X Always L. Ends every message. Sequence number 2 X X Always 1. One terminator per message. Termination code 3 (X) X X X - - - (X) X X X X X X N or missing normal termination T sender aborted R receiver requested abort E unknown error Q error in last request for information I no information available from last query F last request for information processed 3.2.1.3 Patient information record (level 1) Field Name No Host Instr. Comment Record type ID 1 X X Always P. Sequence number 2 X X Running number within Message. Starts with 1. Practice assigned patient ID 3 (X) (X) If no code is given, this gets the value of Patient name. PatientData.sCode Laboratory assigned patient ID 4 - - Patient ID No. 3 5 - - Patient name 6 (X) - - - - (X) - - - - Last name ^First name ^middle name or initial ^suffix ^title Only one text field. The whole name should be given there. Optional if no patient relates to sample. PatientData.sName Mothers maiden name 7 - - Date of birth 8 (X) (X) Form YYYYMMDD. PatientData.acBirthDate Patient sex 9 (X) - RefClassData.sName Patient race- ethnic origin 10 - - Patient address 11 - - Reserved field 12 - - Patient telephone number 13 - - Attending physician ID 14 - - Special field 1 15 - - Special field 2 16 - - LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 30 Patient height 17 - - Patient weight 18 - - Patients known or suspected diagnosis 19 - - Patient active medications 20 - - Patients diet 21 - - Practice field 1 22 - - Practice field 2 23 - - Admission or discharge dates 24 - - Admission status 25 - - Location 26 (X) (X) SenderData.sID Native of alternative diagnostic code and classifiers 27 - - Alternative diagnostic code and classification 28 - - Patient religion 29 - - Marital status 30 - - Isolation status 31 - - Language 32 - - Hospital service 33 - - Hospital institution 34 - - Dosage category 35 - - LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 31 3.2.1.4 Test order record (level 2) Field Name No Host Instr. Comment Record type ID 1 X X Always O. Sequence number 2 X X Running number within Patient information. Starts with 1. Specimen ID 3 (X) (X) SpecimenID^ManualDilution^Segment^P osition Optional if no sample in order. Mapping to Konelab internal presentation: SpecimenID PatientSampleData.sID ManualDilution PatientSampleData.fManualDilRatio Segment StorageCollectionData.iId Position StorageItemData.ucPosition If ManualDilution, Segment and Position information is omitted, the value of 0 will be used for each. Segment value 0 with position value 0 refer to a virtual collection and can be used safely, when no actual position is known. Instrument specimen ID 4 - - Universal test ID 5 - - - X - - - - X X Universal test ID ^universal test name ^universal test ID type ^manufacturer defined test code TestData.sOnlineName ^auto-dilution factor Multiple tests can be ordered separated by repeat delimiter. Priority 6 (X) (X) (X) - - (X) (X) (X) - - S stat REQ_PRIOR_STAT A asap REQ_PRIOR_ASAP R routine REQ_PRIOR_NORMAL C callback P preoperative *.ucPriority Optional if no sample or sample is calibrator or control. Requested/orde red date and time 7 - - Specimen collection date and time 8 (X) (X) Form YYYYMMDDHHMMSS PatientSampleData.sCollectionInfo Collection end time 9 - - Collection volume 10 - - Collector ID 11 - - If even one test is requested as stat the priority of test order record is set to stat (S) when results are reported by samples. When results are reported by requests the right test priority is always seen. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 32 Action code 12 X X X - - - X X - - X - X X C cancel A add test requests to existing specimen N new test requests + new specimen P pending specimen L reserved X specimen or test in process Q QC specimen Multiple action codes can be given separated by repeat delimiter. For example X\Q. Danger code 13 - - Relevant clinical information 14 (X) (X) PatientSampleData.osComment Date/time specimen received 15 - - Specimen descriptor (type and source) 16 X - X - Type ^Source Type is coded as: 1 Serum, 2 Plasma, 3 Urine, 4 CSF, 5 Other PatientSampleData.ucSampleType Ordering physician 17 - - Physicians telephone number 18 - - User field No.1 19 - - User field No.2 20 - - Laboratory field No.1 21 - - Laboratory field No.2 22 - - Date/time results reported or last modified 23 - - Instrument charge to computer system 24 - - Instrument section ID 25 (X) (X) Optional if no sample. InstrumentData.iId Report types 26 X - - X X - - - X - - X X X X X X X O order C correction to previously transmitted results P preliminary results F final results X requests cancelled I in instrument pending Y no order for test (response to query) Z no record of this patient (response to query) Q response to query (info) Multiple report types can be given separated by repeat delimiter. For example Y\Z. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 33 Reserved field 27 - - Location or ward of specimen collection 28 - - Nosocomial infection flag 29 - - Specimen service 30 - - Specimen institution 31 - - 3.2.1.5 Result record (level 3) Field Name No Host Instr. Comment Record type ID 1 X X Always R. Sequence number 2 X X Running number within Test order. Starts with 1. Universal test ID 3 - - - X (X) - - - X X Universal test ID ^universal test name ^universal test ID type ^manufacturer defined test code TestData.sOnlineName ^dilution factor used in calculation Data or measurement value 4 X (X) If result status is X (cancelled) or result is UNSTABLE, no result is given. *.fResult The range of result will be [99999.9 0.00000] and [-0.00000 -99999.9]. If actual result exceeds these values, the nearest value will be shown. Units 5 X X TestData.sResultUnit Reference ranges 6 - - - X X - Components: Low TRCLimitsData.fLowerlimit ^High TRCLimitsData.fUpperlimit ^Description Result abnormal flags 7 - - - - - - X X X X/- - - L/H below/above normal LL/HH below/above panic normal </> -below/above absolute low/high (off the scale of instrument) N/A normal/abnormal U/D significant change up/down (delta) B/W better/worse (used when direction is not relevant) *.ulErrorFlags Nature of abnormality testing 8 - - LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 34 Result status 9 - - X - - - - - - - - - X X X X - - X - X - C correction P preliminary F final X cancelled, I pending S partial M MIC level R reported N contains necessary information to run a new order Q response to query V verified Multiple status flags can be given separated by repeat delimiter. For example F\Q. REQ_ASKED ~ I, REQ_FIXABLE ~ I REQ_FIXED ~ I , REQ_CALCULATED ~ P, REQ_MEASURED ~ P, REQ_XXX_ACC ~ F, REQ_XXX_REJ ~X Date of change in instrument normative values or units 10 - - Operator identification 11 - (X) User login name if User levels have been set on Date/time test started 12 - - Date/time test completed 13 (X) (X) Form YYYYMMDDHHMMSS. No value if test is not completed. *.iResultDateTime Instrument identification 14 - X InstrumentData.iId LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 35 3.2.1.6 Comment record (level 4) used with the Result Record Field Name No Host Instr. Comment Record type ID 1 - X Always C. Used to transfer instrument flags after Result record. Sequence Number 2 - X Always 1, because of the use. Comment source 3 - - - - - X P practice L computer system I clinical instrument system Comment text 4 - X Error condition identified with a number and a text in English 1 Init abs. 2 Bichr. net abs. 3 Linearity 4 Unstable 5 Instr, error 6 Addl. meas. error 7 Sample blank error 8 Dil. limit low 9 Dil. limit high 10 Test limit low 11 Test limit high 12 Antigen limit high 13 Out of limit 14 QC 15 Calc. error 16 Outlier 17 Cut curve 18 Bias corr. limit 19 Antigen limit low 20 AE meas error 21 Blank resp. low 22 Blank resp. high 23 Blank init abs. low 24 Blank init abs. High 25 Critical limit low 26 Critical limit high 27 Instrument abs. Limit 28 Not measurable Multiple flags can be given separated with repeat delimiter. *.ulErrorFlags Comment type 5 - - - - - - - - - X G generic/free text document T test name comment P positive test comment N negative test comment I instrument flag(s) comment LIMS AND LAS INTERFACES Konelab 23.09.03 895304-4301 36 3.2.1.7 Comment record (level 3) used with transmission related error conditions Field Name No Host Instr. Comment Record type ID 1 - X Always C. Used to transfer instrument flags after Result record. Sequence Number 2 - X Always 1, because of the use. Comment source 3 - - - - - X P practice L computer system I clinical instrument system Comment text 4 - X Error condition identified by 'E' followed by a number E3 - wrong initialising character in record E4 - wrong termination code or request code in record E5 - records found in wrong order E104 - invalid sample plate position sample position already reserved in analyzer by another sample or calibrator or control. The new sample was wrongly positioned by LIS. Use position 0^0 for any sample when the position is defined at a later moment with sample insertion into the Konelab. E105 - problems with analysis request, request could not be created E108 - maximum number of samples/ patient exceeded E201 - sample segment position is reserved E210 - problems with updating patient information E211 - patient information could not be found E220 - sample already exists E221 - problems with sample information Comment type 5 - - - - - X - - - - G generic/free text document T test name comment P positive test comment N negative test comment I instrument flag(s) comment LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 37 3.2.1.8 Request information record (level 1) Field Name No Host Instr. Comment Record type ID 1 X X Always Q. Used by Instrument to ask external test results or orders to new samples, and by host for requesting results and orders that are in instruments database. Sequence number 2 X X Always 1. Only one request may be outstanding at a time. Starting range ID number 3 (X) (X) (X) (X) (X) (X) (X) (X) patient ID or ALL ^ sample ID or ALL ^segment ^position Patient ID and sample ID are text fields, so field is not used as range. Multiple patients or samples can be requested separated by repeat delimiter. Ending range ID number 4 - - Universal test ID 5 - - - (X) - - - - (X) - Universal test ID ^universal test name ^universal test ID type ^manufacturer defined test code TestData.sOnlineName ^auto-dilution factor Multiple tests can be requested separated by repeat delimiter. Nature of request time limits 6 - (X) - (X) S specimen collect date R result test date According to standard R is taken as default, so it is optional. Beginning request results date and time 7 (X) (X) Form YYYYMMDDHHMMSS Ending request results date and time 8 (X) (X) Form YYYYMMDDHHMMSS Requesting physician name 9 - - Requesting physician telephone number 10 - - User field No.1 11 - - User field No.2 12 - - Request information status codes 13 - X X X X - - X - - X X X X - - X - C correction P preliminary F final X cancelled I pending S unfinalized results M MIC level, R previously transmitted A cancel last request criteria LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 38 X X - X X - N requesting new or edited results only, O requesting test orders only (no results) D requesting demographics only Note: not repeated. 3.2.2 FIELD LENGTHS USED BY Konelab Field Length in characters Instrument type 3 instrument ID 2 software version 16 Date and time of message 14 Laboratory assigned patient ID 16 Patient name 24 Date of birth 8 Patient sex 10 Hospital institution 24 Specimen ID 16 Instrument specimen ID Segment , Position integers max 6 characters Universal test ID 30 Specimen collection date and time 14 Relevant clinical information 30 Instrument section ID 2 Data or measurement value 8 Units 10 Reference ranges Low 6, High 6 Date/time test completed 14 Beginning request results date and time 14 Ending request results date and time 14 LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 39 3.2.3 EXAMPLES OF COMMUNICATION BETWEEN Konelab AND THE HOST COMPUTER Examples of transmissions between Konelab and the host computer, when Konelab is configured to use automatic sample ID sending and automatic result sending. The control characters are presented between '<>'. For example <enq> means an ASCII character ENQ which hexadecimal value is 05. These examples give only an overview, the actual communication may vary. 1) New sample is introduced to Konelab. Example of the communication sequence: Konelab:<enq> Host: <ack> Konelab:<stx>1H|\^&|||60^1^5.0|||||||P||20010502105431<cr><etx>96<cr><lf> Host: <ack> Konelab:<stx>2Q|1|^TestSample^^||^^^ALL^||||||||O<cr><etx>50<cr><lf> Host: <ack> Konelab:<stx>3L|1|N<cr><etx>06<cr><lf> Host: <ack> Konelab:<enq> 2) The host computer responds: Host: <enq> Konelab:<ack> Host: <stx>1H|\^&|||60^Host^5.0|||||||P||20010502105446<cr><etx>09<cr><lf> Konelab:<ack> Host: <stx>2P|1|112233-4455|||TestPatient|||Adult|||||||||||||||||||||||||<cr><etx>59<cr><lf> Konelab:<ack> Host: <stx>3O|1|TestSample||^^^Ca^0.0|R||||||X||||1|||||||||1|Q\O<cr><etx>93<cr><lf> Konelab:<ack> Host: <stx>4L|1|F<cr><etx>FF<cr><lf> Konelab:<ack> Host: <eot> Note the reference class Adult. This must have a perfect match with one of the reference classes defined in Konelab LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 40 3) Konelab has analysed the sample and sends the results to host computer. Konelab:<enq> Host: <ack> Konelab:<stx>:1H|\^&|||60^1^5.0|||||||P||20010502105626<cr><etx>9C<cr><lf> Host: <ack> Konelab:<stx>:2P|1|112233- 4455|||TestPatient|||Adult|||||||||||||||||||||||||<cr><etx>59<cr><lf> Host: <ack> Konelab:<stx>:3O|1|TestSample^0.0^1^1||^^^ALL^|R||||||X||||1|||||||||1|F<cr><etx>8E<c r><lf> Host: <ack> Konelab:<stx>:4R|1|^^^Ca^0.0|2.3|mmol/l|2.2^2.7^Adult|L||F||||20010502105628|1<c r><etx>02<cr><lf> Host: <ack> Konelab:<stx>:5L|1|N<cr><etx>08<cr><lf> Host: <ack> Konelab:<eot> 4) New sample is introduced to Konelab. Konelab send request for information of the sample: Konelab:<enq> Host: <ack> Konelab:<stx>1H|\^&|||60^1^5.0|||||||P||20010502124646<cr><etx>9F<cr><lf> Host: <ack> Konelab:<stx>2Q|1|^S1234^^||^^^ALL^||||||||O<cr><etx>6B<cr><lf> Host: <ack> Konelab:<stx>3L|1|N<cr><etx>06<cr><lf> Host: <ack> Konelab:<eot> 5) The host computer responds: Host: <enq> Konelab:<ack> Host: <stx>1H|\^&|||60^Host^5.0|||||||P||20010502124702<cr><etx>12<cr><lf> Konelab:<ack> Host: <stx>2P|1|123456-789A|||LastName FirstName|||Adult|||||||||||||||||||||||||<cr><etx>C2<cr><lf> Konelab:<ack> Host: <stx>3O|1|S1234^3.0||^^^Ca^0.0|R||||||X||||1|||||||||1|Q\O<cr><etx>9D<cr><lf> Konelab:<ack> Host: <stx>4L|1|F<cr><etx>FF<cr><lf> Konelab:<ack> Host: <eot> Note the reference class limit and name presentation in R- record (Min^Max^Name) and the 'L'-flag for value 2.3 in range from 2.2 to 2.7. Note that the sample has been manually diluted with dilution 1 + 3.0! LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 41 6) Analysing the sample is completed. Konelab sends the results: Konelab:<enq> Host: <ack> Konelab:<stx>1H|\^&|||60^1^5.0|||||||P||20010502124833<cr><etx>9D<cr><lf> Host: <ack> Konelab:<stx>2P|1|123456-789A|||LastName FirstName|||Adult|||||||||||||||||||||||||<cr><etx>C2<cr><lf> Host: <ack> Konelab:<stx>3O|1|S1234^3.0^1^2||^^^ALL^|R||||||X||||1|||||||||1|F<cr><etx>AD<cr><lf > Host: <ack> Konelab:<stx>4R|1|^^^Ca^3.0|9.2|mmol/l|2.2^2.7^Adult|HH||F||||20010502124835|1 <cr><etx>50<cr><lf> Host: <ack> Konelab:<stx>5L|1|N<cr><etx>08<cr><lf> Host: <ack> Konelab:<eot> 7) New sample is introduced to Konelab. Communication sequence: Konelab:<enq> Host: <ack> Konelab:<stx>1H|\^&|||60^1^5.0|||||||P||20010502125526<cr><etx>9D<cr><lf> Host: <ack> Konelab:<stx>2Q|1|^ICU Sample^^||^^^ALL^||||||||O<cr><etx>B1<cr><lf> Host: <ack> Konelab:<stx>3L|1|N<cr><etx>06<cr><lf> Host: <ack> Konelab:<eot> 8) The host computer responds. Communication sequence: Host: <enq> Konelab:<ack> Host: <stx>1H|\^&|||60^Host^5.0|||||||P||20010502125551<cr><etx>15<cr><lf> Konelab:<ack> Host: <stx>2P|1|223311-9876|||ICU Patient||||||||||||||||||||||||||||<cr><etx>CC<cr><lf> Konelab:<ack> Host: <stx>3O|1|ICU Sample||^^^ISE.Na^0.0|R||||||X||||1|||||||||1|Q\O<cr><etx>0E<cr><lf> Konelab:<ack> Host: <stx>4L|1|F<cr><etx>FF<cr><lf> Konelab:<ack> Host: <eot> Note the reference class 'HH'-flag in R- record. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 42 9) Konelab has analysed the sample and sends the results to host computer. Konelab:<enq> Host: <ack> Konelab:<stx>1H|\^&|||60^1^5.0|||||||P||20010502125610<cr><etx>97<cr><lf> Host: <ack> Konelab:<stx>2P|1|223311-9876||ICU Patient||||||||||||||||||||||||||||<cr><etx>50<cr><lf> Host: <ack> Konelab:<stx>3O|1|ICU Sample^0.0^1^4||^^^ALL^|R||||||X||||1|||||||||1|F<cr><etx>F2<cr><lf> Host: <ack> Konelab:<stx>4R|1|^^^ISE.Na^0.0|9999999.9|mmol/l|^^|>||F||||20010502125556|1<c r><etx>50<cr><lf> Host: <ack> Konelab:<stx>5C|1|I|11 Test limit high\15 Calc. error|I<cr><etx>29<cr><lf> Host: <ack> Konelab:<stx>6L|1|N<cr><etx>09<cr><lf> Host: <ack> Konelab:<eot> 10) New sample is introduced to Konelab. Communication sequence: Konelab:<enq> Host: <ack> Konelab:<stx>1H|\^&|||60^1^5.0|||||||P||20010502125238<cr><etx>9D<cr><lf> Host: <ack> Konelab:<stx>2Q|1|^SomeSample^^||^^^ALL^||||||||O<cr><etx>44<cr><lf> Host: <ack> Konelab:<stx>3L|1|N<cr><etx>06<cr><lf> Host: <ack> Konelab:<eot> 11) The host computer responds. Communication sequence: Host: <enq> Konelab:<ack> Host: <stx>1H|\^&|||60^Host^5.0|||||||P||20010502125239<cr><etx>0B<cr><lf> Konelab:<ack> Host: <stx>2P|1|221121-6655|||SomePatient||||||||||||||||||||||||||||<cr><etx>54<cr><lf> Konelab:<ack> Host: <stx>3O|1|SomeSample||^^^TestTest^0.0|R||||||X||||1|||||||||1|Q\O<cr><etx>23<cr><lf> Konelab:<ack> Host: <stx>4L|1|F<cr><etx>FF<cr><lf> Konelab:<ack> Host: <eot> Note the result value of 9999999.9, which represents the maximum value for result. This is due to calculation error causing the value to reach the maximum internal presentation. Please check always the existence of C-record after a R-record for error conditions. Note also the '>'-flag in R- record. This is due to the result exceeding the test maximum limit. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 43 12) The request 'TestTest' is invalid, because Konelab's test repertoire does not contain any test with OnlineName 'TestTest'. Error condition sequence: Konelab:<enq> Host: <ack> Konelab:<stx>1H|\^&|||60^1^5.0|||||||P||20010502125240<cr><ext>96<cr><lf> Host: <ack> Konelab:<stx>2P|1|221121-6655|||SomePatient||||||||||||||||||||||||||||<cr><ext>54<cr><lf> Host: <ack> Konelab:<stx>3O|1|SomeSample||^^^TestTest^0.0|R||||||C||||1|||||||||1|X<cr><ext>6A<cr ><lf> Host: <ack> Konelab:<stx>4C|1|I|E105|G<cr><ext>13<cr><lf> Host: <ack> Konelab:<stx>5L|1|Q<cr><ext>0B<cr><lf> Host: <ack> Konelab:<eot> 13) Sending of control sample analysis results is enabled and Konelab performs Ca analysis on control sample Nortrol. Communication sequence: Konelab:<enq> Host: <ack> Konelab:<stx>1H|\^&|||60^1^5.0|||||||Q||20010502130025<cr><etx>94<cr><lf> Host: <ack> Konelab:<stx>2P|1||||||||||||||||||||||||||||||||<cr><etx>BF<cr><lf> Host: <ack> Konelab:<stx>3O|1|Nortrol||^^^Ca^0.0|R||||||Q||||1|||||||||1|<cr><etx>C4<cr><lf> Host: <ack> Konelab:<stx>4R|1|^^^Ca^0.0|2.3|mmol/l|^^|N||F||||20010502130024|0<cr><etx>D4 <cr><lf> Host: <ack> Konelab:<stx>5L|1|N<cr><etx>08<cr><lf> Host: <ack> Konelab:<eot> LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 44 4. KONELAB / LAS INTERFACE The communication interface between Konelab analyser and a Laboratory Automation System (LAS) is described in the following sections. 4.1 HARDWARE INTERFACE Communication between the analyser and LAS is performed using standard three- wire RS 232- interface. Maximum cable length is 15 meters and the cable should be shielded. The pins used in 9-pin male D-connector on analyser side are: Signal Pin RxD (received data) 2 TxD (transmitted data) 3 GND (ground) 5 Communication parameters are 9600 baud, 8 bit, 1 start bit, 1 stop bit, no parity. No hardware or software flow control is used. 4.2 GENERAL DESCRIPTION When debug log is on, all messages between analyser and LAS are recorded to the log file C:\Konelab\tmp\ksdebug.txt. 4.2.1 MESSAGE RECORD FORMAT The following abbreviations are used in this document for some special communication characters. STX 0x02 ETX 0x03 ACK 0x06 NACK 0x15 Start of transmission (STX) character is used at the beginning of communication record and End of transmission (ETX) character is used at the end of communication record. Each communication record contains checksum. After communication record has been received, an acknowledgement is always sent by the analyser or LAS. The analyser or LAS sends positive acknowledgement character (ACK), if the checksum in message is correct and negative acknowledgement character (NACK), if the checksum in message is incorrect. Analyser waits for ACK or NACK up to 1 second. If the analyser receives NACK, it tries to re-send the record max two times. You can set debug on by F8/F1 function in the Konelab programs Management window. With the same button it is also set off. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 45 Each communication record contains also field for message length. Message length doesnt include STX and ETX characters. The general format of a message record is: Byte Field Comment 1 STX 2 Message length 3 Message id 4 - n Message data Optional n+1 Checksum n+2 ETX 4.2.2 CALCULATION OF CHECKSUM The calculation of checksum does not include the STX-character, the checksum itself or the ETX-character. The calculation starts with zeroing the checksum. Every character of the message is added to the checksum (modulo 256) excluding the above mentioned characters and the result is an 8-bit checksum. For example the characters in normal Analyser Status record are 0x02 0x04 0x04 0x00 0x08 0x03, where 0x02 is the STX-character, 0x04 is the length of message, 0x04 is message id, 0x00 is the status, 0x08 is the checksum and 0x03 is the ETX-character. The example for calculation of the checksum in C language: unsigned char CalculateChecksum( unsigned char * pString, int iNumOfChars ) { unsigned char ucChecksum; unsigned char ucTemp; int iIndex; ucChecksum = 0; for (iIndex = 0; iIndex < iNumOfChars; iIndex++) { ucTemp = pString[iIndex]; ucChecksum = ucChecksum + ucTemp; } return ucChecksum; } When calling CalculateChecksum function, pointer pString should point to the Message length - field and iNumOfChars variable should contain value Message length - 1. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 46 4.2.3 SEQUENCE FOR INITIALISING THE COMMUNICATION INTERFACE When the communication between analyser and LAS is restarted, the initialisation sequence described in this chapter has to be performed. Communication is restarted every time, when LAS has sent Reinitialise communication record or a fatal communication error occurs. Analyser starts the initialisation sequence by sending Initialisation record. Analyser sends Initialisation record every 5 seconds as long as LAS responses by sending ACK. After that LAS sends Analyser status query record to the analyser. Analyser waits for this record up to 10 seconds. If the record is received in time, analyser responses with ACK and sends Analyser status record to LAS. LAS sends ACK to the analyser to finish the initialisation sequence. 4.2.4 ANALYSER BOOT SEQUENCE When analyser has been booted and it is ready to aspirate a sample, it starts listening the communication line. LAS can check the connection by sending a status query or it can directly start a sample aspiration sequence. If the analyser is down or booting, it will not acknowledge the message and LAS can then start the initialisation sequence. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 47 4.2.5 KUSTI STATES AND ERROR RECOVERY Dispensing complete status Status record status LAS status 0 ok 0 ok 1 no free sample position 2 duplicate sample id 3 timeout 5 short sample Free to move tubes and retry aspirate sample. 4 fatal error Not allowed to move sample tubes. Re-check status with status query. 2 out of order Not allowed to move sample tubes. Konelab requires operator actions before it will retry aspirate sample. 6 not in use 3 not in use Allowed to move sample tubes. Konelab requires operator actions before it will retry aspirate sample. 7 busy 1 busy Not allowed to move sample tubes. Wait for a couple of seconds and check status again. When busy response is received from Konelab either as response to status query or to aspirate sample command, Konelab is either initializing or recovering from an error situation. This is a temporary state and LAS should start polling with status query (or aspirate sample command) until status value other than busy is received. Typically this will take 10-20 seconds and shouldnt take more than a minute. Until then sample tubes must not be moved as KUSTI dispenser may be extended at the LAS position. If status value ready is received, the recovery was successful and another aspirate sample command may be sent. If the recovery was unsuccessful, status out of order or not in use is returned. Konelab does not automatically try to recover from states out of order or not in use. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 48 The diagram below explains the possible states and transitions of the Konelab LAS interface and when LAS is allowed to move sample tubes. State Status response Aspirate response 1 0 (ready) starts dispensing 2 1 (busy) protocol error 3 1 (busy) 7 (busy) 4 2 (out of order) 4 (fatal error) 5 3 (not in use) 6 ( not in use) 1. Analyser is ready for sample aspiration LAS status : moving allowed analyzer status: ok 2. Analyser is busy LAS status : moving not allowed analyzer status: ok 4. Analyser has fatal error situation LAS status : moving not allowed analyzer status: not ok 5. Analyser not inuse LAS status : moving allowed analyzer status: not ok ASPIRATE SAMPLE RECORD sended SAMPLE DISPENSING COMPLETE RECORD, status=0,1,2,3 or 5 received SAMPLE DISPENSING COMPLETE RECORD, status=4 or 7 received 3. Fatal error when aspiration LAS status : moving not allowed analyzer status: unknown ANALYSER STATUS RECORD, status=3 (not in use) received ANALYSER STATUS RECORD, status=2 (fatal error) received ANALYSER STATUS RECORD, status=0 (ok) received ANALYSER STATUS RECORD, status=0 (ok) received ANALYSER STATUS RECORD, status=0 (ok) received SAMPLE DISPENSING COMPLETE RECORD, status=6 (not in use) received ANALYSER STATUS RECORD, status=1(busy) received LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 49 4.3 COMMUNICATION RECORDS 4.3.1 INITIALISATION RECORD This record in sent by analyser to inform LAS, that analyser is ready to start the communication. Byte Field Comment 1 STX 2 Message length 3 Message id (0x01) 4 Checksum 5 ETX 4.3.2 ILLEGAL COMMAND RECORD This record in sent by analyser or LAS to inform that data of the received message has not been valid. Byte Field Comment 1 STX 2 Message length 3 Message id (0x02) 4 Error type 0x00 = message id not valid 0x01 = unexpected record 0x02 = invalid message data 5 Error info1 Message id in received message 6 Error info2 0x00 = no additional information 0x01 = invalid sample id 7 Checksum 8 ETX 4.3.3 ANALYSER STATUS QUERY RECORD This record in sent by LAS to ask the status of the analyser. LAS can send this record at any time after the initialisation sequence has been successfully performed. Byte Field Comment 1 STX 2 Message length 3 Message id (0x03) 4 Checksum 5 ETX Note! All the fields in the records, that are not used, should be set to 0x00. LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 50 4.3.4 ANALYSER STATUS RECORD This record in sent by the analyser as a response to Analyser status query record. Byte Field Comment 1 STX 2 Message length 3 Message id (0x04) 4 Status 0x00 = analyser is ready for sample aspiration 0x01 = analyser is busy (i.e. initialising or dispensing sample). Sample tubes may not be moved. 0x02 = analyser has fatal error situation and sample aspiration cant be performed. Sample tubes may not be moved. 0x03 = analyser is not in use and sample aspiration cant be performed. Sample tubes may be moved. 5 Checksum 6 ETX 4.3.5 ASPIRATE SAMPLE RECORD This record in sent by LAS to inform that theres a sample to be aspirated. Byte Field Comment 1 STX 2 Message length 3 Message id (0x05) 4 Sample tube type 0x00 (Not used at the moment) 5 Sample ID length 6 n Sample ID Maximum length of sample ID is 16 characters n+1 Checksum n+2 ETX LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 51 4.3.6 SAMPLE DISPENSING COMPLETE RECORD This record in sent by the analyser to inform the LAS, that sample dispensing is completed. If Status- field in the message is not 0, the sample dispensing hasnt been performed successfully. Byte Field Comment 1 STX 2 Message length 3 Message id (0x06) 4 Status 0x00 = OK 0x01 = No empty sample positions in the sample disk for sample dispensing 0x02 = Duplicate sample id 0x03 = Timeout in sample dispensing 0x04 = Analyser couldnt perform operation due to a fatal error situation. Sample tubes may not be moved. 0x05 = Not enough sample found in sample tube 0x06 = Analyser not in use and sample aspiration cant be performed. Sample tubes may be moved. 0x07 = Analyser is busy and sample aspiration cant be performed. Sample tubes may not be moved. 5 Sample ID length 6 n Sample ID Maximum length of sample ID is 16 characters n+1 Checksum n+2 ETX 4.3.7 REINITIALISE COMMUNICATION RECORD This record in sent by the LAS to reinitialise the communication. Byte Field Comment 1 STX 2 Message length 3 Message id (0x07) 4 Checksum 5 ETX LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 52 4.4 COMMUNICATION EXAMPLES 4.4.1 INITIALISATION SEQUENCE LAS ANALYSER Initialisation record 5 s timeout Initialisation record ACK Max 10 s Status query record ACK Status Record ACK 4.4.2 SAMPLE ASPIRATION SEQUENCE FOR TWO SAMPLES LAS ANALYSER Aspirate sample record ACK Sample dispensing complete record ACK Aspirate sample record ACK Sample dispensing complete record ACK LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 53 4.4.3 SAMPLE ASPIRATION FAILS, RECOVERY SUCCESSFUL 1 LAS ANALYSER Aspirate sample record ACK sample dispensing complete record status = FATAL ERROR ACK wait 10 s Status query record ACK status record status = BUSY ACK wait 10 s Status query record ACK status record status = BUSY ACK wait 10 s Status query record ACK status record status = READY ACK Aspirate sample record ACK sample dispensing complete record status = OK ACK LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 54 4.4.4 SAMPLE ASPIRATION FAILS, RECOVERY SUCCESSFUL 2 LAS ANALYSER Aspirate sample record ACK sample dispensing complete record status = FATAL ERROR ACK wait 10 s Aspirate sample record ACK sample dispensing complete record status = BUSY ACK wait 10 s Aspirate sample record ACK sample dispensing complete record status = BUSY ACK wait 10 s Aspirate sample record ACK sample dispensing complete record status = OK ACK LIMS AND LAS INTERFACES Konelab 23.04.03 895304-4301 55 4.4.5 SAMPLE ASPIRATION FAILS, RECOVERY UNSUCCESSFUL LAS ANALYSER Aspirate sample record ACK Sample dispensing complete record Status = FATAL ERROR ACK wait 10 s Status query record ACK Status record Status = BUSY ACK wait 10 s Status query record ACK Status record Status = BUSY ACK wait 10 s Status query record ACK Status record Status = NOT IN USE or Status = OUT OF ORDER ACK Error message to operator, cannot recover automatically