You are on page 1of 12

ELFOLAB DATA TRANFER TRANSMISSION REV.

02
PROTOCOL VIA SERIAL COMMUNICATION 29.01.14

Elfolab Data Transfer Transmission Protocol


Via Serial Communication

Index
Elfolab Data Transfer Transmission Protocol ..................................................................................1
Protocol.............................................................................................................................................2
Export Data .............................................................................................................................2
Import Data .............................................................................................................................2
Packets ..............................................................................................................................................3
COMMAND PACKET (CP) ..................................................................................................3
ACKNOWLEGEMENT PACKET (AP)................................................................................3
RECORD PACKET (RP) .......................................................................................................4
Message format.................................................................................................................................5
Export 'Message' .....................................................................................................................5
Import 'Message' ...................................................................................................................10
Notes ...............................................................................................................................................12

All the content of this Document, is a property of INTERLAB S.r.l. Via Rina Monti, 26 00155 Roma ITALY U.E Pag. 1 di 12
ELFOLAB DATA TRANFER TRANSMISSION REV. 02
PROTOCOL VIA SERIAL COMMUNICATION 29.01.14

Protocol
• The data transfer uses a Serial Port for both Import and Export.
• The bidirectional stream is encoded using ASCII.
• The Folder “Lis Interface” has to be inserted in the folder where Elfolab is installed.
• From Elfolab menu “Settings”->”Setting Host” it is possible to set the Com Port Settings.
• From Elfolab Settings> Host Setup it is possible to select if the graph fields 38 and 39 will be
exported. If the settings is “Not” the fields 38 and 39 exported will be have the value #NULL#.

Export Data
[Client] request export with a <Command Packet> with “Command Field” 'E' (ascii 69)
[Server] answer with an <Acknowledgement Packet> (ACK or NAK)
[Client] send one or more <Record Packet> with “Message field” containing data to export
[Server] answer with an <Acknowledgement Packet> to each record sent (ACK or NAK)
[Client] send <EOT> (ascii 4) to terminate transmission

Import Data
[Client] request import with a <Command Packet> with the “Command Field” 'I' (ascii 73)
[Server] answer with an <Acknowledgement Packet> (ACK or NAK)
[Server] send one or more <Record Packet> with “Message field” containing data to import
[Client] answer with an <Acknowledgement Packet> to each record sent (ACK or NAK)
[Server] send <EOT> (ascii 4) to terminate transmission

All the content of this Document, is a property of INTERLAB S.r.l. Via Rina Monti, 26 00155 Roma ITALY U.E Pag. 2 di 12
ELFOLAB DATA TRANFER TRANSMISSION REV. 02
PROTOCOL VIA SERIAL COMMUNICATION 29.01.14

Packets
COMMAND PACKET (CP)
Client sends a <Command Packet> to the server to request an action
Fields:
1. ENQ: 1 byte, (ascii 5)
2. Version: 2 bytes, Int16 containing version of the protocol
3. Command: 1 char, containing the command requested to the server
4. Reserved: 4 bytes, reserved for future use
5. \r : 1 byte, Carriage Return (ascii 13)
6. \n: 1byte, Line Feed (ascii 10)
Command fields are
− 'E' (ascii 69) to start an export
− 'I' (ascii 73) to start an import

ENQ Version Command Reserved \r \n


(1 byte) (2 bytes) (1 byte) (4 bytes) (1 byte) (1 byte)

ACKNOWLEGEMENT PACKET (AP)


Client or Server sends a <Row Packet> to acknowledge a packet
Packet-Fields:
1. Result: 1 byte containing:
• ACK (Positive Acknowledgement) or
• NAK (Negative Acknowledgement)
2. \r : 1 byte, Carriage Return (ascii 13)
3. \n: 1byte, Line Feed (ascii 10)

RESULT \r \n
(1 byte) (1 byte) (1 byte)
ACK/NAK

All the content of this Document, is a property of INTERLAB S.r.l. Via Rina Monti, 26 00155 Roma ITALY U.E Pag. 3 di 12
ELFOLAB DATA TRANFER TRANSMISSION REV. 02
PROTOCOL VIA SERIAL COMMUNICATION 29.01.14

RECORD PACKET (RP)


