diff --git a/packages/openchs-android/src/action/program/ProgramEncounterCancelState.js b/packages/openchs-android/src/action/program/ProgramEncounterCancelState.js index 78311898f..e6b9ff5f2 100644 --- a/packages/openchs-android/src/action/program/ProgramEncounterCancelState.js +++ b/packages/openchs-android/src/action/program/ProgramEncounterCancelState.js @@ -62,7 +62,7 @@ class ProgramEncounterCancelState extends AbstractDataEntryState { } getNextScheduledVisits(ruleService, context) { - const nextScheduledVisits = ruleService.getNextScheduledVisits(this.getEntity(), this.getEntityType()).filter((x) => this.isAlreadyScheduled(this.programEncounter.programEnrolment, x)); + const nextScheduledVisits = ruleService.getNextScheduledVisits(this.getEntity(), this.getEntityType()).filter((x) => !this.isAlreadyScheduled(this.programEncounter.programEnrolment, x)); return context.get(IndividualService).validateAndInjectOtherSubjectForScheduledVisit(this.getEntity().individual, nextScheduledVisits); }