Setting up validation notifications for data sets


Documentation

https://docs.dhis2.org/en/develop/using-the-api/dhis-core-version-master/data-validation.html

Questions

  1. Can you configure them to send a notification if a validation rule fails when a user clicks on “Run validation” in the data entry form?
  2. I have set something up, but the user isn’t receiving a notification when the validation rule fails. Am I missing something in the configuration or the concept of these notifications?
  3. Does the priority of the validation rule matter?
  4. Are notifications sent only through the Data Quality app when validation is run?

Answers

  1. Check that the system can send emails. There are several ways e.g. go to system settings > Email and send yourself a test email (ensure your email is registered in the currently logged in user’s profile).
  2. The notifications may only be sent as DHIS 2 messages.There is a validation tab in Messages app. Confirm if users receive an email for every DHIS2 message.  Alternatively you can check the system cron jobs under scheduler; edit the cron job called Validation result notification to see the last execution status
  3. Priority shouldn’t matter
  4. Are notifications sent only through the Data Quality app when validation is run? You can also send notifications by sending to POST /api/33/validation/sendNotifications, Only unsent results are sent using this endpoint.