Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add date service to rules engine facts map #3519

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import org.smartregister.fhircore.engine.domain.model.RepositoryResourceData
import org.smartregister.fhircore.engine.domain.model.RuleConfig
import org.smartregister.fhircore.engine.domain.model.ServiceMemberIcon
import org.smartregister.fhircore.engine.domain.model.ServiceStatus
import org.smartregister.fhircore.engine.rulesengine.services.DateService
import org.smartregister.fhircore.engine.rulesengine.services.LocationService
import org.smartregister.fhircore.engine.util.DispatcherProvider
import org.smartregister.fhircore.engine.util.SharedPreferenceKey
Expand Down Expand Up @@ -102,6 +103,7 @@ constructor(
put(DATA, mutableMapOf<String, Any>().apply { putAll(params) })
put(LOCATION_SERVICE, locationService)
put(SERVICE, rulesEngineService)
put(DATE_SERVICE, DateService)
}
if (repositoryResourceData != null) {
with(repositoryResourceData) {
Expand Down Expand Up @@ -710,6 +712,7 @@ constructor(
companion object {
private const val SERVICE = "service"
private const val LOCATION_SERVICE = "locationService"
private const val DATE_SERVICE = "dateService"
private const val INCLUSIVE_SIX_DIGIT_MINIMUM = 100000
private const val INCLUSIVE_SIX_DIGIT_MAXIMUM = 999999
private const val DEFAULT_REGEX = "(?<=^|,)[\\s,]*(\\w[\\w\\s]*)(?=[\\s,]*$|,)"
Expand Down
Loading