Business Rule Editor - Using Foreach Action and how to account for the counter
I have a segment within a Group (grp) that needs to be validated that it is populated within the message.
.png)
When you use a Foreach within a Business Rule how should you account for the counter in the group?
For example, Epic sends their MFN message in the following format.
MSH~MFI~[~{~MFE~STF~PRA~[~ZPR~]~[~ZLK~]~[~CER~]~[~ZMG~]~[~ZTF~]~[~ZGP~]~[~ZDD~]~}~]
so, the ZLK segment might not exist until the last MFEgrp that is in the message. I need to verify if there is an Employee ID associated with the Provider in the HL7 message before I run it through the translation.
Comments
You don't use the counter in the Rule Editor. In the When condition inside the Foreach, you would use Segment.{LinkToSER.Identifier}. Below is an example that is similar to what you have.
.png)