Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit d26e93c

Browse files
author
Jonas Cirotzki
committed
[SORMAS-Foundation#4247] introduce reportDateThreshold
1 parent 832af4c commit d26e93c

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseFacade.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,5 +205,7 @@ void saveBulkEditWithFacilities(
205205
boolean surveillanceOfficerChange,
206206
Boolean doTransfer);
207207

208+
List<CasePersonDto> getDuplicates(CasePersonDto casePerson, int reportDateThreshold);
209+
208210
List<CasePersonDto> getDuplicates(CasePersonDto casePerson);
209211
}

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3432,12 +3432,18 @@ public String getFirstCaseUuidWithOwnershipHandedOver(List<String> caseUuids) {
34323432
* * same externalToken
34333433
* * same first name, last name, date of birth, sex (null is considered equal to any sex), disease, reportDate (ignore time), district
34343434
*
3435+
* The reportDateThreshold allows to return duplicates where
3436+
* -reportDateThreshold <= match.reportDate <= reportDateThreshold
3437+
*
34353438
* @param casePerson
34363439
* - case and person
3440+
* @param reportDateThreshold
3441+
* - the range bounds on match.reportDate
34373442
* @return list of duplicate cases
34383443
*/
34393444
@Override
3440-
public List<CasePersonDto> getDuplicates(CasePersonDto casePerson) {
3445+
public List<CasePersonDto> getDuplicates(CasePersonDto casePerson, int reportDateThreshold) {
3446+
34413447
CaseDataDto searchCaze = casePerson.getCaze();
34423448
PersonDto searchPerson = casePerson.getPerson();
34433449

@@ -3529,6 +3535,11 @@ public List<CasePersonDto> getDuplicates(CasePersonDto casePerson) {
35293535
.collect(Collectors.toList());
35303536
}
35313537

3538+
@Override
3539+
public List<CasePersonDto> getDuplicates(CasePersonDto casePerson) {
3540+
return getDuplicates(casePerson, 0);
3541+
}
3542+
35323543
@LocalBean
35333544
@Stateless
35343545
public static class CaseFacadeEjbLocal extends CaseFacadeEjb {

0 commit comments

Comments
 (0)