private void search() { if (form.cmbMDTList().getValue() == null) { engine.showMessage("Valid search criteria must be specified - Please select a List"); return; } form.getGlobalContext().Core.setCurrentMDTListShown(form.cmbMDTList().getValue()); MDTListAndDatesVo voMdtListFilter = new MDTListAndDatesVo(); MDTListAndDatesVoCollection mdtColl = null; voMdtListFilter.setCareContext(new CareContextVo()); voMdtListFilter.getCareContext().setContext(ContextType.INPATIENT); voMdtListFilter.setListPatientisOn(form.cmbMDTList().getValue()); if ((form.cmbMDTList().getValue() != null) && (form.cmbMDTList().getValue().equals(MDTListAorB.NOTONANYLISTYET))) mdtColl = domain.listCareContextsWithNoMDTList(voMdtListFilter); else if (form.cmbMDTList().getValue() != null) mdtColl = domain.listMDT(voMdtListFilter); populateListControl(mdtColl); }
/** * Function used to data-bind 'MDT Area' & 'MDT List A or B' lookups to combo-boxes * Since these two lookups are non-system and non-system entries are relevant * we need to manually data-bind them */ private void initializeComboBoxDataBinding() { // Get 'MDT Area' lookup values (non-system) and bid them to the 'Area' combobox LookupInstVo[] roots = LookupHelper.getMDTArea(domain.getLookupService()).getRoots(); // Add each root entry from lookup to combo-box for (int i = 0; i < roots.length; i++) { MDTArea area = (MDTArea) roots[i]; form.ctnDetails().cmbArea().newRow(area, area.getText()); } // Get 'MDTListAorB' lookup values (non-system) and bind them to the 'MDT List' combobox MDTListAorBCollection values_MDT_AorB = LookupHelper.getMDTListAorB(domain.getLookupService()); // Add each entry from lookup to combo-box for (int i = 0; i < values_MDT_AorB.size(); i++) { MDTListAorB instance = values_MDT_AorB.get(i); if (!MDTListAorB.NOTONANYLISTYET.equals(instance) && Boolean.TRUE.equals(instance.isActive())) { form.cmbListMDT().newRow(instance, instance.getText()); } } }
private void setSearchCriteria(MDTListAorB currentMDTListShown) { form.cmbMDTList().setValue(currentMDTListShown); }