public DischargeFuturePlanVo saveFuturePlan(DischargeFuturePlanVo voFuturePlan) throws DomainInterfaceException, StaleObjectException { if(voFuturePlan == null) throw new CodingRuntimeException("DischargeFuturePlanVo is null"); if(!voFuturePlan.isValidated()) throw new CodingRuntimeException("DischargeFuturePlanVo Value Object has not been validated"); DomainFactory factory = getDomainFactory(); FuturePlan doFP = DischargeFuturePlanVoAssembler.extractFuturePlan(factory, voFuturePlan); factory.save(doFP); return DischargeFuturePlanVoAssembler.create(doFP); }
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 DischargeFuturePlanVo save(DischargeFuturePlanVo dummy, SurgicalOperationSummaryVo surgicalOperationSumm) throws DomainInterfaceException, StaleObjectException { if(dummy == null) throw new CodingRuntimeException("DischargeFuturePlanVo is null"); if(!dummy.isValidated()) throw new CodingRuntimeException("DischargeFuturePlanVo Value Object has not been validated"); if( surgicalOperationSumm == null) //wdev-15917 throw new CodingRuntimeException("SurgicalOperationSummaryVo is null"); //wdev-11576 if(!dummy.getID_FuturePlanIsNotNull()) { if( getFuturePlan(dummy.getCareContext()) != null) throw new StaleObjectException(null); } //----------- DomainFactory factory = getDomainFactory(); //wdev-15917 SurgicalOperationSummary dosurgOpum = SurgicalOperationSummaryVoAssembler.extractSurgicalOperationSummary(factory,surgicalOperationSumm); if( dosurgOpum != null ) factory.save(dosurgOpum); //---- wdev-15917 FuturePlan doFP = DischargeFuturePlanVoAssembler.extractFuturePlan(factory, dummy); factory.save(doFP); return DischargeFuturePlanVoAssembler.create(doFP); }
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; }