OK, first, it's generally a good idea to reduce the code to the smallest example that still demonstrates the problem. Often someone who might be able to answer your question will be see the wall of code, and decide it's time to finish their TPS reports instead. Fortuanately, I got my reports done early today!
Your inner class should start with a capital letter, like all
Java classes. The compiler doesn't care about that, but it makes thing more readable to future generations of Java coders who may have to maintain your code.
And finally, the actual problem is that way you've defined your templates. I assume Predicate is a generic class, which you are parameterizing with <Patient>, but then you also parameterize the inner class that extends it, which doesn't make sense. Now, I'm not saying the compiler error was especially clear on that point, but if you change your class declaration to:
private class RecentPatientMatch extends Predicate<Patient> { ... }
then everything should work for you.