PROC for finding message structure

Clovertech Forums Read Only Archives Cloverleaf Tcl Library PROC for finding message structure

  • Creator
    Topic
  • #53774
    Robert Denny
    Participant

      I would like to write a proc or use an xlate that will copy an NTE segment that follows an ORC segment to the next OBR segment.

      this is for an ORU message format. The receiving system drops the NTEs if they are not following an OBR segment.

      I am wondering if anyone has a proc that does a similar task? Checks for a segment and if the following segment meets a certain requirement move or delete the following segment.

    Viewing 4 reply threads
    • Author
      Replies
      • #78899
        Jim Kosloskey
        Participant

          Robert,

          If I understand the situation correctly this is easily accomplished in an Xlate.

          More information would be helpful.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #78900
          Robert Denny
          Participant

            Jim, I thought I had it working correctly, but it looks as though I am copying the NTE segments after every OBR in the message.

            I’ll attach a screen shot of my xlate to this comment and hope to hear back soon.

          • #78901
            Keith McLeod
            Participant

              Just a quick observation.  If nte1 is NE @null, check you math add statement.  It looks like you are not including $%s99 on the addition side.

              Can you add the input and output structures into your snapshot to view? Usually the OBR segment optionally repeats as part of the ORC Group.

            • #78902
              Jim Kosloskey
              Participant

                Robert,

                While this is not affecting your message structure when you are building @NTE2 you are using @g1 instead of %g1 in your inbound address path. That will always get you the first occurrence.

                Also you may not need to save those NTE fields off into temp variables as you can just use their level counter to reference the inbound when you need the data.

                As Keith suggested ccorrecting that MATH ADD will have an effect.

                email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

              • #78903
                Robert Denny
                Participant

                  Jim,

                  Once I had a better understanding of the format of the Messages the Vendor sends, we were able to modify the variant and with just a few modifications get the xlate working.

                  The counters are working correctly and we are getting the NTE following the ORC moved down below the first OBR segment that follows the ORC and it is following the converted OBXs.

                  Thank you for your help with this issue.

              Viewing 4 reply threads
              • The forum ‘Tcl Library’ is closed to new topics and replies.