Announcement

Collapse
No announcement yet.

destinationSet Filters

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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);
    }

  • #2
    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.

    Comment


    • #3
      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.

      Comment

      Working...
      X