web stats
How to filter and process different message types? - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 09-24-2006, 06:38 AM
tintinn tintinn is offline
Mirth Newb
 
Join Date: Sep 2006
Posts: 6
tintinn
Default How to filter and process different message types?

How do I go about configuring an inbound channel (LLP listener) to process different type of messages ?

Suppose my channel at LLP port 8080 listens to various type of ADT messages. I'd like to process each type of messages differently depending on the event code. How do I go about doing it ?

As a novice, my plan is that i would create a filter that recognize the ADT event type, and use Destination to resend the message to various Mirth channels (eg A01, A04, A13 etc) i created in order to handle the different message types. Doing it this way ensures that I can create customized transformers, database destinations for the different message types.

Is there a better way of doing this ?

-badrul
Reply With Quote
  #2  
Old 09-24-2006, 11:27 AM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re: How to filter and process different message types?

Yes, there is a better way.

All you need is a single channel with all of your destinations, set in Router mode.

You can define a filter on each destination that checks the message type:

Code:
var messageType = msg['MSH']['MSH.9']['MSG.1'].text() + msg['MSH']['MSH.9']['MSG.2'].text();
if (messageType == "ADTA04"){
     return true;
}else{
     return false;
}
The destination will only be processed if the message Type matches (this is for HL7 v.2.3 or greater - the mapping is a bit different for 2.2 and 2.1). You can define a seperate transformer and database destination for each "destination" in Mirth. It will only be run if the filter returns true.
__________________
Chris Lang
Reply With Quote
  #3  
Old 09-24-2006, 09:51 PM
tintinn tintinn is offline
Mirth Newb
 
Join Date: Sep 2006
Posts: 6
tintinn
Default Re: How to filter and process different message types?

thanks.

i wasn't aware that each destinations have separate filters and transformers. *doh*
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
I want to handle random message types chronofish Support 5 02-23-2009 07:53 AM
Proprietary types bolota Support 3 08-03-2007 06:31 AM
creating channels for various types of HL7 message shifting_18 Support 2 05-07-2007 05:29 PM
Can one transformer apply to all message types? jbartels Support 2 04-20-2007 12:57 PM
Caused by: ca.uhn.hl7v2.HL7Exception: Can't process message of version '2.3.1EVN' - v friscov Support 3 12-18-2006 07:56 PM


All times are GMT -8. The time now is 07:24 AM.


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