Contact Us 1-800-596-4880

Connector Testing with TestPanel

HAPI TestPanel is an HL7 receiver, transmitter, and message editor. TestPanel is free software distributed under the MPL/GPL licenses, and runs on Mac OSX, Linux, and Windows.

Before using this document, download, install, and start TestPanel using the HAPI TestPanel site. Thereafter, you can use the information in this document to send HL7 messages to the TestPanel and receive messages from the software.

Because the TestPanel can transmit HL7 messages to a listening application through MLLP or HTTP, you can use it to test your Mule flows that handle HL7. The following section provides an example of a simple flow tested with the TestPanel.

Simple Example

In this example, you can:

  • Build a simple Studio application to process the HL7 messages, then send responses.

  • Configure the TestPanel application to send and receive HL7 messages on specific ports.

  • Test that the setup works as intended.

Configuration and Illustration

The TestPanel uses the following default Host and Port configurations:

  • To send and receive a HL7 messages – localhost, port 50609

The diagram below illustrates the steps that TestPanel and Mule take to process HL7 messages.

The TestPanel:

  1. Generates an HL7 message.

  2. Sends an HL7 message to the Mule application over port 50609.

  3. Receives an HL7 message.

  4. Mule App processes the HL7 message.

  5. Sends an ACK reply (general acknowledge) to localhost port 50609, and Mule stores the message on a file on the local filesystem at the same time.

  6. Receives the ACK reply.

testflow_diag

Anypoint Studio Application

This example application performs the following actions:

  • Listens for incoming HL7 messages.

  • After it receives a message through HL7 MLLP, HL7 EDI reads and validates a message and generates an HL7 ACK message.

  • HL7 EDI writes the ACK message in HL7 ER7 format, and HL7 MLLP sends it back to the sending application.

  • File Connector stores the ACK message on a file.

sampleflow

The first building block is an HL7 inbound endpoint configured with the following parameters:

  • Host: localhost

  • Port: 50609

After the HL7 MLLP inbound endpoint, an All Flow Control sends the HL7 message to two Cache Scopes for parallel processing.

In the Process the HL7 Message scope, HL7 EDI reads and validates the original HL7 message and generates an ACK message. ** In this demo, HL7 EDI is configured to process ADT_A01 in HL7 v2.5.1 (/hl7/v2_5_1/ADT_A01.esl). You can add other versions and messages schemas in the HL7 Message character encoding under the HL7 EDI: Configuration.

testpanel obj builder

In the Send a HL7 ACK scope, HL7 MLLP sends the ACK message to the originating application.

TestPanel Configuration

This section explains how to set up TestPanel to work with this example.

TestPanel configuration involves the following tasks:

  • Configure the TestPanel to send a sample HL7 message to localhost port 50609.

  • Start the listening port.

  • Send a sample HL7 message.

  • Check the activity log for the ACK reply from Mule.

To configure the TestPanel:

  1. In the Sending Connections pane to the right of HAPI TestPanel’s main window, click the displayed localhost connection (see the mouse cursor in the image below).

    outconf
  2. At the Outgoing Message Sender pane, configure the following settings (highlighted above):

    • Host: localhost

    • Port: 50609

  3. Click Start near the top of the Incoming Message Receiver pane. The TestPanel starts listening for HL7 messages on the configured host and port.

  4. Click the Messages pane to the right of the application window. The application displays a predefined sample HL7 message (see image below).

    messages
  5. Click the Send button near the top of the pane. The application sends the sample message once to the specified host and port. Mule receives the HL7 message, then returns an ACK message to the TestPanel.

  6. Check the Activity log for the HL7 response from Mule. The image below displays the HL7 ACK messages sent by Mule.

    incoming ack