All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.org.hisp.dhis.rules.api.RuleEngine.kt Maven / Gradle / Ivy

package org.hisp.dhis.rules.api

import org.hisp.dhis.rules.engine.DefaultRuleEngine
import org.hisp.dhis.rules.models.*
import kotlin.jvm.JvmStatic

interface RuleEngine {
    fun validate(expression: String, dataItemStore: Map): RuleValidationResult
    fun validateDataFieldExpression(expression: String, dataItemStore: Map): RuleValidationResult
    fun evaluateAll(enrollmentTarget: RuleEnrollment?, eventsTarget: List, executionContext: RuleEngineContext): List
    fun evaluate(target: RuleEnrollment, ruleEvents: List, executionContext: RuleEngineContext): List
    fun evaluate(target: RuleEvent, ruleEnrollment: RuleEnrollment?, ruleEvents: List, executionContext: RuleEngineContext): List

    companion object {
        @JvmStatic
        fun getInstance(): RuleEngine {
            return DefaultRuleEngine()
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy