refactored patient search and added automated tests
added patient search by attribute, part 1