List<MedicinePatient> list = currentSession.createCriteria(MedicinePatient.class).add(Restrictions.and(Restrictions.eq("patient", patient), Restrictions.eq("medicine", medicine))).list();
this.logger.logDebug("exist medicine by patient successfully");
return !list.isEmpty();
} catch (HibernateException e) {
this.logger.logError("error on exist medicine by patient, msg: " + e.getMessage());
throw new ExceptionDAO("No se pudo verificar si ya existe el medicamento para el paciente", e.fillInStackTrace());
}
}