Add new OBX in an ORU message BEFORE the OBX iterate

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Add new OBX in an ORU message BEFORE the OBX iterate

  • Creator
    Topic
  • #48510
    Tucker Sack
    Participant

      Hello All,

      Does anyone have any slick advice on adding an OBX segment to an ORU message before the regular OBX iterate?

      I need to create a (or a couple) of new OBX segments with data from the OBR segment. The newly created OBX’s need to appear in the outbound message before the OBX’s from the original message.

      I’ve seen advice, and used it, on adding OBX’s after the iterate, but I haven’t had luck with this new problem.

      Thanks,

      Tucker.

    Viewing 2 reply threads
    • Author
      Replies
      • #58818
        Jim Kosloskey
        Participant

          Tucker,

          email me and we can chat.

          What you want to do is doable – without Tcl.

          Jim Kosloskey

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

        • #58819
          Robert Kersemakers
          Participant

            What I mostly do is keep track of the number of OBX’s that are translated by means of a list-variable (%l1). For example:

            # initialize variable

            COPY =0 -> $%l1

            # Iterate through OBR

            ITERATE group basis 3 variable %g1

             # Create new OBX

             COPY ={new info} -> 3(%g1).1(%l1).OBX

             MATH: ADD $%l1 =1 -> $%l1

             # Iterate through normal OBX

             ITERATE group basis 3.(%g1).1 variable %g2

               # Create new OBX

               PATHCOPY 3(%g1).1(%g2).OBX -> 3(%g1).1(%l1).OBX

               MATH: ADD $%l1 =1 -> $%l1

            I hope you get the drift…

            Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

          • #58820
            Tucker Sack
            Participant

              Thanks Robert,

              I’ve put together an xlate in a similar fashion with Jim’s help using the group variable (%g3), and it’s almost working. I’m getting some phantom blank OBR segments though. I’m going to keep tinkering with it, and will post the solution once I have it working and tested.

              Thanks,

              Tucker.

          Viewing 2 reply threads
          • The forum ‘Cloverleaf’ is closed to new topics and replies.