HL7 MSG Message Type
HL7 datatype components MSG components from HL7 v2.5.1 Hide components
These are the generated components for the version selected at the top of the page. The article stays practical, and this panel follows the chosen HL7 version.
Components
| Pos | Component | Name | Type | Table | Description |
|---|---|---|---|---|---|
| 1 | MSG.1 | Message Code | ID | 0076 | Message Code is the broad message family, such as ADT, ORU, ORM, SIU, or MDM. It is useful for broad routing and for narrowing the valid trigger-event choices. |
| 2 | MSG.2 | Trigger Event | ID | 0003 | Trigger Event is the specific event within the message family. This is usually the part that tells you the real action, such as A04 for registering a patient. |
| 3 | MSG.3 | Message Structure | ID | 0354 | Message Structure identifies the abstract message structure used to validate the segment layout. It can share a structure across several events, so it should not be confused with the trigger event. |
MSG carries the message type, trigger event, and message structure. It is most familiar in MSH-9, where it tells the receiver what kind of message it is about to process.
In this guide, MSG appears in MSH.9. That used-by list is a good reality check: the datatype is only half the story, and the field that uses it tells you the workflow.
The component panel above is expanded by default because most datatype pages are used as quick lookup pages. Start there for the exact HL7 v2.5.1 shape, then use the notes below for the practical gotchas.
MSG-1 to MSG-3: Component Quick Read
The generated component panel above is the formal quick lookup. The short version is below so you can scan the shape without counting carets by eye.
The table-backed components here are MSG-1, MSG-2, MSG-3. Keep those values to the table or value set your implementation guide names, especially when the field is crossing organization boundaries.
- MSG-1 Message Code - Message Code. Type ID. Table 0076.
- MSG-2 Trigger Event - Trigger Event. Type ID. Table 0003.
- MSG-3 Message Structure - Message Structure. Type ID. Table 0354.
Practical Notes
The safest habit is to populate only the components the receiving profile actually uses, and to keep each meaning in its own component. Empty components are better than a compact display string that a receiver has to reverse-engineer.
In HL7 Soup Web, click a field that uses MSG and the interpretation view will show which component you are sitting in and where that value lives in the raw message. That is especially handy with compact datatypes because one missing caret can move every value after it.
Official and Reference Notes
For formal reference, compare the generated HL7 v2.5.1 panel above with the HL7 v2.5.1 datatype list and the HL7 Terminology data type code system. Local implementation guides can narrow allowed values, tables, and component usage.
Related Datatypes
Related quick lookups: ID.