Announcement

Collapse
No announcement yet.

X12 EDI Segment Loop Handling Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • X12 EDI Segment Loop Handling Question

    I'm trying to use Mirth to process on incoming X12 832 document.

    I have searched the community and have found some posting that are kinda similar but not quite.

    How do you handle nested loops (x12 loops, i.e repeating groups of segments, that may have segments in them that are used in other "loops")?

    an example:
    Loop 1 - A header for a catalog
    ST|832|1234~
    BCT|PC~
    REF|X9|1234~
    DTM|007|1234
    N1|VN|abcde~
    N1|BY|xyz|99|1234~

    loop 2 - Line items for the catalog
    LIN||XX|00000|AA~
    DTM|11|1234~
    DTM|22|9999~
    N1|SS|22|4444~
    LIN||YY|11111|BB~
    DTM|11|8765~
    DTM|22|8888~
    N1|SS|33|5555~

    SE|1234|0000~

    As seen above the ST,BCT,REF,DTM,N1,N1 is a loop, it is "grouped" together.

    The LIN,DTM,DTM,N1 is a loop or group that is repeated.

    Is there anyway (maybe in the inbound message template?) that such groupings can be specified?
    Or how can the "repeated" segments be associated with the appropriate enclosing X12 loop.
    Everything I have tried so far seem to dump all the repeated N1, etc into an array in order encountered.

    Thank you

  • #2
    hi there,

    I am also looking for the same thing... i am building 837 from database

    one solution is don't use message tree to drag and drop and create a message builder instead use javascript, in JS u can handle all the loops.

    but i am also looking ,if there is anyway to specify loops and optional fields in template.

    plz let me know if u got any solution.

    thanks.

    Comment

    Working...
    X