Skip to content
Contact Us

HL7 v2 Sample Messages & Examples

HL7 v2 sample messages — a catalog of 20 complete, copy-paste-ready example messages across five families: ADT, ORU, ORM, SIU, and MDM. Expand any sample to explore it segment by segment, copy it as valid pipe-delimited HL7, or download it as a .hl7 file. Paste any example into HL7 Workbench to parse and validate it interactively.

All sample data is synthetic — no real patient information — and every message is structurally valid HL7 v2.5.1. Copied and downloaded messages use the carriage-return segment terminator expected by interface engines and HL7 parsers.

ADT messages report patient administration events as they happen — admissions, discharges, registrations, transfers between units, and demographic updates. They are the highest-volume traffic on most hospital interfaces, keeping every downstream system in step with where each patient is, their current status, and their identity. A trigger event code such as A01 for an admit or A08 for an update names the specific change.

ADT message reference

An emergency-department inpatient admission to the ICU.

ADT^A01 7 segments HL7 v2.5.1

A walk-in patient registers at the emergency department front desk before being seen by a clinician.

ADT^A04 7 segments HL7 v2.5.1

An admitted medical-surgical inpatient is discharged to home after completing their hospital stay.

ADT^A03 6 segments HL7 v2.5.1

A registrar corrects an existing patient’s home address and phone number after the patient reports a move.

ADT^A08 4 segments HL7 v2.5.1

ORU messages deliver clinical results back to the system that ordered them — laboratory values, radiology and pathology reports, microbiology cultures, and point-of-care readings. Each result group pairs an OBR segment describing the order with one or more OBX segments that carry the individual values, units, reference ranges, and abnormal flags. ORU^R01 is the unsolicited transmission that closes the order-to-result loop.

ORU message reference

A finalized Comprehensive Metabolic Panel result.

ORU^R01 12 segments HL7 v2.5.1

A radiologist finalizes a 2-view chest X-ray report, returning the narrative findings and impression to the ordering EHR.

ORU^R01 7 segments HL7 v2.5.1

A microbiology lab reports a final urine culture identifying E. coli with colony count and antibiotic susceptibility results.

ORU^R01 10 segments HL7 v2.5.1

A bedside patient monitor automatically posts a set of point-of-care vital signs for an inpatient to the EHR flowsheet.

ORU^R01 10 segments HL7 v2.5.1

ORM messages place and manage orders for laboratory tests, imaging studies, and medications. The ORC segment carries the order-control code — new, cancel, hold, or discontinue — while OBR and detail segments describe exactly what is being requested. ORM is the request half of the workflow that ORU result messages complete.

ORM message reference

A STAT Complete Blood Count order placed for a febrile patient.

ORM^O01 7 segments HL7 v2.5.1

An ED physician orders a CT of the abdomen and pelvis with IV contrast to evaluate acute right lower quadrant pain.

ORM^O01 6 segments HL7 v2.5.1

A hospitalist orders intravenous vancomycin every 12 hours for an inpatient with a confirmed MRSA bloodstream infection.

ORM^O01 6 segments HL7 v2.5.1

A clinician cancels a previously placed lipid panel after the patient was discharged before the specimen could be collected.

ORM^O01 5 segments HL7 v2.5.1

SIU messages communicate appointment activity between a scheduling system and the EHR — new bookings, reschedules, modifications, cancellations, and no-shows. The SCH segment carries the appointment itself, while AIS, AIG, AIL, and AIP segments describe the service, resources, location, and personnel involved. A trigger event from S12 through S26 names the scheduling action.

SIU message reference

A new routine office-visit appointment booking.

SIU^S12 8 segments HL7 v2.5.1

A patient’s cardiology follow-up visit is moved from its original slot to a later date and time.

SIU^S13 8 segments HL7 v2.5.1

An MRI appointment keeps its original time slot but is reassigned to a different radiologist.

SIU^S14 8 segments HL7 v2.5.1

A patient cancels a scheduled dermatology consultation.

SIU^S15 8 segments HL7 v2.5.1

MDM messages manage clinical documents across their lifecycle — transcribed notes, dictated reports, addenda, replacements, and cancellations. The TXA segment carries the document identifiers and status, and OBX segments can carry the document content itself. Trigger events T01 through T11 distinguish a brand-new document from an edit or a status change.

MDM message reference

A transcribed operative note delivered as an original document.

MDM^T02 6 segments HL7 v2.5.1

A surgeon files an addendum to a previously transcribed operative note to record an intraoperative finding omitted from the original dictation.

MDM^T06 6 segments HL7 v2.5.1

A clinician issues a corrected version of a discharge summary after the discharge medication list was found to contain a transcription error.

MDM^T08 6 segments HL7 v2.5.1

A radiology report is retracted after staff discover it was filed against the wrong patient and sent to the EHR in error.

MDM^T11 5 segments HL7 v2.5.1

Every message here is a realistic, standards-valid HL7 test message. Copy one into HL7 Workbench to parse and validate it interactively, send it over MLLP to an interface-engine channel, or download the .hl7 file to drive an interface engine or test harness. Because all sample data is synthetic, these messages are safe for non-production testing with no PHI exposure.

An ADT^A01 admit message is a vertical stack of segments, each a single line with a three-character name and a clear role. MSH and EVN carry the message and event metadata; PID and PV1 carry the patient and the visit; NK1 and IN1 add the next of kin and insurance. Read top to bottom, the segments tell the full story of one admission.
What is an HL7 v2 message?

An HL7 v2 message is a structured, pipe-delimited text record that healthcare systems exchange to share clinical and administrative data. Each message is a sequence of segments — lines such as MSH, PID, and OBX — that carry fields like patient identity, orders, and results between EHRs, labs, and interface engines.

What is an ADT message?

ADT (Admit, Discharge, Transfer) messages are HL7 v2 messages that communicate patient administration events. A trigger code identifies the event — A01 for an admission, A03 for a discharge, A08 for a demographic update — keeping registration, billing, and downstream clinical systems synchronized as patient status changes.

What is an ORU^R01 message?

ORU^R01 is the HL7 v2 message that delivers unsolicited observation results — laboratory values, radiology reports, microbiology cultures, and vital signs. It carries OBR segments for the order and OBX segments for each result, returning finalized findings from a lab or device to the ordering EHR or clinician.

What is the format of an HL7 v2 message?

An HL7 v2 message is plain text organized into segments — one per line, each ending with a carriage return. Every segment starts with a three-letter identifier and splits into fields separated by the pipe character; fields divide further into components separated by the caret. The MSH segment declares these delimiters.

What segments are in an HL7 message?

Every HL7 v2 message begins with an MSH (message header) segment. Other common segments include PID for patient identity, PV1 for the patient visit, EVN for the trigger event, OBR and OBX for orders and observation results, ORC for order control, and SCH for scheduling activity.