web stats
destinationSet Filters - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 09-23-2016, 07:12 AM
BJohn BJohn is offline
What's HL7?
 
Join Date: Sep 2016
Posts: 4
BJohn is on a distinguished road
Default destinationSet Filters

Trying to route messages using the destinationSet method based on a value in the HL7 message.

There are three destination channels. 1 and 2 are the redirects and 3 is a catch all.

There are no errors and the status of the incoming messages show "Filtered" yet none of the destination channels receive the message.

Where did I mess up?


MC 3.4.1

// Filter based on locations

var location = msg['ORC']['ORC.13']['ORC.13.4']['ORC.13.4.2'].toString();

switch(location) {
case "1001":
destinationSet.removeAllExcept(1);
break;
case "1002":
destinationSet.removeAllExcept(2);
break;
default:
destinationSet.removeAllExcept(3);
}
Reply With Quote
  #2  
Old 09-23-2016, 07:34 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,116
narupley is on a distinguished road
Default

Works fine for me. Are you doing that in the source transformer script?

If your source message status is FILTERED then that means you have a filter script that is rejecting the message. So obviously it's not going to go any further.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #3  
Old 09-23-2016, 07:57 AM
BJohn BJohn is offline
What's HL7?
 
Join Date: Sep 2016
Posts: 4
BJohn is on a distinguished road
Default

That was the issue.

I was using the source filter script, changed to the source transformer script and I get the expected behavior.

Thanks so much. Now I need to learn the mapper functions.
Reply With Quote
Reply

Tags
destinationset, filter, hl7 message

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:09 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation