HL7 Modules Receiving and Processing Messages
  • 18 Oct 2021
  • 4 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

HL7 Modules Receiving and Processing Messages

  • Dark
    Light

Article summary

Overview 

The HL7 module allows users to send, receive, and add business processing logic to HL7 messages through an HL7 interface. Processing can be applied when messages are received at various stages via processing Flows. There are three processing Flows that can handle messages Pre-processing Flow, Process Flow, and Post Processing Flow.

Prerequisites:

Receiving Messages

Once a Receiver has been enabled to start receiving messages, the new messages will display under Recent Messages on the left side of the Interface Dashboard. Messages that have an error occurred will display under Open Tasks and the Reciever will appear on the right side under Name.

Right-click one of the messages in the recent list and click View HL7 Message to display the message.


Processing Messages

To define how this Interface processes HL7 content, select Tiles on the top action bar to display the processing Flows.

The three Flows displayed are automatically created when creating the interface.


Pre Processing Flow

The Pre Processing Flow gets the HL7 Message as text before the message is parsed into an actual HL7 object. This Flow allows the user to perform manipulations on the message before the main Processing happens within the Decisions platform. 

Since this Flow works with the text of the HL7 Message, any of the standard String and Rule steps in Decisions will work. There are also Flow steps that deal with HL7 text that is in the ER7 format.


Flow StepStep Description
Add Segment At PositionInserts the specified text (assumed to be a segment) at a position in a String[] of segments.
Clean Special Chars Before Segment StartRemoves newline and carriage return characters.
For Each Segment Array in EnvelopeTakes the main text from the HL7 Message and gives each individual Message as a String[] of segments one at a time.
Get Data From Segment By PositionGets data from a segment by the position of the data in the segment
Get Data From Segment By Position In MessageGets data from a segment by the position of the data in the Message
Get First Segment By TypeReturns the first segment from the Array of Segments by Segment Type
Get Segment PositionGets the position or index of a specific segment.
Get Segments By TypeGets all segments by a specific Segment Type 
Join Messages Into EnvelopeTakes a list of String values and converts it into a String with Message Separator characters between each Message
Join Segments Into MessageTakes a list of String values and converts it into an HL7 Message with segment separator characters between each segment
Remove All Segments By TypeRemoves all the segments with the matching String type
Replace Data In Segment By PositionSubstitutes new data in a segment by the position value
Replace Data In Segment By Position In MessageSubstitutes new data in a segment by the position value in a Message
Split Envelope Into MessagesSplits an Envelope into a String[] with the Message Separator character
Split Message Into SegmentsSplits a Message into a String[] of segments with the segment separator character


Processing Flow

The Processing Flow is set up to do no work. This allows users to use the Decisions HL7 Mediator to receive Messages from systems and send them right back out again unmodified. Users are able to create a single hub where Messages are distributed to a wide range of systems in the environment, but the Processing Flow lets users inject behavior.

The Processing Flow allows users to:

  • Stop the Message and assign tasks to people (alerts, corrections, notifications)
  • Transform the Message using databases, web services, math, text manipulation, and more
  • Store the messages in other systems
  • Transform the Message data
  • Have other users manually correct the Message data
  • Compare the Message data to other systems and either accept  or discard it
  • Merge Messages with other Messages
The Processing Flow takes an HL7 Envelope, which may have multiple HL7 Messages in it, as input.  The Flow outputs the same HL7 Message Envelope with Messages changed, removed, or added so that the Interface can send these Messages along to other systems via the configured Emitters.


The Processing Flow also has a special set of HL7 Message specific steps that can be used in the workflow engine.  Below are a few steps that require an explanation of how to use them.

Flow StepDescription
For Each Abstract Message In EnvelopeIterates through all of the HL7 Messages in the Envelope and allows users to work with one Message at a time until the work is complete. (Used with the Cast Message as Another Message Type step which lets users treat a Message as another Type)
For Each Message In EnvelopeSimilar to the For Each Abstract Message in Envelope except that the Message Types that are expected to be processed are specified and each Message Type received separate paths to modify Message in the workflow.
Sent to InterfaceAllows the user to send a Message directly to an Interface at a specific Stage (Pre-Processing, Processing, Post-Processing, Emitter) of the processing.


Post-Processing Flow

The Post-Processing Flow behaves as the counterpart to the Pre-Processing Flow.  It takes the raw HL7 text that the Processing Flow has passed through and allows it to be modified before it is sent over to receiving systems via the Emitters.  This allows users to accommodate systems and services that do not support the standards appropriately.


Was this article helpful?