Re: Kill a Message in a IF Statement

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Kill a Message in a IF Statement Re: Kill a Message in a IF Statement

#58423
Anonymous
Participant

    Hope this code fragment helpful. In this messages is discarded if the PV1:18 contains the following: CN1

    foreach segment $segmentList {

                   if [cequal [crange $segment 0 2] PV1] {

                           set fieldList [split $segment $field_sep]

                           set pv1_18 [lindex $fieldList 18]

                   } else {

                   }

               }

    # The following command is used to select specific patient types.

                   if {[regexp {CN1} $pv1_18]} {

                   lappend dispList “KILL $mh”

                   return $dispList

               } else {

                   lappend dispList “CONTINUE $mh”

                   return $dispList

              }

              }