web stats
Multiple Sources - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-12-2009, 05:31 AM
peinso peinso is offline
Mirth Newb
 
Join Date: Dec 2008
Posts: 9
peinso
Default Multiple Sources

Hello @ all!
Again we need help!

We need multiple sources for one channel, and we have to distinguish between them by an id or a sourcename or something.

short: multiple source, one destination...


is that possible? When yes, how?

THX

Post edited by: peinso, at: 03/12/2009 06:32
Reply With Quote
  #2  
Old 03-12-2009, 05:49 AM
quimicefa quimicefa is offline
Mirth Guru
 
Join Date: Dec 2007
Location: Barcelona
Posts: 235
quimicefa is on a distinguished road
Default Re:Multiple Sources

Can you describe your scenario?

I've discussed about this with ricber, some days ago .. but I still think that this is only required in a very few environments ...
Reply With Quote
  #3  
Old 03-12-2009, 06:06 AM
peinso peinso is offline
Mirth Newb
 
Join Date: Dec 2008
Posts: 9
peinso
Default Re:Multiple Sources

ok, it's a bit difficult...

We writed a transformer which create a CDA-document out of a HL7-document. But the CDA-document have to contain more information than a HL7-document, so the remaining data is in a database.

Now the scenario:
For example, a laboratory sends a HL7-Message to our mirth-channel. The transformer maps it to a CDA-document with addition data from the database. After that, we store this CDA-File in another database. So far so good, that works.
But if there are for example two laboratories who send HL7-Messages, I can't distinguish between them, and cannot combine them with the write master data.

I hope you could understand my explanation!
Reply With Quote
  #4  
Old 03-12-2009, 06:25 AM
quimicefa quimicefa is offline
Mirth Guru
 
Join Date: Dec 2007
Location: Barcelona
Posts: 235
quimicefa is on a distinguished road
Default Re:Multiple Sources

Ok,

you can implement this by using a single channel with 2 destinations. The source may receive the HL7 messages as usual, then define 2 destinations:
* DBwriter/JS enabled -> note that you may execute several SQL statements inside a single DBWriter/JS enabled!
* Document Writer / FileWriter, or the type you like to create the CDA-document.

When a incoming HL7 message pass to the 1st destination (DBWriter), in their transformer extract the fields you need to build the SQL query.
In the DB Writer itself, execute the query, AND process the obtained resultset, mapping the interesting values to the channelMap.

In the 2nd destination, you can access the incoming HL7 message (as received from the source) and the mapped variables into 1st destination, so, you can contruct the whole CDA-document.

PD: AFAIK you don't need multiple sources. As I discussed with ricber, the only scenario that really need the multiple sources input is when there are to sources that are sending you messages asynchronously, so you need to receive 1 message of each source to combine them and process the result as one only message; but I didn't faced yet with such scenario ...
Reply With Quote
  #5  
Old 03-12-2009, 06:27 AM
ricber ricber is offline
Mirth Guru
 
Join Date: Jun 2007
Location: Barcelona, Spain
Posts: 181
ricber
Default Re:Multiple Sources

Hi all,

ha, ha, ha!!!, it's just an example quimicefa. But really in this case we are talking about integration.

Peinso, AFAIK, you can use multiple channels in order to "expose" different interfaces to other systems, and use channel writer as a destination to a common channel. This common channel must use channel reader as a source and you can define multiple destinations or message routings.

At this point there is a lot of problems like you can't trace back the message in order to know its channel source without modifying it, and a second problem and much more important is that Mirth uses XML as a format between channel writer-reader. If you are using HL7 as a message format, you can route this message to the common channel, but you must work with it as a XML message, not as a HL7. Here I am.

Surely many of this troubles can be resolved, maybe second one using HL7 serializer but nowadays I don't know how.

This is all my knowledge about this.

HTH,

Ricard Bernat
Reply With Quote
  #6  
Old 03-12-2009, 06:42 AM
quimicefa quimicefa is offline
Mirth Guru
 
