public PlanOfCareNotingVoCollection listSearchNoting(DateTime startDate, DateTime endDate, CareContextRefVo voCareContextRef ) { if(startDate != null && endDate != null) return PlanOfCareNotingVoAssembler.createPlanOfCareNotingVoCollectionFromPlanOfCareNoting( getDomainFactory().find("from PlanOfCareNoting as pocn where pocn.authoringInformation.authoringDateTime between :startDate and :endDate and pocn.careContext.id = :careContext order by pocn.authoringInformation.authoringDateTime desc", new String[] {"startDate", "endDate", "careContext"}, new Object[] {startDate.getJavaDate(), endDate.getJavaDate(), voCareContextRef.getID_CareContext()})); else if(startDate != null) return PlanOfCareNotingVoAssembler.createPlanOfCareNotingVoCollectionFromPlanOfCareNoting( getDomainFactory().find("from PlanOfCareNoting as pocn where pocn.authoringInformation.authoringDateTime >= :startDate and pocn.careContext.id = :careContext order by pocn.authoringInformation.authoringDateTime desc", new String[] {"startDate", "careContext"}, new Object[] {startDate.getJavaDate(), voCareContextRef.getID_CareContext()})); else if(endDate != null) return PlanOfCareNotingVoAssembler.createPlanOfCareNotingVoCollectionFromPlanOfCareNoting( getDomainFactory().find("from PlanOfCareNoting as pocn where pocn.authoringInformation.authoringDateTime <= :endDate and pocn.careContext.id = :careContext order by pocn.authoringInformation.authoringDateTime desc", new String[] {"endDate", "careContext"}, new Object[] {endDate.getJavaDate(), voCareContextRef.getID_CareContext()})); return null; }
/** * saveActionsReview * @throws StaleObjectException */ public void saveActionsReview(ims.nursing.vo.PlanOfCareActionsVoCollection voPlanOfCareActionColl, ims.nursing.vo.PlanOfCareNotingVo voPlanOfCareNoting) throws StaleObjectException { if(voPlanOfCareActionColl == null) throw new DomainRuntimeException("Invalid records"); if(!voPlanOfCareActionColl.isValidated()) throw new CodingRuntimeException("Records not validated"); DomainFactory factory = getDomainFactory(); PlanOfCareNoting doPlanOfCareNoting = PlanOfCareNotingVoAssembler.extractPlanOfCareNoting(factory, voPlanOfCareNoting); factory.save(doPlanOfCareNoting); }
public void saveNewActions(PlanOfCareActionsVoCollection voPlanOfCareActionColl, PlanOfCareNotingVo voPlanOfCareNoting) throws StaleObjectException { if(voPlanOfCareActionColl == null) throw new DomainRuntimeException("Invalid records"); if(!voPlanOfCareActionColl.isValidated()) throw new CodingRuntimeException("Records not validated"); DomainFactory factory = getDomainFactory(); PlanOfCareNoting doPlanOfCareNoting = PlanOfCareNotingVoAssembler.extractPlanOfCareNoting(factory, voPlanOfCareNoting); factory.save(doPlanOfCareNoting); }