Question
· Jul 3, 2023

HL7 test message generator

I am looking for an appropriate solution to generate HL7 test messages to test my production. IRIS for Health already contains many HL7 specific functions like the schema structures. Furthermore one can use transformations to build custom messages.

What I am interested in is if anyone has already created a tool or script that can be used to create any HL7 messages that meet the minimum requirements and populate all the required fields with test values. I would then like to send these test messages via TCP to a business service.

Does anyone already have an approach or implementation for this?

Product version: IRIS 2022.3
Discussion (12)7
Log in or sign up to continue

Hi Tommy,

Something that might be a placeholder to this facility could be: https://openexchange.intersystems.com/package/UnitTest-RuleSet

The idea is a self-contained UnitTest class containing a Vanilla Starting HL7 message defined in a XData block.

Each test method constructs a clone of the starting HL7 message, makes required modifications, before sending to a target via a named Service.

I suppose it is simpler without the routing rule, check. Interested what Assertions are needed.

For example:

* Checking a MessageHeader was created for the same SessionId with a particular Target Name

* Checking a response was received from an end-point

From your question; Is there a particular reason to send over TCP to a Service? Is the message generator and sending being used for end-to-end / volumes / message types stressing?

Is this about message content variation (optional values) as well as the full message with a value in every field.

I was just thinking about trying to make something to do this.

I asked Google Bard to create a HL7 message for me using this prompt: 

"create an ECG order hl7 message example for HL7 v2 2.4"

And I got this:

MSH|^~&|EPICADT|EPICADT|CERNER|CERNER|20230804120000||ORM^O01|1234567890|P|2.4 PID|1||1234567890^^^EPICADT^MR||DOE^JOHN||19800805|M||123 MAIN ST^^ANYTOWN^CA^91234^USA^^H PV1|1|I|INPATIENT|||||||ADMITTING PHYSICIAN^LAST^FIRST^M^MD ORC|1|NW|1234567890^EPICADT^MR|1234567890^EPICADT^MR|86702^ELECTROCARDIOGRAM^LOINC||20230804120000||||||20230804120000 OBR|1|NW|1234567890^EPICADT^MR|1234567890^EPICADT^MR|86702^ELECTROCARDIOGRAM^LOINC||20230804120000||||||20230804120000

If you want to quickly generate a message it might be helpful

It did get me thinking that an LLM could be the way to go here