Changing the sequence of the OBX segments

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Changing the sequence of the OBX segments

  • Creator
    Topic
  • #50702
    Roy Osumi
    Participant

    I want to change the sequence of the OBX segments in a R01.

Viewing 7 reply threads
  • Author
    Replies
    • #67173
      Gary Atkinson
      Participant

      I’ll take a stab at this….  In your xlate try this:

      1.) Put an IF outside of iterate and pathcopy the OBX if OBX:3 is not equal to ST.

      –> This will give all the OBX’s except the ones with “ST” in OBX:3

      –> Init your own counter

      –>  Now you want to add to end of the last OBX the OBX’s with “ST”

      2.)  Put another IF right after your last iterate  but say is equal to ST

         –> Create another iterate including the last iterate in your basis

        –> Math add one to the your init counter

       –> Pathcopy the OBX’s

    • #67174

      This is something that might be easier to do in a tcl proc either pre or post xlate. You’d split the message into a list of segments, pull out the OBX segments, sort the OBX segments however you want them, and then rebuild the message.

      -- Max Drown (Infor)

    • #67175
      Jim Kosloskey
      Participant

      This is not that difficult to do in an Xlate (if you understand Xlates) and in my opinion Xlate is the better place to do this work – it keeps everything in front of you.

      Anyway, I do this frequently in an Xlate and it is no big deal.

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

    • #67176

      This is not that difficult to do in a Tcl (if you understand Tcl) and in my opinion Tcl is the better place to do this work.

      -- Max Drown (Infor)

    • #67177
      Roy Osumi
      Participant

      Thanks for the repsonses so far.

      I have been trying to do this in an Xlate. I have tried it in one iteration and two or more interations.  it still outputs it in order.  Funny thing is that even though I do the logic on the OBXs with ST last whether its one iteration or mulitple the ST always come out first with my logic including the OBX  counters. So my output would look something like this:

      OBX|6|ST|||a

      OBX|7|ST|||

      OBX|8|ST|||b-c

      OBX|1|FX|||1

      OBX|2|FX|||2

      OBX|3|FT|||da

      OBX|4|FT|||db

      OBX|5|FT|||dc

      Can you folks give me examples of how you would do this?  I am running CL 5.5 rev 1 on AIX 5.3.

    • #67178
      Jim Kosloskey
      Participant

      Roy,

      Email me directly.

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

    • #67179
      Sam Craig
      Participant

      One other thing……

      Yes, it can be done.  But, I try to avoid “messing” with result messages as much as possible.

      These are patient results and clinical decisions are made from these result messages.

      TEST   TEST  TEST and then TEST AGAIN!!!!  ðŸ™‚

      Later,

      Sam

    • #67180
      Roy Osumi
      Participant

      here’s an update.  Jim was able to figure this out using an Xlate.  On the inbound he used two iterates and used only one on the outbound.  Didn’t know the Xlate was capable of doing something like this. Pretty slick!

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

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,293
Replies
34,435
Topic Tags
286
Empty Topic Tags
10