patient filtering working