MajwareMAJWARE
OML
^O21
Order Management5 required / 4 optional segments

OML^O21Laboratory Order

OML^O21 is the modern laboratory order message introduced in HL7 v2.5 as the recommended replacement for ORM^O01 in lab ordering workflows. It includes a dedicated SPM (Specimen) segment that explicitly describes the specimen required, making it more precise for LIS-facing interfaces.

When Is This Sent?

Sent when placing a specimen-based lab order in a LIS-capable system. Fired by the CPOE or EHR when the clinician places a lab order requiring a physical specimen (blood, urine, tissue).

Real-World Usage

OML^O21 is mandated by IHE Laboratory Testing Workflow (LTW) profile and is the preferred lab order message for modern LIS deployments. The SPM segment eliminates ambiguity about specimen type and collection requirements. Hospitals transitioning from ORM^O01 to OML^O21 often do so when upgrading their LIS — both systems must support the new message type before migration.

Message Structure

Segment names link to their field-level reference pages.

#SegmentPurpose in this messageReqRepeat
1MSHMessage header with OML^O21 in MSH.9R
2PIDPatient demographics including MRNR
3ORCOrder common segment — ORC.1 specifies action (NW=New, CA=Cancel)R
4OBRObservation request — lab test code and ordering providerR
5SPMSpecimen details: specimen type, collection method, collection date/timeRYes
6PV1Patient visit context (inpatient/outpatient)O
7DG1Clinical indication/ordering diagnosisOYes
8NTEOrder notes and special instructionsOYes
9OBXPre-existing observations relevant to the order (e.g., height/weight)OYes

Example Message

Realistic example with fake patient data. Paste into the HL7 Message Viewer to explore interactively.

HL7 v2.x Message
1MSH||^~\&|EPIC|HOSPITAL_A|LIS|HOSPITAL_A|20260310143205||OML^O21^OML_O21|OML00001|P|2.5.1
2PID||1||123456^^^HOSP_A^MR||Smith^John^M^^Mr.||19850315|M
3PV1||1|I|4A^201^1^^^HOSP_A||||1234^Ahmed^Dr.^Khalid
4ORC||NW|ORD20260310001^EPIC|||SC||||20260310143205|1234^Ahmed^Dr.^Khalid
5OBR||1|ORD20260310001^EPIC||85025^CBC with Auto Differential^CPT4|||20260310143205|||||||||1234^Ahmed^Dr.^Khalid
6SPM||1|||BLDV^Venous blood^HL70487||||||P||||||20260310143205

Troubleshooting Scenarios

LIS not creating specimen collection task after OML^O21

Cause

SPM.4 (specimen type) code is not in the LIS specimen catalog. The LIS cannot map the specimen type to a collection container or tube.

Fix

Obtain the LIS's supported specimen type codes and map your sending system's codes to them in the interface engine. Standard values come from HL7 table 0487 (Specimen Type) — verify the LIS is using standard codes or a local extension.

Orders duplicated in LIS — both ORM^O01 and OML^O21 received for same order

Cause

During a migration period, the sending system is configured to send both ORM^O01 (legacy channel) and OML^O21 (new channel) simultaneously.

Fix

Disable the legacy ORM^O01 channel to the LIS once OML^O21 is confirmed working. Use ORC.2 (placer order number) as the deduplication key — both messages will carry the same placer order number.

Common Confusions

OML^O21 (lab order with specimen) vs ORM^O01 (legacy general order). OML^O21 has the SPM segment for explicit specimen description; ORM^O01 encodes specimen details in OBR fields. Also: OML^O21 vs OMG^O19 — OML is specifically for lab/specimen-based orders; OMG^O19 is for general clinical orders that don't require a specimen (e.g., imaging, consults).

Related Message Types

Segment Reference

Paste this message into our viewer

Interactive HL7 parser. Decodes every field, validates structure, highlights errors. Free, no signup.

Open HL7 Message Viewer →

Need mapping templates?

The HL7 Integration Toolkit includes field mapping worksheets and interface spec templates for every major HL7 message type including OML^O21.

View HL7 Integration Toolkit →
← Back to HL7 Message Types Reference