Brian: before Modify the searchPatients function