Introduction to ASTM E1394 and LIS02-A2 Message Formats

Theron W. Genaux

Revision 1

7-August-2024

 

 

Introduction

The ASTM E1394 standard was created over 30 years ago. However, Laboratory Information Systems (LIS), middleware, and clinical laboratory instruments still use messages based on the ASTM E1394 (now LIS02) standard. I will use "ASTM" throughout this document to refer to the ASTM E1394, LIS2, and LIS02 standards.

Here is an example of an immunohematology-based ASTM message. I want to help you understand its structure and identify each part. Don't worry, we won't cover everything all at once. We'll start with the basics and then move on to more complex messages as we go along.

An ASTM message comprises lines called records, a list of fields separated by a pipe character (|). Every record begins with a Record Type ID, like O, for an Order record, which indicates the type of data contained in that record.

Field Separator

Let's start with an ASTM Order record containing only essential information and nothing more.

The table below shows the fields in the above Order record and their field position number, Data Type, and values. The field position in the record identifies its Data Type. Not all fields are required.

image-20240419223033977

ASTM messages use field separators, making it easy for computers to create and read them.

Let me show you how to manually disassemble this Order record and identify each field and the type of data it contains.

You can use any text editor that can show line numbers and can replace each field separator (|) with a line break. I'll demonstrate with Notepad++.

image-20240719202227277

The first step is to split the fields in the record into separate lines. In the Replace dialog:

  1. Enter the field separator.

  2. Enter the new line characters: \r\n

  3. Enable the Extended search.

  4. Click Replace All

You now have a list of fields where each line number is also its field position.

image-20240420183844463

Field names and their position are defined in the ASTM standard. The specification for the Order record is in section 8 of the ASTM E1394-97 standard. The field definitions start with section 8.4.1 (Record Type ID). The field position is the last number of the section number that defines it, 1 for the Record Type ID.

The Specimen ID is in section 8.4.3 and is referred to as O.3 for Order record field 3.

Below, I list the fields, their position notation, Data Type, and value.

PositionData TypeValue
O.1Record Type IDO
O.2Sequence Number1
O.3Specimen IDSID101
O.5Test IDABORH
O.16Specimen DescriptorCENTBLOOD

You can reverse the process to create an Order record manually.

image-20240719204446801

To hand code an Order record:

  1. Enter each field attribute on the line number corresponding to its position as defined by the ASTM standard or the manufacturer's LIS interface guide. For example, the sample ID goes in field 3 (O.3) for an Order record, so write it on line 3.

  2. Enter the new line characters: \r\n

  3. Enter the field separator.

  4. Enable the Extended search.

  5. Click Replace all

Now, we have manually created an Order record. Computers are programmed to do something similar.

image-20240420185552555

 

Repeat Field Separator

A Repeat field contains multiple unique field values. For example, an order record with multiple Specimen IDs, such as a pair of blood samples from the same draw, one containing packed red blood cells and the other plasma.

If we break the above Order record into fields, we get the following fields and values:

PositionData TypeValue
O.1Record Type IDO
O.2Sequence Number1
O.3Specimen IDSID102\SID103
O.5Test IDABO FWD/RVS
O.16Specimen DescriptorPACKEDCELLS\PLASMA

Field O.3, Specimen ID is a Repeat field. We can split the O.3 field into the repeated fields by replacing the Repeat field separator (\) with new lines. This is identical to what we did with fields.

And we end up with the following:

image-20240529214915431

The notation for repeat fields is their filed notation plus their repeat field position. For sample ID SID103, the notation is O.3.2.

Below, I list the complete order record field position notations, Data Types, and values.

PositionData TypeValue
O.1Record Type IDO
O.2Sequence Number1
O.3.1Specimen IDSID102
O.3.2Specimen IDSID103
O.5Test IDABO FWD/RVS
O.16.1Specimen DescriptorPACKEDCELLS
O.16.2Specimen DescriptorPLASMA

Component Separator

One data type that occurs in ASTM is a person's full name. ASTM specifies that full names follow this format: last name, first name, middle name or initial, suffix, and title. Full names have several components, and the component separator separates each part. Naming conventions vary considerably around the world. Full names can be in any format agreed upon between the sender and the receiver. This means the parts of a full name do not have to be separated by the component separator. When more than one full name is required, they are separated by a repeat separator.

Let's add a couple of ordering physicians to our order record. Physicians can be identified by their Identifier code, names, or both. I will use both in our example.

As we know, the first step is to break the order record into fields.

image-20240720193941865

 

We can see that O.17 is the ordering physician field and contains two repeat fields separated by the repeat field separator (\).

We copy this field into another tab and break the repeat fields into separate lines.

image-20240719214822554

We'll copy the first repeat field, O.17.1, into another tab and break the components into separate lines.

We will do the same with the component separator (^) as we did with the field separator.

image-20240719215046542

O.17.1.1 is the physician ID, O.17.1.2 is the last name, and O.17.1.3 is the first name.

image-20240719215548243

Below is a list of the fields, their position notation, Data Type, and value.

PositionData TypeValue
O.1Record Type IDO
O.2Sequence Number1
O.3Specimen IDSID101
O.5Test IDABORH
O.17.1.1Physician [1] - IdentifierPHY1001
O.17.1.2Physician [1] - Last NameBrewster
O.17.1.3Physician [1]- First NameKatherine
O.17.2.1Physician [1] - IdentifierPHY1002
O.17.2.2Physician [1] - Last NameMcCoy
O.17.2.3Physician [1]- First NameLeonard
O.17.2.4Physician [1]- Middle InitialH
O.16Specimen DescriptorCENTBLOOD

Escape Sequences

