NTE Not repeating

Clovertech Forums Cloverleaf NTE Not repeating

  • Creator
    Topic
  • #111305
    Collin Praster
    Participant

      I am having an issue with an NTE not repeating, I have included screen shots.  Thanks in advance.  The first NTE is there but I can not get the second to show.

      Attachments:
      You must be logged in to view attached files.
    Viewing 3 reply threads
    • Author
      Replies
      • #111308
        Collin Praster
        Participant

          This is 2.4 to 2.5.1

        • #111312
          Collin Praster
          Participant

            Sorry one more screen shot the actual results of the xlate

            Attachments:
            You must be logged in to view attached files.
          • #111314
            Jim Kosloskey
            Participant

              Try removing the field repetition from the NTE in the address path (both sides) in your PATHCOPY.

              Ex ….NTE rather than …. NTE(0)

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

              • #111331
                Collin Praster
                Participant

                  That worked, can you give me a quick explanation as to why that worked if you don’t mind and have an extra minute.   Thanks

                • #111356
                  Jim Kosloskey
                  Participant

                    With PATHCOPY and a repeating element (at least Segment and Field – I have not tried Group) if there is a Repetition position specified the tokenizer/parser expects either an absolute value or a % reference.

                    But if you leave off the repetition position then PATHCOPY has a feature where it will COPY all elements of all repetitions at that level – unless the variants don’t match up or unless PATHCOPYing from one node to another (like Group to segment or one segment to a different type of segment).

                    It is just the way PATHCOPY was written.

                    I suggest you add comments so the next person (or even you later on) who works on this section of code doesn’t have to remember this non-obvious feature.

                    Personally I don’t use PATHCOPY in this way just because I like the control of specifying the ITERATE and the self documenting that presents. Just a personal preference.

                    This is one of the topics I cover in my Xlate ITERATE Class.

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

                • #111321
                  Robert Kersemakers
                  Participant

                    NTE is not a repeating group, but a repeating segment inside the group {[OBX] {[NTE]}}.

                    So you need another %g3 iteration within the %g2 iteration and then

                    PATHCOPY 1(0).1(%g1).1(%g2).NTE(%g3) -> 1(0).1(%g1).3(%g2).NTE(%g3)

                    Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

                    • #111330
                      Collin Praster
                      Participant

                        I couldnt get this to work but I totally could be doing something wrong.

                  Viewing 3 reply threads
                  • You must be logged in to reply to this topic.