HL7: Random Message Generator

Introduction

Need an incoming stream of sample message data? Try this random ADT message generator! The code is straightforward and easy to implement, but you can elaborate on it as needed.

The channel uses the ran.lua module to generate random HL7 ADT messages.

If you have any questions please contact us at support@interfaceware.com.

Using the Code [top]

  • Import the HL7: Random Message Generator channel from the Builtin: Iguana Protocols repository
  • Experiment with the code to find out how it works
  • Then add the module to your Translator project
  • Copy the require statement from the channel and add it at the top of your script
    Note: This module uses require to return a single function
  • Adapt the code to your own requirements
  • Use the ran.RandomMessage() function to generate random messages
  • Interactive scripting help is included for this module

This is the github code for the main module:

How it works [top]

The From Components of the channel generates a random HL7 ADT message every 10 seconds and pushes onto Iguana message queue. In this case we use an LLP Client Destination component to send it via LLP to localhost:5145.

You can process the generated messages just as you would any other message. You can modify them (probably in the Filter component), and forward them ( LLP client Destination), save them to file etc.

The channel uses the following components:

  • From Translator (source)
  • To LLP Client (destination)

Tip: You can use whatever destination component best suits your needs.

More information [top]

Leave A Comment?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.