web stats
One Channel with dynamic destinations - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-20-2013, 06:29 AM
cLordP cLordP is offline
What's HL7?
 
Join Date: Mar 2013
Posts: 5
cLordP is on a distinguished road
Default One Channel with dynamic destinations

Hello All -

I am new to Mirth, and have some questions:

I saw that it is possible to setup one channel with multiple destinations. Is it possible send some messages based on file name to one destination or another, but not both? If so, any negative consequences that could come up for that scenario?

In the same train of thought, would one channel with multiple destination channels be a better route to go?

Thanks for your time in advance.
Reply With Quote
  #2  
Old 03-20-2013, 07:47 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

Quote:
Originally Posted by cLordP View Post
I saw that it is possible to setup one channel with multiple destinations. Is it possible send some messages based on file name to one destination or another, but not both? If so, any negative consequences that could come up for that scenario?
Yes, you could use each destination's filter to accomplish that.

Quote:
Originally Posted by cLordP View Post
In the same train of thought, would one channel with multiple destination channels be a better route to go?
Better than what and in what case? I don't understand; that idea is the same as what you proposed in your previous paragraph.
__________________
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 03-20-2013, 08:00 AM
cLordP cLordP is offline
What's HL7?
 
Join Date: Mar 2013
Posts: 5
cLordP is on a distinguished road
Default

Quote:
Originally Posted by narupley View Post
Better than what and in what case? I don't understand; that idea is the same as what you proposed in your previous paragraph.
Thanks for the response narupley.

visual:
Code:
                 /-> Destination1 (D1)
Channel1---- 
                 \-> Destination2 (D2)
My thought is that if D1 goes down, then messages for both D1 and D2 will queue up; correct? I do not want messages to stop sending to D2 in this event.


Code:
                 /-> Channel2 --> Destination1 (D1)
Channel1---- 
                 \-> Channel3 --> Destination2 (D2)
With this idea, I am thinking that if D1 fails, then D2 will still work fine while I'm notifying the other vendor of the issue with D1.

Does that help clarify?

FYI: The end goal is to send lab results to different clients. So, of course, D1 should never receive messages that should be for D2, and vise versa.

Thanks

Last edited by cLordP; 03-20-2013 at 08:02 AM. Reason: formatting
Reply With Quote
  #4  
Old 03-20-2013, 08:33 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

Assuming that you have persistent queuing turned on for both D1 and D2, then if D1 begins to queue it will not affect D2 at all; D2 will still continue to send messages.
__________________
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
  #5  
Old 03-20-2013, 08:51 AM
cLordP cLordP is offline
What's HL7?
 
Join Date: Mar 2013
Posts: 5
cLordP is on a distinguished road
Default

Thanks for confirming for me!

Now I just need to figure out the whole scripting side. I'm able to read Javascript, but I haven't had much experience writing it. Any help on this matter is appreciated, but not expected.

Thanks
Reply With Quote
  #6  
Old 03-20-2013, 09:59 AM
cLordP cLordP is offline
What's HL7?
 
Join Date: Mar 2013
Posts: 5
cLordP is on a distinguished road
Default

I started writing a destination filter in Javascript, but it doesn't appear to be working - it is filtering everything. Could someone give me a couple pointers?

Thanks

Please don't laugh at what is to follow

Code:
function myFunction()
{
var parts="filterOnThisName-TEST.HL7";
var x=parts.split("-");
var y=(x[0]);
z=(y=="SBCNE")?"True":"False"; 
alert(z);
}

myFucntion()

Last edited by cLordP; 03-20-2013 at 10:00 AM. Reason: Edited code for clarity in what I want to acheive
Reply With Quote
  #7  
Old 03-20-2013, 10:40 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

Quote:
Originally Posted by cLordP View Post
I started writing a destination filter in Javascript, but it doesn't appear to be working - it is filtering everything. Could someone give me a couple pointers?

Thanks

Please don't laugh at what is to follow

Code:
function myFunction()
{
var parts="filterOnThisName-TEST.HL7";
var x=parts.split("-");
var y=(x[0]);
z=(y=="SBCNE")?"True":"False"; 
alert(z);
}

myFucntion()
First off, the "alert" function won't work because that's a browser-specific function that isn't in Rhino. Also, your call at the end is "myFucntion" instead of "myFunction", so that will fail too. Lastly, in a filter, you need to return something. It's best to return one of the primitives true or false, but really anything will work; if the return value is truthy then the filter step will pass. If you don't return anything, then the return value is actually undefined, which is falsy (and therefore causes the filter step to fail).
__________________
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
  #8  
Old 12-23-2014, 09:24 AM
AmitSingh AmitSingh is offline
What's HL7?
 
Join Date: Dec 2014
Posts: 2
AmitSingh is on a distinguished road
Default select one destination of multiple destinations in channel

hi team,

I have multiple destination in one channel. And i just want to know how can i select one destination of them to pass the data on the basis of input data which i am passing in mirth.
Reply With Quote
Reply

Tags
channel, channels, destinations, dynamic

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 07:13 AM.


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