Working with New Message Specifications
These instructions are intended to get you working quickly with new specification. They will be most helpful if you have taken the introductory tour first. It is also recommended that you first look at the instructions for operating with an existing specification.
Start the MWB application and select File/New. The main MWB window will be displayed with all but the Structure field blank. The structure field will contain: MSH, indicating the required message header for all HL7 messages. Fill out the rest of the abstract message structure indicating the repeating segments and segment groups ('{ }') and optional segments and segment groups ('[ ]').
Completion of the message structure is a good time to ensure that you have the proper library or conformance file selected for you new message (actually this step could be done first, but is often forgotten).
Selecting Conformance files
Select on Maint/Libraries/Select Conformance Files or click on the tool bar icon (books). This will load the library file (also called conformance file) selection dialog. This usually takes a few second to load. On the left hand side is a list of available library files. On the right side is a list of library files currently in use. Manipulate the right hand list to reflect the appropriate library files for your interface.
These files will be used by the MWB application to determine the definition of particular segments and data types used within you specification. So for example if the message you are building must conform to HL7 2.2 then you would want to ensure that the HL7 2-2.mcf appears as the top entry on the right hand list. This ensures that in the compile step (described below) that a particular segment in your message structure (PID for example) is incorporated into your message specification using HL7 2.2 field and data type definitions.
Multiple library files may be selected for inclusion on the right hand list. This is typically done to allow for library files which may contain Z segments or non-standard segments employed by your interface. The position of the files within the right hand list is important, since the compiler seeks out segment definitions on a first come first used basis. So for example if you had 3 different files included on the right hand list, each of which had a PID segment definition, then only the PID defined in the top most file in the list would be used. When the right hand list is satisfactory click OK.
Message Complilation
When you are sure that the message structure is defined as you need it and that the appropriate libraries are selected click on the Compile button (yellow gear). Alternatively if you are focused on the Structure field, you may simply press return to start the compilation.
Compilation causes the Message Tree to be populated. Before working with the individual message elements however it is a good idea to fill in the remaining specification and message fields in the upper panel. Failure to fill in required field will prevent you from saving the specification and/or from entering conformance attributes for the specification. It is best to avoid that annoyance by filling these field in at this point. Once done, you may at this point also want to save a copy of the specification "just in case".
As described elsewhere, you may access individual message elements by selecting them from the message tree. You may alter there default values (derived from the library files) to suit you current needs. This is pretty straight forward.
Adding New Fields
If your message structure contained segments that the compiler couldn't identify i.e. were not defined in any of the libraries that you selected, then you will notice that the segment has been added to the message tree with a single field named Set ID with a data type of SI. In this case, what you'll probably want to do is flesh out the segment(s) with additional fields, and perhaps change the definition of the Set ID default field.
To change sequence 1 in such a segment, simply change its Element Name parameter as needed, then select a new data type for it if necessary. The MWB will take care of adding the components and subcomponents as appropriate for the new data type. Adjust the remaining field parameters such as length etc. as necessary.
To add a new field, select sequence 1 of the new segment then click on the Field Add tool button on the menu (+F). This will bring up a floating dialog that will allow you to define a new field. Fill out the form appropriately and click the add button when satisfied. Continue adding fields as needed. remember there is no need to add individual components and sub-components (as a matter of fact you can't), the MWB inserts the necessary elements for the field depending on the data type that you selected.
Adding Additional Segments
Similarly, if you forgot to include a segment in your message structure you may add or insert one using the Segment Add tool (+S) on the tool menu. To do so, select the segment after which you want to insert the new segment in the Message Tree, then click on the Seg Add button. This too brings up a floating dialog that allows you to define your new segment. Click the add button when satisfied to insert the segment into the tree. Continue inserting new segments as needed. Note that if the new segments that you insert are defined in your selected library list, that they will be inserted into the tree with all of their subordinate fields etc.. If on the other hand the new segment that you insert are not defined in your library files, they will be added as single field stub entries as described above, and you will have to add fields to them.
Re-Grouping Segments
Finally, if you need to regroup segments, use the Group Add tool (+G) on the tool menu. This works similar to the Field and Segment add tools in that a floating dialog is brought up to facilitate the addition. Select a segment to serve as the upper bound of the group, then select a segment to serve as the lower bound of the group and press Add when satisfied.