← Back to team overview

dhis2-users team mailing list archive

[validation rules] Validating an entry based on last period's value of a given data element

 

Dear all,

I am having difficulty creating a validation rule that checks an entry (data element) with the last period's value of the same data element. I read the documentation and noticed 18.7.1.1. About sliding windows, a feature that I think might be helpful (https://docs.dhis2.org/2.27/en/user/html/manage_validation_rule.html ). However, there is no clear guide on how to use/set it up. If I am on the right track, does anyone know how to use it?

Scenario:

              Data Entry:
                             Period 0: Data element “Malaria” [Malaria_Period_0] has value 10
                             Period 1: Data element “Malaria” [Malaria_Period_1] has value 20
                             Period 2: Data element “Malaria” [Malaria_Period_2] has value 30

Validation rule to create: Current data element value = last period’s data element value
Period 1: Checks “Malaria_Period_1” = “Malaria_Period_0”
                             Period 2: Checks “Malaria_Period_2” = “Malaria_Period_1”

Info:
DHIS2 version: 2.27
              Domain type: Aggregate

Any help is much appreciated.

Thanks,
Jean