Skip to content

Commit

Permalink
#1441 - fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
petmongrels committed Jul 2, 2024
1 parent ec11afb commit d0d3282
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/openchs-android/src/service/IndividualService.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ class IndividualService extends BaseService {
dateMorning);

programEncounters = applyConfiguredFilters(programEncounters, programEncounterCriteria);
programEncounters = applyUserFilters(programEncounters, reportFilters, addressFilter, genders, ProgramEncounter.schema.name, this.getService(CustomFilterService));
programEncounters = applyUserFilters(programEncounters, reportFilters, ProgramEncounter.schema.name, this.getService(CustomFilterService));

programEncounters = programEncounters.map((enc) => {
const individual = enc.programEnrolment.individual;
Expand Down Expand Up @@ -393,7 +393,7 @@ class IndividualService extends BaseService {
dateMorning);

encounters = applyConfiguredFilters(encounters, encounterCriteria);
encounters = applyUserFilters(encounters, reportFilters, addressFilter, genders, Encounter.schema.name, this.getService(CustomFilterService));
encounters = applyUserFilters(encounters, reportFilters, Encounter.schema.name, this.getService(CustomFilterService));

encounters = encounters.map((enc) => {
const individual = enc.individual;
Expand Down Expand Up @@ -455,10 +455,6 @@ class IndividualService extends BaseService {
'AND encounterDateTime >= $1 ',
tillDate,
fromDate);
if (!_.isEmpty(programEncounterCriteria)) {
programEncounters = programEncounters.filtered(`${programEncounterCriteria}`);
}
programEncounters = RealmQueryService.filterBasedOnAddress(ProgramEncounter.schema.name, programEncounters, addressFilter);

programEncounters = programEncounters.map((enc) => {
const individual = enc.programEnrolment.individual;
Expand Down

0 comments on commit d0d3282

Please sign in to comment.