PipeHat Open PipeHat
HL7 V2 | TRIGGER EVENT O21

OML^O21: Laboratory order

The laboratory order message: orders for lab tests, with ORC and OBR per order and specimen details where needed.

Message type
OML · Laboratory order message
Trigger event
O21
Message structure
OML_O21 · per HL7's current table 0354; older versions sometimes paired events differently
In MSH-9
OML^O21^OML_O21

Segments in OML_O21 and their FHIR resources

The segments of the OML_O21 structure as listed in the HL7 v2-to-FHIR Implementation Guide, with the FHIR resources each one maps to. Square brackets mean optional and braces mean the segment can repeat. Indented segments belong to the group above them; “required” means required whenever that group is present.

SegmentNameRequiredFHIR resources
MSHMessage HeaderYesBundle MessageHeader Provenance
[{SFT}]SoftwareNo · repeatsProvenance
[ UAC ]User Authentication CredentialNo—
[{NTE}]Notes and Comments (for Header)No · repeats—
PATIENT groupNo
PIDPatient IdentificationYesPatient Provenance
[PD1]Additional DemographicsNoPatient Observation
[{PRT}]Participation (for Patient)No · repeatsPractitionerRole RelatedPerson
[{NTE}]Notes and Comments (for Patient ID)No · repeats—
[{NK1}]Next of Kin/Associated PartiesNo · repeatsRelatedPerson Patient
[{ARV}]Access RestrictionsNo · repeats—
PATIENT_VISIT groupNo
PV1Patient VisitYesEncounter Basic Patient Coverage
[ PV2 ]Patient Visit- Additional InfoNoEncounter
[{PRT}]Participation (for Patient Visit)No · repeatsPractitionerRole
INSURANCE groupNo · repeats
IN1InsuranceYesCoverage
[ IN2 ]Insurance Additional InformationNo—
[ IN3 ]Insurance Additional Information, CertificationNoCoverage
[ GT1 ]GuarantorNo—
[{AL1}]Allergy InformationNo · repeatsAllergyIntolerance
ORDER groupYes · repeats
ORCCommon OrderYesServiceRequest Provenance
[{PRT}]Participation (for Common Order)No · repeatsPractitionerRole
TIMING groupNo · repeats
TQ1Timing/QuantityYesServiceRequest
[{TQ2}]Timing/Quantity Order SequenceNo · repeats—
OBSERVATION_REQUEST groupNo
OBRObservation RequestYesServiceRequest Specimen
[ TCD ]Test Code DetailsNo—
[{NTE}]Notes and Comments (for Detail)No · repeatsServiceRequest
[{PRT}]Participation (for Observation Request)No · repeatsPractitionerRole
[ CTD ]Contact DataNo—
[{DG1}]DiagnosisNo · repeatsCondition
OBSERVATION groupNo · repeats
OBXObservation/ResultYesObservation
[{PRT}]Participation (for OBX)No · repeatsDevice Observation PractitionerRole
[ TCD ]Test Code DetailNo—
[{NTE}]Notes and Comments (for Results)No · repeatsObservation
SPECIMEN groupNo · repeats
SPMSpecimenYesSpecimen
SPECIMEN_OBSERVATION groupNo · repeats
OBXObservation/Result related to specimenYes—
[{PRT}]Participation (for Specimen Observation)No · repeats—
CONTAINER groupNo · repeats
SACSpecimen ContainerYes—
CONTAINER_OBSERVATION groupNo · repeats
OBXObservation/Result related to containerYes—
[{PRT}]Participation (for Container Observation)No · repeats—
[SGH]Segment Group HeaderNo—
PRIOR_RESULT groupNo
PATIENT_PRIOR groupNo
PIDPatient Identification– previous resultNo—
[PD1]Additional Demographics – previous resultNo—
[{PRT}]Participation (for Patient Prior)No—
[{ARV}]Access RestrictionsNo—
PATIENT_VISIT_PRIOR groupNo
PV1Patient Visit– previous resultNo—
[ PV2 ]Patient Visit Add. Info – previous resultNo—
[{PRT}]Participation (for Patient Visit Prior)No—
ORDER_PRIOR groupNo
ORCCommon Order- previous resultNo—
[{PRT}]ParticipationNo—
OBROrder Detail- previous resultNo—
[{NTE}]Notes and Comments- previous resultNo—
TIMING_PRIOR groupNo
TQ1Timing/QuantityNo—
[{TQ2}]Timing/Quantity Order SequenceNo—
OBSERVATION_PRIOR groupNo
OBXObservation/Result- previous resultNo—
[{PRT}]Participation (for Observation Prior)No—
[{NTE}]Notes and Comments- previous resultNo—
[SGT]Segment Group TrailerNo—
[{FT1}]Financial TransactionNo—
[{CTI}]Clinical Trial IdentificationNo—
[ BLG ]Billing SegmentNo—

Source: HL7 Terminology (THO) 7.4.0 and the HL7 v2-to-FHIR Implementation Guide 1.0.0, published by HL7 International under CC0. Check your trading partner's specification for the values they actually send.