public DischargeFuturePlanVo getFuturePlan(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 FuturePlan fp where "); String andStr = " "; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Serializable> values = new ArrayList<Serializable>(); hql.append(andStr + " fp.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) { DischargeFuturePlanVoCollection voColl = DischargeFuturePlanVoAssembler.createDischargeFuturePlanVoCollectionFromFuturePlan(list); if(voColl != null && voColl.size() > 0) return voColl.get(0); } } return null; }
public ims.clinical.vo.DischargeFuturePlanVo getFuturePlan(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 FuturePlan fp where "); String andStr = " "; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Serializable> values = new ArrayList<Serializable>(); hql.append(andStr + " fp.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) { DischargeFuturePlanVoCollection voColl = DischargeFuturePlanVoAssembler.createDischargeFuturePlanVoCollectionFromFuturePlan(list); if(voColl != null && voColl.size() > 0) return voColl.get(0); } } return null; }
public Boolean getNurseEnabledDischargeInstructionFromFuturePlan(CareContextRefVo careContextRef) { if(careContextRef == null) throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. "); if(careContextRef != null) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from FuturePlan fp where "); String andStr = " "; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Serializable> values = new ArrayList<Serializable>(); hql.append(andStr + " fp.careContext.id = :careContextId"); markers.add("careContextId"); values.add(careContextRef.getID_CareContext()); andStr = " and "; List list = factory.find(hql.toString(), markers,values); if(list != null && list.size() > 0) { DischargeFuturePlanVoCollection voColl = DischargeFuturePlanVoAssembler.createDischargeFuturePlanVoCollectionFromFuturePlan(list); if(voColl != null && voColl.size() > 0) { if (voColl.get(0).getWasNurseEnabledDischargeIsNotNull() && Boolean.TRUE.equals(voColl.get(0).getWasNurseEnabledDischarge())) return true; return false; } } } return true; }