private SkinAssessmentReviewCollection copySkinAssessmentReview(SkinAssessmentReviewCollection skinAssessmentReview) { if (skinAssessmentReview == null) return null; for (int i = 0 ; i <skinAssessmentReview.size() ; i++) { if (skinAssessmentReview.get(i) == null) continue; skinAssessmentReview.get(i).clearIDAndVersion(); } return skinAssessmentReview; }
protected void onFormDialogClosed(ims.framework.FormName formName, ims.framework.enumerations.DialogResult result) throws ims.framework.exceptions.PresentationLogicException { if(formName.equals(form.getForms().Nursing.SkinReviewDialog) && result.equals(DialogResult.OK)) { //Get the value SkinAssessmentFindings findingVO = form.getGlobalContext().COE.SkinBodyChart.getFindingsVO(); if(findingVO.getSkinAssessmentReview() == null) findingVO.setSkinAssessmentReview(new SkinAssessmentReviewCollection()); findingVO.getSkinAssessmentReview().add(form.getGlobalContext().COE.SkinBodyChart.getReviewVO()); SkinAssessment assessmentVO = form.comboBoxAssessment().getValue(); addFindingToAssessment(assessmentVO, findingVO); if (assessmentVO.getClinicalContact() == null) assessmentVO.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact()); if (assessmentVO.getCareContext() == null) assessmentVO.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); //Save try{ String [] error = assessmentVO.validate(); if(error != null) { engine.showErrors(error); return; } // domain.saveSkinAssessment(assessmentVO, form.getGlobalContext().Core.getClinicalEpisode()); domain.saveSkinAssessment(assessmentVO); } catch (StaleObjectException e) { displayMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); } //If the Assessment was discontinued - activate the All radio button if(findingVO.getIsDiscontinuedAssess() != null && findingVO.getIsDiscontinuedAssess().booleanValue()) form.GroupActive().setValue(GenForm.GroupActiveEnumeration.rdoAll); //Restore the old Assessment and Display open(); if(form.comboBoxSite().getValues() != null) { form.comboBoxSite().setValue(form.getGlobalContext().COE.SkinBodyChart.getFindingsVO()); refreshFindings(); } } else if(result.equals(DialogResult.OK) && formName.equals(form.getForms().Core.Reports)) { printReport(); } }
protected void onComboBoxSiteValueChanged() throws ims.framework.exceptions.PresentationLogicException { form.getLocalContext().setCurrentVOIndex(new Integer(0)); form.grdSkinDetails().getRows().clear(); addDetailsEmptyRows(); if(form.comboBoxSite().getValue() != null) { form.btnPrint().setEnabled(true); //Build the pain Review List SkinAssessmentReviewCollection reviewVOCollection = new SkinAssessmentReviewCollection(); // Add the header record to the first position //reviewVOCollection.add(getReviewVOfromFindingVO()); if(form.comboBoxSite().getValue().getSkinAssessmentReview() != null) { for(int i=0; i<form.comboBoxSite().getValue().getSkinAssessmentReview().size(); i++) reviewVOCollection.add(form.comboBoxSite().getValue().getSkinAssessmentReview().get(i)); } reviewVOCollection.sort(SortOrder.ASCENDING); //Save the list in the context form.getLocalContext().setReviewCollection(reviewVOCollection); //------------------------------------------------------ //set the current index to be the one that's displaying the last records first int recIndex = 0; if(reviewVOCollection.size()%maxcolumns == 0) recIndex = (reviewVOCollection.size()/maxcolumns)*maxcolumns - maxcolumns; else recIndex = (reviewVOCollection.size()/maxcolumns)*maxcolumns; recIndex = recIndex<0?0:recIndex; form.getLocalContext().setCurrentVOIndex(new Integer(recIndex)); //-------------------------------------------------------- //Set the findingVO to be used in Review Dialog form.getGlobalContext().COE.SkinBodyChart.setFindingsVO(form.comboBoxSite().getValue()); populateReviewDetails(); form.btnNext().setEnabled(false); if(reviewVOCollection.size() > maxcolumns) form.btnPrevious().setEnabled(true); else form.btnPrevious().setEnabled(false); //Check if it's the first record if(form.comboBoxAssessment().getValues().get(0).equals(form.comboBoxAssessment().getValue())) { //Check if discontinued if(form.comboBoxSite().getValue().getIsDiscontinuedAssess() != null && form.comboBoxSite().getValue().getIsDiscontinuedAssess().booleanValue()) form.bNew().setEnabled(false); else form.bNew().setEnabled(true); } else form.bNew().setEnabled(false); } else { form.bNew().setEnabled(false); form.btnNext().setEnabled(false); form.btnPrevious().setEnabled(false); } }
protected void onComboBoxSiteValueChanged() throws ims.framework.exceptions.PresentationLogicException { form.getLocalContext().setCurrentVOIndex(new Integer(0)); form.grdSkinDetails().getRows().clear(); addDetailsEmptyRows(); if(form.comboBoxSite().getValue() != null) { form.btnPrint().setEnabled(true); //Build the pain Review List SkinAssessmentReviewCollection reviewVOCollection = new SkinAssessmentReviewCollection(); // Add the header record to the first position //reviewVOCollection.add(getReviewVOfromFindingVO()); if(form.comboBoxSite().getValue().getSkinAssessmentReview() != null) { for(int i=0; i<form.comboBoxSite().getValue().getSkinAssessmentReview().size(); i++) reviewVOCollection.add(form.comboBoxSite().getValue().getSkinAssessmentReview().get(i)); } reviewVOCollection.sort(SortOrder.ASCENDING); //Save the list in the context form.getLocalContext().setReviewCollection(reviewVOCollection); //------------------------------------------------------ //set the current index to be the one that's displaying the last records first int recIndex = 0; if(reviewVOCollection.size()%maxcolumns == 0) recIndex = (reviewVOCollection.size()/maxcolumns)*maxcolumns - maxcolumns; else recIndex = (reviewVOCollection.size()/maxcolumns)*maxcolumns; recIndex = recIndex<0?0:recIndex; form.getLocalContext().setCurrentVOIndex(new Integer(recIndex)); //-------------------------------------------------------- //Set the findingVO to be used in Review Dialog form.getGlobalContext().COE.SkinBodyChart.setFindingsVO(form.comboBoxSite().getValue()); populateReviewDetails(); form.btnNext().setEnabled(false); if(reviewVOCollection.size() > maxcolumns) form.btnPrevious().setEnabled(true); else form.btnPrevious().setEnabled(false); //Check if it's the first record if(form.comboBoxAssessment().getValues().get(0).equals(form.comboBoxAssessment().getValue())) { //Check if discontinued if(form.comboBoxSite().getValue().getIsDiscontinuedAssess() != null && form.comboBoxSite().getValue().getIsDiscontinuedAssess().booleanValue()) form.bNew().setEnabled(false); else form.bNew().setEnabled(true); } else form.bNew().setEnabled(false); } else { form.bNew().setEnabled(false); form.btnNext().setEnabled(false); form.btnPrevious().setEnabled(false); } form.getGlobalContext().Nursing.setSkinReviewSearchCriteria(getSearchCriteria());//WDEV-19389 }