HL7 Z-Segment: Questions and Answers

April 17th, 2007 by Mike Stockemer

8 Votes | Average: 4.75 out of 58 Votes | Average: 4.75 out of 58 Votes | Average: 4.75 out of 58 Votes | Average: 4.75 out of 58 Votes | Average: 4.75 out of 5 (8 votes, average: 4.75 out of 5)

Loading ... Loading ...

Posted in Healthcare Integration, HL7 Messaging, HL7 Terms

On a previous HL7 Messaging Z-Segment post, a reader responded with two questions. Outlined below are the questions about these HL7 terms and my answers.

HL7 Question 1: Can I insert a Z-segment anywhere in the HL7 message or can I only place the Z-segment at the end?

HL7 Answer: You can place the Z-segment anywhere in the HL7 message. There is no rule in HL7 that dictates where a Z-segment should be located in a message. One popular approach is to insert the Z-segment in the message so it is grouped with similar information contained in the message. For example, if you are storing insurance specific data, you may want to create a ZIN segment and place it in the insurance group in your message directly after the IN3 segment.

Another approach is to place any Z-segments at the end of your message, so systems that are configured to parse the ’standard’ HL7 format can read the segments in the order they expect them without making modifications to their configuration. Subsequently, if they need the data in the Z-segment, they can modify their parser to extract the data.

HL7 Question 2: In our customer’s interface specification, if they have not defined a Z-segment yet they send some Z-segments, should I throw an HL7 conformance error or not?

HL7 Answer: You should be prepared to accept that Z-segment in the HL7 message. It’s unfortunately very common to build your processing based on a system’s specifications and then find differences in the format once you receive actual HL7 messages. We have written a white paper on HL7 conformance checking, if you need additional information.

When you are in the testing and development phase of your healthcare integration implementation, you should ensure you can parse the structure that you will be receiving. If you are not interested in the data in the Z-segment, you may not reference it in your processing, but you still need to take into account that the format of the message will include it. If the Z-segment is at the end of the message, then you may not have to account for it since you can parse the complete HL7 message without addressing the Z-segment. How you address this issue will depend on the application you use to parse the HL7 messages.

If there are more questions about working with HL7 Z-segments, please post a reply. We welcome the questions and feedback.

Last 5 posts by Mike Stockemer
2 Responses to “HL7 Z-Segment: Questions and Answers”
  1. HL7 Engine Mapping says:

    […] Allowing for modification of these base versions by creating a derivative of the standard message format that inherits all the characteristics of the standard format – supports Z segments, non-standard separator characters, etc. […]

  2. Variations of the HL7 ORU^R01 Message Format says:

    […] Message from RIS/Dictation System: Notice that the message is loaded with Z-segments. These Z-segments will most likely need to be stripped out of the message that will be delivered to […]

Leave a Reply

Discover the NeoTool Healthcare Integration Solution for Your Market.