fix some bugs in patient/search