public PatientProcedureChecklistVo getPatientProcedureChecklistVo(ClinicalContactRefVo clinicalContact) { if(clinicalContact == null) throw new DomainRuntimeException("Invalid Search criteria. ClinicalContact must be supplied."); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("from PatientProcedureChecklist p "); hql.append(" where (p.clinicalContact.id = " + clinicalContact.getID_ClinicalContact() + ")"); PatientProcedureChecklistVoCollection collPatientProcedureChecklist = PatientProcedureChecklistVoAssembler.createPatientProcedureChecklistVoCollectionFromPatientProcedureChecklist((factory.find(hql.toString()))); if(collPatientProcedureChecklist==null || collPatientProcedureChecklist.size()==0) return null; return collPatientProcedureChecklist.get(0); }
public Boolean checkForProcedureChecklist(ClinicalContactRefVo refClinicalContact) { if(refClinicalContact == null) throw new DomainRuntimeException("Invalid Search criteria. ClinicalContact must be supplied."); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("from PatientProcedureChecklist p "); hql.append(" where (p.clinicalContact.id = " + refClinicalContact.getID_ClinicalContact() + ")"); PatientProcedureChecklistVoCollection collPatientProcedureChecklist = PatientProcedureChecklistVoAssembler.createPatientProcedureChecklistVoCollectionFromPatientProcedureChecklist((factory.find(hql.toString()))); if(collPatientProcedureChecklist.size()==0) return Boolean.FALSE; return Boolean.TRUE; }