Creating Declared Z Segments
You can create declared Z segments at any level of a schema (unlike undeclared Z segments, which must be the last part of a multi-party message, following the body part).
To create a Z segment in BizTalk Editor
In Solution Explorer of Visual Studio, right-click the schema to which you want to add a Z segment, and then click Open.
In BizTalk Editor, right-click the node with the name of the schema, point to Insert Schema Node, and then click Child Record.
Name the record starting the name with three alphanumeric digits, in capitals, with the first digit being "Z". (The Z segment tag must include three characters.) Insert an underscore (_), and then add a short description of the segment. The description should be one or a series of words, without spaces, with the first letter of each word capitalized. The last word should be "Segment". (An example is "ZPP_PatientPreferencesSegment.) Press Enter.
In the Properties pane, type the properties you want for the Z segment, including Data Structure Type (schema name or xsd:anyType), Max Occurs, and Min Occurs.
Note
If you enter a data structure type for the record, you will not be able to add a child field element.
In BizTalk Editor, right-click the name of the Z segment, point to Insert Schema Node, then click Child Field Element.
Type the name of the field, starting the name with the first three digits of the segment name, followed by a period and the number of the field, followed by an underscore and then a short description of the field. The description should be one or a series of words, without spaces, with the first letter of each word capitalized. Press Enter.
In the Properties pane, type the properties you want for the Z segment, including Data Type, Nillable, Fixed, Max Occurs, and Min Occurs.
To create a field with components, create the field as a record, and then create a child element of that record for each component. To create a field with subcomponents, create the field and components as records, and the subcomponents as child elements. Note that subcomponents cannot be composite data types. For example, for the segment named ZPP_PatientPreferencesSegment, you might create a ZPP.1_Dietary field and a PD.1 Allergies component with a PD.1.1_FoodGroupAllergy subcomponent. The PD.1.1_FoodGroupAllergy subcomponent would have to be a simple data type.
See Also
Extending HL7 2.X Schemas with Z Objects
Creating Custom Data Types in Schemas
Creating Custom Tables in Schemas
Extending Enumerations
Handling Undeclared Z Segments