Client or Server sends a <Record Packet> to transfer data from or to the Server
Packet-Fields:
1. STX: 1 byte (ascii 1), starat the Message field
2. Message: n bytes, variable data in ascii format
3. EXT: 1 byte (ascii 3), end the Message Packet-Field
4. \r : 1 byte, Carriage Return (ascii 13)
5. \n: 1byte, Line Feed (ascii 10)

STX Message ETX \r \n


(1 byte) (n bytes) (1 byte) (1 byte) (1 byte)

All the content of this Document, is a property of INTERLAB S.r.l. Via Rina Monti, 26 00155 Roma ITALY U.E Pag. 4 di 12
ELFOLAB DATA TRANFER TRANSMISSION REV. 02
PROTOCOL VIA SERIAL COMMUNICATION 29.01.14

Message format
“Message” is a Packet-Field contained in the “Record Packet” between <STX> and <ETX> char
values, it's a 'string' containing all the data formatted as Comma-Separated-Values.
No ascii value under the 32 is allowed in the “Message Packet-field”.

Export 'Message'
“Export Message” has 81 message-fields described in the following table.

No. Description Max Length Notes


1 Sample ID 16
2 Concentration(e.g.Total Proteins) -
3 Department 10
4 Name 30
5 Sex 1 “M” or “F”
6 Date of Birth - Date Field
7 Patient ID 40
8 Type of Test 15
9 Test Date - Date Field
10 Gel holder Number -
11 Trace number -
12 Number of fractions -
13 Scan length -
14 Fraction 1 Name 20
15 Fraction 1 Value - 1 decimal (e.g. “65.8”)
16 Fraction 2 Name 20
17 Fraction 2 Value - 1 decimal (e.g. “65.8”)
18 Fraction 3 Name 20
19 Fraction 3 Value - 1 decimal (e.g. “65.8”)
20 Fraction 4 Name 20
21 Fraction 4 Value - 1 decimal (e.g. “65.8”)
22 Fraction 5 Name 20
23 Fraction 5 Value - 1 decimal (e.g. “65.8”)
24 Fraction 6 Name 20
25 Fraction 6 Value - 1 decimal (e.g. “65.8”)
26 Fraction 7 Name 20
27 Fraction 7 Value - 1 decimal (e.g. “65.8”)
28 Fraction 8 Name 20

All the content of this Document, is a property of INTERLAB S.r.l. Via Rina Monti, 26 00155 Roma ITALY U.E Pag. 5 di 12
ELFOLAB DATA TRANFER TRANSMISSION REV. 02
PROTOCOL VIA SERIAL COMMUNICATION 29.01.14

No. Description Max Length Notes


