diff --git a/bundles/ch.elexis.core.ui.mediorder/src/ch/elexis/core/ui/mediorder/MediorderPart.java b/bundles/ch.elexis.core.ui.mediorder/src/ch/elexis/core/ui/mediorder/MediorderPart.java index 45fb393786..ebfe0b2abf 100644 --- a/bundles/ch.elexis.core.ui.mediorder/src/ch/elexis/core/ui/mediorder/MediorderPart.java +++ b/bundles/ch.elexis.core.ui.mediorder/src/ch/elexis/core/ui/mediorder/MediorderPart.java @@ -711,15 +711,15 @@ private void addMedicationOrderEntryToStock(IStock stock, IArticle article) { } /** - * Retrieves a list of patient stocks that doesn't contain stockEntries with the - * status {@link MediorderEntryState#AWAITING_REQUEST} + * Retrieves a list of patient stocks that do not only have stockEntries with + * the status {@link MediorderEntryState#AWAITING_REQUEST} * * @return */ private List getStocksExcludingAwaitingRequests() { return stockService.getAllPatientStock().stream().filter(stock -> !stock.getStockEntries().isEmpty()) - .filter(stock -> stock.getStockEntries().stream().noneMatch( - entry -> MediorderEntryState.AWAITING_REQUEST.equals(MediorderPartUtil.determineState(entry)))) + .filter(stock -> stock.getStockEntries().stream().anyMatch( + entry -> !MediorderEntryState.AWAITING_REQUEST.equals(MediorderPartUtil.determineState(entry)))) .toList(); }