Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 2.72 KB

handling-undeclared-z-segments.md

File metadata and controls

25 lines (21 loc) · 2.72 KB
description title ms.date ms.service ms.topic
Learn more about: Handling Undeclared Z Segments
Handling Undeclared Z Segments
06/08/2017
biztalk-server
article

Handling Undeclared Z Segments

There are two types of Z segments: declared Z segments and undeclared Z segments. While they are similar in that you use them for local purposes, they are very different in how you use them.

You include the definition of a declared Z segment in a message schema, and Microsoft BizTalk Accelerator for HL7 ([!INCLUDEbtaBTAHL71.3abbrevnonumber]) uses it to process a message, just like a schema defined by the HL7 standard. No schema defines an undeclared Z segment. You include an undeclared Z segment at the end of a message, and [!INCLUDEbtaBTAHL71.3abbrevnonumber] passes through without processing it against a schema. The parser and serializer do not validate it. [!INCLUDEbtaBTAHL71.3abbrevnonumber] treats it as a binary large object (BLOB). The only check that [!INCLUDEbtaBTAHL71.3abbrevnonumber] does on an undeclared Z segment is verifying that the BLOB does not include any existing three-character schema tag.

You include the undeclared Z segment as the third part, or Z part, of a multi-part message. The message includes the header, the body, and the Z part. The Z part has a segment ID starting with the letter "Z".

Note

The Zpart must always contain data. Specifying null for the stream results in an error condition. If no data is included in the Zpart, [!INCLUDEbtaBTAHL71.3abbrevnonumber] inserts the word "Empty" in the Zpart. [!INCLUDEbtaBTAHL71.3abbrevnonumber] uses the context property ZPartPresent to determine whether to serialize the Z part.

[!CAUTION] Microsoft has tested Zsegments with ANSI character sets, with the result that Zsegment behavior with ANSI characters is predictable. However, using other character sets in Zsegments may result in unpredictable behavior.

See Also

Extending HL7 2.X Schemas with Z Objects
Creating Declared Z Segments
Creating Custom Data Types in Schemas
Creating Custom Tables in Schemas