private void populateInstanceControls(RepositioningPlanVo voRepositioningPlan, boolean bAnsFrequencyValueChanged) { if(voRepositioningPlan == null) return; form.ctnRepo().cmbFrequency().setValue(voRepositioningPlan.getPositioningFreq()); form.ctnRepo().ansTest().setValue(voRepositioningPlan.getSkinToleranceTest()); form.ctnRepo().cmbBlanching().setValue(voRepositioningPlan.getBlanching()); if (!bAnsFrequencyValueChanged) form.ctnRepo().ansFrequency().setValue(voRepositioningPlan.getPositioningSuitable()); form.ctnRepo().txtComments().setValue(voRepositioningPlan.getComment()); form.ctnRepo().chkSides().setValues(voRepositioningPlan.getPosition()); if(voRepositioningPlan.getAuthoringInformationIsNotNull()) { form.ctnRepo().customAuthoring().setValue(voRepositioningPlan.getAuthoringInformation()); } }
private void addResositioningPlanningRecord() { RepositioningPlanVo voRepositioningPlan = domain.getLastCompletedRepositioningPlan(form.getGlobalContext().Core.getCurrentCareContext()); if(voRepositioningPlan != null) { addNewAssessmentRow(voRepositioningPlan, "Repositioning Plan", voRepositioningPlan.getAuthoringInformationIsNotNull()?voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime():null); } }
private void populateListControl(RepositioningPlanVoCollection voRepositioningPlanColl) { if(voRepositioningPlanColl == null) return; for(int i=0; i<voRepositioningPlanColl.size(); i++) { RepositioningPlanVo voRepositioningPlan = voRepositioningPlanColl.get(i); GenForm.grdDetailsRow row = form.grdDetails().getRows().newRow(); if(voRepositioningPlan.getAuthoringInformation() != null) { AuthoringInformationVo voInfo = voRepositioningPlan.getAuthoringInformation(); String authoringInfo = ""; if(voInfo.getAuthoringDateTimeIsNotNull()) authoringInfo += voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime().toString(); if(voInfo.getAuthoringHcpIsNotNull()) authoringInfo += " - " + voRepositioningPlan.getAuthoringInformation().getAuthoringHcp().toString(); row.setColDateTime(authoringInfo); } if(voRepositioningPlan.getPositioningFreqIsNotNull()) row.setColFrequency(voRepositioningPlan.getPositioningFreq().toString()); if(voRepositioningPlan.getBlanchingIsNotNull()) row.setColBlanching(voRepositioningPlan.getBlanching().toString()); row.setColSides(getPosition(voRepositioningPlan.getPosition())); row.setColSkinTest(voRepositioningPlan.getSkinToleranceTest()); row.setValue(voRepositioningPlan); } if(voRepositioningPlanColl != null && voRepositioningPlanColl.size() != 0) form.getLocalContext().setpreviousRepositioningPlan(voRepositioningPlanColl.get(0)); }
private boolean save() { RepositioningPlanVo voRepositioningPlan = populateInstanceData(); voRepositioningPlan.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact()); voRepositioningPlan.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); /* WDEV-13175ArrayList screenErrors = new ArrayList(); if(form.ctnRepo().customAuthoring().getValue() == null) { if (form.ctnRepo().customAuthoring().getValue().getAuthoringHcp() == null) { screenErrors.add("Authoring HCP is mandatory."); } if (form.ctnRepo().customAuthoring().getValue().getAuthoringDateTime() == null) { screenErrors.add("Authoring Date/Time is mandatory."); } }*/ String[] errors = voRepositioningPlan.validate(); // WDEV-13175 //String[] arrScreenAndVoErrors = addScreenErrorsToVOErrors(screenErrors, arrErrors); WDEV-13175 if(errors!= null && errors.length != 0)// WDEV-13175 { engine.showErrors(errors); return false; } try { form.getLocalContext().setRepositioningPlan(domain.saveRepositioningPlan(voRepositioningPlan)); } catch (StaleObjectException e) { engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); open(); return false; } return true; }
private void populateResositioningPlanningRecord() { RepositioningPlanVo voRepositioningPlan = domain.getLastCompletedRepositioningPlan(form.getGlobalContext().Core.getCurrentCareContext()); if(voRepositioningPlan != null) { addNewAssessmentRow(voRepositioningPlan, "Repositioning Plan", voRepositioningPlan.getAuthoringInformationIsNotNull()?voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime():null); } }
private void viewAssessmentRecord() { Object value = form.grdSummary().getValue(); if (value instanceof BradenScale) { engine.open(form.getForms().Nursing.BradenScaleVIEW); } if (value instanceof MUSTVo) { engine.open(form.getForms().Nursing.MUST); } if (value instanceof PatientAssessmentListVo) { PatientAssessmentListVo voPatAsssess = (PatientAssessmentListVo) value; UserDefinedAssessmentType userDefinedAssessmentType = null; if (voPatAsssess.getAssessmentDataIsNotNull() && voPatAsssess.getAssessmentData().getGraphicIsNotNull()) userDefinedAssessmentType = voPatAsssess.getAssessmentData().getGraphic().getAssessmentType(); if (userDefinedAssessmentType != null) { if (userDefinedAssessmentType.equals(UserDefinedAssessmentType.PAINASSESSMENT)) engine.open(form.getForms().Assessment.PatientGraphicStagesPain); else if (userDefinedAssessmentType.equals(UserDefinedAssessmentType.SKINASSESSMENT)) engine.open(form.getForms().Assessment.PatientGraphicStages); } } if(value instanceof RepositioningPlanVo) { engine.open(form.getForms().Nursing.RepositioningPlan); } }
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("from RepositioningPlan rp "); ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); String andStr = " "; if (voCareContextRef != null) { hql.append(" where "); hql.append(andStr + " rp.careContext.id = :id_CareContext"); markers.add("id_CareContext"); values.add(voCareContextRef.getID_CareContext()); } hql.append(" order by rp.authoringInformation.authoringDateTime desc "); List plan = factory.find(hql.toString(), markers, values); if(plan != null && plan.size() > 1) { Object firstItem = plan.get(0); plan.removeAll(plan); plan.add(firstItem); } RepositioningPlanVoCollection collRepositioningPlanVo = RepositioningPlanVoAssembler.createRepositioningPlanVoCollectionFromRepositioningPlan(plan); if(collRepositioningPlanVo != null && collRepositioningPlanVo.size() > 0) return collRepositioningPlanVo.get(0); return null; }
public RepositioningPlanVo saveRepositioningPlan(RepositioningPlanVo voRepositioningPlan) throws StaleObjectException { if(!voRepositioningPlan.isValidated()) throw new DomainRuntimeException("This Repositioning Plan has not been validated"); DomainFactory factory = getDomainFactory(); RepositioningPlan doRepositioning = RepositioningPlanVoAssembler.extractRepositioningPlan(factory, voRepositioningPlan); factory.save(doRepositioning); return RepositioningPlanVoAssembler.create(doRepositioning); }
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef) { DailyPatientProgress impl = (DailyPatientProgress) getDomainImpl(DailyPatientProgressImpl.class); return impl.getLastCompletedRepositioningPlan(voCareContextRef); }
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef) { RepositioningPlan repositioningPlanImpl = (RepositioningPlan) getDomainImpl(RepositioningPlanImpl.class); return repositioningPlanImpl.getLastCompletedRepositioningPlan(voCareContextRef); }