IRIS-HL7v2Gen is a CSP application designed to dynamically generate HL7 test messages, validate them against HL7 specifications, display their message structure hierarchy, and transmit the messages to production via TCP/IP.
- Dynamic HL7 Message Generation: Instantly create HL7 messages for a range of message types, facilitating comprehensive testing.
- Message Structure Exploration: Visualize the structure of generated messages based on HL7 specifications.
- Value Set Visualization View predefined sets of allowable coded values for specific fields.
- Message Validation: Validate messages against HL7 standards to ensure compliance.
- TCP/IP Communication: Easily transmit messages to production using TCP/IP settings.
- Broad Message Type Support: Supports 184 different HL7 message types, ensuring versatility for various healthcare integration needs.
- ClassMethod: Generate a Test Message by Invoking a Class Method
- Version Support: Currently Supports HL7 Version 2.5
Make sure you have git and Docker desktop installed.
Clone/git pull the repo into any local directory
$ git clone https://github.com/mwaseem75/iris-HL7v2Gen.git
Open the terminal in this directory and run:
$ docker-compose up -d
Open IRIS for Health installation with IPM client installed. Call in any namespace:
USER>zpm "install iris-HL7v2Gen"
Navigate to http://localhost:32783/csp/HL7v2Gen/index.csp to run the application

The core functionality of IRIS-HL7v2Gen is its ability to dynamically generate HL7 test messages. Users can select from a list of 184 message types, ranging from ADT (Admit, Discharge, Transfer) messages to ORM (Order Message) and ORU (Observation Result) messages. This dynamic message generation allows developers and testers to simulate a wide array of healthcare data exchanges and test their integrations.
The applicationβs interface is designed for simplicity, allowing users to select a message type from a dropdown list, click a button, and immediately generate a test message. This feature is valuable for quickly creating realistic data exchanges that can be used to test systems, troubleshoot errors, and ensure compliance with HL7 standards.
Select a message type from the dropdown list and click the "Generate Test Message" button

The application will generate a test message

HL7 messages can be complex, containing multiple segments, fields, and components. Understanding the structure of these messages is key to ensuring that data is transmitted accurately. IRIS-HL7v2Gen provides an intuitive feature that allows users to explore the structure of the generated message. This feature visualizes the hierarchical structure of the HL7 message, making it easier to understand how different parts of the message relate to each other.
By providing this level of insight, the application helps users identify any structural issues within the message and make necessary adjustments before transmission.
Upon selecting the Message Type, the application will construct the message structure based on HL7 specifications.

This feature enhances message profiling by displaying field value sets. It allows users to view predefined sets of allowable coded values for each field within the message profile, ensuring that data is consistent and standardized according to HL7 v2 specifications. By binding fields to specific value sets, the application helps users create precise, compliant message definitions, reducing optionality and improving interoperability between healthcare systems.

Once a test message has been generated, the application provides a built-in message validation feature. Validating HL7 messages is crucial to ensure they conform to the HL7 standards, preventing issues during real-world exchanges.
Click the "Validate Message" button to validate the message

Click on "View Production" to open the production page. Make sure the production is started
Click on "Send message to production" button from the application
Select business service "HL7TcpService" and Open message viewer

Click on 'Connection Settings' to open the connection settings dialog, where you can define and test the connection

Connect to the IRIS Terminal, and execute the GenMessage function of the dc.HL7v2Gen class, and pass the desired HL7 message type
set mes = ##class(dc.HL7v2Gen).GenMessage("ADT_A01")
write mes
do ##class(dc.HL7v2Gen).ListMessageTypes()
Thanks


