HL7 v2 Reference Guides
The reference guides in this section cover the mechanics beneath every HL7 v2 interface: how values are typed, how messages are encoded, how they travel over the wire, how the standard evolved across versions, and how to diagnose interfaces when they misbehave. Message-level and segment-level detail live in their own sections; this is the layer underneath both.
Structure & Encoding
Section titled “Structure & Encoding”Data types define what a field’s value looks like; encoding defines how those values are separated and escaped inside a message. Together they explain why PID-3 can carry an identifier, an assigning authority, and a type code in a single field.
Transport
Section titled “Transport”MLLP (Minimal Lower Layer Protocol) wraps HL7 v2 messages for delivery over TCP. Nearly every production v2 interface runs on it, and most connectivity problems trace back to its framing or acknowledgment rules.
Versions
Section titled “Versions”HL7 v2 is backward compatible by design, which is why a v2.3 sender and a v2.5.1 receiver can usually interoperate. Knowing what each version added tells you which fields you can rely on.
Troubleshooting
Section titled “Troubleshooting”Organized by symptom rather than by cause, so you can start from what you observe (a growing queue, a silent socket, duplicate results) and work toward the fix.
Reference Summary
Section titled “Reference Summary”| Guide | Covers | Start here when |
|---|---|---|
| Data Types | CX, XPN, XAD, CE/CWE, TS, HD, PL, XCN | A field holds more components than you expected |
| Encoding | Delimiters, MSH-1/MSH-2, escape sequences | Carets or ampersands are showing up as literal text |
| MLLP | Framing bytes, ACKs, ports, TLS | Sockets connect but messages never arrive |
| Versions | v2.1 through v2.9, MSH-12 | Sender and receiver disagree on a field’s meaning |
| Troubleshooting | Symptom-driven diagnosis | An interface worked yesterday and does not today |