You said you are using the customer to query your data yet you have
.setParameter("SID", patient.getId()), where does the patient variable come from?
Oops, copy and paste mix up names.
But things still happen if it's corrected! Just treat that patient as customer. Sorry about that little bit of naming error.
Can you post the code that refers to the second Action.java