TCL help Remove everything after ampersand

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf TCL help Remove everything after ampersand

  • Creator
    Topic
  • #55343
    vdurst
    Participant

      In OBR-15.1 for Specimen Type, we are getting value URINE&URINE. We only want value “URINE” so we need to remove the & and anything after it. I’m having issues dong this in an xlate because of & being a special char so need TCL help. Thank you in advance!

    Viewing 1 reply thread
    • Author
      Replies
      • #85034
        Jim Kosloskey
        Participant

          Use sub-component notation to only get the first sub-component

          So COPY ….OBR(0).#15.[0].[0]  the first [0] says take the first component, the second [0] says take the first sub-component  – the first URINE (if the second square brackets set was [1] you would get the second URINE – the one following the &).

          No Tcl needed.

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

        • #85035
          vdurst
          Participant

            Thank you for the response Jim! Before your post, that is what I ended up doing since the “&” made it a sub-component – doh!

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