Separators and escape characters can vary with each message; they are defined in the Header record and used throughout the message. The escape character is the last of the four defined characters in the header. Its primary purpose is to create a sequence of characters to replace message separator characters used in field data. There is also an escape sequence for the escape character.

ASTM messages use escape sequences to handle situations where the standard field separator character might appear within the data.

Escape sequences avoid confusion when the receiver reads a message. The special character sequence tells the receiving system to interpret the escape sequence as a separator character, not part of the message's structure.

Take, for example, the name of a profile that contains the repeat field separator, as in "ABO\Rh\ABScr", named after the analyses returned by the profile. If this profile name were placed in the order profile field as is, the receiver would read it as three repeat fields and not one profile name. To prevent this, the repeat field separators in the text data are replaced by the sender with an escape sequence, which will be converted back to the repeat field separator character by the receiver of the message.

ESCAPE Sequence 
&F&Embedded field separator
&S&Embedded component separator
&R&Embedded repeat field separator
&E&Embedded escape character

 

 

ASTM Record Notation

The ASTM record notation I use allows us to identify the parts of a record. It consists of a record ID followed by indexes, one for Field, Repeat Field, and Component.

Record-ID.Field.Repeat.Component

When a message contains records with a sequence number greater than 1, we can use an array notation to indicate the record being referenced.

Record-ID.Field[SequenceNumber].Repeat.Component

Breaking down the introductory Message

As promised, we will break down the example ASTM message in the introduction into its parts.

Header Record

The Header record defines the separators and escape character, and contains information about the sender and receiver. It is the first record in an ASTM message.

PositionTypeValue
H.1Record Type IDH
H.2Delimiter Definition^&
H.5Sender Name or IDOCDVISION5.13.1.46935^J60009999
H.12Processing ID (P, T, D, Q)P
H.13Version NumberLIS2-A
H.14Date and Time of Message20210309142633

Patient Record

The patient record contains patient demographics, such as patient IDs, names, sex, and dates of birth.

PositionTypeValue
P.1Record Type IDp
P.2Sequence Number1
P.3Practice-Assigned Patient IDPID123456
P.5Patient ID Number 3NID123456MID123456OID123456
P.5.1.1National IDNID123456
P.5.1.2Medical RecordMID123456
P.5.1.3Other IDOID123456
P.6Patient NameBrownBobbyB
P.6.1.1Patient Last NameBrown
P.6.1.2Patient First NameBobby
P.6.1.3Patient Middle InitialB
P.7Mother’s Maiden NameWhite
P.8Birthdate19650102030400
P.9Patient SexU
P.14Attending Physician IDPHY1234KildareJames^P
P.14.1.1Physician IDPHY1234
P.14.1.2Last NameKildare
P.14.1.3First NameJames
P.14.1.4Middle InitialP
P.15Special Field 1Blaine

Test Order Record

The Test Order record contains all required information to request tests to be performed on one or more specimens.

PositionTypeValue
O.1Record Type IDO
O.2Sequence Number1
O.3Specimen IDSID305
O.5Universal Test IDABO
O.6PriorityN
O.7Requested/Order Date and Time20210309142136
O.16Specimen DescriptorCENTBLOOD
O.23Date/Time Results Reported or Last Modified20210309142229
O.26Report TypesR

Result Record (1)

The Result record

A Result record is returned for each separate analysis requested by the test.

PositionTypeValue
R.1Record Type IDR
R.2Sequence Number1
R.3Test IDABO
R.4AnalysisB
R.9Result StatusR
R.11Operator IdentificationAutomatic
R.13Date/Time Test Completed20210309142229
R.14Instrument IdentificationJ60009999

Result Record (2)

PositionTypeValue
R.1Record Type IDR
R.2Sequence Number1
R.3Test IDRh
R.4AnalysisPOS
R.9Result StatusR
R.11Operator IdentificationAutomatic
R.13Date/Time Test Completed20210309142229
R.14Instrument IdentificationJ60009999

 

Terminator Record (L)

PositionTypeValue
R.1Record Type IDL
R.2Sequence Number1
R.3Termination CodeN

 

Definitions

TERMDESCRIPTION
ASTMRefers to ASTM E1394 and LIS02 standards.
ASTM MessageAn ordered list of ASTM records, starting with a Header record and ending with a Terminator record.
ASTM Message FormatA specific implementation of the ASTM E1394 or LIS02 standards by a manufacturer.
ComponentA single data element of a field's Data Type, i.e., of the patient name field in a Patient record.
Data TypeA defined format of one or more data values, such as a birthdate, patient's name, etc.
FieldAn attribute (Data Type) of a record, i.e. a patient's name
LISLaboratory Information Systems
RecordAn ordered list of fields, i.e., the fields in a Patient record containing a patient's name, date of birth, etc.
Repeat fieldA repeating field (Data Type), i.e., a list of two or more of a patient's attending physicians
Sequence NumberUsed to distinguish records of the same type that may occur multiple times within ahierarchical level within a message.

 

Selected Record Type IDs

Type IDRecord Description
HMessage Header - contains information about the sender and defines separators and the escape character
PPatient - includes information on an individual patient
OOrder - when sent from an LIS, this record contains information about a test order. When sent by the instrument, it shall provide information about the test request.
RResult - contains the results of a single analytic determination.
MManufacturer Information - the fields in this record are defined by the manufacturer.
QRequest for information - used to request information, e.g., outstanding orders for a sample.
LMessage Terminator - the last record in the message. A header record may be transmitted after this record, which signifies the start of a second message.

Field Definitions

You can find the descriptions of fields in the LIS standards and in instrument LIS Interface guides or specificati0ns.

Additionally, in Markey, Brian (2010) (1),

 

References to Standards, LIS Guides, and Other Sources

You can find many instrument and middleware LIS guides by searching for Software LIS Interface Specification Guide

You can do general search by entering the following Google search: