Validation Showing Inconsistent Number of Violations

Update – I think we figured out the cause of this. A few of the validation rules had the default category option combo specified in the right or left side validation formulas. After removing the default, it seems to be giving consistent results.

e.g. changed #{dataelementid.HllvX50cXC0}) to #{dataelementid} .

Still kind of puzzled about why this caused a problem, but it seems to be ok for now. J

Thanks,

Becky

image

···

From: Smith, Rebecca A.

Sent: Tuesday, April 10, 2018 1:28 PM

To: DHIS Developers dhis2-devs@lists.launchpad.net

Subject: Validation Showing Inconsistent Number of Violations

Hi dev team,

I’m trying to figure out an issue where I’m getting an inconsistent number of violations on each validation run. For example, I might get 5 violations when I click “run validation” on a data entry form the first time, but if I click it again, I get only 2 violations, and then the next time I get 3 violations, and so on. It happens with both the “Run validation” button on the data entry form and the /validation/dataset API call.

We recently upgraded from 2.25 to 2.28, and found this issue on 2.28 builds 927ddf9 and fd8e419. I haven’t been able to reproduce it with the existing validation rules on the DHIS2 Play demo site, so my best guess is that it might have something to do with the large number of data elements in our dataset (300+ data elements, or 2000+ individual data points if you include disaggregations) or the number of rules (4000+ in this system, 1000+ that apply to this dataset).

Has anyone else run into this? Is it a DHIS bug or something about this configuration? Any troubleshooting guidance would be extremely helpful!

Thank

Becky

Example:

I think it’s easiest to see from the API call, so I’ll include a set of screenshots below. I get a different number of errors each time I refresh it, even though nothing has changed on the data entry form.

  1. First time, I got one Result:

  2. Refreshed page – Now there are 5 Results:

  3. Refreshed page – 2 results

  4. And so on…

Becky Smith

Health Information Specialist

ICAP at Columbia University

Tel: 212.304.7109

Email: rs3524@cumc.columbia.edu

Hi Becky,

I’ve been looking into this. It seems that this can be a problem if you have both #{dataelementid.optioncomboid} and #{dataelementid} in the same validation rule run (either in the same rule or in different rules evaluated the same run), and if optioncomboid is the default category option combo. This problem has now been fixed in 2.29 build 24b5733, and we are working to see if we can backport it to 2.28 as well. Meanwhile, I am glad you found a way around it.

Cheers,

Jim

image

···

On Tue, Apr 10, 2018 at 3:36 PM, Smith, Rebecca A. rs3524@cumc.columbia.edu wrote:

Update – I think we figured out the cause of this. A few of the validation rules had the default category option combo specified in the right or left side validation formulas. After removing the default, it seems to be giving consistent results.

e.g. changed #{dataelementid.HllvX50cXC0}) to #{dataelementid} .

Still kind of puzzled about why this caused a problem, but it seems to be ok for now. J

Thanks,

Becky

From: Smith, Rebecca A.

Sent: Tuesday, April 10, 2018 1:28 PM

To: DHIS Developers dhis2-devs@lists.launchpad.net

Subject: Validation Showing Inconsistent Number of Violations

Hi dev team,

I’m trying to figure out an issue where I’m getting an inconsistent number of violations on each validation run. For example, I might get 5 violations when I click “run validation” on a data entry form the first time, but if I click it again, I get only 2 violations, and then the next time I get 3 violations, and so on. It happens with both the “Run validation” button on the data entry form and the /validation/dataset API call.

We recently upgraded from 2.25 to 2.28, and found this issue on 2.28 builds 927ddf9 and fd8e419. I haven’t been able to reproduce it with the existing validation rules on the DHIS2 Play demo site, so my best guess is that it might have something to do with the large number of data elements in our dataset (300+ data elements, or 2000+ individual data points if you include disaggregations) or the number of rules (4000+ in this system, 1000+ that apply to this dataset).

Has anyone else run into this? Is it a DHIS bug or something about this configuration? Any troubleshooting guidance would be extremely helpful!

Thank

Becky

Example:

I think it’s easiest to see from the API call, so I’ll include a set of screenshots below. I get a different number of errors each time I refresh it, even though nothing has changed on the data entry form.

  1. First time, I got one Result:

  2. Refreshed page – Now there are 5 Results:

  1. Refreshed page – 2 results
  1. And so on…

Becky Smith

Health Information Specialist

ICAP at Columbia University

Tel: 212.304.7109

Email: rs3524@cumc.columbia.edu


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Jim Grace
Core developer, DHIS 2

HISP US Inc.

http://www.dhis2.org

Thanks! This completely explains the inconsistent results we saw. We’ll make sure to stay consistent with #{dataelementid} format until we upgrade to 2.29 or get a 2.28 backport of the fix.

Thanks,

Becky

image

···

Hi Becky,

I’ve been looking into this. It seems that this can be a problem if you have both #{dataelementid.optioncomboid} and #{dataelementid} in the same validation rule run (either in the same rule or in different rules evaluated the same run), and if
optioncomboid is the default category option combo. This problem has now been fixed in 2.29 build 24b5733, and we are working to see if we can backport it to 2.28 as well. Meanwhile, I am glad you found a way around it.

Cheers,

Jim

On Tue, Apr 10, 2018 at 3:36 PM, Smith, Rebecca A. rs3524@cumc.columbia.edu wrote:

Update – I think we figured out the cause of this. A few of the validation rules had the default category option combo specified in the right or left side validation formulas. After removing the default, it seems to be giving consistent results.

e.g. changed #{dataelementid.HllvX50cXC0}) to #{dataelementid} .

Still kind of puzzled about why this caused a problem, but it seems to be ok for now. J

Thanks,

Becky

From: Smith, Rebecca A.

Sent: Tuesday, April 10, 2018 1:28 PM

To: DHIS Developers dhis2-devs@lists.launchpad.net

Subject: Validation Showing Inconsistent Number of Violations

Hi dev team,

I’m trying to figure out an issue where I’m getting an inconsistent number of violations on each validation run. For example, I might get 5 violations when I click “run validation” on a data entry form the first time, but if I click it again, I get only 2 violations, and then the next time I get 3 violations, and so on. It happens with both the “Run validation” button on the data entry form and the /validation/dataset API call.

We recently upgraded from 2.25 to 2.28, and found this issue on 2.28 builds 927ddf9 and fd8e419. I haven’t been able to reproduce it with the existing validation rules on the DHIS2 Play demo site, so my best guess is that it might have something to do with the large number of data elements in our dataset (300+ data elements, or 2000+ individual data points if you include disaggregations) or the number of rules (4000+ in this system, 1000+ that apply to this dataset).

Has anyone else run into this? Is it a DHIS bug or something about this configuration? Any troubleshooting guidance would be extremely helpful!

Thank

Becky

Example:

I think it’s easiest to see from the API call, so I’ll include a set of screenshots below. I get a different number of errors each time I refresh it, even though nothing has changed on the data entry form.

  1. First time, I got one Result:
  1. Refreshed page – Now there are 5 Results:
  1. Refreshed page – 2 results
  1. And so on…

Becky Smith

Health Information Specialist

ICAP at Columbia University

Tel: 212.304.7109

Email: rs3524@cumc.columbia.edu


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Jim Grace

Core developer, DHIS 2

HISP US Inc.

http://www.dhis2.org