A Z-segment in HL7 messaging is basically a junk drawer, meaning it can carry any data you want. Just make sure that these segments start with the letter “Z”. Z-segments are one of the reason why HL7 is often referred to as a flexible standard.
Example Z-segment:
MSH|^~\&|iNTERFACEWARE|Lab|Main HIS|... EVN||20110213144532||||20110213145902|... PID|||4525285^^^ADT1||Harrison^Art||... PV1||E||||||5101^Garland^Mary^F^^DR|||||||||||... ZN0|||CD^CANDY||2|jellybeans|...