This feature helps ensure data quality on chosen variables. Based on the rules defined for those variables, a run for the patients yields a list of patients for whom the data is incomplete/erroneous. The results are displayed as a list of all data inconsistencies on a dashboard called the Data Quality Dashboard.
The rules can be customized by an implementer (Steps for the same will be updated later). These rules can be sometimes very complex and therefore the rules can be written in java/sql/groovy depending on the complexity.
The data integrity task is scheduled to run every day at 12:00AM by default. To change this setting, go to OpenMRS Administration > Manage Scheduler > click on Data Integrity Task link > Schedule and change the repeat interval .
2. Internationalize Data integrity module name
Add the value for key in respective home/ locale_${en,fr, .. }.json.
To configure columns to search on the DQ Dashboard, add the column keys to the list in searchColumns. The search facility can be enabled on all columns.
The configuration below will enable search on columns Treatment Reg No, Name of the patient.
The rules written in Java can be found in this folder in the repository : openmrs-modulebahmniendtb/api/src/main/java/org/openmrs/module/bahmniendtb/dataintegrity/rules
Every rule is written as a Java class that implements RuleDefn<PatientProgram> interface.
The logic for the rule is written in the evaluate method.
The rule can be inserted into the dataintegrity_rule table as below :
Support for rule_group and schedule tables so that certain rules can be grouped and can be assigned specific groups to a different schedules. (open for discussion)
Building ability to run rules per patient and making rule groups.