help with if

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf help with if

  • Creator
    Topic
  • #53759
    Kevin Crist
    Participant

      i am sure this is something simple but it’s driving me nuts. The below only allows the first part of the statement through, patient service of WND but kills the next part, HBO. How can i set this so that it continues both the WND and HBO?  

      #########################################################################################

      # If the PV1-10 != WND or HBO then KILL the message

      # else

      # CONTIUNE the message

      #########################################################################################

       if {![string equal $patservice WND] || [string equal $patservice HBO]} {

      set dispList

         

             

           }

        thanks for any help.

    Viewing 1 reply thread
    • Author
      Replies
      • #78849
        James Cobane
        Participant

          Kevin,

          I’m assuming that you want to kill everything other than messages with WND or HBO in PV1:10.  If that is the case, than I think you need to change the logic to:

          if {![string equal $patservice WND] && ![string equal $patservice HBO]} {

            set dispList

            }

            or you could do this:

            set dispList

            if {[string equal $patservice WND] || [string equal $patservice HBO]} {

              set dispList

            }

            Your original statement would be true no matter what, because there was no ! in front of the 2nd condition

            Hope this helps.

            Jim Cobane

            Henry Ford Health

        • #78850
          Kevin Crist
          Participant

            Got it. Thanks for your time.

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