About this HL7 Message Viewer
HL7 v2 messages are compact and efficient for systems, but hard to read at a glance when you are troubleshooting field placement, missing separators, or repeating values. This viewer breaks a message into segments and fields, then adds common field descriptions so interface analysts can scan structure more quickly.
Who this calculator is for
- Interface analysts, developers, and testers reading raw HL7 v2 messages during troubleshooting.
- Teams mapping common segments such as MSH, PID, PV1, ORC, OBR, and OBX.
- Anyone learning how field positions, repetitions, and separators appear in real HL7 traffic.
When to use it
- Use it when you receive a raw HL7 v2 message and need a faster way to inspect fields and repetitions.
- Use it to confirm where a value sits before building a transform, route, or parser.
- Use it to compare common segment fields with a human-readable label while debugging test messages.
How to use this calculator
- Copy a raw HL7 message (e.g. `MSH|^~\&|...`).
- Paste it into the Raw Message input box.
- The tool automatically detects the segment separator (usually carriage return) and field separator (usually pipe).
- The Parsed Output table displays the Segment Name, Field Position, Value, and a Description (if available).
Key assumptions
- The parser expects a pipe-delimited HL7 v2-style message that begins with MSH and uses recognizable segment separators.
- Field descriptions come from a built-in dictionary for common segments and do not cover every HL7 version, custom segment, or local implementation detail.
- This viewer focuses on field-level structure and repetitions; it does not fully decode components, validate message grammar, or confirm trigger-event correctness.
Accuracy and testing
Review formula sources, default test cases, assumptions, unit handling, rounding rules, and changelog for this calculator.
How this calculator works
Inputs explained
Raw Message
The full HL7 string. It must contain at least an MSH segment. Standard separators are expected (e.g., `|` for fields, `^` for components).
Understanding your results
Key Features
- Local Processing (Privacy)
- Standard Field Dictionary
- Repetition Support (~)
Things to Keep in Mind
Supports standard v2.x pipe-delimited encoding. XML-encoded HL7 (v3) is not supported. Descriptions are provided for common segments (MSH, PID, PV1, ORC, OBR, OBX); custom Z-segments will appear without descriptions.
Tips & Best Practices
- If your message is one long line, ensure there is a carriage return (`\r`) or newline (`\n`) between segments.
- Always scrub real patient data (PHI) before pasting it into online tools, even though this tool runs locally in your browser.
Glossary of Terms
- Segment
- A line in the message starting with a 3-letter code (e.g., MSH, PID, OBR) representing a group of related data.
- Field
- A specific data element within a segment, separated by a delimiter (usually `|`).
- Component
- A sub-part of a field, separated by a caret (`^`).