protected void onBSearchClick() throws ims.framework.exceptions.PresentationLogicException { // Ensure that something has been put into the title if (form.layerControl().tab1().textSearchCriteria().getValue() == null || form.layerControl().tab1().textSearchCriteria().getValue().equals("")) { engine.showMessage("Please enter search criteria for the Care Plan Template."); return; } String templateStr=form.layerControl().tab1().textSearchCriteria().getValue(); if (form.layerControl().tab1().Group1().getValue().equals(GenForm.layerControlLayer.tab1Container.Group1Enumeration.radioButtonBeginsWith)) templateStr = templateStr + "%"; else if (form.layerControl().tab1().Group1().getValue().equals(GenForm.layerControlLayer.tab1Container.Group1Enumeration.radioButtonContains)) templateStr = "%" + templateStr + "%"; CarePlanTemplateCollection searchResults = domain.listTemplates(templateStr); if (searchResults == null || searchResults.size() == 0) { engine.showMessage("No results found for search criteria."); } populateGrid(searchResults); }
private void populateGrid(CarePlanTemplateCollection coll) { form.layerControl().tab1().gridCarePlan().getRows().clear(); if (coll != null) { GenForm.layerControlLayer.tab1Container.gridCarePlanRow row; for (int i=0; i<coll.size(); i++) { CarePlanTemplate template = coll.get(i); row = form.layerControl().tab1().gridCarePlan().getRows().newRow(); row.setColCPTitle(template.getTitle()); row.setValue(template); } } form.getLocalContext().setTemplates(coll); }
private void populateCarePlanGrd(CarePlanTemplateCollection voCarePlanTempColl) { if (voCarePlanTempColl != null && voCarePlanTempColl.size() > 0) { GenForm.container1Container.gridCarePlanRow cpRow; int i=0; // Find the correct row to set to selected for (int j=0; j<form.container1().gridCarePlan().getRows().size(); j++) { cpRow = form.container1().gridCarePlan().getRows().get(j); for (i=0; i<voCarePlanTempColl.size(); i++) { CarePlanTemplate voTemplate = voCarePlanTempColl.get(i); if (cpRow.getValue().getID_CarePlanTemplate().equals(voTemplate.getID_CarePlanTemplate())) { cpRow.setcolSelected(true); cpRow.setReadOnly(true); break; } } } } }
private void populateCarePlanGrd(CarePlanTemplateCollection voCarePlanTemplateColl) { if (voCarePlanTemplateColl != null && voCarePlanTemplateColl.size() > 0) { GenForm.container1Container.gridCarePlansRow cpRow; int i=0; // Find the correct row to set to selected for (int j=0; j<form.container1().gridCarePlans().getRows().size(); j++) { cpRow = form.container1().gridCarePlans().getRows().get(j); for (i=0; i<voCarePlanTemplateColl.size(); i++) { CarePlanTemplate votemplate = voCarePlanTemplateColl.get(i); if (cpRow.getValue().getID_CarePlanTemplate().equals(votemplate.getID_CarePlanTemplate())) { cpRow.setcolSelected(true); cpRow.setReadOnly(true); break; } } } } }
private void populateCarePlanGrd(CarePlanTemplateCollection voCarePlanTemplateColl) { if (voCarePlanTemplateColl != null && voCarePlanTemplateColl.size() > 0) { GenForm.gridCarePlanRow cpRow; int i=0; // Find the correct row to set to selected for (int j=0; j<form.gridCarePlan().getRows().size(); j++) { cpRow = form.gridCarePlan().getRows().get(j); for (i=0; i<voCarePlanTemplateColl.size(); i++) { CarePlanTemplate template = voCarePlanTemplateColl.get(i); if (cpRow.getValue().getID_CarePlanTemplate().equals(template.getID_CarePlanTemplate())) { cpRow.setcolSelected(true); cpRow.setReadOnly(true); break; } } } } }
private void populateCarePlanGrd(CarePlanTemplateCollection voCarePlanTempColl) { //Populate the correct selected careplan template if one saved with the component if (voCarePlanTempColl != null && voCarePlanTempColl.size() > 0) { GenForm.container1Container.gridCarePlanRow cpRow; CarePlanTemplate template; int i=0; // Find the correct row to set to selected for (int j=0; j<form.container1().gridCarePlan().getRows().size(); j++) { cpRow = form.container1().gridCarePlan().getRows().get(j); for (i=0; i<voCarePlanTempColl.size(); i++) { template = voCarePlanTempColl.get(i); if (cpRow.getValue().getID_CarePlanTemplate().equals(template.getID_CarePlanTemplate())) { cpRow.setcolSelected(true); cpRow.setReadOnly(true); break; } } } } }
private void populateCarePlanGrd(CarePlanTemplateCollection voCarePlanTempColl) { if (voCarePlanTempColl != null && voCarePlanTempColl.size() > 0) { //form.container1().gridCarePlan().setReadOnly(true); GenForm.container1Container.gridCarePlanRow cpRow; CarePlanTemplate template; int i=0; // Find the correct row to set to selected for (int j=0; j<form.container1().gridCarePlan().getRows().size(); j++) { cpRow = form.container1().gridCarePlan().getRows().get(j); for (i=0; i<voCarePlanTempColl.size(); i++) { template = voCarePlanTempColl.get(i); if (cpRow.getValue().getID_CarePlanTemplate().equals(template.getID_CarePlanTemplate())) { cpRow.setReadOnly(true); cpRow.setcolSelected(true); break; } } } } }
protected void populateScreenFromData(NurAssessmentPersonalDetailsVo voPersonal) { super.populateScreenFromData(voPersonal); //Care Plans if (voPersonal.getCarePlanTemplate() != null && voPersonal.getCarePlanTemplate().size() > 0) { GenForm.grdCarePlanRow cpRow; CarePlanTemplateCollection templateColl = voPersonal.getCarePlanTemplate(); CarePlanTemplate template; int i=0; // Find the correct row to set to selected for (int j=0; j<form.grdCarePlan().getRows().size(); j++) { cpRow = form.grdCarePlan().getRows().get(j); for (i=0; i<templateColl.size(); i++) { template = templateColl.get(i); if (cpRow.getValue().getID_CarePlanTemplate().equals(template.getID_CarePlanTemplate())) { cpRow.setcolSelect(true); cpRow.setReadOnly(true); break; } } } } if (voPersonal.getIsComplete().booleanValue() == true) // Complete { form.setMode(FormMode.VIEW); } else { if ((form.cmbOccupation().getValue() != null)) if(form.getMode().equals(FormMode.EDIT)) form.txtOtherOccupation().setEnabled(form.cmbOccupation().getValue().equals(Occupation.OTHER)); } form.chkCopy().setEnabled(false); }
private void populateInstanceControl(AssessmentSpirituality voAssessSP) { if (voAssessSP == null) return; form.checkBoxComplete().setValue(voAssessSP.getIsComplete().booleanValue()); if (voAssessSP.getIsComplete().booleanValue() == true) // Complete { form.bSave().setEnabled(false); form.setMode(FormMode.VIEW); form.checkBoxComplete().setEnabled(false); form.gridCarePlan().setReadOnly(true); form.checkBoxCopy().setEnabled(false); } form.checkBoxCopy().setValue(voAssessSP.getCopy().booleanValue()); if (voAssessSP.getCopy().booleanValue()== true) form.checkBoxCopy().setEnabled(false); form.textBoxAddress().setValue(voAssessSP.getAddress()); form.textBoxName().setValue(voAssessSP.getName()); form.textBoxReligion().setValue(voAssessSP.getReligion()); form.textBoxRequirements().setValue(voAssessSP.getRequirements()); form.txtBoxTelephone().setValue(voAssessSP.getTelephoneNumber()); form.answerBoxBeliefOrFaith().setValue(voAssessSP.getBeliefOrFaith()); form.answerBoxContinuePracticing().setValue(voAssessSP.getContinuePracticing()); form.answerBoxPracticingMember().setValue(voAssessSP.getPracticingMember()); // Populate the correct selected careplan template if one saved with the component if (voAssessSP.getCarePlanTemplate() != null && voAssessSP.getCarePlanTemplate().size() > 0) { GenForm.gridCarePlanRow cpRow; CarePlanTemplateCollection templateColl = voAssessSP.getCarePlanTemplate(); CarePlanTemplate template; int i=0; // Find the correct row to set to selected for (int j=0; j<form.gridCarePlan().getRows().size(); j++) { cpRow = form.gridCarePlan().getRows().get(j); for (i=0; i<templateColl.size(); i++) { template = templateColl.get(i); if (cpRow.getValue().getID_CarePlanTemplate().equals(template.getID_CarePlanTemplate())) { cpRow.setcolSelected(true); cpRow.setReadOnly(true); break; } } } } }
private void populateFormInfo(AssessmentMobility assessMob) { if (assessMob == null) return; form.checkBoxCopy().setValue(assessMob.getCopy().booleanValue()); if (assessMob.getCopy().booleanValue() == true) form.checkBoxCopy().setEnabled(false); form.checkBoxComplete().setValue(assessMob.getIsComplete().booleanValue()); if (assessMob.getIsComplete().booleanValue() == true) // Complete { form.bSave().setEnabled(false); form.setMode(FormMode.VIEW); form.checkBoxCopy().setEnabled(false); form.checkBoxComplete().setEnabled(false); form.gridCarePlan().setReadOnly(true); } form.comboBoxBed().setValue(assessMob.getBedType()); form.comboBoxChair().setValue(assessMob.getChairType()); form.textBoxNotes().setValue(assessMob.getNotes()); form.answerBoxAssistanceWithMobility().setValue(assessMob.getAssistanceWithMobility()); //fall assessment score if(assessMob.getFallAssessmentScore() != null) form.decFallScore().setValue(new Float(assessMob.getFallAssessmentScore().floatValue())); // Populate the correct selected careplan template if one saved with the component if (assessMob.getCarePlanTemplate() != null && assessMob.getCarePlanTemplate().size() > 0) { GenForm.gridCarePlanRow cpRow; CarePlanTemplateCollection templateColl = assessMob.getCarePlanTemplate(); CarePlanTemplate template; int i=0; // Find the correct row to set to selected for (int j=0; j<form.gridCarePlan().getRows().size(); j++) { cpRow = form.gridCarePlan().getRows().get(j); for (i=0; i<templateColl.size(); i++) { template = templateColl.get(i); if (cpRow.getValue().getID_CarePlanTemplate().equals(template.getID_CarePlanTemplate())) { cpRow.setcolSelected(true); cpRow.setReadOnly(true); break; } } } } }