29 Fraction 8 Value - 1 decimal (e.g. “65.8”)
30 Fraction 9 Name 20
31 Fraction 9 Value - 1 decimal (e.g. “65.8”)
32 Fraction 10 Name 20
33 Fraction 10 Value - 1 decimal (e.g. “65.8”)
34 Fraction 11 Name 20
35 Fraction 11 Value - 1 decimal (e.g. “65.8”)
36 “A/G Ratio” (Only the title)
37 A/G Ratio Value -
38 • File path for Immunofixations - For Graphic quotes The
method; field is divided in
• Graphic quotes in hex format (Axis package of 4 characters
Y quotes) for other methods. (every 4 characters is a
decimal number
39 Minimums positions in hex format (Axis X 36 The field is divided in
quotes) package of 3 characters
(every 3 characters is a
decimal number).
40 Notes -
41 IgG Value (Field for Immunofixations) -
42 IgA Value (Field for Immunofixations) -
43 IgM Value (Field for Immunofixations) -
44 IgE Value (Field for Immunofixations) -
45 IgD Value (Field for Immunofixations) -
46 Kappa Value (Field for Immunofixations) -
47 Lambda Value (Field for Immunofixations) -
st
48 1 Nephelometric free Field Name 8
st
49 1 Nephelometric free Field Value
nd
50 2 Nephelometric free Field Name 8
nd
51 2 Nephelometric free Field Value
52 Measure Unit of Nephelometric Values The field are 3 possible
values: "g/L", "mg/L",
"mg/dL”
53 Gel ID
54 Free 1 Field 20
55 Free 2 Field 20
56 Free 3 Field 20
57 Free 4 Field 20
58 Free 5 Field 20
59 Free 6 Field 20

All the content of this Document, is a property of INTERLAB S.r.l. Via Rina Monti, 26 00155 Roma ITALY U.E Pag. 6 di 12
ELFOLAB DATA TRANFER TRANSMISSION REV. 02
PROTOCOL VIA SERIAL COMMUNICATION 29.01.14

No. Description Max Length Notes


60 SMC 1 Field(e.g. "321;385;11.46") - The field have 3 information
divided by the symbol “;” : Start
Position in decimal format; End
Position in decimal format; Value
in %”.
61 SMC 2 Field - Like Field No.60
62 SMC 3 Field - Like Field No.60
63 SMC 4 Field - Like Field No.60
64 SMC 5 Field - Like Field No.60
65 SMC 6 Field - Like Field No.60
66 SMC 7 Field - Like Field No.60
67 SMC 8 Field - Like Field No.60
68 Patient Species (e.g. Human) 20
69 Pathologic Field - Possible Values: “PAT” or
“NORM”
70 UserName Field -
71 Fraction 1 Value Concentration Field 2 decimals (e.g. “6.32”)
72 Fraction 2 Value Concentration Field 2 decimals (e.g. “6.32”)
73 Fraction 3 Value Concentration Field 2 decimals (e.g. “6.32”)
74 Fraction 4 Value Concentration Field 2 decimals (e.g. “6.32”)
75 Fraction 5 Value Concentration Field 2 decimals (e.g. “6.32”)
76 Fraction 6 Value Concentration Field 2 decimals (e.g. “6.32”)
77 Fraction 7 Value Concentration Field 2 decimals (e.g. “6.32”)
78 Fraction 8 Value Concentration Field 2 decimals (e.g. “6.32”)
79 Fraction 9 Value Concentration Field 2 decimals (e.g. “6.32”)
80 Fraction 10 Value Concentration Field 2 decimals (e.g. “6.32”)
81 Fraction 11 Value Concentration Field 2 decimals (e.g. “6.32”)

The format for the <Record Packet> while exporting is the following:
(<STX>, <ETX>,<\r> and <\n> are char values described under “Row Packet”)

<STX>"sample id", “Concentration Value", "department", "name", "sex", "birth date", "patient
id", "Type of Test", "Test Date", "Gel holder number", "trace number", "fractions", "scan
length", "Fraction 1 Name", "Fraction 1 Value", "Fraction 2 Name", "Fraction 2 Value",
"Fraction 3 Name", "Fraction 3 Value", "Fraction 4 Name", "Fraction 4 Value", "Fraction 5
Name", "Fraction 5 Value", "Fraction 6 Name", "Fraction 6 Value", "Fraction 7 Name",
"Fraction 7 Value", "Fraction 8 Name", "Fraction 8 Value", "Fraction 9 Name", "Fraction 9
Value", "Fraction 10 Name", "Fraction 10 Value", "Fraction 11 Name", "Fraction 11 Value",
“’A/G Ratio’", "value of A/G Ratio", "graphic quotes in hex format", "minima positions in hex
format", "notes", ”IgG Value”, ”IgA Value”, ”IgM Value”, ”IgE Value”, ”IgD Value”, ”Kappa
Value”, ”Lambda Value”, "Name of 1st Nephelometric free Field", "1st Nephelometric free Field

All the content of this Document, is a property of INTERLAB S.r.l. Via Rina Monti, 26 00155 Roma ITALY U.E Pag. 7 di 12
ELFOLAB DATA TRANFER TRANSMISSION REV. 02
PROTOCOL VIA SERIAL COMMUNICATION 29.01.14

Value", Name of 2nd Nephelometric free Field ", 2nd Nephelometric free Value", “Measure Unit
of Nephelometric Values", “Gel ID”, “Free 1 Field”, “Free 2 Field”, “Free 3 Field”, “Free 4
Field”, “Free 5 Field”, “Free 6 Field”, “SMC1 Value”, “SMC2 Value”, “SMC3 Value“, SMC4
Value“, “SMC5 Value”, “SMC6 Value”, “SMC7 Value”, “SMC8 Value”, “ Patient Species”,
“Pathologic Field”, “Username Field”, “Conc. 1 Field”, “Conc. 2 Field”, “Conc. 3 Field”, “Conc.
4 Field”, “Conc. 5 Field”, “Conc. 6 Field”, “Conc. 7 Field”, “Conc. 8 Field”, “Conc. 9 Field”,
“Conc. 10 Field”, “Conc. 11 Field”<ETX><\r><\n>

It follows an example of Message Packet-Field inside a Record Packet while exporting:

"F140574", "7.00", "Ematologia", "Mario Rossi", "M", "12/04/1974",


"12345", "Serumproteins", "22-05-2009", "Tel 2A-Gel L", " 2", " 6",
"19", "Albumin", "55.8", "Alpha 1", "2.1", "Alpha 2", "13.5", "Beta
1", "7.0", "Beta 2", "4.3", "Gamma", "17.3", #NULL#, #NULL#, #NULL#,
#NULL#, #NULL#, #NULL#, #NULL#, #NULL#, #NULL#, #NULL#, "A/G Ratio",
"1.26",
"001F0028003300400051006B009000C5010F0176020402C603C8051D06D6090E0BE1
0F7213E81968201A281C31903C8D4923574C66F677F58A039CB3AF7FC17DD20FDFF2E
B3DF35DF947FD1AFF42FFFFFFC0FDD0FA98F5EDEF50E64ADB06CDC4BEE9AF4D9F2A8F
2F7F8970A26296559949A83ECF35062C5224A71DFD1841135F0F450BE1092106F1053
C03EF02F6024101BB0158010600C2008B0063004C0044004800530061007100840099
00B200CF00EF0113013C0169019D01D8021C026A02C4032D03A6042D04BF055905F70
694072D07C0084A08C5092E097C09AD09C009B7099209540900089A082507AA072C06
B0063A05C80562050404B2046C0433040803EB03DC03D903DF03ED0403041F043E046
3048C04B904EA051D0556059305DC0632069C071F07BE087C09610A740BC10D4F0F24
114213A8164B19201C0F1F0421E3249026EC28DC2A4C2B362B9D2B8F2B1D2A59295B2
83226F025A6245D232021EE20CC1FB71EB21DBC1CD41BF61B1D1A46196D188E17A716
B815C814D813EC13061227115110830FBF0F020E4B0D990CEE0C4A0BB30B270AA90A3
909DA098B094D0923091109170937096F09BD0A240AA60B460C030CE20DE30F081050
11BB134314E916A418701A401C061DB11F2E2065213F21A5218420D71FA71E061C121
9E817AA15771368118D0FEF0E940D7A0CA00BFF0B8F0B4A0B270B240B390B620B960B
D30C130C550C960CDB0D230D710DC70E240E880EEE0F510FAB0FF310271048105C106
B107410731059101F0FBD0F3C0E9F0DF60D480C9F0C030B7F0B150AC90A9C0A8B0A91
0AAB0AD40B090B4A0B940BE40C340C810CC50CFF0D2B0D4A0D630D760D890D9D0DB10
DC60DDC0DF30E0C0E280E490E700E9E0ED10F0B0F490F900FDB102D108210D7112D11
7D11CC1217126212AD12F81342138A13D014151455149314CC1501152F1558157D159
F15BE15DA15F21609161C162E163C164A165716621669166D166F166F166C1664165C
1650164316331620160A15EE15CD15A51575153D14FD14B9146F142113CE137513151
2AF124511D7116B11001097102E0FC40F580EEA0E7A0E0B0D9C0D2E0CC50C5E0BF60B
8B0B210AB80A5509F6099C094308EF089D084E080107B5076A071C06CE067E063005E
4059C0556050E04C90483044003FB03BB037C0341030A02D602A502750248021B01ED
01BF01900164013A011700F700DD00C400AB0093007B0066005300420032002200100
000", "0500840D40FF1241C11C2", "Good", #NULL#, #NULL#, #NULL#,
#NULL#, #NULL#, #NULL#, #NULL#, #NULL#, #NULL#, #NULL#, #NULL#,
#NULL#, "", "10/06/2009", "Bianco", #NULL#, #NULL#, #NULL#, #NULL#,
#NULL#, #NULL#, #NULL#, #NULL#, #NULL#, #NULL#, #NULL#, #NULL#,
"Human", "NORM", #NULL#, "3.90", "0.15", "0.95", "0.49", "0.30",

All the content of this Document, is a property of INTERLAB S.r.l. Via Rina Monti, 26 00155 Roma ITALY U.E Pag. 8 di 12
ELFOLAB DATA TRANFER TRANSMISSION REV. 02
PROTOCOL VIA SERIAL COMMUNICATION 29.01.14

"1.21", #NULL#, #NULL#, #NULL#, #NULL#, #NULL#, "_”, "904585904",


"0.00", "Geriatria", "Mario Rossi", #NULL#, "23/07/1940", "12346",
"Serumproteins", "22-05-2009", "Tel 2A-Gel L", " 3", " 6", "19",
"Albumin", "56.4", "Alpha 1", "2.1", "Alpha 2", "13.4", "Beta 1",
"6.8", "Beta 2", "4.2", "Gamma", "17.1", #NULL#, #NULL#, #NULL#,
#NULL#, #NULL#, #NULL#, #NULL#, #NULL#, #NULL#, #NULL#, "A/G Ratio",
"1.29",
"000B000F001A002A003B004E005F0073008F00B900F7015001CC02730353047B05FF
07F60A7B0DAF11B916C21CF6247D2D7A3805443151FC6164723F844B971EAA26BCA5C
DCBDCBDE92CF270F92DFD63FF83FFFFFF08FD63FAB0F6E5F0CCE92CDF10D31BC54AB6
60A6B496CC86F177A369155B8A4F06439F39583028280B20EF1AC81582110D0D560A4
A07D505E1045A032E024901A1012700D4009B0077006500620070008D00B800E90119
013B014B0144012E0113010301070121014C018301C10208025A02B803220398041B0
4A9054205E20683072007B4083D08B80920097209A909C209BD099B095C0906089A08
1F07980710068D061505A8054504EB049C0459042003F703DB03CE03CE03D803EB040
30420043E0462048804B204E10513054C058A05D3062A0691070F07A6085F093D0A4A
0B8B0D090ECB10D6132715B618731B491E2220E5237525BC279F290E29FE2A712A702
A0C295628632745261124D3239C226B214A20391F381E431D551C6B1B861AA419C818
F0181917411665158814AA13CD12F1121A114310740FA50EE00E200D690CBC0C190B8
50AFF0A880A1C09BC0968092408F008D208C808D608FD094009A20A240AC50B850C64
0D610E810FC4112B12B41455160D17CD19911B481CE61E561F802049209920641FAA1
E791CE61B0D190816F314E412F111280F920E380D1F0C470BAD0B490B100AF70AF10A
F80B050B1A0B370B5F0B8F0BC70C070C530CB00D1A0D8D0E000E6C0EC80F110F420F6
30F780F910FAF0FD30FF410020FEE0FB00F4C0ECA0E360D9D0D060C780BF70B890B34
0AF90ADE0AE00AFB0B290B680BB20C060C5E0CB40D040D480D7F0DA90DC90DE10DEE0
DF20DEE0DEB0DEB0DF30E010E150E300E520E7E0EB20EEE0F320F7B0FCA101D107210
C8111F117511C512101256129612D1130613381369139B13D014081443148214BF14F
9152C1553156D157E15891591159D15AA15BC15CD15DD15EA15F215F615F315EC15E0
15D215C515B915B015A6159C158E157C15631541151514E114A71466142113D513851
33212DA1280122111BF115810F1108910230FBB0F500EE30E740E060D9A0D2F0CC50C
5F0BF90B940B2D0AC50A5F09F90997093808DD0884082F07DB078A073A06ED06A1065
7060D05C705840545050804CD04900452041403D903A1036C0339030602D00297025B
022101EA01B70188015E0138011900FD00E400CA00AF0094007A006600550048003A0
02A00160000", "0510870D81021271C31C4", "", #NULL#, #NULL#, #NULL#,
#NULL#, #NULL#, #NULL#, #NULL#, #NULL#, #NULL#, #NULL#, #NULL#,
#NULL#, "", "11/11/2008", "e546", #NULL#, #NULL#, #NULL#, #NULL#,
#NULL#, #NULL#, #NULL#, #NULL#", #NULL#, #NULL#, #NULL#, "#NULL#,
"Human", "NORM", #NULL#, #NULL#, #NULL#, #NULL#, #NULL#, #NULL#,
#NULL#, #NULL#, #NULL#, #NULL#, #NULL#, #NULL#

All the content of this Document, is a property of INTERLAB S.r.l. Via Rina Monti, 26 00155 Roma ITALY U.E Pag. 9 di 12
ELFOLAB DATA TRANFER TRANSMISSION REV. 02
PROTOCOL VIA SERIAL COMMUNICATION 29.01.14

Import 'Message'
The Import command can import a maximum of 999 records.
Import 'Message' has 26 message-fields described in the following table.

No. Description Max Length Notes


1 Sample ID 16
2 Concentration (e.g. Total -
Proteins)
3 Department 10
4 Name 30
5 Sex 1 The field have to be “M”
or “F”
6 Date of Birth - Format #YYYY-MM-DD#
7 Patient ID 40
8 IgG Value (Field for Immunofixations) -
9 IgA Value (Field for Immunofixations) -
10 IgM Value (Field for Immunofixations) -
11 IgE Value (Field for Immunofixations) -
12 IgD Value (Field for Immunofixations) -
13 Kappa Value (Field for Immunofixations) -
14 Lambda Value (Field for Immunofixations) -
st
15 1 Nephelometric free Field Name 8
st
16 1 Nephelometric free Field Value
17 2nd Nephelometric free Field Name 8
nd
18 2 Nephelometric free Field Value
19 Measure Unit of Nephelometric Values - The field have to have 3
possible values: "g/L",
"mg/L", "mg/dL”
20 Gel ID
21 Free 1 Field 20
22 Free 2 Field 20
23 Free 3 Field 20
24 Free 4 Field 20
25 Free 5 Field 20
26 Free 6 Field 20

All the content of this Document, is a property of INTERLAB S.r.l. Via Rina Monti, 26 00155 Roma ITALY U.E Pag. 10 di 12
ELFOLAB DATA TRANFER TRANSMISSION REV. 02
PROTOCOL VIA SERIAL COMMUNICATION 29.01.14

The format for the <Record Packet> while importing is the following:

(<STX>, <ETX>,<\r> and <\n> are char values described under “Row Packet”)

<STX>"sample id", "Concentration", "department", "name", "sex", "birth date", "patient id",
”IgG Value”, ”IgA Value”, ”IgM Value”, ”IgE Value”, ”IgD Value”, ”Kappa Value”, ”Lambda
Value”, "1st Nephelometric free Field Name", "1st Nephelometric free Field Value", 2nd
Nephelometric free Field Name ", 2nd Nephelometric free Value", “Measure Unit of
Nephelometric Values",“Gel ID”, “Free 1 Field”, “Free 2 Field”, “Free 3 Field”, “Free 4 Field”,
“Free 5 Field”, “Free 6 Field”<ETX><\r><\n>

It follows an example of Message Packet-Field inside a <Record Packet> while Importing:

"371618",7.7,"Hospital", "ANTONIO JULIO ESCALEIRA", "M", #1966-01-22#,


"1234", "1",5,"3", "7", "2", "4", "0.06", "Frac.A", "3", "????", "0", "g/L",
"345", "aa", "bb", "cc", "dd", "ee", "ff", ""
"", "371622", "6,3", #NULL#, "MARIA ISILDA LOPES", "F", #NULL#,"1237",
#NULL#, "9", "3", #NULL#, "2", "4", "0.06", #NULL#, "3", "????", "0", #NULL#,
#NULL#, #NULL#, #NULL#, #NULL#, #NULL#, #NULL#, #NULL#

All the content of this Document, is a property of INTERLAB S.r.l. Via Rina Monti, 26 00155 Roma ITALY U.E Pag. 11 di 12
ELFOLAB DATA TRANFER TRANSMISSION REV. 02
PROTOCOL VIA SERIAL COMMUNICATION 29.01.14

Notes
• If the field “Sampled ID" is empty (#NULL#) all the respective
line won’t import.
• If a field has value “NULL” then Elfolab will export #NULL# for
this field.
• STX =ASCII char 2
• ETX =ASCII char 3
• EOT =ASCII char 4
• ENQ =ASCII char 5
• ACK =ASCII char 6
• NAK =ASCII char 21

All the content of this Document, is a property of INTERLAB S.r.l. Via Rina Monti, 26 00155 Roma ITALY U.E Pag. 12 di 12

You might also like