Create x12 file from ClaimDocument object

Aug 31, 2012 at 2:37 PM


Is there any way to convert ClaimDocument object back to x12 file?

Thanks in advance for your help.

Sep 4, 2012 at 3:28 PM

I also have the exact need. It is easy for our appliation to create a valid ClaimDocument. It will be nice if we can serialize this into valid 837P or 837I document.

Sep 5, 2012 at 4:03 PM

Found a way to do it.

1. Convert the Claim object to XML

2. Convert the XML to X12

Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("OopFactory.X12.Hipaa.Tests.Unit.Claims.TestData.SKInstitutionalClaim5010.xml");

TextReader tr = new StreamReader(stream);
string xml = tr.ReadToEnd();

//Now convert the XML to X12
OopFactory.X12.Parsing.X12Parser parser = new Parsing.X12Parser();
string myX12 = parser.TransformToX12(xml);