You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sormas-backend/src/main/java/de/symeda/sormas/backend/externalmessage/labmessage/AutomaticLabMessageProcessor.java
// special case for LATENT_TUBERCULOSIS: if there are more caseUuids and we have tuberculosis cases we need to give priority to the tuberculosis cases
321
-
if (disease == Disease.LATENT_TUBERCULOSIS && autoAssignCaseUuids.size() > 1) {
322
-
// sort the cases by disease giving priority to tuberculosis cases and take the first one (the one with the highest priority and most recent report date)
// special case for LATENT_TUBERCULOSIS: if there are more caseUuids and we have tuberculosis cases we need to give priority to the tuberculosis cases
321
+
if (disease == Disease.LATENT_TUBERCULOSIS && autoAssignCaseUuids.size() > 1) {
322
+
// sort the cases by disease giving priority to tuberculosis cases and take the first one (the one with the highest priority and most recent report date)
323
+
// we can't use the autoAssignCaseUuids order because it may have at position 0 a case with LATENT_TUBERCULOSIS and we need to prioritize TUBERCULOSIS cases
Copy file name to clipboardExpand all lines: sormas-backend/src/test/java/de/symeda/sormas/backend/externalmessage/labmessage/AutomaticLabMessageProcessorTest.java
+11-10Lines changed: 11 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,6 @@
27
27
importjava.util.Date;
28
28
importjava.util.List;
29
29
importjava.util.concurrent.ExecutionException;
30
-
importjava.util.concurrent.TimeUnit;
31
30
importjava.util.function.Consumer;
32
31
importjava.util.stream.Collectors;
33
32
@@ -301,8 +300,8 @@ public void testThresholdAgainstSampleDate() throws ExecutionException, Interrup
@@ -380,8 +375,14 @@ public void testProcessWithExistingPersonAndCaseWithBySampleDate(final String co
380
375
381
376
cases = getCaseFacade().getAllAfter(newDate(0));
382
377
assertThat("Case count should not have increased, sample date theshold was set in valid range", cases, hasSize(2));
383
-
assertThat("Sample count should have incresed, new sample for existing case.", sampleCountAfterStep3, is(greaterThan(sampleCountBeforeStep3)));
384
-
assertThat("Case UUID should be the same as the result of the previous step (result should be added to existing case).", step3ResultCaseUuid, is(step2ResultCaseUuid));
378
+
assertThat(
379
+
"Sample count should have incresed, new sample for existing case.",
380
+
sampleCountAfterStep3,
381
+
is(greaterThan(sampleCountBeforeStep3)));
382
+
assertThat(
383
+
"Case UUID should be the same as the result of the previous step (result should be added to existing case).",
0 commit comments