Data Sets - Data Elements - Min and max limits


Related to Data Sets, I noticed that the Min and max limits for a data element is related to the OU where they are applied. For example, data_element1 can have Min 5-Max15 inside the OU Ngelehun CHC, and Min 30-Max75 inside the OU Njandama MCHP.

Question1: Is there any way to know the Data Elements that have Min and max limits and where are they set (OU)? Main idea is to know and control these min/max values.

Also, I noticed that inside Android app, the Min and max limits are not enforced for the Data Element inside the Data Set. I can put any value inside the data element and min-max is not applied.

Question2: Am I doing something wrong? Is this a bug?

Question3: Only to know if this possibility exists: For Data Elements belonging to Datasets, how to restrict the input data in the same way as we do for programs with program rules?
For example, data_element2 of type (char) < 30chars, or data_element3 of type (date) > 2018, as an example. I checked Field mask, but it is much more limited than program rules.

Thanks a lot for your time.

Hello @kfeina . This option is not supported in Android (yet?) [ANDROAPP-1171] - Jira . This is the first time I hear the community asking for it, maybe you want to add your use case in the JIRA issue?

Regarding your general question, you would probably want to define data quality (validation rules) as explained here DHIS2 User Manual - DHIS2 Documentation

1 Like

Thanks @kfeina ! I would like to add some info for Question 1.

You can find all the validation rules in your instances using the endpoint instance-URL/api/validationRules and for a specific dataset you can include instance-URL/api/validationRules/data-set-ID Read more about using the validationRules api here.

Hello @jaime.bosque. I don’t have a use case for this. Only that I was playing with it and found that they behave different Android / Data Entry.

Thanks for your time.

1 Like