Join Date: Dec 2007
Location: Barcelona
Posts: 235
quimicefa is on a distinguished road
Default Re:Multiple Sources

The main problem I see about the multiple channels solution is that, despite you can reuse your code because the "common channel" remains intact and is possible to extend it by adding more "interface channels" that write their meesages to the common one .... I didn't found how to pass the ACK/NAK message back to the "interface channel" from the "common channel".

If some error happens while processing the message in the common channel, you cannot pass a NAK message to the interface channel, and therefore the sending application doesn't know if the message was sent or not ...

May we start another thread about the need for the multiple sources channel. I remember that a few days ago, somebody asked about a "best practices" with mirth ...?

PD: I just googled a bit, but the integration pattern that I referred in my last message was the Aggregator (http://www.enterpriseintegrationpatterns.com/toc.html)
Reply With Quote
  #7  
Old 03-12-2009, 06:44 AM
peinso peinso is offline
Mirth Newb
 
Join Date: Dec 2008
Posts: 9
peinso
Default Re:Multiple Sources

ricber, you've understand the problem...

ok, but that's no solution for us, because it's the same problem. I cannot see who has send the message...Damn!


We try to find a solution.... If I have news, I will publish them here....
Reply With Quote
  #8  
Old 03-12-2009, 06:51 AM
quimicefa quimicefa is offline
Mirth Guru
 
Join Date: Dec 2007
Location: Barcelona
Posts: 235
quimicefa is on a distinguished road
Default Re:Multiple Sources

If you clone the whole channel (1source/2 dests), and adding a tag to the message ?

What protocol are you using to receive the messages from the lab?
Reply With Quote
  #9  
Old 03-13-2009, 04:19 AM
quimicefa quimicefa is offline
Mirth Guru
 
Join Date: Dec 2007
Location: Barcelona
Posts: 235
quimicefa is on a distinguished road
Default Re:Multiple Sources

If you want my 2 cents about this ...
From the point of view of integration, the scenario you described is closer to the "data enricher" than "aggregator" pattern
http://www.enterpriseintegrationpatt...aEnricher.html
http://www.enterpriseintegrationpatt...ggregator.html

And, if routing messages between channels allows ACK/NAK to be passed back from the "common channel" to the "interface channels" ... If you have to operate with N labs, you would have to deploy N+1 channels (N interface channels plus the common one).
But using 1 channel with 2 dests (where the 1st dest is the "data enricher"), you would have to deploy N chanels to talk with N labs, and you can add some tag/var to each channelMap to distinguish between the different labs

So, perhaps the multiple sources feature should be implemented, or discussed?
Reply With Quote
  #10  
Old 08-27-2010, 05:44 AM
magikbanana magikbanana is offline
OBX.2 Kenobi
 
Join Date: Dec 2007
Posts: 79
magikbanana is an unknown quantity at this point
Default

Hello,

Would it be possible to show your transformer on this forum ? it would save me as I don't know how to transform HL7 to CDA. Thanks

Quote:
Originally Posted by peinso View Post
ok, it's a bit difficult...

We writed a transformer which create a CDA-document out of a HL7-document. But the CDA-document have to contain more information than a HL7-document, so the remaining data is in a database.

Now the scenario:
For example, a laboratory sends a HL7-Message to our mirth-channel. The transformer maps it to a CDA-document with addition data from the database. After that, we store this CDA-File in another database. So far so good, that works.
But if there are for example two laboratories who send HL7-Messages, I can't distinguish between them, and cannot combine them with the write master data.

I hope you could understand my explanation!
Reply With Quote
Reply

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Receiving mllp hl7 messages from multiple sources jerchap Support 11 10-18-2011 09:32 PM
ASTM sources ricber Development 2 05-12-2010 02:02 AM
Building Mirth from sources in subversion [SOLVED] angelo Development 3 06-11-2007 03:40 AM
Construct HL7 messages from data sources [mysql] kgk_007 Support 0 03-06-2007 03:31 AM


All times are GMT -8. The time now is 07:27 PM.


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