ZXX — Custom Z Segment
Can appear anywhere in an HL7 message after standard segments. Used to carry site-specific data such as custom patient identifiers, facility-specific clinical data, or vendor proprietary fields.
Z-segments (ZAA, ZBS, ZPD, ZPI, ZDT, etc.) are custom segments defined by individual healthcare organizations or vendors for information that does not fit into standard HL7 v2.x segments. Every Z-segment begins with the letter Z and is followed by two alphanumeric characters. Their structure and field definitions are entirely site-specific and not governed by the HL7 standard.
Real-World Context
Z-segments are the wild west of HL7 interfaces. Every vendor has different ones, and they are almost never documented in the interface specification until something breaks. When you receive a message with unknown Z-segments, do not discard them — they may carry critical routing or clinical data that the sending system depends on. Request the Z-segment field definitions from the sending vendor before going live with any interface that includes Z-segments.
Field Reference
Click any row to see the full description, common values, and troubleshooting tip.
| # | Field Name | Type | Req | Max Len | |
|---|---|---|---|---|---|
| 1 | Z-Segment Field 1 (ZXX.1) | Varies | O | 200 | ▶ |
| 2 | Z-Segment Field 2 (ZXX.2) | Varies | O | 200 | ▶ |
| 3 | Z-Segment Field 3 (ZXX.3) | Varies | O | 200 | ▶ |
| 4 | Z-Segment Field 4 (ZXX.4) | Varies | O | 200 | ▶ |
| 5 | Z-Segment Fields 5-N (ZXX.5 through ZXX.n) | Varies | O | 200 | ▶ |
Example Segment
1ZPD||SITE_CUSTOM_ID_001|ROUTING_FLAG_A|EXTENDED_DEMO_CODE|CUSTOM_CLINICAL_NOTE
Related Segments
Used In Message Types
Parse messages with ZXX in real time
Paste any HL7 message into our free viewer. Decodes every segment and field instantly, client-side.
Open HL7 Message Viewer →Need HL7 mapping templates?
The HL7 Integration Toolkit includes field mapping worksheets, interface spec templates, and a go-live checklist for every major HL7 message type.
View HL7 Integration Toolkit →