/** Returns whether it is selected. * <p>Default: false. * <p>Don't override this. Override {@link #isChecked} instead. */ public boolean isSelected() { return isChecked(); }
private boolean checkStatus(String data) { return radAll.isChecked() || data.startsWith("ACTIVE"); }
/** * Update display when patient context changes. */ @Override public void committed() { updatePatient(radPatient.isChecked()); }
/** Sets the radio is checked and unchecked the others in the same radio * group ({@link Radiogroup}. */ public void setChecked(boolean checked) { if (checked != isChecked()) { super.setChecked(checked); fixSiblings(checked, false); } }
@Override protected List<String> executeRPC(String searchText) { if (searchText == null || searchText.isEmpty()) { searchText = "*"; } String params = VistAUtil.concatParams(searchText, radLexicon.isChecked() ? "1" : "0", "", //m_sLookupDate Visit date PatientContext.getActivePatient().getGender(), "", //IIf(m_bEcodeMode, 2, IIf(m_bAllowEcode, 1, "")) "" // CInt(m_bDisplayShortText) ' VCodes ); return broker.callRPCList(lookupParams.getRpc(), null, params); } }
/** * Refresh the display. */ @Override public void refresh() { lstNotification.setModel((ListModel<?>) null); service.getNotifications(radAll.isChecked() ? null : patient, model); lstNotification.setModel(model); Clients.resize(lstNotification); updateControls(false); }
/** * Update controls to reflect the current selection state. * * @param processingUpdate If true, a processing status update has occurred. */ private void updateControls(boolean processingUpdate) { btnAll.setDisabled(isProcessing || model.isEmpty()); btnDelete.setDisabled(isProcessing || !canDeleteSelected()); btnInfoAll.setDisabled(isProcessing || !hasInfoOnly()); btnSelected.setDisabled(isProcessing || model.getSelection().isEmpty()); btnForward.setDisabled(isProcessing || btnSelected.isDisabled()); radAll.setStyle(radAll.isChecked() ? BOLD : NO_BOLD); radPatient.setStyle(radPatient.isChecked() ? BOLD : NO_BOLD); if (processingUpdate) { lstNotification.setDisabled(isProcessing); ZKUtil.disableChildren(lstNotification, isProcessing); } }
/** * Loads form data from the current problem. */ private void loadForm() { if (test != null) { setEventType(test.getEventType()); radRefusal.setDisabled(!radRefusal.isChecked()); radHistorical.setDisabled(!radHistorical.isChecked()); radCurrent.setDisabled(!radCurrent.isChecked()); datEvent.setValue(test.getDate()); ZKUtil.disableChildren(fraHistorical, true); datEvent.setDisabled(true); int reading = NumberUtils.toInt(test.getReading(), -1); spnReading.setValue(reading < 0 ? null : reading); } else { onClick$btnSkinTest(); if (txtSkinTest.getValue().isEmpty()) { close(true); return; } setEventType(EventType.CURRENT); Encounter visit = EncounterContext.getActiveEncounter(); Date date = visit == null ? null : visit.getPeriod().getStart(); datEvent.setValue(DateUtil.stripTime(date == null ? new Date() : date)); } }
private void syncInputs() { boolean ignore = radNo.isChecked(); record.setIndicated(radYes.isChecked()); record.setGoalRange(ignore ? null : cboGoal.getText()); record.setGoalMin(ignore ? null : NumberUtils.toDouble(cboMin.getText())); record.setGoalMax(ignore ? null : NumberUtils.toDouble(cboMax.getText())); record.setDuration(ignore ? null : cboDuration.getText()); record.setStartDate(ignore ? null : datStart.getValue()); record.setComment(txtComment.getText()); record.setProvider((Practitioner) wbProvider.getSelectedData()); }
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; }
/** * Creates a notification from raw data. Will be added to the model unless filtered. Will * generate a slide-down message alert if its priority exceeds the set threshold. * * @param data Raw notification data. */ private void addNotification(String data) { Notification notification = new Notification(data); service.getNotificationMessage(notification); if (radAll.isChecked() || (notification.hasPatient() && patient != null && notification.getDfn() .equals(patient.getId().getIdPart()))) { model.add(notification); } if (alertThreshold != null && notification.getPriority().ordinal() <= alertThreshold.ordinal()) { MessageInfo mi = new MessageInfo(notification.getDisplayText(), "New Notification", PriorityRenderer.getColor(notification.getPriority()), alertDuration * 1000, null, "cwf.fireLocalEvent('ALERT.INFO', '" + notification.getAlertId() + "');"); getEventManager().fireLocalEvent(MessageWindow.EVENT_SHOW, mi); } }