Skip to content

Commit

Permalink
Revert "Revert "#1033 | Use baseservice method instead of convoluted …
Browse files Browse the repository at this point in the history
…logic""

This reverts commit 717630a.
  • Loading branch information
himeshr committed Jul 24, 2023
1 parent 2a2d134 commit a00015e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions packages/openchs-android/src/service/IndividualService.js
Original file line number Diff line number Diff line change
Expand Up @@ -673,11 +673,6 @@ class IndividualService extends BaseService {
.sorted('name');
}

getSubjectByUUIDAndType(uuid, subjectTypeName) {
return this.getAllNonVoided()
.find('uuid = $0 and subjectType.name = $1', uuid, subjectTypeName);
}

findAllWithMobileNumber(mobileNumber) {
return this.getAllNonVoided()
.filter(ind => _.toString(ind.getMobileNumber()).slice(-10) === _.toString(mobileNumber).slice(-10));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class IndividualServiceFacade {
.getSubjectsInLocation(addressLevel, subjectTypeName).map(_.identity);
}

getSubjectByUUIDAndType(uuid, subjectTypeName) {
getSubjectByUUID(uuid) {
return GlobalContext.getInstance().beanRegistry.getService(IndividualService)
.getSubjectByUUIDAndType(uuid, subjectTypeName).map(_.identity);
.findByUUID(uuid);
}
}

Expand Down

0 comments on commit a00015e

Please sign in to comment.