How to split edi message properly when the splitted parts lose (null) other segments distinct of loops.
In the case of 837p EdiMessage if i split the message by Loop2000, as stated the last splitted message contain all the info about the original message, but the others (IsPart = true) has segments other than loop2000 nulled, how could i access original values to generate Valid Edi.
Comments
5 comments
Splitting is the process of breaking the original EDI document into repeating ranges of segments. This way you are able to translate EDI files of any size. Each part (IsPart =true) is that same range you need splitting by.
When splitting, the last EdiMessage contains all of the original segments but the repeating loops that you split by. Each repetition of the loops is returned as a new EdiMessage with only the current loop populated.
AckMan allows message parts to be published to it, just like any other transaction sequence, and it will correctly assemble the parts and validate them as a whole. AckMan will raise a 997 or 999 for the whole message, and not the individual parts. You can then inspect the relevant segment and determine if it was valid or not.
Admin
Thanks for clarification, but the fact is how could i split by loop and create the complete message by myself including ISA and other require Segments, because when i get the splitted group as you said the other component is null even when AckMan has the power of validating as a whole it could be good treating the message as a valid message on itself.
Well, if you need the message as a whole then why do you split it ? Splitting and then reconstructing defies the purpose of spitting in the first place.
As I said, if you need to validate the different parts then publish them to AckMan - it will correctly validate the message as a whole.
If, for whatever reason, you need to split a message and then reconstruct it, the problem can be paraphrased as - How to merge multiple instances of the same class into one instance ? I'm sure there are hundreds of examples if you google it. The nice thing here is that there is a single collection that is being broken down and you know exactly which one. A pseudo code for this:
Thanks for your quick answer but the case, is i have batch Claims and want to split on files only one claim per st and generate a valid EDI file, and have no mandatory data on splitting by loops.
Well, this is a similar approach and because outside of the 2000 loop there are only 4 other properties. You just assign them to each part from the last:
Please sign in to leave a comment.