better handling of N/A, more flexible email search, fix selected patient button enabling