17.1 HL7 v2 Messages (ADT, ORM, ORU), Segments & FHIR Basics
Key Takeaways
The integration profile establishes which v2 messages and order codes handle workflow events.
Use MSH-1 and MSH-2 for the actual separators. Segment terminators and MLLP block boundaries are separate.
Correlate the response MSA-2 to the initiating MSH-10 and distinguish application from enhanced accept acknowledgments.
FHIR resources can represent requests, study metadata and results. Check the declared version, profile and supported exchanges.
SMART App Launch supports authorization and launch context. DICOMweb Search, Retrieve and Store operate on imaging resources.
Identify the Message and Its Intended Event
HL7 version 2 is a family of clinical messaging specifications. The sending and receiving systems agree on a version, message profile and terminology. For example, ADT A01 can inform registration systems of an admission, A04 of patient registration, A08 of patient information changes and A40 of a merge under the applicable patient-identity workflow. SIU messages communicate configured scheduling events such as S12 for a new appointment or S15 for an appointment cancellation. Appointment events and order events are distinct.
An interface that uses legacy ORM^O01 can represent general order events. Another profile can use OMG for general clinical orders or OMI for imaging order communication in specified transactions. When the agreed interface uses the standard order-control codes, ORC-1 NW means new order, CA means cancel request and XO means change request. A request code does not prove that its receiver acted on it. An unsolicited ORU^R01 can carry findings or report text under the selected implementation.
Read Separators, Identifiers and Result Status
In the common delimiter encoding, segments are terminated by carriage return (hex 0D). MSH-1 declares the field separator, usually a vertical bar. In v2.5.1, the common MSH-2 string defines the component, repetition, escape and subcomponent separators, usually caret, tilde, backslash and ampersand in that order. Check the actual message and agreed character set. In the common encoding, the escape form \F\ represents a literal field separator in a suitable value.
| Segment | Fields worth checking |
|---|---|
| MSH message header | MSH-9 message type, trigger and structure, MSH-10 message control ID, MSH-12 version and MSH-15/16 acknowledgment settings |
| PID patient identification and PV1 patient visit | PID-3 identifiers and assigning authority, PID-5 name, and PV1-19 visit number |
| ORC common order and OBR observation request | ORC-1 order control, ORC-2/3 placer/filler identifiers, OBR-4 service identifier. The accession location is specified by the interface profile |
| OBX observation result | OBX-2 value type, OBX-5 result value, OBX-11 observation status such as F for final. The applicable report or viewer-link representation depends on the interface |
| MSA acknowledgment and ERR error segment | MSA-1 acknowledgment code, MSA-2 original control ID and ERR details when present |
For example, in an agreed ORM interface, a message with a unique control ID TRAIN17 can carry a patient identifier issued by one facility and an ORC segment with CA and the original placer order identifier. Trace the original identifier through the receiving interface. Do not conclude the exam was canceled solely from the outgoing code.
Separate MLLP Framing From Acknowledgment
Minimal Lower Layer Protocol (MLLP) commonly wraps a v2 message on a TCP stream. The framing uses 0B before the payload and 1C followed by 0D after it. For a 412-byte payload including its segment terminators, the framed application stream has bytes before TCP/IP overhead. If the end marker is missing, a receiver may wait, time out or reject according to its implementation even though TCP transported the bytes.
Original acknowledgment mode uses AA, AE and AR for application accept, error and reject. Enhanced mode distinguishes accept acknowledgments CA, CE and CR from application acknowledgments AA, AE and AR. Follow the message profile and MSH-15/MSH-16 to determine when acknowledgments are requested. The same text CA in MSA-1 and ORC-1 has different meanings. Use MSA-2 to match the acknowledgment to the initiating MSH-10. An acknowledgment from an intermediate interface is not proof of a downstream clinical update. Use the actual status and error evidence before deciding whether to retry.
Connect Clinical Resources and Image Services
HL7 FHIR can exchange resources through RESTful HTTP APIs as well as other exchange patterns. For example, in release R4 a ServiceRequest can represent the requested imaging service, an ImagingStudy can describe the DICOM study and retrieval information, and a DiagnosticReport can link the findings to relevant clinical context and imaging studies. Verify the release and supported profiles and operations.
SMART App Launch specifies discovery, authorization and launch context for participating applications, using OAuth 2.0 and OpenID Connect where applicable. It does not itself transfer DICOM images. A viewer can use the DICOMweb Studies Service to search for studies and series (QIDO-RS) and retrieve objects or frames (WADO-RS). STOW-RS stores supported imaging resources. Check viewer context and authorization separately from the image service.
Sources
- HL7 v2.5.1 control, encoding, MSH and acknowledgment
- HL7 v2.5.1 patient administration and merges
- HL7 v2.5.1 order exchange and control codes
- HL7 v2.5.1 observation and results
- HL7 v2.5.1 scheduling
- Microsoft HL7 MLLP transport and frame markers
- HL7 FHIR R4 ServiceRequest
- HL7 FHIR R4 ImagingStudy
- HL7 FHIR R4 DiagnosticReport
- HL7 SMART App Launch 2.2
- DICOMweb Studies Service
An agreed legacy interface uses ORM^O01 and standard v2 order-control codes. Which outbound field value requests cancellation of an existing CT order?
MSA-1 CA in the order message
ORC-1 CA in the ORM^O01
OBX-11 F in an ORU^R01
SIU^S15 as proof the imaging order was canceled
The interface profile uses original application acknowledgment codes. A receiving application logs an application error on message TRAIN17. Which MSA fields report that result and correlate it?
MSA-1 AA and MSA-2 set to the patient ID
MSA-1 CA and MSA-2 set to the procedure code
MSA-1 AR and no message identifier
MSA-1 AE and MSA-2 TRAIN17
An authorized image viewer uses DICOMweb to find the CT series in a known study and then retrieve the frames. Which transactions fit?
QIDO-RS Search and WADO-RS Retrieve
STOW-RS Search and C-FIND pixel transfer
WADO-RS Store and QIDO-RS upload
An HL7 appointment cancel and MLLP image transfer
Sections you finish are checked off in the contents.