Getting started
The HL7 Inspector preview reads one HL7 v2 message at a time.
- Paste a message, or choose Load sample. Use synthetic or de-identified data only.
- Choose Inspect message. A summary shows the message type, control ID and version from the MSH segment.
- Select a segment to see its fields. Fields with components or repetitions are expanded below the raw value.
Limits of the preview: messages up to 20 KB; one message at a time; structure only. The preview does not validate a message against HL7 standards, implementation guides or conformance profiles, and it does not decode escape sequences.
HL7 v2 basics
An HL7 v2 message is plain text made of segments. Each segment is one line and starts with a three-character ID, such as PID. Segments end with a carriage return character. Inside a segment, fields are separated by a field separator (normally |). Fields can contain components, and components can contain subcomponents. A field can also repeat.
A short synthetic example:
MSH|^~\&|SENDAPP|SENDFAC|RECVAPP|RECVFAC|20261010093000||ADT^A01^ADT_A01|MSG00001|P|2.5.1
EVN|A01|20261010093000
PID|1||000123^^^SENDFAC^MR||DOE^JANE^Q||19800101|F|||123 SAMPLE ST^^EXAMPLEVILLE^ZZ^00000^USA||^PRN^PH^^^555^0100
PV1|1|I|WARD1^101^A^SENDFAC||||1234^SAMPLE^DOCTOR^A
The first segment, MSH, declares the delimiters used in the rest of the message, so a reader should take them from MSH rather than assume them.
Delimiters
These are the usual defaults. The message itself is the authority: MSH-1 holds the field separator and MSH-2 holds the other four characters.
| Character | Role | Where it is declared |
|---|---|---|
| | Field separator | MSH-1 |
^ | Component separator | MSH-2, position 1 |
~ | Repetition separator | MSH-2, position 2 |
\ | Escape character | MSH-2, position 3 |
& | Subcomponent separator | MSH-2, position 4 |
Field addresses
A value is addressed as SEGMENT-field.component.subcomponent. Fields are numbered from 1 in the order they appear after the segment ID. The MSH segment is a special case: the field separator itself counts as MSH-1, so the first field after the separator is MSH-2, and the first field after the encoding characters is MSH-3.
| Address | Meaning | Value in the sample |
|---|---|---|
MSH-9 | Message type | ADT^A01^ADT_A01 |
MSH-10 | Message control ID | MSG00001 |
MSH-12 | Version ID | 2.5.1 |
PID-3 | Patient identifier list | 000123^^^SENDFAC^MR |
PID-5 | Patient name | DOE^JANE^Q |
PID-5.1 | Family name (first component of PID-5) | DOE |
PV1-2 | Patient class | I |
Field meanings depend on the HL7 version. The table above reflects the v2.5.1 sample; check the specification for the version you use.
Common segments
| ID | Name | Typical purpose |
|---|---|---|
MSH | Message Header | Delimiters, sender and receiver, message type, control ID, version |
EVN | Event Type | Trigger event details for ADT messages |
PID | Patient Identification | Patient identifiers, name, birth date, sex, address |
PV1 | Patient Visit | Visit or encounter details such as patient class and location |
NK1 | Next of Kin / Associated Parties | Related persons and contacts |
ORC | Common Order | Order control and identifiers shared across order types |
OBR | Observation Request | Details of a requested test or observation |
OBX | Observation / Result | An individual result value, often repeated |
NTE | Notes and Comments | Free-text notes attached to the preceding segment |
DG1 | Diagnosis | Diagnosis information |
AL1 | Patient Allergy Information | Allergy details |
MSA | Message Acknowledgment | Acknowledgment code and the control ID being acknowledged |
ERR | Error | Error information in an acknowledgment |
Common message types
MSH-9 holds the message type and trigger event, for example ADT^A01.
| Type | Name | Example |
|---|---|---|
ADT | Admit, Discharge, Transfer | ADT^A01 admit or visit notification |
ORM | Order message | ORM^O01 general order |
ORU | Observation result (unsolicited) | ORU^R01 result report |
SIU | Scheduling information (unsolicited) | SIU^S12 new appointment |
VXU | Vaccination record update (unsolicited) | VXU^V04 |
ACK | General acknowledgment | Reply carrying an MSA segment |
Escape sequences
When a delimiter character must appear inside a value, HL7 v2 uses an escape sequence that starts and ends with the escape character (normally \). The Inspector preview shows these sequences as they appear in the message and does not decode them.
| Sequence | Represents |
|---|---|
\F\ | Field separator |
\S\ | Component separator |
\T\ | Subcomponent separator |
\R\ | Repetition separator |
\E\ | Escape character |
Notes for Mirth Connect developers Planned
In a Mirth Connect transformer, an inbound HL7 v2 message is typically exposed as an XML-like object, where each field and component has an element name built from its address. As a general pattern, PID-5.1 is written like this:
var familyName = msg['PID']['PID.5']['PID.5.1'].toString();
The exact structure can depend on your channel's data type settings and HL7 version, so confirm it against your own channel. Helper tools that generate these references are planned and are not available yet.
This project is independent and is not affiliated with or endorsed by NextGen Healthcare.
Roadmap
The roadmap is a plan, not a commitment. There are no release dates.
- Phase 1 (this build): website foundation, Inspector preview, documentation, proposed pricing, contact form, account page placeholders.
- Phase 2: a stronger Inspector (escape handling, version-specific field names), accounts, saved snippets, and the first version of message comparison.
- Later: Mirth Connect helper tools, paid plans and checkout, and API access. Each is subject to change after feedback.