Logo
Healthcare Interoperability

HL7 v2 (Health Level Seven)

HL7 v2 is the pipe-delimited messaging standard that still powers most hospital interoperability — ADT admissions, ORU results, ORM orders exchanged as segments (MSH, PID, PV1, OBR, OBX) between clinical systems.

Anatomy of a message

An HL7 v2 message is a sequence of -separated segments. Each segment starts with a 3-letter type (MSH header, PID patient identification, PV1 visit, OBR order, OBX observation result), then pipe-delimited fields, caret-delimited components, and ampersand subcomponents. The MSH segment declares the delimiters and the message type (e.g., ADT^A01 for an admission, ORU^R01 for a lab result) plus the version in MSH-12.

The standard is deliberately loose: every site implements it through an implementation guide defining which fields and segments are required for their workflow — which is why HL7 integration is famously parse once, tune per site, and why a structural parser that labels fields is more useful than a rigid schema validator.

v2 vs FHIR

HL7 v2 remains the workhorse inside hospitals — it is embedded in every LIS, HIS, and interface engine — while FHIR is the modern API-facing standard for new development. Most organizations run both: v2 feeds inside, FHIR at the edges. Our articles on message structure and the v2-vs-FHIR comparison go deeper on migration strategy.

Frequently Asked Questions

Is HL7 v2 being replaced by FHIR?

Not any time soon. v2 still runs most intra-hospital messaging (ADT, ORU, ORM) and is embedded in every LIS, HIS, and interface engine. New development targets FHIR, but realistic strategies run both: v2 feeds internally, FHIR APIs at the edges.

What characters does HL7 v2 use as delimiters?

By default: | separates fields, ^ components, & subcomponents, ~ repeats, and \ escapes. The MSH segment declares the actual delimiters a message uses in MSH-1 and MSH-2, and segments are separated by carriage returns.

Related Standards

  • •HL7 v2.x messaging standard (versions 2.1–2.9)
  • •HL7 FHIR R4/R5 — the modern successor

Free Tools & Resources

Need help with this?

We consult and build across all of these domains — tell us what you are working on.

Privacy & Cookie Preferences

We use cookies to enhance your experience, analyze site performance, and support our marketing efforts. Your privacy matters, and you can withdraw consent at any time.