1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
408 views
by angela-h-1523 (120 points)
edited by gary-t-8719
A reference lab that is supposed to be sending us results instead sends repeating HL7 messages of NO-OP without any kind of MSH header.  Is there a way to block these messages instead of letting them create errors?  I have a ticket in with said ref lab but the response time is not great.

1 Answer

0 votes

Filtering out NO-OP messages can be done with the following two steps.

Step 1. On the source node set the ACK response to "From Mapping or Destination Node" Then add the following script to the "Preprocess Received Byte" script window.

bytesOut = bytesIn;
var message = new java.lang.String(bytesIn);
if (StringUtils.equalsIgnoreCase(message, 'no-op')) {
   var messageResult = new java.lang.String('MSH|^~\\&|NO-OP');
   bytesOut = messageResult.getBytes('UTF-8');
}

Step 2. Add the following script as the first mapping on the channel. This script will delete the invalid NO-OP messages or send an ACK message back for the valid messages.

//Remove invalid NO-OP Messages else send ACK for valid messages
if (StringUtils.equalsIgnoreCase(source.getNode('MSH-3'), 'no-op')) {
   qie.warn('NO-OP message discarded');
   qie.postMessageResponse("no-op");
   message.discard();
} else {
   //send ACK for valid messages
   var responseMsg = qie.parseHL7String('MSH|^~\\&|');
   responseMsg.setNode('MSH-3', source.getNode('MSH-5'));
   responseMsg.setNode('MSH-4', source.getNode('MSH-6'));
   responseMsg.setNode('MSH-5', source.getNode('MSH-3'));
   responseMsg.setNode('MSH-6', source.getNode('MSH-4'));
   responseMsg.setNode('MSH-7', qie.formatDate('yyyyMMddhhmmss'));
   responseMsg.setNode('MSH-8', source.getNode('MSH-8'));
   responseMsg.setNode('MSH-9', 'ACK');
   responseMsg.setNode('MSH-10', qie.formatDate('yyyyMMddhhmmssSSS'));
   responseMsg.setNode('MSH-11', source.getNode('MSH-11'));
   responseMsg.setNode('MSH-12', source.getNode('MSH-12'));
   responseMsg.setNode('MSA-1', 'AA');
   responseMsg.setNode('MSA-2', source.getNode('MSH-10'));
   qie.postMessageResponse(responseMsg);
}

Step 1 Screen Shot:

Step 1

Step 2 Screen Shot:

Step 2

by gary-t-8719 (15.1k points)
...