Added ability to have spaces in searchPatients