web stats
X12 to XML output - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-07-2009, 09:09 AM
EricD EricD is offline
Mirth Newb
 
Join Date: Oct 2009
Posts: 14
EricD is on a distinguished road
Default X12 to XML output

Hello everyone. I am using Mirth for HL7 processing, however I also have X12 EDI documents that I need converted to XML. I currently use the program Bots(http://bots.sf.net/) for conversion, but I'd much rather use Mirth.

It's been really easy to configure Mirth to do a simple conversion, but it does not respect relationships between segments. For example, if I have a purchase order (PO1) segment, there will be an associated product/item desc.(PID) segment as well.

Currently, my output from Mirth will look something like
HTML Code:
<PO1>
	<PO1.01>
		<PO1.01.1>1</PO1.01.1>
	</PO1.01>
	<PO1.02>
		<PO1.02.1>000000005</PO1.02.1>
	</PO1.02>
	<!-- etc... -->
</PO1>
<PID>
	<PID.01>
		<PID.01.1>F</PID.01.1>
	</PID.01>
	<PID.02 />
	<!-- etc... -->
</PID>
Where both segments are represented, but the PID should be a child of the PO1 segment, rather than a sibling.

If there is some way to achieve this with Mirth please let me know. If you need any clarification, I'll be more than happy to explain it further.

Thanks
Reply With Quote
  #2  
Old 10-07-2009, 09:47 AM
dans dans is offline
Mirth Employee
 
Join Date: Apr 2007
Location: Irvine, CA
Posts: 590
dans is an unknown quantity at this point
Default

I have done a few x12 to xml channels. The internal x12 xml structure is probably not what you need or want. We mainly convert it to xml so that we can more easily do transformation with the data. It would be better to define your own xml structure and write a javascript transformer to convert the data.
__________________
Daniel Svanstedt
Software Engineer
Mirth Corporation

Want professional services, support, and enterprise or virtual appliances? It's all available from the Mirth Corporation:
Mirth Support | Mirth Training | Mirth Appliances | Online Training | Developer Q&A

Don't forget, Mirth Support gives you access to all of our online training videos, and silver support gives you access to developer Q&As!
Reply With Quote
  #3  
Old 10-07-2009, 10:56 AM
EricD EricD is offline
Mirth Newb
 
Join Date: Oct 2009
Posts: 14
EricD is on a distinguished road
Default

Thanks for the quick response!
I have a good grasp of XML and a great handle on Javascript, so I just need a starting point. Is there some tutorial or other resource available that would point me in the right direction?

Thanks again.
Reply With Quote
  #4  
Old 10-07-2009, 12:20 PM
dans dans is offline
Mirth Employee
 
Join Date: Apr 2007
Location: Irvine, CA
Posts: 590
dans is an unknown quantity at this point
Default

You should be good to go with javascript and xml. Take a look at the Mirth wiki and at the following: http://www.faqts.com/knowledge_base/...phtml/fid/1762

Also worth considering Mirth Corp training and/or support.
__________________
Daniel Svanstedt
Software Engineer
Mirth Corporation

Want professional services, support, and enterprise or virtual appliances? It's all available from the Mirth Corporation:
Mirth Support | Mirth Training | Mirth Appliances | Online Training | Developer Q&A

Don't forget, Mirth Support gives you access to all of our online training videos, and silver support gives you access to developer Q&As!
Reply With Quote
Reply

Tags
edi, relationship, segment, x12, 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 03:12 AM.


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