fix search bug in patients view