web stats
Use of Inbound and Outbound templates in transformer - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 05-05-2009, 02:57 AM
dheeraj dheeraj is offline
OBX.1 Kenobi
 
Join Date: Apr 2009
Location: India
Posts: 46
dheeraj is on a distinguished road
Default Use of Inbound and Outbound templates in transformer

Hi folks,

I am a newbie to mirth and sincerely stucked with significance of inbound and outbound message templates in a channel. Also can anyone tell me the steps of provide an example for transforming an XML from one format to another. Any help will be highly appreciated.

Thanks and Regards,
Dheeraj Bansal
Reply With Quote
  #2  
Old 05-06-2009, 09:28 AM
geraldb geraldb is offline
Mirth Employee
 
Join Date: Aug 2006
Location: Irvine, CA
Posts: 314
geraldb is an unknown quantity at this point
Default

Hi Dheeraj,

Mirth Connect helps you create message mappings and transforms "by example". The inbound template represents the incoming message. When you paste in a sample message, and drag the segments over from the tree to create mapping steps, you're essentially telling Mirth Connect that you are expecting to receive a message that looks like the inbound template (that is, has the same segments). Since the inbound template is just an "example", none of the data from the template is used, just the mappings that were created. You would use an inbound template when you want to extract segments or modify an incoming message.

The outbound template is used to specify the outgoing message format. By providing an outbound template, you are telling Mirth Connect that you want your outgoing message to look different from your incoming message. In this case, the content of the outbound template is exactly what is going to be sent, so you'll want to make sure that you clear out any data that you wouldn't want to be sent with every message. Once you've pasted in an outbound template, you can use the Message Builder step type to modify the message however you want. The most common way to do this is to paste in both an inbound and an oubound template, and then drag-and-drop from a segment in the inbound to a segment in the outbound. This will create a new step that takes the data from the incoming message and inserts it into the outgoing message.

In your case, since you're using XML, just paste your original structure into the inbound template and the desired structure into the outbound template. Then, drag-and-drop the desired segments from the inbound to the outbound. When the channel is deployed and receiving XML messages, it will create a new outbound message (based on the template), replace all of the segments with the incoming data (based on your mapping), and send it out to your destinations.

Hope this helps.
__________________
Gerald Bortis | Chief Information Officer | Mirth Corporation
Reply With Quote
  #3  
Old 05-06-2009, 09:32 AM
geraldb geraldb is offline
Mirth Employee
 
Join Date: Aug 2006
Location: Irvine, CA
Posts: 314
geraldb is an unknown quantity at this point
Default

Also, you can find an example of using the Message Builder step on the community wiki.
__________________
Gerald Bortis | Chief Information Officer | Mirth Corporation
Reply With Quote
  #4  
Old 05-06-2009, 10:46 PM
dheeraj dheeraj is offline
OBX.1 Kenobi
 
Join Date: Apr 2009
Location: India
Posts: 46
dheeraj is on a distinguished road
Smile

This is called as solution to a problem. Thanks it helped a lot and cleared the air.
Once again thanks.
Reply With Quote
  #5  
Old 07-27-2015, 01:26 AM
Divs Divs is offline
What's HL7?
 
Join Date: Apr 2015
Posts: 4
Divs is on a distinguished road
Default

Hi,

I suppose the above solution is for a fixed structure result message and not for the dynamic result.

I want to send a result with multiple segment of OBR and NTE and their numbers (OBR and NTE segments number) must be based on the number what I am receiving in my order message.

Can It be done using javascript without doing any manual mapping??

Please reply with some solution.
Reply With Quote
  #6  
Old 04-11-2019, 07:19 AM
BDafoe BDafoe is offline
What's HL7?
 
Join Date: Apr 2019
Posts: 2
BDafoe is on a distinguished road
Default

Quote:
Originally Posted by Divs View Post
Hi,

I suppose the above solution is for a fixed structure result message and not for the dynamic result.

I want to send a result with multiple segment of OBR and NTE and their numbers (OBR and NTE segments number) must be based on the number what I am receiving in my order message.

Can It be done using javascript without doing any manual mapping??

Please reply with some solution.


Does anyone have a solution for this, similar problem to what I am having right now....
Reply With Quote
  #7  
Old 04-11-2019, 07:23 AM
BDafoe BDafoe is offline
What's HL7?
 
Join Date: Apr 2019
Posts: 2
BDafoe is on a distinguished road
Default

Anyone have a solution for the previous post about a dynamic solution. I'm having the same issue...
Reply With Quote
  #8  
Old 04-11-2019, 01:34 PM
cory_cole cory_cole is offline
Mirth Guru
 
Join Date: Mar 2012
Posts: 1,238
cory_cole is on a distinguished road
Default

NTE|this is a note
NTE|this is another note

If you drag drop, you will have something like this...

msg[NTE][NTE.1] ...

if you have multiple

foreach (ntecount in msg[NTE]) {
msg[NTE][ntecount][NTE.1]
}

syntax may be off a little. I have done this in awhile and I don't have complete access yet.
Reply With Quote
  #9  
Old 04-15-2019, 08:01 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 857
agermano is on a distinguished road
Default

Recommended to start a new thread with information about your specific problem.
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 11:56 PM.


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