Skip to content

Commit 11021ce

Browse files
committed
Fix duplication of flags
1 parent 8b56f13 commit 11021ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

patient-flags/src/main/java/org/openmrs/module/drools/patientflags/DroolsFlagEvaluator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ public class DroolsFlagEvaluator implements FlagEvaluator {
3131
public Boolean eval(Flag flag, Patient patient, Map<Object, Object> contextMap) {
3232
Cohort cohort = new Cohort();
3333
cohort.addMember(patient.getId());
34+
// clear stale context
35+
contextMap.remove(patient.getId());
3436
Cohort resultCohort = evalCohort(flag, cohort, contextMap);
3537
return !resultCohort.isEmpty();
3638
}

0 commit comments

Comments
 (0)