- 20 Jul 2022
- 4 Minutes to read
Receiving and Processing HL7 Messages
- Updated on 20 Jul 2022
- 4 Minutes to read
|Core or Github Module||Core|
|Settings Location||Settings are configured and defined for each interface|
The HL7 module allows users to send, receive, and add business processing logic to HL7 messages through an 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.
Once a Receiver has been enabled, new messages will display under the Recent Messages Report found on the left side of the Interface Dashboard.
Messages that have an error will display under Open Tasks.
Receivers will appear on the rightmost Report.
To display a message, Right-click one of the messages in the recent list and select View HL7 Message. The message type will be listed on the left, along with the message text.
Pre Process Flow
The Pre Process Flow gets the HL7 message as text before the message is parsed into an actual HL7 object. This Flow allows the users to manipulate and evaluate messages before being fully processed.
|Flow Step||Step Description|
|Add Segment At Position||Inserts the specified text (assumed to be a segment) at a position in a String of segments.|
|Clean Special Chars Before Segment Start||Removes newline and carriage return characters.|
|For Each Segment Array in Envelope||Takes 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 Position||Gets data from a segment by the position of the data in the segment|
|Get Data From Segment By Position In Message||Gets data from a segment by the position of the data in the Message|
|Get First Segment By Type||Returns the first segment from the Array of Segments by Segment Type|
|Get Segment Position||Gets the position or index of a specific segment.|
|Get Segments By Type||Gets all segments by a specific Segment Type|
|Join Messages Into Envelope||Takes a list of String values and converts it into a String with Message Separator characters between each Message|
|Join Segments Into Message||Takes a list of String values and converts it into an HL7 Message with segment separator characters between each segment|
|Remove All Segments By Type||Removes all the segments with the matching String type|
|Replace Data In Segment By Position||Substitutes new data in a segment by the position value|
|Replace Data In Segment By Position In Message||Substitutes new data in a segment by the position value in a Message|
|Split Envelope Into Messages||Splits an Envelope into a String with the Message Separator character|
|Split Message Into Segments||Splits a Message into a String of segments with the segment separator character|
In addition, steps that contain a Stage input, such as Send Message to Interface or Send Raw Message To Interface, have the ability to select the pass-through stage.
This stage allows messages to be sent to an emitter or interface directly after the completion of the step, avoiding any changes from the Process or Post Process Flow.
By default, the Process Flow is configured to make no changes and serves as a centralized location to distribute messages. The Flow can be modified to suit user needs.
Below are some example use cases for the Process Flow:
- Stop messages and assign tasks to people (alerts, corrections, notifications)
- Transform messages using databases, web services, math, text manipulation
- Store messages in other systems
- Transform message data
- Have other users manually correct message data
- Compare message data to other systems
- Merge messages together
The Process Flow also has specific steps that can be used when designing the Flow. These steps can be found under HL7 > Processing Steps in the Toolbox.
Below are a few steps that require an explanation of how to use them.
|For Each Abstract Message In Envelope||Iterates 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 Envelope||Similar 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 Interface||Allows the user to send a Message directly to an Interface at a specific Stage (Pre-Processing, Processing, Post-Processing, Emitter) of the processing.|
|Get Value from Segment by Position||Allows the user to get a value from a segment by the position using numbers or dots (i.e. 3 or 3.2)|
Post Process Flow
The Post Process Flow behaves as the counterpart to the Pre Process Flow. It takes the raw HL7 text that the Process Flow has passed through and is used to emit nonstandard messages.
This Flow is mainly used to manipulate text in a message prior to being sent to an emitter.