ORU message OBX segment variation

Clovertech Forums Read Only Archives Cloverleaf Tcl Library ORU message OBX segment variation

  • Creator
    Topic
  • #51804
    John Bass
    Participant

      Our dictation system sends transcribed reports as an HL7 v2.2 ORU^R01 message.  Each line of the report is sent as a separate OBX segment (OBX|1|, OBX|2|, OBX|3|. etc.).  I need to send the results to a system that expects each line of the transcribed report as a repetition of the OBX-5 field (OBX|1|TX|||line1~ ~line2~ ~line2~ ).  Does anyone have a tcl proc that does something like this or can point me in the right direction?  I’m a tcl newbie so any assistance or suggestions would be greatly appreciated.

    Viewing 2 reply threads
    • Author
      Replies
      • #71802
        Connie Kraska
        Participant

          I have done this.  email me – connie.kraska@tmcaz.com and I will send you my code.

        • #71803
          Jim Kosloskey
          Participant

            John,

            Unless you are absolutely committed to using Tcl, this can easily be done inside the Xlate without any Tcl.

            Simply ITERATE over the OBX group as usual and use the OBX counter asd te field counter for OBX-5.

            Rather easy assuming basic knowledge of ITERATE and address pathing.

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

          • #71804
            Connie Kraska
            Participant

              yes, I was going to send the whole translation, but it is just this iterate to put it all into one OBX.5.  yuo may have to remove the other OBXs or define your variant with a non-recurring OBX.

              { { OP ITERATE }

                 { BASIS 0(0).OBX }

                 { VAR %f1 }

                 { TYPE segment }

                 { BODY {

                     { { OP COMMENT }

                         { COMMENT {LOOP THROUGH ALL} }

                     }

                     { { OP COPY }

                         { ERR 0 }

                         { IN 0(0).OBX(%f1).#5(0) }

                         { OUT {{1(0).OBX(0).#5(%f1).[0]}} }

                     }

                 }}

              }

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