HL7 OML_O21 Laboratory Order

HL7 message structure OML_O21 groups and segments from HL7 v2.5.1 Hide structure

These are the generated groups and segments for the version selected at the top of the page. The article explains the workflow, and this panel follows the chosen HL7 version.

Message Structure

SegmentNameRequiredRepeatable
Message Header Yes No
Software Segment No Yes
Notes and Comments No Yes
OML_O21.PATIENT
Patient group No No
Patient Identification Yes No
Patient Additional Demographic No No
Notes and Comments No Yes
Next of Kin / Associated Parties No Yes
OML_O21.PATIENT_VISIT
Patient Visit group No No
Patient Visit Yes No
Patient Visit - Additional Information No No
OML_O21.INSURANCE
Insurance group No Yes
Insurance Yes No
Insurance Additional Information No No
Insurance Additional Information, Certification No No
Guarantor No No
Patient Allergy Information No Yes
OML_O21.ORDER
Order group Yes Yes
Common Order Yes No
OML_O21.TIMING
Timing group No Yes
Timing/Quantity Yes No
Timing/Quantity Relationship No Yes
OML_O21.OBSERVATION_REQUEST
Observation Request group No No
Observation Request Yes No
Test Code Detail No No
Notes and Comments No Yes
Contact Data No No
Diagnosis No Yes
OML_O21.OBSERVATION
Observation group No Yes
Observation/Result Yes No
Test Code Detail No No
Notes and Comments No Yes
OML_O21.SPECIMEN
Specimen group No Yes
Specimen Yes No
Observation/Result No Yes
OML_O21.CONTAINER
Container group No Yes
Specimen Container detail Yes No
Observation/Result No Yes
OML_O21.PRIOR_RESULT
Prior Result group No Yes
OML_O21.PATIENT_PRIOR
Patient Prior group No No
Patient Identification Yes No
Patient Additional Demographic No No
OML_O21.PATIENT_VISIT_PRIOR
Patient Visit Prior group No No
Patient Visit Yes No
Patient Visit - Additional Information No No
Patient Allergy Information No Yes
OML_O21.ORDER_PRIOR
Order Prior group Yes Yes
Common Order No No
Observation Request Yes No
Notes and Comments No Yes
OML_O21.TIMING_PRIOR
Timing Prior group No Yes
Timing/Quantity Yes No
Timing/Quantity Relationship No Yes
OML_O21.OBSERVATION_PRIOR
Observation Prior group Yes Yes
Observation/Result Yes No
Notes and Comments No Yes
Financial Transaction No Yes
Clinical Trial Identification No Yes
Billing No No

OML_O21 is the laboratory order message introduced for more explicit lab and automation workflows. It still has the familiar order pieces, but it gives specimen and container detail first-class structure through groups such as specimen, container, prior result, and observation request.

If ORM_O01 is the broad old workhorse, OML_O21 is the lab-aware version you reach for when specimen identity, specimen type, collection details, container IDs, and lab automation matter. Many modern lab interfaces prefer OML because it avoids overloading OBR fields with specimen facts that deserve their own segments.

A small OML lab order example

MSH|^~\&|EHR|CITYHOSP|LAB|CITYLAB|20260715110500||OML^O21^OML_O21|OML00001|P|2.5.1 PID|1||123456^^^CITYHOSP^MR||Smith^Jane^Anne^^Ms^^L||19800314|F PV1|1|O|CLINIC^12^^CITYHOSP ORC|NW|ORD448812^EHR|||||^^^20260715114500|||12345^Careful^Clara OBR|1|ORD448812^EHR||24323-8^Comprehensive metabolic panel^LN|||20260715114500 SPM|1|SPEC20260715001^CITYLAB||BLD^Blood^HL70487|||||||||||||20260715114000 SAC|||TUBE778899^CITYLAB||||SER^Serum tube^L

What workflow it represents

The sender is normally an ordering system, EHR, or middleware. The receiver is a LIS, lab automation system, specimen processing system, or integration engine in front of those systems. The receiver creates the order and ties it to one or more specimens, containers, and tests.

The practical distinction from ORM is that the specimen is not an afterthought. SPM identifies the specimen and its type. SAC can identify the container. That becomes critical when the same order has multiple specimens, aliquots, tubes, or automation steps.

How to read the structure

The patient group is optional in the abstract structure but common in real interfaces. PID identifies the patient, PV1 ties the order to a visit when needed, and insurance or guarantor groups appear when the lab needs billing context.

The required order group starts with ORC. The observation request group usually contains OBR, notes, diagnosis, order-level OBX observations, then specimen groups. Prior result groups can carry history that helps the lab interpret or process the order.

Specimens and containers

Use SPM for specimen identity and specimen characteristics. Do not bury specimen type and collection details in a local OBR note if both systems can handle SPM. Container identifiers belong in SAC when the workflow tracks tubes, plates, trays, or automation containers.

Implementation guides sometimes map older OBR specimen fields into SPM fields during migrations from ORM to OML. That is fine as a transition plan, but the long-term model should make specimen and container information explicit.

Reference notes

Caristix describes OML_O21 as a laboratory and other order message that is required for lab automation use cases in older HL7 versions. Public lab-order implementation guides also show practical mappings from ORM-style OBR specimen details into OML/SPM structures.