private ProblemFilter getFilter() { return (ProblemFilter) cboFilter.getSelectedItem().getValue(); }
@Override protected boolean isComplete() { return lstLocation.getSelectedItem() != null && cboServiceCategory.getSelectedItem() != null && datEncounter.getDate() != null; }
/** * Returns the currently active category filter. * * @return The active category filter. */ private DocumentCategory getCurrentFilter() { return fixedFilter != null ? fixedFilter : cboFilter.getSelectedIndex() > 0 ? (DocumentCategory) cboFilter.getSelectedItem().getValue() : null; }
/** * Returns date type from picker. * * @return The date type. */ protected DateType getDateType() { Comboitem item = dateTypePicker == null ? null : dateTypePicker.getSelectedItem(); return item == null ? dateFilter.getDateType() : (DateType) item.getValue(); }
private boolean validateInputs() { Clients.clearWrongValue(inputs); if (radNo.isChecked()) { syncInputs(); return true; } if (!radYes.isChecked()) { Clients.wrongValue(rgIndicated, "You must provide an indication."); } else if (cboGoal.getSelectedItem() == null) { Clients.wrongValue(cboGoal, "You must provide a goal."); } else if (pnlGoalOther.isVisible() && cboMin.getSelectedItem() == null) { Clients.wrongValue(cboMin, "You must provide a minimum."); } else if (pnlGoalOther.isVisible() && cboMax.getSelectedItem() == null) { Clients.wrongValue(cboMax, "You must provide a maximum."); } else if (cboDuration.getSelectedItem() == null) { Clients.wrongValue(cboDuration, "You must provide a duration."); } else if (datStart.getValue() == null) { Clients.wrongValue(datStart, "You must provide a starting date."); } else if (wbProvider.getSelectedData() == null) { Clients.wrongValue(wbProvider, "You must specify a provider."); } else { syncInputs(); return true; } return false; }
@Override protected Encounter getEncounterInternal() { if (!isComplete()) { return null; } Listitem item = lstLocation.getSelectedItem(); String locid = item == null ? null : (String) item.getValue(); Location location = locid != null ? DomainFactoryRegistry.fetchObject(Location.class, locid) : null; Comboitem cboitem = cboServiceCategory.getSelectedItem(); String sc = cboitem == null ? null : (String) cboitem.getValue(); Date date = datEncounter.getDate(); Encounter encounter = EncounterUtil.create(mainController.patient, date, location, sc); if (chkForceCreate.isChecked()) { mainController.flags.add(EncounterFlag.FORCE); } else { mainController.flags.remove(EncounterFlag.FORCE); } return encounter; }
/** * Scroll to document with same header. */ public void onSelect$cboHeader() { Document doc = cboHeader.getSelectedItem().getValue(); for (Listitem item : listBox.getItems()) { Document doc2 = (Document) item.getValue(); if (doc2 == null) { listBox.renderItem(item); doc2 = (Document) item.getValue(); } if (doc == doc2) { Clients.scrollIntoView(item); break; } } }
String locid = item == null ? null : (String) item.getValue(); Location location = locid != null ? DomainFactoryRegistry.fetchObject(Location.class, locid) : null; Comboitem cboitem = cboServiceCategory.getSelectedItem(); Date date = datEncounter.getDate(); CodeableConceptDt sc = EncounterUtil.createServiceCategory((String) cboitem.getValue(), cboitem.getLabel(),
/** * Update the scheduled notification with new input values and send to the server, then close * the dialog if successful. */ public void onClick$btnOK() { if (validate()) { notification.setDeliveryDate(new FMDate(dtbDelivery.getDate())); notification.setDfn(chkAssociate.isChecked() ? (String) chkAssociate.getValue() : null); notification.setPatientName(chkAssociate.isChecked() ? lblPatient.getValue() : null); notification.setSubject(txtSubject.getValue()); notification.setPriority((Priority) cboPriority.getSelectedItem().getValue()); List<String> message = StrUtil.toList(txtMessage.getText()); if (service.scheduleNotification(notification, message, recipients)) { root.setAttribute("notification", notification); root.detach(); } else { PromptDialog.showError("@vistanotification.schedule.save.failure"); } } }