Commit 384e960c authored by Thomas Huster's avatar Thomas Huster

[17382] use coverage of encounter for code element context if available

parent c7c23fc5
......@@ -37,11 +37,14 @@ public class CodeElementServiceHolder {
ContextServiceHolder.get().getRootContext().getTyped(IEncounter.class);
if (consultation.isPresent()) {
ret.put(ContextKeys.CONSULTATION, consultation.get());
ret.put(ContextKeys.COVERAGE, consultation.get().getCoverage());
}
Optional<ICoverage> coverage =
ContextServiceHolder.get().getRootContext().getTyped(ICoverage.class);
if (coverage.isPresent()) {
ret.put(ContextKeys.COVERAGE, coverage.get());
if (ret.get(ContextKeys.COVERAGE) == null) {
Optional<ICoverage> coverage =
ContextServiceHolder.get().getRootContext().getTyped(ICoverage.class);
if (coverage.isPresent()) {
ret.put(ContextKeys.COVERAGE, coverage.get());
}
}
return ret;
}
......
Markdown is supported
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