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

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

parent c7c23fc5
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -37,12 +37,15 @@ 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());
		}
		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;
	}