implementing patient search