HL7 v2 Events Management Listener - Implementation Template

(0 reviews)

Setup instructions

Importing Templates into Anypoint Studio

  • In Studio, click the Exchange X icon in the upper left of the taskbar.
  • Log in with your Anypoint Platform credentials
  • Search for the template.
  • Click Open.

Running Templates in Anypoint Studio

After you import your template into Studio, follow these configuration steps to run it:

Common Configuration

  • mule.env - sets the environment where the application is to be deployed. It should be configured in config-<mule.env>.yaml file. For a studio deployment, the recommended mule.env value is local.
  • mule.key - sets the encryption password to be used for encrypting secure properties. Update as needed.

MariaDB Configuration

A MariaDB is needed for this application to store the HL7 message. Once Maria DB instance is identified and access is obtained run the create-schema.sql script available under src/test/resources/scripts folder.
MuleSoft's DB Connector requires database name, host, username, and password to communicate with MariaDB. After obtaining the necessary credentials information configure it in the properties file located in config folder.

  • hls.database.name should be encrypted and configured in config-secured-<env>.yaml file.
  • hls.database.host should be encrypted and configured in config-secured-<env>.yaml file.
  • hls.database.username should be configured in config-<env>.yaml file.
  • hls.database.password should be encrypted and configured in config-secured-<env>.yaml file.

Please refer to the attached link on how to secure the configuration properties.

HTTPS Configuration

  • https.host — sets the service host interface. It should be configured in config-<mule.env>.yaml file. (Defaults to 0.0.0.0 for all interfaces).
  • https.port — sets the HTTPS service port number. It should be configured in config-<mule.env>.yaml file. (Default 8082).
  • TLS Configuration - Keystore properties setup:
    • keystore.alias - sets the alias to the keystore. It should be configured in config-<mule.env>.yaml file.
    • keystore.path - sets the path to the key file. Key should be available in /src/main/resources/keystore. It should be configured in config-<mule.env>.yaml file.
    • keystore.keypass — sets keystore keypass to support HTTPS operation. It should be encrypted and configured in config-secured-<mule.env>.yaml file.
    • keystore.password— sets keystore password to support HTTPS operation. It should be encrypted and configured in config-secured-<mule.env>.yaml file.

Please refer to the attached link on how to generate the Keystore.

This application processes HL7 ADT,SIU and ORU events by invoking two other applications. Please configure the host and other details as below.

  • adt-sys-config.host - sets the host of the application that process ADT messages
  • siu-sys-config.host - sets the host of the application that process SIU messages
  • oru-sys-config.host - sets the host of the application that process ORU messages

API Instance and Autodiscovery Configuration

To secure the HTTP endpoints, navigate to the API Manager and Add new API with the option of Connect to existing application (basic endpoint)[https://docs.mulesoft.com/api-manager/latest/create-instance-task-mule#add-api] under Proxy type. Then apply the policy and configure the following property:

  • api.autodiscoveryID — set the API Autodiscovery ID of the API Instance created to this application. It should be configured in config-<mule.env>.yaml file.

HL7 v2 Message Processing Configuration

These are application specific configurations/rules to process the HL7 v2 messages.

  • messages-processing.order - sets the order of messages/events to be processed. Changing the order, results in improper processing of message/events thereby resulting in wrong sequence of events and improper data in the destination system. Default order : [ADT_A05,ADT_A04,ADT_A01","ADT_A02","ORU_R01","ADT_A08","ADT_A28","ADT_A03","SIU_S12","SIU_S13","SIU_S15","SIU_S14"].
  • messages-processing.parallel - sets only the message/events that are to be processed in parallel. Default order: ["ADT_A01","ADT_A03","ADT_A04","ADT_A05","ADT_A28","SIU_S12","SIU_S15"]
  • messages-processing.sequential - sets only the message/events that need to be grouped by Patient MRN and processed in a sequence for the same patient while messages/events of other patients can still be processed in parallel. Default order: ["ADT_A02","ORU_R01","ADT_A08","SIU_S12","SIU_S13","SIU_S14"]
  • messages-processing.default-message-timestamp - default time stamp used to process messages received after this timestamp in case the watermark is deleted from the Object Store or if nothing exists. Default timestamp set as "2023-04-01 01:00:00.000"
  • messages-processing.outbound-scheduler-cron - Cron expression for Scheduler of outbound processing to run every configured number of minutes. Default set to 10 mins.
  • messages-processing.delete-scheduler-cron - Cron expression for Scheduler of delete messages. Default set to run 3rd of every month.
  • records-older-days - deletes the records that have a message timestamp that is older than the configured number of days. Default set as 15 days.
Run it
  • Right-click the template project folder.
  • Hover your mouse over 'Run as'.
  • Click Mule Application (configure).
  • Inside the dialog, select Environment and set the variable mule.env to the appropriate value (e.g dev or local)
  • Inside the dialog, select Environment and set the variable mule.key. Click Run.

Deployment instructions for CloudHub using provided scripts

Ensure the Maven profile CloudHub-DEV has been properly configured in your settings.xml file. Reference can be found by downloading the Accelerator Common Resources asset. Additional instructions are available in the Getting Started with MuleSoft Accelerators - Build Environment guide.

Update the config-<env>.yaml properties appropriately and then use one of the following scripts to deploy the application to CloudHub:

  • packageDeploy.sh or deployOnly.sh (Mac/Linux)
  • packageDeploy.cmd or deployOnly.cmd (Windows)
Test it

The template accepts requests using HTTPS as well as MLLP listeners:

  • Use Advanced Rest Client or Postman to send a request over HTTPS. The template includes a postman collection in the src/test/resources folder to simulate data ingestion. Most of the postman collection variables are populated by the pre-request script in the first request, apart from host_name. Configure the scripts accordingly for your runs.

Reviews

TypeTemplate
OrganizationMuleSoft
Published by
MuleSoft Solutions
Published onFeb 26, 2024
Asset overview

Asset versions for 1.2.x

Asset versions
VersionActions
1.2.0