Skip to content

Commit 2a0060a

Browse files
Probable case classification fix
1 parent 19af2d3 commit 2a0060a

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2204,6 +2204,18 @@ public void onCaseChanged(CaseDataDto existingCase, Case newCase, boolean syncSh
22042204
}
22052205
}
22062206

2207+
if (Objects.nonNull(existingCase)) {
2208+
// Contact with the source case known with the confirmed status. Github#13507 fix
2209+
boolean isConfirmedCaseExists = contactService.getAllByResultingCase(caseService.getByUuid(existingCase.getUuid())).stream().anyMatch(e -> CaseClassification.CONFIRMED == e.getCaze().getCaseClassification());
2210+
// If contact with source case is known by epidemiolist, && its classified as confirmed, then set epidemiological confirmation to YES
2211+
// Otherwise set to No
2212+
if ((YesNoUnknown.YES == newCase.getEpiData().getContactWithSourceCaseKnown() && isConfirmedCaseExists)) {
2213+
newCase.setEpidemiologicalConfirmation(YesNoUnknown.YES);
2214+
} else {
2215+
newCase.setEpidemiologicalConfirmation(YesNoUnknown.NO);
2216+
}
2217+
}
2218+
22072219
// Update follow-up
22082220
service.updateFollowUpDetails(newCase, existingCase != null && newCase.getFollowUpStatus() != existingCase.getFollowUpStatus());
22092221

0 commit comments

Comments
 (0)