private String[] validateUiRules(BladderManagement voBladderManagement) { ArrayList<String> listOfErrors = new ArrayList<String>(); if (voBladderManagement.getMethod() != null && !BladderManagementMethod.INTERMITTENT_CATHETER.equals(voBladderManagement.getMethod())) { if (voBladderManagement.getDateInserted() == null) { listOfErrors.add("Date Inserted is mandatory"); } if (voBladderManagement.getDateNextChange() == null) { listOfErrors.add("Date Next Change is mandatory"); } } int errorCount = listOfErrors.size(); String[] result = new String[errorCount]; for (int x = 0; x < errorCount; x++) result[x] = (String) listOfErrors.get(x); return result; }
private void populateManagementGrd(BladderManagementCollection voBladderManagement) { if (voBladderManagement != null) { GenForm.container1Container.gridManagementRow mRow; form.container1().gridManagement().getRows().clear(); for (int i=0; i<voBladderManagement.size(); i++) { BladderManagement manage = voBladderManagement.get(i); if ( manage.getIsCurrentlyActive().booleanValue() ) { mRow = form.container1().gridManagement().getRows().newRow(); mRow.setValue(manage); if (manage.getDateInserted() != null) mRow.setColDateInserted(manage.getDateInserted()); if (manage.getDateNextChange() != null) mRow.setColDateNextChange(manage.getDateNextChange()); if (manage.getMethod() != null) mRow.setColMethod(manage.getMethod()); if (manage.getSize() != null) mRow.setColSize(manage.getSize()); if (manage.getType() != null) mRow.setColType(manage.getType()); } else { BladderManagementCollection volstInActiveList = form.getLocalContext().getInActiveDeviceList(); if (volstInActiveList == null) volstInActiveList = new ims.nursing.vo.BladderManagementCollection(); volstInActiveList.add(manage); form.getLocalContext().setInActiveDeviceList(volstInActiveList); } } } }
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException { // See if there is an existing pain medication VO to display BladderManagement man = form.getGlobalContext().Nursing.getBladderManagement(); if (man != null) { form.comboBoxMethod().setValue(man.getMethod()); form.comboBoxType().setValue(man.getType()); form.dateInserted().setValue(man.getDateInserted()); form.dateNextChange().setValue(man.getDateNextChange()); form.intBoxSize().setValue(man.getSize()); form.getLocalContext().setManage(man); } }
private void newBladderManagement() { GenForm.grdManagementRow row = form.grdManagement().getRows().newRow(); row.setValue(new BladderManagement()); }
protected void onDialogClosed(ims.framework.FormName formName, ims.framework.enumerations.DialogResult result) throws ims.framework.exceptions.PresentationLogicException { if (formName.equals(form.getForms().COE.AssessBladderManagement) && result == ims.framework.enumerations.DialogResult.OK) { // Get the medication from the global context GenForm.container1Container.gridManagementRow row; BladderManagement man = form.getGlobalContext().Nursing.getBladderManagement(); if ( !man.getIsCurrentlyActive().booleanValue())//Has been made Inactive { BladderManagementCollection lstInActiveList = form.getLocalContext().getInActiveDeviceList(); if (lstInActiveList == null) lstInActiveList = new ims.nursing.vo.BladderManagementCollection(); lstInActiveList.add(man); form.getLocalContext().setInActiveDeviceList(lstInActiveList); if (form.getLocalContext().getCurIndex() != null) form.container1().gridManagement().getRows().remove(form.getLocalContext().getCurIndex().intValue()); } else { if (form.getLocalContext().getCurIndex() == null) { row = form.container1().gridManagement().getRows().newRow(); row.setValue(man); } else { row = form.container1().gridManagement().getRows().get(form.getLocalContext().getCurIndex().intValue()); row.setValue(man); } if (man.getDateInserted() != null) row.setColDateInserted(man.getDateInserted()); if (man.getDateNextChange() != null) row.setColDateNextChange(man.getDateNextChange()); if (man.getMethod() != null) row.setColMethod(man.getMethod()); if (man.getSize() != null) row.setColSize(man.getSize()); if (man.getType() != null) row.setColType(man.getType()); } } form.container1().bRemove().setEnabled(form.container1().gridManagement().getValue()!=null); }