private PlanOfCareNotingVo populateDataFromScreenForNoting(PlanOfCareActionsVoCollection recordColl) { PlanOfCareNotingVo pocNoting = form.getGlobalContext().getPlanOfCareActionsReview(); // POCNoting CareContext pocNoting.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); AuthoringInformationVo voAuthoringInformation = new AuthoringInformationVo(); voAuthoringInformation.setAuthoringDateTime(form.customAuthoring().getValue().getAuthoringDateTime()); voAuthoringInformation.setAuthoringHcp(form.customAuthoring().getValue().getAuthoringHcp()); pocNoting.setAuthoringInformation(voAuthoringInformation); //POCNoting ReviewingHCP ReviewingDateTime pocNoting.setReviewingDateTime(form.customReviewing().getValue().getAuthoringDateTime()); pocNoting.setReviewingHCP(form.customReviewing().getValue().getAuthoringHcp()); pocNoting.setActionStatus(PlanOfCareActionStatus.ACTIVE); pocNoting.setActions(recordColl); return pocNoting; }
private boolean save() { PlanOfCareActionsVoCollection recordColl = populateDataFromScreen(); if(recordColl != null) { PlanOfCareNotingVo recordNoting = populateDataFromScreenForNoting(recordColl); String[] uiErrors = getUiErrors(); String[] errors = recordNoting.validate(uiErrors); if(errors != null && errors.length > 0) { engine.showErrors(errors); return false; } try { domain.saveNewActions(recordColl, recordNoting); } catch(StaleObjectException e) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); return false; } return true; } return false; }
private void populateGrdPocActions(PlanOfCareActionsVoCollection list) { if (list != null) { NursingSummaryHelper helper = new NursingSummaryHelper(null, null, null, null,null, list); helper.sortDesc(); ims.nursing.forms.planofcare.GenForm.lyrPOCLayer.tabPocDetailsContainer.grdPocActionsRow row = null; for(int i=0; i< list.size(); i++) { PlanOfCareActionsVo voActionsItem = list.get(i); row = form.lyrPOC().tabPocDetails().grdPocActions().getRows().newRow(); if (voActionsItem.getAuthoringInformationIsNotNull()) row.setColAuthoringInfo(voActionsItem.getAuthoringInformation().toString()); if (voActionsItem.getActionIsNotNull()) row.setColAction(voActionsItem.getAction().toString()); if (voActionsItem.getReviewIsNotNull()) { row.setColReview(voActionsItem.getReview()); } row.setValue(voActionsItem); } } }
private void open() { PlanOfCareNotingVo voItem = form.getGlobalContext().getPlanOfCareActionsReview(); PlanOfCareActionsVoCollection voColl = voItem.getActions(); if(voColl != null) { for(int i = 0; i < voColl.size(); i++) { addNewActionRowRecord(voColl.get(i)); } } }
private boolean save() { PlanOfCareActionsVoCollection recordColl = populateDataFromScreen(); PlanOfCareNotingVo recordNoting = populateDataFromScreenForNoting(recordColl); String[] uiErrors = getUiErrors(); String[] errors = recordNoting.validate(uiErrors); if(errors != null && errors.length > 0) { engine.showErrors(errors); return false; } try { domain.saveActionsReview(recordColl, recordNoting); } catch(StaleObjectException e) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); return false; } return true; }
private PlanOfCareActionsVoCollection populateDataFromScreen() { PlanOfCareActionsVoCollection voColl = form.getGlobalContext().getPlanOfCareActionsReview().getActions(); for(int x = 0; x <form.grdActionReview().getRows().size(); x++) { PlanOfCareActionsVo rowValue = form.grdActionReview().getRows().get(x).getValue(); String actionReview = form.grdActionReview().getRows().get(x).getColReview(); if (rowValue != null && actionReview != null && actionReview.length() > 0) { AuthoringInformationVo voAuthoringInformation = new AuthoringInformationVo(); voAuthoringInformation.setAuthoringDateTime(form.customAuthoring().getValue().getAuthoringDateTime()); voAuthoringInformation.setAuthoringHcp(form.customAuthoring().getValue().getAuthoringHcp()); rowValue.setAuthoringInformation(voAuthoringInformation); rowValue.setReview(actionReview); // POCNoting ReviewingHCP ReviewingDateTime rowValue.setReviewingDateTime(form.customReviewing().getValue().getAuthoringDateTime()); rowValue.setReviewingHCP(form.customReviewing().getValue().getAuthoringHcp()); voColl.add(rowValue); } } return voColl; }
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); }
private PlanOfCareActionsVoCollection populateDataFromScreen() { PlanOfCareActionsVoCollection coColl = new PlanOfCareActionsVoCollection(); for(int x = 0; x < form.lyr1().tabNewActions().grdActions().getRows().size(); x++) { PlanOfCareListVo rowValue = form.lyr1().tabNewActions().grdActions().getRows().get(x).getValue(); String action = form.lyr1().tabNewActions().grdActions().getRows().get(x).getColAction(); // if(validateActionText(action)) // return null; PlanOfCareActionsVo newActionVo = new PlanOfCareActionsVo(); if (rowValue != null && action != null && action.length() > 0) { //Authoring Component if (form.lyr1().tabNewActions().customAuthoring().getValue().getAuthoringDateTimeIsNotNull() && form.lyr1().tabNewActions().customAuthoring().getValue().getAuthoringHcpIsNotNull()) { AuthoringInformationVo voAuthoringInformation = new AuthoringInformationVo(); voAuthoringInformation.setAuthoringDateTime(form.lyr1().tabNewActions().customAuthoring().getValue().getAuthoringDateTime()); voAuthoringInformation.setAuthoringHcp(form.lyr1().tabNewActions().customAuthoring().getValue().getAuthoringHcp()); newActionVo.setAuthoringInformation(voAuthoringInformation); } //Action newActionVo.setAction(action); //PlanOfCare newActionVo.setPlanOfCare(rowValue); //add row to collection coColl.add(newActionVo); } } /* String [] error = coColl.validate(); if(error != null && error.length != 0) { engine.showErrors(error); return null; }*/ return coColl; }
public PlanOfCareActionsVoCollection listPocActions(CareContextRefVo voCareContextRef, PlanOfCareRefVo record) { return PlanOfCareActionsVoAssembler.createPlanOfCareActionsVoCollectionFromPlanOfCareActions( getDomainFactory().find("select actions from PlanOfCare poc where poc.careContext.id = :careContext and poc.id = :pocID", new String[] {"careContext","pocID"}, new Object[] {voCareContextRef.getID_CareContext(), record.getID_PlanOfCare()})); }