/** * Called if the controller is patient aware and the patient context is about to be changed. * Override to control the pending context change. * * @param response The survey response. */ protected void onPatientChanging(ISurveyResponse response) { response.accept(); }
@Override public void pending(ISurveyResponse response) { response.accept(); }
/** * Prompt user for logout confirmation (unless suppressed). * * @see IUserContextEvent#pending */ @Override public void pending(ISurveyResponse response) { if (response.isSilent()) { response.accept(); } else { response.defer(); DialogUtil.confirm(LBL_LOGOUT_CONFIRMATION, LBL_LOGOUT_CONFIRMATION_CAPTION, "LOGOUT.CONFIRM", (confirm) -> { if (confirm) { response.accept(); } else { response.reject(LBL_LOGOUT_CANCEL); } }); } }
@Override public void pending(ISurveyResponse response) { if (first) { response.accept(); first = false; } else { response.reject("reject change"); } }
/** * Updates the list when a patient selection is pending. */ @Override public void pending(ISurveyResponse response) { try { Patient patient = PatientContext.getPatientContext().getContextObject(true); if (patient != null) { addPatient(patient, true); saveList(false); } } catch (Throwable t) { log.error("Error updating patient list.", t); } response.accept(); } };