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.
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.
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
ORU^R01 — Radiology Report
HeaderPatientClinicalOrder/ResultFinancial
Field
Name
Value
Note
MSH-3
Sending Application
RADIANT
Radiology information system (RIS) originating the report
MSH-4
Sending Facility
MAIN_HOSP
MSH-5
Receiving Application
EPIC
Ordering EHR that receives the result
MSH-7
Date/Time of Message
20260514093000
YYYYMMDDHHMMSS — when the report was transmitted
MSH-9
Message Type
ORU^R01^ORU_R01
Unsolicited Observation Result
MSH-10
Message Control ID
RAD00781
Unique message identifier for ACK matching
MSH-11
Processing ID
P
P=Production, T=Training, D=Debug
MSH-12
Version ID
2.5.1
MSH-15
Accept Acknowledgment Type
AL
AL=Always send an accept ACK
MSH-16
Application Acknowledgment Type
NE
NE=Never send an application ACK
Field
Name
Value
Note
PID-3
Patient Identifier List
MRN78214^^^MAIN_HOSP^MR
Medical Record Number — primary matching key
PID-5
Patient Name
TANAKA^MARCUS^LEE
Family^Given^Middle
PID-7
Date of Birth
19711203
YYYYMMDD format
PID-8
Administrative Sex
M
PID-11
Patient Address
812 CEDAR LN^^FAIRVIEW^OH^44016^USA
PID-13
Phone (Home)
^PRN^PH^^^^^555-301-4477
PID-18
Patient Account Number
ACCT55310^^^MAIN_HOSP^AN
Visit/encounter account
Field
Name
Value
Note
PV1-2
Patient Class
O
O=Outpatient — exam performed in the imaging department
PV1-3
Assigned Patient Location
RAD^XR2^^MAIN_HOSP
Department^Room^Bed^Facility
PV1-7
Attending Doctor
REF2244^PATEL^ANJALI^^^MD
Ordering/attending physician of record
PV1-10
Hospital Service
DIAG^Diagnostic Imaging^HL70069
PV1-18
Patient Type
OP^Outpatient^HL70004
Field
Name
Value
Note
ORC-1
Order Control
RE
RE=Observations/Performed (results being returned)
ORC-2
Placer Order Number
ORD44120^EPIC
Ordering EHR reference
ORC-3
Filler Order Number
FIL77820^RADIANT
RIS reference
ORC-5
Order Status
CM
CM=Completed
ORC-12
Ordering Provider
REF2244^PATEL^ANJALI^^^MD
Field
Name
Value
Note
OBR-1
Set ID
1
OBR-2
Placer Order Number
ORD44120^EPIC
OBR-3
Filler Order Number
FIL77820^RADIANT
OBR-4
Universal Service ID
36643-5^XR Chest 2 Views^LN
LOINC code for chest radiograph, 2 views (PA and lateral)
OBR-7
Observation Date/Time
20260514084500
When the imaging study was acquired
OBR-16
Ordering Provider
REF2244^PATEL^ANJALI^^^MD
OBR-22
Results Report/Status Change Date
20260514092600
When the report was finalized
OBR-24
Diagnostic Service Section ID
RAD
HL7 Table 0074 — RAD=Radiology
OBR-25
Result Status
F
F=Final result (HL7 Table 0123)
OBR-32
Principal Result Interpreter
PRI8890^OKAFOR^DAVID^^^MD^^^RADIANT^^^^RPT
Radiologist who interpreted the study and signed the report
Field
Name
Value
Note
OBX-1
Set ID
1
OBX-2
Value Type
TX
TX=Text data — free-text narrative
OBX-3
Observation Identifier
18782-3^Radiology Study observation^LN
LOINC code for a radiology study observation
OBX-4
Observation Sub-ID
1
Groups this line as the FINDINGS section
OBX-5
Observation Value
FINDINGS: The lungs are clear and well expanded without focal consolidation, effusion, or pneumothorax. Cardiomediastinal silhouette is within normal limits. No acute osseous abnormality. Visualized upper abdomen is unremarkable.
Radiologist narrative description of the study
OBX-11
Observation Result Status
F
F=Final
OBX-14
Date/Time of the Observation
20260514092600
OBX-16
Responsible Observer
PRI8890^OKAFOR^DAVID^^^MD
OBX|2|TX|19005-8^Radiology Imaging study^LN|2|IMPRESSION: No acute cardiopulmonary process.||||||F|||20260514092600||PRI8890^OKAFOR^DAVID^^^MD
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
ORU^R01 — Microbiology Culture Result
HeaderPatientClinicalOrder/ResultFinancial
Field
Name
Value
Note
MSH-3
Sending Application
LIS_MICRO
Microbiology laboratory information system
MSH-4
Sending Facility
MAIN_HOSP
MSH-5
Receiving Application
EPIC
Ordering EHR that receives the result
MSH-7
Date/Time of Message
20260512141500
YYYYMMDDHHMMSS — when the report was transmitted
MSH-9
Message Type
ORU^R01^ORU_R01
Unsolicited Observation Result
MSH-10
Message Control ID
MIC00339
Unique message identifier for ACK matching
MSH-11
Processing ID
P
P=Production, T=Training, D=Debug
MSH-12
Version ID
2.5.1
Field
Name
Value
Note
PID-3
Patient Identifier List
MRN61907^^^MAIN_HOSP^MR
Medical Record Number — primary matching key
PID-5
Patient Name
REYES^CAROLINE^M
Family^Given^Middle
PID-7
Date of Birth
19560728
YYYYMMDD format
PID-8
Administrative Sex
F
PID-11
Patient Address
47 BIRCH CT^^GRANDVIEW^OH^43212^USA
PID-13
Phone (Home)
^PRN^PH^^^^^555-778-9920
PID-18
Patient Account Number
ACCT49872^^^MAIN_HOSP^AN
Visit/encounter account
Field
Name
Value
Note
ORC-1
Order Control
RE
RE=Observations/Performed (results being returned)
ORC-2
Placer Order Number
ORD30185^EPIC
Ordering EHR reference
ORC-3
Filler Order Number
FIL62004^LIS_MICRO
Microbiology LIS reference
ORC-5
Order Status
CM
CM=Completed
ORC-12
Ordering Provider
GEN1180^HALE^SUSAN^^^MD
Field
Name
Value
Note
OBR-1
Set ID
1
OBR-2
Placer Order Number
ORD30185^EPIC
OBR-3
Filler Order Number
FIL62004^LIS_MICRO
OBR-4
Universal Service ID
630-4^Bacteria identified in Urine by Culture^LN
LOINC code for a urine bacterial culture
OBR-7
Observation Date/Time
20260510073000
When the urine specimen was collected
OBR-16
Ordering Provider
GEN1180^HALE^SUSAN^^^MD
OBR-20
Filler Field 1
URINE^Clean catch midstream^HL70070
Specimen source — clean-catch midstream urine
OBR-22
Results Report/Status Change Date
20260512140500
When the culture was finalized (48h incubation)
OBR-24
Diagnostic Service Section ID
MB
HL7 Table 0074 — MB=Microbiology
OBR-25
Result Status
F
F=Final result (HL7 Table 0123)
Field
Name
Value
Note
OBX-1
Set ID
1
OBX-2
Value Type
CE
CE=Coded Entry — a coded organism identity
OBX-3
Observation Identifier
630-4^Bacteria identified in Urine by Culture^LN
LOINC code for the organism-identified result
OBX-4
Observation Sub-ID
1
Groups all child results for isolate #1
OBX-5
Observation Value
112283007^Escherichia coli^SCT
SNOMED CT code for the organism identified
OBX-8
Abnormal Flags
A
A=Abnormal — a pathogen was recovered (HL7 Table 0078)
OBX-11
Observation Result Status
F
F=Final
OBX-14
Date/Time of the Observation
20260512140500
Field
Name
Value
Note
OBX-1
Set ID
2
OBX-2
Value Type
NM
NM=Numeric
OBX-3
Observation Identifier
564-2^Colony count^LN
LOINC code for a colony count
OBX-4
Observation Sub-ID
1
Same isolate #1 as the organism result above
OBX-5
Observation Value
100000
>=10^5 CFU/mL — clinically significant growth
OBX-6
Units
{CFU}/mL
UCUM annotation for colony-forming units per mL
OBX-7
References Range
<10000
OBX-8
Abnormal Flags
H
H=High — count exceeds the significance threshold (HL7 Table 0078)
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.
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.
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.
HL7 Table 0270 — addendum carries the same document type as its parent
TXA-3
Document Content Presentation
TX^Text^HL70191
HL7 Table 0191 — TX=Machine-readable text
TXA-4
Activity Date/Time
20260315163000
When the original procedure occurred
TXA-6
Origination Date/Time
20260318093000
When the addendum content was originated
TXA-7
Transcription Date/Time
20260318093000
TXA-9
Originator Code/Name
SUR5678^WILLIAMS^MARK^^^MD
Surgeon dictating the addendum
TXA-10
Assigned Document Authenticator
SUR5678^WILLIAMS^MARK^^^MD
TXA-11
Transcriptionist Code/Name
TR0102^GARCIA^MARIA^^^MT
TXA-12
Unique Document Number
DOC54988^TRANS_SYS
New document number assigned to this addendum
TXA-13
Parent Document Number
DOC54321^TRANS_SYS
Links the addendum to the original operative note
TXA-17
Document Completion Status
DO^Documented^HL70271
HL7 Table 0271 — addendum content is documented, pending authentication
TXA-18
Document Confidentiality Status
R^Restricted^HL70272
HL7 Table 0272
TXA-19
Document Availability Status
AV^Available^HL70273
HL7 Table 0273 — document is available for patient care
Field
Name
Value
Note
OBX-1
Set ID
1
OBX-2
Value Type
TX
TX=Text data
OBX-3
Observation ID
ADDENDUM^Addendum^LOCAL
Local code identifying this OBX as addendum text
OBX-5
Observation Value
Addendum dictated 03/18/2026 by Dr. Williams.\.br\Addendum to operative note of 03/15/2026.\.br\An incidental 1.2 cm hepatic cyst was noted on segment IVb of the liver during gallbladder dissection.\.br\The cyst was not biopsied and appeared benign. Recommend follow-up abdominal ultrasound in 6 months.
\.br\ = line break escape sequences
OBX-11
Observation Result Status
F
F=Final
A clinician issues a corrected version of a discharge summary after the discharge medication list was found to contain a transcription error.
HL7 Table 0271 — the edited content must be re-authenticated before it is final
TXA-18
Document Confidentiality Status
R^Restricted^HL70272
HL7 Table 0272
TXA-19
Document Availability Status
AV^Available^HL70273
HL7 Table 0273 — corrected document available for patient care
Field
Name
Value
Note
OBX-1
Set ID
1
OBX-2
Value Type
TX
TX=Text data
OBX-3
Observation ID
DISCH_SUMM^Discharge Summary^LOCAL
Local code identifying the discharge summary content
OBX-5
Observation Value
CORRECTED 03/20/2026 — supersedes the version transcribed 03/18/2026.\.br\Discharge Diagnosis: Community-acquired pneumonia, resolved.\.br\Discharge Medications: Amoxicillin 500 mg PO three times daily for 7 days.\.br\Correction: the original summary listed the dose as 250 mg; the correct prescribed dose is 500 mg.\.br\Follow-up with primary care in 1 week.
Revised content; \.br\ = line break escape sequences
OBX-11
Observation Result Status
C
C=Corrected — this OBX replaces a previously transmitted result
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
MDM^T11 — Document Cancel
HeaderPatientClinicalOrder/ResultFinancial
Field
Name
Value
Note
MSH-3
Sending Application
RIS_SYS
Radiology Information System originating the cancellation
MSH-4
Sending Facility
MAIN_HOSP
MSH-5
Receiving Application
EPIC
MSH-7
Date/Time of Message
20260321153000
YYYYMMDDHHMMSS
MSH-9
Message Type
MDM^T11^MDM_T01
Document Cancel Notification — a notification-only event, uses the MDM_T01 (no-content) message structure
MSH-10
Message Control ID
DOC00629
Unique message identifier for ACK matching
MSH-11
Processing ID
P
P=Production
MSH-12
Version ID
2.5.1
Field
Name
Value
Note
EVN-1
Event Type Code
T11
Document cancel notification — retracts a document transmitted in error
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.
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.
HL7 WorkbenchPaste any HL7 message to parse segments, look up fields, and validate structure interactively.
HL7 v2 Encoding & DelimitersThe segment, field, and component hierarchy, the MSH delimiter declaration, and escape sequences.
HL7 v2 documentationSegment, message-type, and field references for working with HL7 v2 interfaces.
HL7 vs FHIRHow HL7 v2 messaging compares to FHIR, and when each belongs in a healthcare integration.
We use cookies to improve your experience and analyze site usage.
Privacy Policy
By accepting, you allow analytics and advertising cookies — including
HubSpot (CRM and visitor analytics) and Google Ads (advertising and
remarketing tags) — to help us understand how visitors use the site
and to deliver relevant advertising. See our
Privacy Policy for details. Choose "Deny" to
keep only essential cookies.