web stats
Can one transformer apply to all message types? - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 04-20-2007, 12:35 PM
jbartels jbartels is offline
Mirth Guru
 
Join Date: Oct 2006
Posts: 729
jbartels is on a distinguished road
Default Can one transformer apply to all message types?

I currently have a channel set up to recieve any message sent to it (no filters). I created the mappings I needed to work with ADT messages. I now need to move to the next step and handle SIU messages.

I see that the SIU messages and ADT messages both have a PID segment, which I need information from for either message. When the channel gets an ADT message its fine, but when it gets an SIU message it doesnt get any data from the SIU PID segment.

Is there some way to make the PID segment mappings apply to all message types?
__________________
Jon Bartels

Zen is hiring!!!!
http://consultzen.com/careers/
Talented healthcare IT professionals wanted. Engineers to sales to management.
Good benefits, great working environment, genuinely interesting work.
Reply With Quote
  #2  
Old 04-20-2007, 12:38 PM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re: Can one transformer apply to all message types?

Change the parser type (incoming/outgoing data tab on the transformer - uncheck "Use strict parser"). You will need to change your mappings, but you can do something like:

for (pid in msg..['PID']){

}

Now that I think of it - you might be able to do this with the strict parser as well. The for (pid in msg..XXX) will find XXX in any part of the XML.

-Chris
__________________
Chris Lang
Reply With Quote
  #3  
Old 04-20-2007, 12:57 PM
jbartels jbartels is offline
Mirth Guru
 
Join Date: Oct 2006
Posts: 729
jbartels is on a distinguished road
Default Re: Can one transformer apply to all message types?

The difference in syntax is like this:

Strict: msg['PID']['PID.5']['XPN.2'].toString()

Not-Strict: msg['PID']['PID.5']['PID.5.2'].toString()
__________________
Jon Bartels

Zen is hiring!!!!
http://consultzen.com/careers/
Talented healthcare IT professionals wanted. Engineers to sales to management.
Good benefits, great working environment, genuinely interesting work.
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
creating channels for various types of HL7 message shifting_18 Support 2 05-07-2007 05:29 PM
Transformer : Message builder glesener Support 1 04-13-2007 05:50 AM
Can't see transformer or message browser asifshiraz Support 1 11-09-2006 02:50 PM
How to filter and process different message types? tintinn Support 2 09-24-2006 09:51 PM


All times are GMT -8. The time now is 01:23 PM.


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