Loop & Filter on CC Doctors

Clovertech Forums Read Only Archives Cloverleaf Tcl Library Loop & Filter on CC Doctors

  • Creator
    Topic
  • #52158
    Josh Stanek
    Participant

      Hello,

      What I’m looking to do is filter based on doctors that have been CC’ed on a specific result by looking up each physician in a table. If a physician ID has been found in the table, it no longer needs to look up any others, the result will be sent. However, if a physician is not found in the table, the message will be killed.

      The CC physicians come out in TXA-23 in the following format:

      53221^SMITH, D CHRISTOPHER~55649^SMITH, L JOHN~55329^SMITH(NS), M RYAN~55649^SMITH, L JANE

      Only physician numbers exist in our table, so I need to loop thru the field and determine if a number is in our table. If it is, the message continues, otherwise it will be killed.

      Thanks for the help!

      Josh

    Viewing 2 reply threads
    • Author
      Replies
      • #73255
        David Barr
        Participant

          You could use the HL7 parser that I posted in another thread and write it like this:

          Code:

          set disp KILL
          set hl7 [hl7::parse_msg [msgget $mh]]
          for { set i 1 } { $i <= [hl7::count hl7 TXA.23] } { incr i } {
           if { [check_table [hl7::get_field hl7 TXA.23($i).1]] == 1 } {
             set disp CONTINUE
           }
          }
          return "{$disp $mh}"

          You’ll have to write your own “check_table” proc.  I wasn’t sure if you meant a Cloverleaf table or some other kind of table.

        • #73256
          Robert Denny
          Participant

            I looked for where you might have posted the proc and could not find it.

            we are looking to do the same thing. Need to kill a message if the Provider is listed in OBR-28. OBR-28 can have 1 to 6 providers listed in it.

          • #73257
            David Barr
            Participant
          Viewing 2 reply threads
          • The forum ‘Tcl Library’ is closed to new topics and replies.