From 51f037a8777a219653622dbc1b9c28d2eaa0651a Mon Sep 17 00:00:00 2001 From: Vivek Singh Date: Thu, 28 Dec 2023 16:40:24 +0530 Subject: [PATCH] avni-client#1257 - ! in cancel as well --- .../src/action/program/ProgramEncounterCancelState.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }