tclproc to kill messages

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf tclproc to kill messages

  • Creator
    Topic
  • #50874
    Kevin Crist
    Participant

    i am trying to figure out how to write a tclproc to kill some messages. here is what i am trying to do:

    i have an application that wants all hematology lab results and chem results that have the bilirubin test in it.

    I am having trouble figuring this out with tcl (still learning)

    IF OBR18 != HEMA KILL THE MESSAGE AND

    I ALSO WANT TO KILL MESSAGES THAT IF OBR18 !=CHEM AND SOMEWHERE IN TEST IS BILIRUBIN.

    THANKS FOR YOUR IDEAS AND HELP.

Viewing 0 reply threads
  • Author
    Replies
    • #67864
      Tom Rioux
      Participant

      One way to do it is to use a switch statement instead of an IF statement.  This could provide you with some flexibility in case the application wants to start recieiving other types of messages or tests.

      Thanks…Tom

      switch -exact — $OBX18 {

         HEMA { lappend $dispList “CONTINUE $mh” }

         CHEM {

                   if { [lcontain $test “BILIRUBIN”] } {

                      lappend $dispList “CONTINUE $mh”

                   } else {

                       lappend $dispList “KILL $mh”

                   }

          }

          default { lappend $dispList “KILL $mh”}

      }

      return $dispList

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

Forum Statistics

Registered Users
5,115
Forums
28
Topics
9,290
Replies
34,422
Topic Tags
286
Empty Topic Tags
10