@Override public void visible(boolean mode) { if (mode == true) { Problem problem = IatrixEventHelper.getSelectedProblem(); if (problem != null) { // check whether Problem matches the currently selected patient Patient selectedPatient = ElexisEventDispatcher.getSelectedPatient(); if (selectedPatient != null && problem.getPatient().getId().equals(selectedPatient.getId())) { setProblem(problem); } else { setProblem(null); } } else { setProblem(null); } ElexisEventDispatcher.getInstance().addListeners(eeli_problem, eeli_patient); } else { ElexisEventDispatcher.getInstance().removeListeners(eeli_problem, eeli_patient); } }
private void setProblem(Problem problem) { actProblem = problem; if (actProblem != null) { form.setText("Problem " + problem.getLabel() + " von " + problem.getPatient().getLabel()); } else { form.setText("Kein Problem ausgewählt"); } diagnosenViewer.refresh(); konsultationenViewer.refresh(); // Fixmedikation // TODO work-around // we need to call "reload" two times to make the list expand // unknown why this is required dlDauerMedi.reload(); dlDauerMedi.reload(); dauermedikationSection.layout(true); form.reflow(true); }