From d2c296b0c91ae596d27b90d471425f64d0a7c66a Mon Sep 17 00:00:00 2001 From: Ally Wu Date: Tue, 23 Jan 2024 16:15:18 -0500 Subject: [PATCH] more fixups --- .../gsi/dimsum/service/filtering/PendingState.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/ca/on/oicr/gsi/dimsum/service/filtering/PendingState.java b/src/main/java/ca/on/oicr/gsi/dimsum/service/filtering/PendingState.java index 3c125047..9acb2761 100644 --- a/src/main/java/ca/on/oicr/gsi/dimsum/service/filtering/PendingState.java +++ b/src/main/java/ca/on/oicr/gsi/dimsum/service/filtering/PendingState.java @@ -338,7 +338,7 @@ protected Function> getFilteredSamples(MetricCategory reque throw new IllegalStateException("This gate does not apply to samples"); } - public static class Helpers { + private static class Helpers { public static String TOP_UP_REASON = "Top-up Required"; public static Predicate pendingQc = Helpers::isPendingQc; public static Predicate pendingDataReview = Helpers::isPendingDataReview; @@ -351,7 +351,7 @@ public static class Helpers { kase -> kase.getReceipts().stream().anyMatch(passed) && kase.getReceipts().stream().noneMatch(pendingQc); - public static boolean isPassed(Sample sample) { + private static boolean isPassed(Sample sample) { return isTrue(sample.getQcPassed()) && (sample.getRun() == null || isTrue(sample.getDataReviewPassed())); } @@ -360,7 +360,7 @@ private static boolean isTrue(Boolean value) { return Boolean.TRUE.equals(value); } - public static boolean isPendingQc(Sample sample) { + private static boolean isPendingQc(Sample sample) { return sample.getQcPassed() == null && !isTopUpRequired(sample); } @@ -368,12 +368,12 @@ private static boolean isPendingReceiptQc(Case kase) { return kase.getReceipts().stream().anyMatch(pendingQc); } - public static boolean isPendingDataReview(Sample sample) { + private static boolean isPendingDataReview(Sample sample) { return sample.getQcUser() != null && sample.getRun() != null && sample.getDataReviewPassed() == null; } - public static boolean isTopUpRequired(Sample sample) { + private static boolean isTopUpRequired(Sample sample) { return TOP_UP_REASON.equals(sample.getQcReason()); }