web stats
convert x12(270) into xml and write that xml into file - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 07-12-2012, 11:03 PM
nikhilb nikhilb is offline
Mirth Newb
 
Join Date: May 2012
Posts: 19
nikhilb is on a distinguished road
Default convert x12(270) into xml and write that xml into file

Hi,

I am new to mirth.
I want to convert incoming X12(270) meassage from file reader into XML and store/write that XML into file using file writer as channel destination.
Do I need to write any transformation code for this under transformer section ?
If yes, how it will be ?
For destination file writer it asks for template. what I need to put there ?

Could anyone pl provide me the steps for this.

Thanking you,
Nikhil
Reply With Quote
  #2  
Old 07-13-2012, 07:34 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

Luckily, Mirth will automatically convert an X12 message into XML for you. When it creates the "msg" variable, that is an E4X XML object, that then will be serialized into the encoded data (the flat XML string).

Basically, if you have X12 is your Source Inbound and Source Outbound protocols, choose XML as your Destination Outbound protocol, and then just include the encoded data in your File Writer template, then that will accomplish what you're looking for.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #3  
Old 07-13-2012, 08:52 AM
nuerotic nuerotic is offline
Mirth Newb
 
Join Date: Jun 2012
Posts: 8
nuerotic is on a distinguished road
Default

what is is the best way to get started to creating 837 from an xml file?
Reply With Quote
  #4  
Old 07-13-2012, 09:26 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

Didn't you want to go the other way? Id est, from X12 to XML?

Anyway, the best place to start is to get the detailed specifications of whatever an "837" is (sorry, I'm not an X12/EDI expert). Then build an appropriate outbound template in your transformer, and map fields from the incoming XML to the outbound fields in tmp.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #5  
Old 07-16-2012, 02:23 AM
nikhilb nikhilb is offline
Mirth Newb
 
Join Date: May 2012
Posts: 19
nikhilb is on a distinguished road
Default

Thanks a lot narupley.

I am done with the x12 to xml conversion as per ur steps.
Reply With Quote
  #6  
Old 07-16-2012, 07:10 PM
nuerotic nuerotic is offline
Mirth Newb
 
Join Date: Jun 2012
Posts: 8
nuerotic is on a distinguished road
Default

No it's XML to X12. Right now we are grabbing superbills once completed and everything is formatted in XML. I need to, like you said, map. But there are so many loops and variables with 837 that you can't just do a straight map. A lot if not everything is going to need to have rules of what segment gets populated or not according to the information in the Loop. Well... it get's worse. I'm talking at least 100 superbills in a file which could be over 100mb. I don't know what this is going to be compressed but I already see that this is something that Mirth might not be able to handle or any interpretive interface could handle.

Reason for this is that the "grab" happens at over 300 sites..varying from small to large practices and the files get spit down to a central ActionList where...if Aetna has there own rules for an 837 or some other payer requires another thing... instead of going out to the 300 everything just gets sent to the local office and processed there.

We are using another engine but it's struggling at 10mb files. I was just hoping someone used Mirth for doing something similar but am finding this 837-5010 form to be not so utilized in the interface world.
Reply With Quote
  #7  
Old 07-17-2012, 04:09 AM
JoshMc JoshMc is offline
OBX.2 Kenobi
 
Join Date: Jun 2009
Location: Nashville, TN
Posts: 95
JoshMc is on a distinguished road
Default

Are the 837 files already in EDI XML or are they in a custom format? Any chance you can get an anonymous one and post it? If it's already in the real EDI XML format, perhaps look at the "Convert XML to X12" function. I don't know how to use it, but perhaps others may be able to jump in and advise.
Reply With Quote
  #8  
Old 07-17-2012, 04:44 AM
jblythe jblythe is offline
OBX.1 Kenobi
 
Join Date: May 2012
Posts: 34
jblythe is on a distinguished road
Default

You could probably do exactly what you are trying to accomplish but via javascript transformation. I have written something to parse through an 837 in PERL and the logic could probably be written to widdle down what you want. It would help to known the exact specs for any given payer to make sure you are following the rules but not impossible.
Reply With Quote
  #9  
Old 07-25-2016, 11:42 PM
CLakshmi CLakshmi is offline
Mirth Newb
 
Join Date: Dec 2015
Posts: 7
CLakshmi is on a distinguished road
Default Construct X12 XML

Hi,

How we can create a X12 XML by reading the values from DB? I dont want to create EDI only 837P X12 XML. Can someone suggest. Thanks.

Regards,
Lakshmi
Reply With Quote
  #10  
Old 07-26-2016, 04:19 AM
appsbyaaron's Avatar
appsbyaaron appsbyaaron is offline
Mirth Guru
 
Join Date: Nov 2011
Location: Florida, USA
Posts: 377
appsbyaaron is on a distinguished road
Default

Quote:
Originally Posted by CLakshmi View Post
Hi,

How we can create a X12 XML by reading the values from DB? I dont want to create EDI only 837P X12 XML. Can someone suggest. Thanks.

Regards,
Lakshmi
Example channel here:
http://www.mirthcorp.com/community/f...d.php?t=216291
Reply With Quote
Reply

Tags
write, 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 07:38 PM.


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