Glossary
Every term used on this site, defined once. Read top to bottom and each definition uses only words already defined above it.
The shape of a message
- Message
One complete thing sent from one system to another: an admission, a lab result, an order. It is plain text, and it is made of lines called segments.
MSH|^~\&|EPIC|… EVN||20240314… PID|1||1000345678…- Segment
One line of a message. It begins with a three-letter code saying what the line is about, and the rest of the line is its fields.
PID|1||1000345678^^^STJOSEPH^MR||CARTWRIGHT^ELEANOR- Field
One value inside a segment, separated from its neighbours by a pipe. Fields are numbered by position, so the third field of PID is written PID-3.
PID-5 is CARTWRIGHT^ELEANOR^MAY- Component
A part of a field, separated by a caret. A name is one field made of components: family name, then given name, then middle name. A value carrying fewer components than the data type lists is not malformed; the sender populated what it had.
CARTWRIGHT^ELEANOR^MAY has three components- Subcomponent
A part of a component, separated by an ampersand. Used when one component needs its own internal detail.
123 MAIN STREET&APARTMENT 5- Repetition
The same field appearing more than once in one segment, separated by a tilde. A patient with two phone numbers has one field holding both.
011-555-0199~011-555-0200- Delimiter
The characters that separate one part of a message from the next: a pipe between fields, a caret between components, a tilde between repetitions, an ampersand between subcomponents. The message declares its own in MSH-2.
^~\&- Z-segment
A segment whose code begins with Z. The standard reserves these for sites to define their own, so no two hospitals mean the same thing by one.
ZPD|1|LOCAL-EXT|…
What a message says it is
- Message type
The three letters saying what kind of message this is: ADT for a patient movement, ORU for a result, ORM for an order. It is the first part of MSH-9.
ADT, in ADT^A01^ADT_A01- Trigger event
The real-world thing that caused the message to be sent: a patient was admitted, a result was verified. It is the second part of MSH-9, and it says why the message exists, not what is in it.
A01, meaning a patient was admitted- Message structure
The layout: which segments to expect, in what order, and which of them are required. It is the third part of MSH-9. One structure usually serves several trigger events, so the second and third parts often differ.
ADT_A01, which A01, A04, A08 and A13 all use- Group
A run of segments that belong together and repeat together inside a structure. A group has its own required-or-optional marking, and the segments inside it are judged against the group rather than against the message.
The INSURANCE group holds IN1, IN2, IN3 and ROL- Acknowledgment
The reply saying a message arrived and what happened to it. MSA-1 carries the outcome and MSA-2 echoes the control ID of the message being answered.
How much is required
- Usage
Whether you have to send something. R is required, O is optional, C is conditional on a rule stated in prose, B is kept only for backward compatibility, X means do not send it.
- Required
Marked R. It must be present. Inside a group, R means required of that group: send the group and you must include it, omit the group and it never appears at all.
- Optional
Marked O. You may send it or leave it out, and a receiver must cope with either. Optional does not mean unimportant. The sending and receiving facility on MSH are optional. A message going straight down a connection to one system does not need to say where it is headed.
- Conditional
Marked C. Required only when some condition holds, and the condition is written in prose rather than in the table. OBX-6 units, for instance, are needed when the value is a number.
- Backward compatible
Marked B. The element still works and is still read, but a later version replaced it and new work should use the replacement. It is kept so messages written against an older version do not break.
EVN-1 Event Type Code, superseded by the trigger event in MSH-9.2- Cardinality
How many times something may appear, written as a minimum and a maximum. 0..1 means never or once; 1..* means at least once with no upper limit. HL7 does not print it; it is worked out from usage and repetition together.
0..* means any number of times, including none
Values and codes
- Data type
What shape a field holds. A primitive holds one value; a composite holds several, separated by carets.
XPN, the type behind a patient name- Table
The list of values a coded field may carry. An HL7 table is fixed by the standard, so a value outside it is an error. A user-defined table is only a suggestion, and a site may use its own values.
Table 0004, patient class: I, O, E, P, R, B, C, N- Item number
HL7's own five-digit identifier for a field's meaning. The same item number can appear in several segments, which is how the standard says two fields carry the same thing.
00104, the set ID of PID