diff --git a/packages/openchs-android/src/service/RuleEvaluationService.js b/packages/openchs-android/src/service/RuleEvaluationService.js index c8153392c..83e86dc67 100644 --- a/packages/openchs-android/src/service/RuleEvaluationService.js +++ b/packages/openchs-android/src/service/RuleEvaluationService.js @@ -36,6 +36,7 @@ import IndividualService from "./IndividualService"; import EncounterService from "./EncounterService"; import EntityService from "./EntityService"; import * as rulesConfig from "rules-config"; +import {EditFormRuleResponse} from "rules-config"; import moment from "moment"; import GroupSubjectService from "./GroupSubjectService"; import ProgramService from "./program/ProgramService"; @@ -45,7 +46,7 @@ import MessageService from './MessageService'; import {Groups, ReportCardResult, NestedReportCardResult} from "openchs-models"; import {JSONStringify} from "../utility/JsonStringify"; import UserInfoService from "./UserInfoService"; -import {EditFormRuleResponse} from "rules-config"; +import PrivilegeService from './PrivilegeService'; function getImports() { return {rulesConfig, common, lodash, moment, motherCalculations, log: console.log}; @@ -838,7 +839,7 @@ class RuleEvaluationService extends BaseService { getCommonParams() { const user = this.getService(UserInfoService).getUserInfo(); - const myUserGroups = this.getService(EntityService).loadAll(Groups.schema.name); + const myUserGroups = this.getService(PrivilegeService).ownedGroups(); return { user, myUserGroups }; }