4.2 Validation rule analysis

4.2.1 About validation rule analysis

A validation rule is based on an expression which defines a relationship between data element values. The expression forms a condition which should assert that certain logical criteria are met.

The expression consist of:

  • a left side

  • a right side

  • an operator

A validation rule could assert that “Suspected malaria cases tested” >= “Confirmed malaria cases”.

The validation rule analysis tests validation rules against the data registered in the system. Validation violations are reported when the condition defined in the validation rule expression is not met, which means when the condition is false.

You can configure a validation rule analysis to automatically send out information about validation violations to selected user groups. These messages are called validation notifications and you create them in the Maintenance app. Validation notifications are sent via the internal DHIS 2 messaging system.

4.2.2 Workflow

  1. In the Maintenance app, create validation rules and validation rule groups.

  2. (Optional) In the Maintenance app, create validation notifications.

  3. Run the validation rule analysis, either automatically or manually.

    • In the Data Administration app, you schedule the validation rule analysis to run automatically for all validation rules included in one or several validation notifications. After the system has run the analysis, you’ll see the validation violations (if any) in the validation notifications sent via the internal DHIS 2 messaging system.

    • In the Data Quality app, you run the validation rule analysis manually for selected validation rules. After the analysis process has finished, you’ll see a list of validation violations (if any).

4.2.3 Schedule a validation rule analysis to run automatically

Note

Only validation rules that are included in one or several validation notifications will be a part of the validation rule analysis. If there is no corresponding validation notification for a validation rule, no notification will be sent.

Note

While running validation rule analysis automatically, any results not already persisted, will be persisted during this run. Persisted results can currently only be accessed trough the API. Consult the developers guide for more information about how persisted validation rule violations can be accessed.

  1. Verify that you have created all the validation rules, validation rule groups and validation notifications you need.

  2. Open the Data Administration app and click Scheduling .

  3. If scheduling is active, click Stop .

  4. In the Data monitoring section, select All daily .

  5. Click Start .

4.2.4 Run a validation rule analysis manually

  1. Verify that you have created all the validation rules, validation rule groups and validation notifications you need.

  2. Open the Data Quality app and click Validation rule analysis .

  3. Select Start date and End date .

  4. Select which Validation rule group you want to include in the analysis.

    You can select all validation rules or all validation rules from a single validation rule group.

  5. (Optional) Select Send notifications to trigger validation notifications.

    Note

    If you want to send out validation notifications, you must first create them in the Maintenance app.

  6. (Optional) Select Persist new results to persist any non-persisted results found during the analysis

  7. Select a Parent organisation unit .

  8. Click Validate .

    The analysis process duration depends on the amount of data that is being analysed. If there are no violations of the validation rules, you’ll see a message saying Validation passed successfully . If there are validation violations, they will be presented in a list.

  9. (Optional) Click the show details icon to get more information about a validation violation. In the pop-up window you’ll find information about the data elements included in the validation rules and their corresponding data values. You can use this information to identify the source of the validation rule violation.

  10. (Optional) Click Download as PDF , Download as Excel or Download as CSV to download the validation violations list in PDF, Excel or CSV formats.

4.2.5 See also