Sidebar

Can I find HL7 mesage that does not end with a pipe "|"

0 votes
345 views
asked Mar 24, 2016 by brandon-w-8204 (33,270 points)

1 Answer

0 votes

To search for messages that have a HL7 that does not end in a "|" do the following.

1. Click on the messages tab,  Click the ellipsis, Click on advanced

2. Click on advanced, Click on Insert

3. Click on Customize script

4. Use one of the scripts below.

Script:

var messageLines = StringUtils.splitByWholeSeparator(source.getNode('/'), '\r');
var i = messageLines.length -1;
if (StringUtils.isNotBlank(messageLines[i])) {
   i = i--;
}
if (StringUtils.endsWith(messageLines[i], '|')) {
   return false;
} else {
   return true;
}
answered Mar 24, 2016 by brandon-w-8204 (33,270 points)
edited Mar 24, 2016 by brandon-w-8204
...