---
title: "Receiving and Processing Messages"
slug: "hl7-modules-receiving-processing-messages"
description: "This document shows how to view received messages in the HL7 Module and how to create a Workflow for processing those messages. The document details the three pre-made flows that are designated to the different steps of the Processing action. "
tags: ["HL7", "messages", "processing"]
updated: 2025-08-20T20:04:00Z
published: 2025-08-20T20:04:00Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Receiving and Processing Messages

## Overview

| Module Details |
| --- |
| **Modified in Version** | v8.17 |
| **Core or GitHub Module** | Core |
| **Restart Required** | No |
| **Steps Exposed** | Yes |
| **Step Location** | HL7 |
| **Settings Location** | Settings are configured and defined for each interface |
| **Prerequisites** | - For more information on the HL7 standard, origin, and more, see [http://www.hl7.org](http://www.hl7.org). - [Installation](/v8/docs/installing-modules-decisions) of the HL7 module in Decisions. - A [dependency](https://documentation.decisions.com/docs/project-dependencies) for the HL7 in a Project. |

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. Three processing Flows can handle messages: Pre-processing Flow, Process Flow, and Post Processing Flow.

---

## Receiving Messages

Once a [Receiver](/v8/docs/hl7-modules-setting-interface-receivers) has been enabled, new messages will display under the **Recent Messages** Report found on the left side of the Interface Dashboard.

**Note:** When using a File Receiver, ensure the folder path specified in the receiver settings has proper file System permissions configured. The Decisions application must have **read** and **write** access to the folder to process incoming messages successfully.

Messages that have an error will display under **Open Tasks**.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1753389531616.png)

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.

Known issue: Messages do not appear under the "Recent Messages" tab in Decisions versions 9.13 and earlier.

![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1755717177580.png)

---

## Processing Messages

Three Flows are created for each HL7 Interface. These are the Pre Process, Process, and Post Process Flows, where each can be configured to define how the interface will process received messages. To view these Flows, select the **List** Page from the top of the interface folder.

![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1753391102751.png)

---

## 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 user to manipulate and evaluate messages before fully processing them.

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

![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1753391252963.png)

| 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 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 |

---

## Message Passthrough

In addition, steps that contain a Stage input, such as **Send Message to Interface** or **Send Raw Message To Interface,** can select the **pass-through** stage. This stage allows messages to be sent to an emitter or interface directly after completing the step, avoiding any changes from the Process or Post Process Flow. ![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1754082809433.png)

---

## Process Flow

The**Process Flow**is configured as a centralized location to distribute messages.

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

The Flow includes an input for an **HL7 Envelope** structure, which can hold multiple HL7 messages. The structure can be viewed in the **Data Explorer** panel in the Flow Designer.

![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1753392467810.png)

The Process Flow also has specific steps when designing the Flow. These steps can be found under **HL7 > Processing Steps** in the Toolbox.

| Flow Step | Description |
| --- | --- |
| 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 before being sent to an [emitter](/v8/docs/hl7-modules-setting-interface-receivers). ![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1753392569164.png)

---

## Search

When the HL7 module is installed, a dashboard labeled **Search** is made available within the **HL7 Interfaces** folder. This dashboard is designed to help users quickly and easily locate specific HL7 messages.

With the **Search**dashboard, users have the ability to filter messages based on three key criteria. They can select the specific Interface ID that the message was sent through. This is useful for organizations that have multiple interfaces that are sending and receiving HL7 messages. Secondly, define a specific time frame within which the message was sent. This helps narrow down the search results to a specific period, which can be especially helpful when searching through large volumes of messages. Finally, filter by the message data itself. This can be done using various criteria such as patient ID, message type, or any other relevant data that the message contains.

The Search dashboard is an essential tool for efficiently and effectively locating specific HL7 messages within a larger healthcare System.

![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1753393861167.png)

---

## Feature Changes

| Description | Version | Release Date | DT |
| --- | --- | --- | --- |
| Adding a Search Dashboard to the HL7 Interfaces folder. | [8.11](https://documentation.decisions.com/v99/docs/version-811x-release-notes) | April 2023 | [DT-037350] |
| Added an option to auto-ignore NACK messages | [8.17](https://documentation.decisions.com/v99/docs/version-8x) | December 2023 | [DT-039534] |

---

For further information on Modules, visit the [Decisions Forum](https://community.decisions.com/categories/Modules).

## Related

- [HL7](/hl7.md)
- [HL7 Module Step Glossary](/hl7-module-step-glossary.md)
- [HL7 Module Overview](/hl7-module.md)
- [HL7 Module FAQ](/hl7-module-faq.md)
- [Setting up Receivers & Emitters](/hl7-modules-setting-interface-receivers.md)
