Skip to content

Commit

Permalink
avniproject/avni-client#1365 | Remove duplicitous SyncEntityName.Enro…
Browse files Browse the repository at this point in the history
…lment
  • Loading branch information
himeshr committed May 2, 2024
1 parent 3b6893b commit 9b89aa3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public boolean isEncounter() {
}

public boolean isParentOrSelfEnrolment() {
return Arrays.asList(SyncEntityName.Enrolment, SyncEntityName.Checklist, SyncEntityName.ChecklistItem).contains(syncEntityName);
return Arrays.asList(SyncEntityName.ProgramEnrolment, SyncEntityName.Checklist, SyncEntityName.ChecklistItem).contains(syncEntityName);
}

public boolean isProgramEncounter() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public enum SyncEntityName {
Subject,
ProgramEnrolment,
Individual,
Enrolment,
Encounter,
ProgramEncounter,
ChecklistItem,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public SlicedResources<Resource<ProgramEnrolment>> getProgramEnrolmentsByOperati
FormMapping formMapping = formMappingService.find(program, FormType.ProgramEnrolment);
if (formMapping == null)
throw new Exception(String.format("No form mapping found for program %s", program.getName()));
return wrap(scopeBasedSyncService.getSyncResultsBySubjectTypeRegistrationLocationAsSlice(programEnrolmentRepository, userService.getCurrentUser(), lastModifiedDateTime, now, program.getId(), pageable, formMapping.getSubjectType(), SyncEntityName.Enrolment));
return wrap(scopeBasedSyncService.getSyncResultsBySubjectTypeRegistrationLocationAsSlice(programEnrolmentRepository, userService.getCurrentUser(), lastModifiedDateTime, now, program.getId(), pageable, formMapping.getSubjectType(), SyncEntityName.ProgramEnrolment));
}
}

Expand All @@ -116,7 +116,7 @@ public PagedResources<Resource<ProgramEnrolment>> getProgramEnrolmentsByOperatin
FormMapping formMapping = formMappingService.find(program, FormType.ProgramEnrolment);
if (formMapping == null)
throw new Exception(String.format("No form mapping found for program %s", program.getName()));
return wrap(scopeBasedSyncService.getSyncResultsBySubjectTypeRegistrationLocation(programEnrolmentRepository, userService.getCurrentUser(), lastModifiedDateTime, now, program.getId(), pageable, formMapping.getSubjectType(), SyncEntityName.Enrolment));
return wrap(scopeBasedSyncService.getSyncResultsBySubjectTypeRegistrationLocation(programEnrolmentRepository, userService.getCurrentUser(), lastModifiedDateTime, now, program.getId(), pageable, formMapping.getSubjectType(), SyncEntityName.ProgramEnrolment));
}
}

Expand Down

0 comments on commit 9b89aa3

Please sign in to comment.