web stats
mirth newbie: simple channel question - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 01-01-2011, 12:33 PM
ramji1501 ramji1501 is offline
Mirth Newb
 
Join Date: Dec 2010
Posts: 19
ramji1501 is on a distinguished road
Default mirth newbie: simple channel question

Hi,

I wish to get data from csv files, map them to XML segments and then run a php script that reads from xml, and writes to a database.

I have 2 quick questions here:

1. The transformer allows me to map incoming csv fields to xml segments. but, I would like to transform the input variables (eg:if conditions, date formatting) before mapping to output xml segments. how, where should I do this.

2. Where would I input the php script in mirth connect.

Thanks for any help in advance.
Reply With Quote
  #2  
Old 01-02-2011, 12:31 AM
AlexToft AlexToft is offline
OBX.3 Kenobi
 
Join Date: Sep 2010
Location: Leeds, UK
Posts: 160
AlexToft is on a distinguished road
Default

In the same place you created your mapping steps, create a JavaScript step which will allow you to manipulate the data as you see fit. Mirth doesn't use PHP, although much of the JavaScript syntax is very similar. You can call PHP as an external executable from your transformer, but it's a somewhat messy way of doing things.
Reply With Quote
  #3  
Old 01-02-2011, 09:48 PM
ramji1501 ramji1501 is offline
Mirth Newb
 
Join Date: Dec 2010
Posts: 19
ramji1501 is on a distinguished road
Post thanks

thanks.

when i right click on the transformer page (that's where my steps are), i don't find an option to add a javascript step.

also, please let me know how i would call an external executable from the transformer page.
Reply With Quote
  #4  
Old 01-03-2011, 11:57 AM
jacobb jacobb is offline
Mirth Employee
 
Join Date: Aug 2006
Location: Irvine, CA
Posts: 1,218
jacobb is an unknown quantity at this point
Default

Quote:
Originally Posted by ramji1501 View Post
thanks.

when i right click on the transformer page (that's where my steps are), i don't find an option to add a javascript step.

also, please let me know how i would call an external executable from the transformer page.
Double click the step type to change it.
__________________
Jacob Brauer
Director, Software Development
NextGen Healthcare

Reply With Quote
  #5  
Old 01-10-2011, 09:55 AM
ramji1501 ramji1501 is offline
Mirth Newb
 
Join Date: Dec 2010
Posts: 19
ramji1501 is on a distinguished road
Post thanks

Thanks!
Reply With Quote
Reply

Tags
channel, csv, mapping, php, xml

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 10:12 PM.


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