Edit HL7 Messages

HL7Sender

 


Figure 1: HL7Sender Main Application Form
HL7Sender is a utility for sending HL7 messages through the network. It is a single form application can read, write, validate, convert to XML and send HL7 messages.
The upper part of the form shows the message in a rich text control where it can be edited. Every HL7 segment starts in a new line. The best way to edit the message is to cut and paste segments from other messages (you can open multiple instances of the program) or fill text between two | signs (field separator).
At the lower part of the form there are a few text fields where the user can set the LLP network protocol elements, the TCP/IP protocol attributes (destination host name or IP address, port number and timeouts) and disable or enable ACK’s.
The two message structure text configuration files (segDefs and msgRules) are located in the installation folder and can be edited manually if necessary. You can duplicate these files with different suffixes in order to use multiple ‘flavors’ of the HL7 version.

Viewing Message Content

From the File menu select Open HL7 File and select a file to open.
The message content is shown on the right panel.
When the message structure is valid, a green message is shown on the upper right side of the screen.
 
Figure 2: Valid message indicator
If the message is not valid, a red message is shown on the upper right side of the screen describing the problem.
Figure 3: Invalid Message Indicator
In the above example, a wrong segment name is present.
To fix that, simply edit the message content and remove the offending segment.

Sending Messages

Use HL7Sender to send messages stored in HL7 Files.  Open a file and the click the ‘Send Message’ menu button.

Editing Messages

Open a file and edit its content in the HL7 Message text box.
Use the message structure left panel to navigate through the message segments and fields.

Modifying Fields’ Values

In the message structure left panel click on the field name.
The field text is highlighted in the message text panel.
Use the keyboard to change the field value.

Adding Segments

In the message structure click on the segment you would like to insert a segment before.
Click <Home>.
Click <Enter>.
Key in the 3 letters segment name followed by the | sign.
The new segment is added to the message structure panel.

Convert HL7 to XML

From the File menu select Save As.
Choose XML from the “save as type” combo box.
Figure 4: Save as XML
 

HL7Sender main form

Hl7Sender Menu

The File Menu
Open HL7 File
Browse and select an HL7 file. The file content is loaded to the HL7 Message text box.
Save to HL7 File
Save the context of the HL7 Message text box to a HL7 file or XML file.
The Send Message Menu Button
Clicking the Send Message menu button sends the content of the HL7 Message text box through the network to the remote application.
The Help Menu
About HL7 Sender
This item displays the about form.

HL7 Message Structure Tree

The HL7 Message Structure tree control displays the message structure as a tree. Each logical part of the message is represented as node holding a collection of segment nodes. Each segment node is a collection of fields. The node’s names are the field name.
When clicking on a message structure node, the corresponding message text is selected in the HL7 Message text box.

HL7 Message text box

The HL7 Message text box is the main editing area of the HL7Sender. It displays the HL7 Message and enables editing of its content. Every segment is displayed in a new line. When editing a message be careful not to break segments.

The configuration Area

Message Configuration Version
Use this drop down to select the HL7 version to work with. Seecreating new configurationsfor explanation how to add HL7 versions to this drop down.
Remote Application Host Name
Use this text box to set the host name or the IP address of the computer that you want to send the message to.
Remote Application Port
Use this text box to set the port number that the application that you want to send the message to listens on.
MLP Envelope Prefix
Use this text box to set the LLP prefix using Hexadecimal notation. See LLP for more information.
MLP Envelope Suffix
Use this text box to set the LLP suffix using Hexadecimal notation.  See LLP for more information.
Connection Timeout
Send and receive network timeouts in milliseconds. When HL7 Sender performs network activities and there’s no response from the peer for the specified period, the activity is stopped and an error message is displayed.
RZ Software Services