Search code examples
biztalkbiztalk-2009biztalk-2010edi

debatching 837 files with multiple claim


I am getting an edi file 837 which is having multiple claims. How to debatch the 837 edi file so that each file contain only one claim per file using biztalk.


Solution

  • It seems it would be less prudent to split the incoming file into multiple files, as you'd process (translate) everything twice.

    Since a claim would start at the ST segment, you can create a transformation so that for each ST segment you read, it would create a new output file. This way the integrity of the source data you receive remains intact, and you're only processing the data once.

    If you really wanted to go down the path of separating EDI claims into separate input files, and if the file has multiple ISA / IEA segments (actual interchanges in the file), then you could easily write a parser script to read the file in, figure out the segment terminator (position 106) and read the file until you get to the IEA and then write a new file out. Repeat for other instances of the ISA / IEA envelope pair.

    If it doesn't have multiple ISA / IEA segments, then it would have multiple ST / SE segments - the same principle applies once you have the segment terminator. I don't know what impact that would have on your mapping (if it would make translation harder or not).

    It seems like you're trying to make life harder on yourself, but if you have a business reason for splitting up the claims, then it is what it is.