/** * getSurgeryDetails */ public ims.clinical.vo.DischargeDetailsWithAssessmentVo getDischargeDetails(ims.core.admin.vo.CareContextRefVo carecontextRefVo) { if(carecontextRefVo == null) throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. "); if(carecontextRefVo != null) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from DischargeDetails dd where "); String andStr = " "; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Serializable> values = new ArrayList<Serializable>(); hql.append(andStr + " dd.careContext.id = :careContextId"); markers.add("careContextId"); values.add(carecontextRefVo.getID_CareContext()); andStr = " and "; List list = factory.find(hql.toString(), markers,values); if(list != null && list.size() > 0) { DischargeDetailsWithAssessmentVoCollection voColl = DischargeDetailsWithAssessmentVoAssembler.createDischargeDetailsWithAssessmentVoCollectionFromDischargeDetails(list); if(voColl != null && voColl.size() > 0) return voColl.get(0); } } return null; }