adding multiple OBX segments

Clovertech Forums Read Only Archives Cloverleaf Tcl Library adding multiple OBX segments

  • Creator
    Topic
  • #53798
    Kevin Crist
    Participant

      I have been asked to search through all the OBX fields and look for the word “dense” and if this is found i have to add a paragraph at the end of the report in the OBX.5. So, how do i search all OBX.5 fields for one word and then add more segments to the end of it? I am wanting to use tcl because this has to be done for many systems and would rather do it once than redo many xlates. Any ideas are appreciated.

      Thanks.

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

          Kevin,

          If you want to do this for many systems, then one way using just Xlate and not repeating the code in each Xlate is to insert a set of threads between the inbound system and the outbound systems that does nothing more than make that single modification (in an Xlate). Then route that resultant mesage to the Xlates that build the receiving system’s message – the work on the OBX will already be done.

          If you are 5.8 or beyond I think it may be possible to stack that Xlate in each of the routes thus pre-processing the OBX in preparation for the specific work needed for the receiving systems.

          Just another thought.

          As to how that is done if your question is related to how to do this in an Xlate then that would depend on if you have to search each field in a single OBX or if there are multiple OBX segments in the inbound and whether the paragraph to be added needs to be appended to the OBX-5 field of a given segment or as a separate segment, etc.. More detail would be needed to describe how to do this in an Xlate.

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

        • #78965
          Kevin Crist
          Participant

            Thanks for the reply Jim. This was something that was in our vendor upgrade specs because of a law that went into effect but as it turns out they admitted they cant do it. I thought about adding another thread as you suggested but this is a setup we had for years and i was just trying to avoid. I have to search the body of the report, all OBX.5 fields for the word dense and if i find that then i have to append a certain paragraph at the end of the radiologists report in the OBX fields.

          • #78966
            Jim Kosloskey
            Participant

              Kevin,

              Are you on 5.8?If so consider stacking Xlates. You would only create one Xlate then stack it in each appropriate route ahead of the Xlate which will do the specific work for the receiving system.

              Certainly you can do what you want in Tcl if that is the way you want to go.

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

            • #78967
              Kevin Crist
              Participant

                we are using 5.4.1 .

              • #78968
                Harpreet Khakh
                Participant

                  Insert this proc in PRE Procs in Xlate route. This will change all OBX segments withing the message before sending it to any other xlate.

                  proc editObxSegments { args } {

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