Need to add URL to end of result

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Need to add URL to end of result

  • Creator
    Topic
  • #54317
    Diana Schmidt
    Participant

    I have a result coming into the engine with multiple OBX segments that I need to add a URL to. Currently I am just passing the result through raw, without any translation so how would I make the changes listed below?

    A. OBX 2 needs to be changed from TX to RP

    B. OBX5.2 needs to contain the URL definition which is – https://pacs.hrhonline.org/loadstudy.jsp?user name=AnonymousUserTpassword=rsa=trueTaccession number=

    C. The accession number needs to be added to that definition and the number we want to use is currently in the ORC4.

    I don’t know how to make the system know that after the final OBX segment of the result I want to add the additional OBX that will contain the URL information, especially since no translation is currently being done in this thread.

    Of course I need this ASAP for Meaningful USE! 😯

Viewing 5 reply threads
  • Author
    Replies
    • #80975
      Henry Bauer
      Participant

      set v1 “\”

                 set path1 “thpftransagt1”

                 set path2 “bdi_epiphany”

                 set path3 “filedrop”

                 

                 #Get fields for amending or validation

                 #This will replace a field in one segment of several OBX segments if

                 #the proper context is found

                  foreach obx [ lsearch -all -regexp $segmentList {^OBX} ] {

                       set obxFlds [split [lindex $segmentList $obx] $fs]

                       set obx2 [lindex $obxFlds 2]

                       set obx5 [lindex $obxFlds 5]

                       if {[string eq $obx2 “TX”]} {

                            append v1 $v1 $path1 $v1 $path2 $v1 $path3 $v1 $obx5      

                  ;#This allows you to build a relative path to a file and insert it into the HL7                                                            

                  ;#message. ie \thpftransagt1bdi_epiphanyfiledrop$obx5

                            lset obxFlds 5 $v1                                    

                  ;#Replace the existing OBX field 5 with the new value.

                            lset segmentList $obx [join $obxFlds $fs]                                            

                  ;#Replace the existing OBX segment with the amended OBX segment.

                           }          

                   }

    • #80976
      Shane Stambaugh
      Participant

      We are having to do the same for a couple of our sites that need image URL’s sent to them.  I had the same problem so I found the repeating portion of the OBX segment.

      0(0).OBX(i).#2(0).[0] for example

      The “i” being the portion that counts up as it repeats.  To keep from having to loop through every OBX segment and find that number then add one to the last I just did this

      0(0).OBX(9999).#2(0).[0] for example

      Cloverleaf then just adds my new OBX segment 9999 at the end of the message but it numbers it to the next OBX segment for you.  Not sure if it’s the “proper” way but it hasn’t failed yet.

      This is on CL 5.7

    • #80977
      Diana Schmidt
      Participant

      While creating this URL there is the need to replace the & with T. Unfortunatly I am receiving \T\ instead of the T. Not sure how to get rid of it. Any suggestions?

    • #80978
      Diana Schmidt
      Participant

      This is my current translation

    • #80979
      Robert Kersemakers
      Participant

      Diana,

      I wonder why the first two T in the URL are turned into \T\, while the third T before the accession number remains a T.

      And you use

      Code:

      set output {https://…

      which turns output into a list. Why not do

      Code:

      set output “https://…

      to make it a string? Not sure if this would explain your problem, but just an observation.

      Can you show us the complete tcl code you are using?

      Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

    • #80980
      Brandon Grudt
      Participant

      You could do a string map command to change every instance of \T\ to T.  That will leave the valid ones alone, and only swap the incorrect ones.  Not sure how that shakes out with it being an escape character, but using {} or simply more characters should in some way give you a valid output.

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

Forum Statistics

Registered Users
5,129
Forums
28
Topics
9,301
Replies
34,448
Topic Tags
288
Empty Topic Tags
10