web stats
Source One XML --> Dest. Several XML - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 04-11-2012, 12:30 AM
chris_k chris_k is offline
OBX.1 Kenobi
 
Join Date: Jan 2012
Location: Austria
Posts: 27
chris_k is on a distinguished road
Default Source One XML --> Dest. Several XML

hello everyone,

I have a problem with parsin gof xml messages.

I receive ONE large xml message via a channel reader source. My destination is a web service sender.

My received XML:
<message>
<patient>
<AnfoNr Value="412"/>
<SID Value="001"/>
<ALB Value="111"/>
<BALP Value="112"/>
.....
</patient>
<patient>
<AnfoNr Value="413"/>
<SID Value="002"/>
<ALB Value="211"/>
<BALP Value="212"/>
.....
</patient>
.........
.........
</message>

Each patient has to be send as a own web service message. The message has to be completed with id information, from other xml configuration files, but this is not my problem.
My problem is, how is it possible to parse the above xml patient elements and transfer them as single messages (or global channel variable) to the destination conntector?

thanks
Reply With Quote
  #2  
Old 04-11-2012, 04:44 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,116
narupley is on a distinguished road
Default

Since it's a Channel Reader, the easiest way to do this is to go back to the destination that is sending to that channel. Id est, if ChannelA is sending XML to ChannelB, and ChannelB sends it out via a Web Service Sender, then go back to the destination of ChannelA that is sending it to ChannelB. There, you can split and route the message as you see fit.

Here's an example of how to split/route HL7 messages (it'll be almost the same thing for straight XML): http://www.mirthcorp.com/community/f...ead.php?t=6504
Also, here's more info on routing in general: http://www.mirthcorp.com/community/f...ead.php?t=6531
Reply With Quote
  #3  
Old 04-16-2012, 12:17 AM
chris_k chris_k is offline
OBX.1 Kenobi
 
Join Date: Jan 2012
Location: Austria
Posts: 27
chris_k is on a distinguished road
Default

Thanks, your link was the help.
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


All times are GMT -8. The time now is 06:28 PM.


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