HL7 Module 7.1 | Understanding and Using HL7 Module | Installing and Using HL7 Module | Configuring webMethods HL7 Module | Generating Message Schemes | Creating a Custom Message Scheme | Customizing the XML Schemes
 
Customizing the XML Schemes
Important:
Before you can customize a Z segment, you must add a definition for the Z segment to the corresponding message scheme and make changes where applicable.
*To customize the XML schemes provided with HL7 Module
1. Create a directory for the XML schema that you want to customize, analogical to the default XML schema directory.
The default XML schema is located in the Integration Server_directory \packages\WmHL7\data\xsd\wm.ip.hl7.docType\ v<version_number> directory.
The customized XML schema should be located in the Integration Server_directory \packages\WmHL7\data\xsd\custom_message_scheme_id\v<version_number>directory.
where custom_message_scheme_id is the scheme ID for your custom message scheme and <version_number> is the HL7 message version for which you want to use this custom message scheme.
For example, Integration Server_directory \packages\WmHL7\data\xsd\com.example.custom.scheme\v231
2. Copy the XML schema you want to customize from the default XML message scheme into the customized XML schema directory. The new directory should:
*Contain the complete definitions for generating the message structure (such as segments, fields, data types, and messages).
*Contain a messages.properties file that lists all messages for the particular message version and message scheme.
Each key in the messages.properties file refers to the message schema file, and the values denote the message types that the schema can represent.
For example:
ADT_A01=ADT_A01,ADT_A04,ADT_A08
where ADT_A01 denotes that the message schema definition can represent message structures ADT_01, ADT_A04, and ADT_A08.
A messages.properties file exists for each message version and describes the schemas and message types supported for that version. The file should be located in the same directory as the schema definitions. For details about the content and structure of a message property file, see the messages.properties file for one of the versions in the default XML message scheme.
3. Open the XML schema in an editor and include your custom changes.
Important:
Do not customize the schema for the MSH and MSA segments in the HL7 message. These segments are not open for customizing.
An HL7 message must have only one MSH segment and it should be the first segment in the message.
Important:
Do not use Java reserved key words, such as INT, TRY, and NEW, as segment names in the custom XML schema.
4. Edit each of the schema definition files, and update only the xmlns and targetNamespace attributes for your custom message scheme as follows:
custom_message_scheme_id.v<version_number>
For example:
Replace
xmlns="urn:hl7-org:v231xml"
with
xmlns="com.example.custom.scheme.v231"
and
targetNamespace="urn:hl7-org:v231xml"
with
targetNamespace="com.example.custom.scheme.v231"
5. To ensure that the folder contains all the required schema files and the correct structures, you can optionally validate the structure of the customized XML schemas using any third party parser.