-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Clean up evaluation call to rule engine
- Loading branch information
1 parent
578ed58
commit cfaf295
Showing
21 changed files
with
308 additions
and
422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
src/commonMain/kotlin/org/hisp/dhis/rules/RuleEngineContext.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
package org.hisp.dhis.rules | ||
|
||
import org.hisp.dhis.rules.models.Rule | ||
import org.hisp.dhis.rules.models.RuleEnrollment | ||
import org.hisp.dhis.rules.models.RuleEvent | ||
import org.hisp.dhis.rules.models.RuleVariable | ||
|
||
data class RuleEngineContext( | ||
val rules: List<Rule>, | ||
val ruleVariables: List<RuleVariable>, | ||
val ruleVariables: List<RuleVariable> = emptyList(), | ||
val events: List<RuleEvent> = emptyList(), | ||
val enrollment: RuleEnrollment? = null, | ||
val supplementaryData: Map<String, List<String>> = emptyMap(), | ||
val constantsValues: Map<String, String> = emptyMap(), | ||
val ruleEngineIntent: RuleEngineIntent = RuleEngineIntent.EVALUATION | ||
val constantsValues: Map<String, String> = emptyMap() | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 0 additions & 36 deletions
36
src/commonMain/kotlin/org/hisp/dhis/rules/RuleEngineIntent.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.