How to properly handle multiple transactions?

Dec 7, 2012 at 10:01 PM
Edited Dec 10, 2012 at 8:03 PM

I've been trying to rework an 837 message in that I've successfully transformed from 4010 to 5010 into multiple transactions.  the requirement is that each claim loop be in it's own transaction.  In effect I want to have multiple ST segments within a file.  This seems to have worked and the message converts back to X12 without error.  However when I convert the message back to XML I get the error: "An item with the same key has already been added."

Upon further research the X12 string that was being created by the TransformToX12 method is not correct at this point and doesn't contain multiple transaction sets.

I've looked at the example for UnbundleByLoop and the sample file you have includes multiple ST sets in the file.  I think the question is what should the XML look like to have it successfully parse back to X12 and create multiple transaction sets.  Should I be creating a new Interchange object and then adding function groups to that?

I've figured this out using posting http://x12parser.codeplex.com/discussions/294499.

One thing: The transaction control numbers are not unique - Do I need to set these myself?

Sorry for all the posts but I'm constantly learning something new about the parser, it is really a very handy library!