Commit c694158c authored by thomas's avatar thomas
Browse files

[23110] post update event after adding block to encounter, add diagnosis

parent 073424c9
Pipeline #22415 passed with stages
in 4 minutes and 20 seconds
......@@ -7,6 +7,7 @@ import java.util.StringJoiner;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Display;
import ch.elexis.core.common.ElexisEventTopics;
import ch.elexis.core.constants.StringConstants;
import ch.elexis.core.l10n.Messages;
import ch.elexis.core.model.IBillable;
......@@ -78,6 +79,7 @@ public class BlockMakro implements IKonsMakro {
"Warnung folgende Leistungen konnten im aktuellen Kontext (Fall, Konsultation, Gesetz) nicht verrechnet werden.\n"
+ sb.toString());
}
ContextServiceHolder.get().postEvent(ElexisEventTopics.EVENT_UPDATE, encounter);
}
}
}
......@@ -660,7 +660,6 @@ public class VerrechnungsDisplay extends Composite implements IUnlockable {
} else {
// refresh with sorted billed list
CoreModelServiceHolder.get().refresh(actEncounter, true);
setEncounter(actEncounter);
}
} else if (object instanceof ICodeElementBlock) {
ICodeElementBlock block = (ICodeElementBlock) object;
......@@ -677,6 +676,9 @@ public class VerrechnungsDisplay extends Composite implements IUnlockable {
notOkResults.add(message);
}
}
} else if (element instanceof IDiagnosis) {
actEncounter.addDiagnosis((IDiagnosis) element);
CoreModelServiceHolder.get().save(actEncounter);
}
}
if (!notOkResults.toString().isEmpty()) {
......@@ -686,10 +688,7 @@ public class VerrechnungsDisplay extends Composite implements IUnlockable {
});
}
// refresh with sorted billed list
Display.getDefault().asyncExec(() -> {
CoreModelServiceHolder.get().refresh(actEncounter, true);
setEncounter(actEncounter);
});
CoreModelServiceHolder.get().refresh(actEncounter, true);
List<ICodeElement> diff = block.getDiffToReferences(elements);
if (!diff.isEmpty()) {
......@@ -709,6 +708,7 @@ public class VerrechnungsDisplay extends Composite implements IUnlockable {
CoreModelServiceHolder.get().save(actEncounter);
}
}
ContextServiceHolder.get().postEvent(ElexisEventTopics.EVENT_UPDATE, actEncounter);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment