Home

Reverse Engineering Specifications

These instructions are intended to get you working quickly reverse engineering a 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. From the File menu select Capture External Message. This will open the Message Capture tab of the MWB.

Note the Get Message File button. Click it to navigate to a text file that contains an ER7 encoded message. After selecting the file it will be displayed in the Message Text display area. Alternately and probably more practically, you may copy the ER7 message from another document onto the clipboard, and paste it into the Message Text window.

The message may be edited within the window to correct any deficiencies or artifacts discovered. Once the message is copied to the Message Text window, the Parse Message button is enabled.

The outcome of clicking the Parse Message button is 1.) The Message Parse Tree to the right is populated, and 2.) the Derived Message Structure field displays the abstract message structure for the message. Within the Message parse tree the segments encountered in the message are displayed sequentially with their constituent message elements labeled in HL7 shorthand hierarchically beneath them. At the lowest level of the hierarchy in the parse tree are the values  associated with the primitive data elements (there will be a list of values for a repeating element).

Notice the Consolidate Repeat Segments check box. If this is checked, the MWB will attempt to group repeating segments into appropriate segment groups. If this is not appropriate for the particular message that you are working with un-check the box to view and process all of the repeated segments just as they were encountered in the message. The abstract message derived from the captured message and displayed in the Message Structure field may be edited before further processing (see below). This way you have an opportunity to change or adjust the segment groupings or segment positions within the abstract message.

Beneath the derived Message Structure Window is the Derive Specification button. Click this button to derive the specification for the abstract message structure culled from the captured message. After compilation, the Message Definition Tree is automatically brought into view with the specification parameters panel fields populated from information in the message, and the Message Tree populated. The specification for the captured message has been "reverse engineered" at this point.

Note that each of the values culled from the captured message have been automatically associated with their Message Tree counter-parts as example values. An optional feature of the Message  Tree displays the HL7 shorthand path for each element in the tree as the mouse is swept over the element. The paths displayed should now correspond the the node paths displayed on the Capture tab Parse tree. This can aid in debugging errant message examples. Also note that since pressing the Derive Specification button sweeping the mouse over Parse Tree elements displays their corresponding element names from the Message Tree which also aids in debugging.

Home