Skip to content

Commit

Permalink
put list of envs back
Browse files Browse the repository at this point in the history
  • Loading branch information
enricocolasante committed Dec 6, 2023
1 parent acb01d5 commit 8ebeff4
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/main/java/org/hisp/dhis/rules/utils/RuleEngineUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,27 @@ object RuleEngineUtils {
const val ENV_VAR_PROGRAM_NAME = "program_name"
const val ENV_VAR_ENVIRONMENT = "environment"
const val ENV_VAR_OU_CODE = "orgunit_code"

// new environment variable must be added in this map
val ENV_VARIABLES = Map.ofEntries(
Map.entry(ENV_VAR_COMPLETED_DATE, ItemValueType.DATE),
Map.entry(ENV_VAR_CURRENT_DATE, ItemValueType.DATE),
Map.entry(ENV_VAR_EVENT_DATE, ItemValueType.DATE),
Map.entry(ENV_VAR_INCIDENT_DATE, ItemValueType.DATE),
Map.entry(ENV_VAR_ENROLLMENT_DATE, ItemValueType.DATE),
Map.entry(ENV_VAR_DUE_DATE, ItemValueType.DATE),
Map.entry(ENV_VAR_EVENT_COUNT, ItemValueType.NUMBER),
Map.entry(ENV_VAR_TEI_COUNT, ItemValueType.NUMBER),
Map.entry(ENV_VAR_ENROLLMENT_COUNT, ItemValueType.NUMBER),
Map.entry(ENV_VAR_EVENT_ID, ItemValueType.NUMBER),
Map.entry(ENV_VAR_PROGRAM_STAGE_ID, ItemValueType.NUMBER),
Map.entry(ENV_VAR_ENROLLMENT_ID, ItemValueType.NUMBER),
Map.entry(ENV_VAR_ENROLLMENT_STATUS, ItemValueType.TEXT),
Map.entry(ENV_VAR_EVENT_STATUS, ItemValueType.TEXT),
Map.entry(ENV_VAR_OU, ItemValueType.TEXT),
Map.entry(ENV_VAR_OU_CODE, ItemValueType.TEXT),
Map.entry(ENV_VAR_ENVIRONMENT, ItemValueType.TEXT),
Map.entry(ENV_VAR_PROGRAM_NAME, ItemValueType.TEXT),
Map.entry(ENV_VAR_PROGRAM_STAGE_NAME, ItemValueType.TEXT)
)
}

0 comments on commit 8ebeff4

Please sign in to comment.