← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18484: Run data integrity checks as asynchronous task. Added DataIntegrityReport object used to store an...

 

Merge authors:
  Halvdan Hoem Grelland (halvdanhg)
------------------------------------------------------------
revno: 18484 [merge]
committer: Halvdan Hoem Grelland <halvdanhg@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-03-05 14:41:43 +0100
message:
  Run data integrity checks as asynchronous task. Added DataIntegrityReport object used to store and serve task result, fixed minor intialization bug in collection of collections reeturned from DataIntegrityService.
removed:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/dataintegrity/GetDataIntegrityAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataIntegrityForm.vm
added:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataintegrity/DataIntegrityReport.java
  dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/tasks/
  dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/tasks/DataIntegrityTask.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataIntegrityController.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/dataintegrity/GetDataIntegrityReportAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataIntegrity.vm
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/scheduling/TaskCategory.java
  dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/DefaultDataIntegrityService.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemController.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataIntegrity.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseDataIntegrity.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataintegrity/DataIntegrityReport.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataintegrity/DataIntegrityReport.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataintegrity/DataIntegrityReport.java	2015-03-04 16:26:10 +0000
@@ -0,0 +1,330 @@
+package org.hisp.dhis.dataintegrity;
+
+/*
+ * Copyright (c) 2004-2015, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataelement.DataElementGroup;
+import org.hisp.dhis.dataelement.DataElementOperand;
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.dataset.Section;
+import org.hisp.dhis.indicator.Indicator;
+import org.hisp.dhis.indicator.IndicatorGroup;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.period.Period;
+import org.hisp.dhis.validation.ValidationRule;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedMap;
+
+/**
+ * @author Halvdan Hoem Grelland <halvdanhg@xxxxxxxxx>
+ */
+public class DataIntegrityReport
+{
+    private List<DataElement> dataElementsWithoutDataSet;
+
+    private List<DataElement> dataElementsWithoutGroups;
+
+    private Map<DataElement, Collection<DataSet>> dataElementsAssignedToDataSetsWithDifferentPeriodTypes;
+
+    private SortedMap<DataElement, Collection<DataElementGroup>> dataElementsViolatingExclusiveGroupSets;
+
+    private SortedMap<DataSet, Collection<DataElement>> dataElementsInDataSetNotInForm;
+
+    private Map<DataSet, Set<DataElementOperand>> categoryOptionCombosNotInDataElementCategoryCombo;
+
+    private List<DataSet> dataSetsNotAssignedToOrganisationUnits;
+
+    private List<Section> sectionsWithInvalidCategoryCombinations;
+
+    private Collection<Collection<Indicator>> indicatorsWithIdenticalFormulas;
+
+    private List<Indicator> indicatorsWithoutGroups;
+
+    private Map<Indicator, String> invalidIndicatorNumerators;
+
+    private Map<Indicator, String> invalidIndicatorDenominators;
+
+    private SortedMap<Indicator, Collection<IndicatorGroup>> indicatorsViolatingExclusiveGroupSets;
+
+    private List<Period> duplicatePeriods;
+
+    private List<OrganisationUnit> organisationUnitsWithCyclicReferences;
+
+    private List<OrganisationUnit> orphanedOrganisationUnits;
+
+    private List<OrganisationUnit> organisationUnitsWithoutGroups;
+
+    private SortedMap<OrganisationUnit, Collection<OrganisationUnitGroup>> organisationUnitsViolatingExclusiveGroupSets;
+
+    private List<OrganisationUnitGroup> organisationUnitGroupsWithoutGroupSets;
+
+    private List<ValidationRule> validationRulesWithoutGroups;
+
+    private Map<ValidationRule, String> invalidValidationRuleLeftSideExpressions;
+
+    private Map<ValidationRule, String> invalidValidationRuleRightSideExpressions;
+
+    //-------------------------------------------------------------------------
+    // Constructors
+    //-------------------------------------------------------------------------
+
+    public DataIntegrityReport()
+    {
+
+    }
+
+    //-------------------------------------------------------------------------
+    // Getters and setters
+    //-------------------------------------------------------------------------
+
+    public List<DataElement> getDataElementsWithoutDataSet()
+    {
+        return dataElementsWithoutDataSet;
+    }
+
+    public void setDataElementsWithoutDataSet( List<DataElement> dataElementsWithoutDataSet )
+    {
+        this.dataElementsWithoutDataSet = dataElementsWithoutDataSet;
+    }
+
+    public List<DataElement> getDataElementsWithoutGroups()
+    {
+        return dataElementsWithoutGroups;
+    }
+
+    public void setDataElementsWithoutGroups( List<DataElement> dataElementsWithoutGroups )
+    {
+        this.dataElementsWithoutGroups = dataElementsWithoutGroups;
+    }
+
+    public Map<DataElement, Collection<DataSet>> getDataElementsAssignedToDataSetsWithDifferentPeriodTypes()
+    {
+        return dataElementsAssignedToDataSetsWithDifferentPeriodTypes;
+    }
+
+    public void setDataElementsAssignedToDataSetsWithDifferentPeriodTypes( Map<DataElement, Collection<DataSet>> dataElementsAssignedToDataSetsWithDifferentPeriodTypes )
+    {
+        this.dataElementsAssignedToDataSetsWithDifferentPeriodTypes = dataElementsAssignedToDataSetsWithDifferentPeriodTypes;
+    }
+
+    public SortedMap<DataElement, Collection<DataElementGroup>> getDataElementsViolatingExclusiveGroupSets()
+    {
+        return dataElementsViolatingExclusiveGroupSets;
+    }
+
+    public void setDataElementsViolatingExclusiveGroupSets( SortedMap<DataElement, Collection<DataElementGroup>> dataElementsViolatingExclusiveGroupSets )
+    {
+        this.dataElementsViolatingExclusiveGroupSets = dataElementsViolatingExclusiveGroupSets;
+    }
+
+    public SortedMap<DataSet, Collection<DataElement>> getDataElementsInDataSetNotInForm()
+    {
+        return dataElementsInDataSetNotInForm;
+    }
+
+    public void setDataElementsInDataSetNotInForm( SortedMap<DataSet, Collection<DataElement>> dataElementsInDataSetNotInForm )
+    {
+        this.dataElementsInDataSetNotInForm = dataElementsInDataSetNotInForm;
+    }
+
+    public Map<DataSet, Set<DataElementOperand>> getCategoryOptionCombosNotInDataElementCategoryCombo()
+    {
+        return categoryOptionCombosNotInDataElementCategoryCombo;
+    }
+
+    public void setCategoryOptionCombosNotInDataElementCategoryCombo( Map<DataSet, Set<DataElementOperand>> categoryOptionCombosNotInDataElementCategoryCombo )
+    {
+        this.categoryOptionCombosNotInDataElementCategoryCombo = categoryOptionCombosNotInDataElementCategoryCombo;
+    }
+
+    public List<DataSet> getDataSetsNotAssignedToOrganisationUnits()
+    {
+        return dataSetsNotAssignedToOrganisationUnits;
+    }
+
+    public void setDataSetsNotAssignedToOrganisationUnits( List<DataSet> dataSetsNotAssignedToOrganisationUnits )
+    {
+        this.dataSetsNotAssignedToOrganisationUnits = dataSetsNotAssignedToOrganisationUnits;
+    }
+
+    public List<Section> getSectionsWithInvalidCategoryCombinations()
+    {
+        return sectionsWithInvalidCategoryCombinations;
+    }
+
+    public void setSectionsWithInvalidCategoryCombinations( List<Section> sectionsWithInvalidCategoryCombinations )
+    {
+        this.sectionsWithInvalidCategoryCombinations = sectionsWithInvalidCategoryCombinations;
+    }
+
+    public Collection<Collection<Indicator>> getIndicatorsWithIdenticalFormulas()
+    {
+        return indicatorsWithIdenticalFormulas;
+    }
+
+    public void setIndicatorsWithIdenticalFormulas( Collection<Collection<Indicator>> indicatorsWithIdenticalFormulas )
+    {
+        this.indicatorsWithIdenticalFormulas = indicatorsWithIdenticalFormulas;
+    }
+
+    public List<Indicator> getIndicatorsWithoutGroups()
+    {
+        return indicatorsWithoutGroups;
+    }
+
+    public void setIndicatorsWithoutGroups( List<Indicator> indicatorsWithoutGroups )
+    {
+        this.indicatorsWithoutGroups = indicatorsWithoutGroups;
+    }
+
+    public Map<Indicator, String> getInvalidIndicatorNumerators()
+    {
+        return invalidIndicatorNumerators;
+    }
+
+    public void setInvalidIndicatorNumerators( Map<Indicator, String> invalidIndicatorNumerators )
+    {
+        this.invalidIndicatorNumerators = invalidIndicatorNumerators;
+    }
+
+    public Map<Indicator, String> getInvalidIndicatorDenominators()
+    {
+        return invalidIndicatorDenominators;
+    }
+
+    public void setInvalidIndicatorDenominators( Map<Indicator, String> invalidIndicatorDenominators )
+    {
+        this.invalidIndicatorDenominators = invalidIndicatorDenominators;
+    }
+
+    public SortedMap<Indicator, Collection<IndicatorGroup>> getIndicatorsViolatingExclusiveGroupSets()
+    {
+        return indicatorsViolatingExclusiveGroupSets;
+    }
+
+    public void setIndicatorsViolatingExclusiveGroupSets( SortedMap<Indicator, Collection<IndicatorGroup>> indicatorsViolatingExclusiveGroupSets )
+    {
+        this.indicatorsViolatingExclusiveGroupSets = indicatorsViolatingExclusiveGroupSets;
+    }
+
+    public List<Period> getDuplicatePeriods()
+    {
+        return duplicatePeriods;
+    }
+
+    public void setDuplicatePeriods( List<Period> duplicatePeriods )
+    {
+        this.duplicatePeriods = duplicatePeriods;
+    }
+
+    public List<OrganisationUnit> getOrganisationUnitsWithCyclicReferences()
+    {
+        return organisationUnitsWithCyclicReferences;
+    }
+
+    public void setOrganisationUnitsWithCyclicReferences( List<OrganisationUnit> organisationUnitsWithCyclicReferences )
+    {
+        this.organisationUnitsWithCyclicReferences = organisationUnitsWithCyclicReferences;
+    }
+
+    public List<OrganisationUnit> getOrphanedOrganisationUnits()
+    {
+        return orphanedOrganisationUnits;
+    }
+
+    public void setOrphanedOrganisationUnits( List<OrganisationUnit> orphanedOrganisationUnits )
+    {
+        this.orphanedOrganisationUnits = orphanedOrganisationUnits;
+    }
+
+    public List<OrganisationUnit> getOrganisationUnitsWithoutGroups()
+    {
+        return organisationUnitsWithoutGroups;
+    }
+
+    public void setOrganisationUnitsWithoutGroups( List<OrganisationUnit> organisationUnitsWithoutGroups )
+    {
+        this.organisationUnitsWithoutGroups = organisationUnitsWithoutGroups;
+    }
+
+    public SortedMap<OrganisationUnit, Collection<OrganisationUnitGroup>> getOrganisationUnitsViolatingExclusiveGroupSets()
+    {
+        return organisationUnitsViolatingExclusiveGroupSets;
+    }
+
+    public void setOrganisationUnitsViolatingExclusiveGroupSets( SortedMap<OrganisationUnit, Collection<OrganisationUnitGroup>> organisationUnitsViolatingExclusiveGroupSets )
+    {
+        this.organisationUnitsViolatingExclusiveGroupSets = organisationUnitsViolatingExclusiveGroupSets;
+    }
+
+    public List<OrganisationUnitGroup> getOrganisationUnitGroupsWithoutGroupSets()
+    {
+        return organisationUnitGroupsWithoutGroupSets;
+    }
+
+    public void setOrganisationUnitGroupsWithoutGroupSets( List<OrganisationUnitGroup> organisationUnitGroupsWithoutGroupSets )
+    {
+        this.organisationUnitGroupsWithoutGroupSets = organisationUnitGroupsWithoutGroupSets;
+    }
+
+    public List<ValidationRule> getValidationRulesWithoutGroups()
+    {
+        return validationRulesWithoutGroups;
+    }
+
+    public void setValidationRulesWithoutGroups( List<ValidationRule> validationRulesWithoutGroups )
+    {
+        this.validationRulesWithoutGroups = validationRulesWithoutGroups;
+    }
+
+    public Map<ValidationRule, String> getInvalidValidationRuleLeftSideExpressions()
+    {
+        return invalidValidationRuleLeftSideExpressions;
+    }
+
+    public void setInvalidValidationRuleLeftSideExpressions( Map<ValidationRule, String> invalidValidationRuleLeftSideExpressions )
+    {
+        this.invalidValidationRuleLeftSideExpressions = invalidValidationRuleLeftSideExpressions;
+    }
+
+    public Map<ValidationRule, String> getInvalidValidationRuleRightSideExpressions()
+    {
+        return invalidValidationRuleRightSideExpressions;
+    }
+
+    public void setInvalidValidationRuleRightSideExpressions( Map<ValidationRule, String> invalidValidationRuleRightSideExpressions )
+    {
+        this.invalidValidationRuleRightSideExpressions = invalidValidationRuleRightSideExpressions;
+    }
+}

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/scheduling/TaskCategory.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/scheduling/TaskCategory.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/scheduling/TaskCategory.java	2015-02-13 14:13:56 +0000
@@ -43,5 +43,6 @@
     METADATA_EXPORT,
     AGGREGATE_QUERY_BUILDER,
     SENDING_REMINDER_MESSAGE,
-    SENDING_SMS
+    SENDING_SMS,
+    DATAINTEGRITY
 }

=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/DefaultDataIntegrityService.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/DefaultDataIntegrityService.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/DefaultDataIntegrityService.java	2015-03-04 15:31:53 +0000
@@ -616,7 +616,7 @@
             
             for ( OrganisationUnit duplicate : duplicates )
             {
-                targets.put( duplicate, duplicate.getGroups() );
+                targets.put( duplicate, new HashSet<>( duplicate.getGroups() ) );
             }
         }
 

=== added directory 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/tasks'
=== added file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/tasks/DataIntegrityTask.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/tasks/DataIntegrityTask.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataintegrity/tasks/DataIntegrityTask.java	2015-03-05 13:40:39 +0000
@@ -0,0 +1,152 @@
+package org.hisp.dhis.dataintegrity.tasks;
+
+/*
+ * Copyright (c) 2004-2015, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
+import org.hisp.dhis.dataintegrity.DataIntegrityReport;
+import org.hisp.dhis.dataintegrity.DataIntegrityService;
+import org.hisp.dhis.scheduling.TaskId;
+import org.hisp.dhis.system.notification.NotificationLevel;
+import org.hisp.dhis.system.notification.Notifier;
+import org.hisp.dhis.system.timer.SystemTimer;
+import org.hisp.dhis.system.timer.Timer;
+import org.springframework.scheduling.annotation.Async;
+
+import java.util.ArrayList;
+import java.util.Collections;
+
+/**
+ * @author Halvdan Hoem Grelland <halvdanhg@xxxxxxxxx>
+ */
+@Async
+public class DataIntegrityTask
+    implements Runnable
+{
+    private static final Log log = LogFactory.getLog( DataIntegrityTask.class );
+
+    private TaskId taskId;
+
+    private DataIntegrityReport dataIntegrityReport = new DataIntegrityReport();
+
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private DataIntegrityService dataIntegrityService;
+
+    private Notifier notifier;
+
+    // -------------------------------------------------------------------------
+    // Constructors
+    // -------------------------------------------------------------------------
+
+    public DataIntegrityTask( TaskId taskId, DataIntegrityService dataIntegrityService, Notifier notifier )
+    {
+        this.taskId = taskId;
+        this.dataIntegrityService = dataIntegrityService;
+        this.notifier = notifier;
+    }
+
+    // -------------------------------------------------------------------------
+    // Runnable implementation
+    // -------------------------------------------------------------------------
+
+    @Override
+    public void run()
+    {
+        Timer timer = new SystemTimer().start();
+
+        dataIntegrityReport.setDataElementsWithoutDataSet( new ArrayList<>( dataIntegrityService.getDataElementsWithoutDataSet() ) );
+
+        dataIntegrityReport.setDataElementsWithoutGroups( new ArrayList<>( dataIntegrityService.getDataElementsWithoutGroups() ) );
+        dataIntegrityReport.setDataElementsAssignedToDataSetsWithDifferentPeriodTypes( dataIntegrityService.getDataElementsAssignedToDataSetsWithDifferentPeriodTypes() );
+        dataIntegrityReport.setDataElementsViolatingExclusiveGroupSets( dataIntegrityService.getDataElementsViolatingExclusiveGroupSets() );
+        dataIntegrityReport.setDataElementsInDataSetNotInForm( dataIntegrityService.getDataElementsInDataSetNotInForm() );
+
+        log.info( "Checked data elements" );
+
+        dataIntegrityReport.setCategoryOptionCombosNotInDataElementCategoryCombo( dataIntegrityService.getCategoryOptionCombosNotInDataElementCategoryCombo() );
+
+        log.info( "Checked operands" );
+
+        dataIntegrityReport.setDataSetsNotAssignedToOrganisationUnits( new ArrayList<>( dataIntegrityService.getDataSetsNotAssignedToOrganisationUnits() ) );
+        dataIntegrityReport.setSectionsWithInvalidCategoryCombinations( new ArrayList<>( dataIntegrityService.getSectionsWithInvalidCategoryCombinations() ) );
+
+        log.info( "Checked data sets" );
+
+        dataIntegrityReport.setIndicatorsWithIdenticalFormulas( dataIntegrityService.getIndicatorsWithIdenticalFormulas() );
+        dataIntegrityReport.setIndicatorsWithoutGroups( new ArrayList<>( dataIntegrityService.getIndicatorsWithoutGroups() ) );
+        dataIntegrityReport.setInvalidIndicatorNumerators( dataIntegrityService.getInvalidIndicatorNumerators() );
+        dataIntegrityReport.setInvalidIndicatorDenominators( dataIntegrityService.getInvalidIndicatorDenominators() );
+        dataIntegrityReport.setIndicatorsViolatingExclusiveGroupSets( dataIntegrityService.getIndicatorsViolatingExclusiveGroupSets() );
+
+        log.info( "Checked indicators" );
+
+        dataIntegrityReport.setDuplicatePeriods( dataIntegrityService.getDuplicatePeriods() );
+
+        log.info( "Checked periods" );
+
+        dataIntegrityReport.setOrganisationUnitsWithCyclicReferences( new ArrayList<>( dataIntegrityService.getOrganisationUnitsWithCyclicReferences() ) );
+        dataIntegrityReport.setOrphanedOrganisationUnits( new ArrayList<>( dataIntegrityService.getOrphanedOrganisationUnits() ) );
+        dataIntegrityReport.setOrganisationUnitsWithoutGroups( new ArrayList<>( dataIntegrityService.getOrganisationUnitsWithoutGroups() ) );
+        dataIntegrityReport.setOrganisationUnitsViolatingExclusiveGroupSets( dataIntegrityService.getOrganisationUnitsViolatingExclusiveGroupSets() );
+        dataIntegrityReport.setOrganisationUnitGroupsWithoutGroupSets( new ArrayList<>( dataIntegrityService.getOrganisationUnitGroupsWithoutGroupSets() ) );
+        dataIntegrityReport.setValidationRulesWithoutGroups( new ArrayList<>( dataIntegrityService.getValidationRulesWithoutGroups() ) );
+
+        log.info( "Checked organisation units" );
+
+        dataIntegrityReport.setInvalidValidationRuleLeftSideExpressions( dataIntegrityService.getInvalidValidationRuleLeftSideExpressions() );
+        dataIntegrityReport.setInvalidValidationRuleRightSideExpressions( dataIntegrityService.getInvalidValidationRuleRightSideExpressions() );
+
+        log.info( "Checked validation rules" );
+
+        Collections.sort( dataIntegrityReport.getDataElementsWithoutDataSet(), IdentifiableObjectNameComparator.INSTANCE );
+        Collections.sort( dataIntegrityReport.getDataElementsWithoutGroups(), IdentifiableObjectNameComparator.INSTANCE );
+        Collections.sort( dataIntegrityReport.getDataSetsNotAssignedToOrganisationUnits(), IdentifiableObjectNameComparator.INSTANCE );
+        Collections.sort( dataIntegrityReport.getSectionsWithInvalidCategoryCombinations(), IdentifiableObjectNameComparator.INSTANCE );
+        Collections.sort( dataIntegrityReport.getIndicatorsWithoutGroups(), IdentifiableObjectNameComparator.INSTANCE );
+        Collections.sort( dataIntegrityReport.getOrganisationUnitsWithCyclicReferences(), IdentifiableObjectNameComparator.INSTANCE );
+        Collections.sort( dataIntegrityReport.getOrphanedOrganisationUnits(), IdentifiableObjectNameComparator.INSTANCE );
+        Collections.sort( dataIntegrityReport.getOrganisationUnitsWithoutGroups(), IdentifiableObjectNameComparator.INSTANCE );
+        Collections.sort( dataIntegrityReport.getOrganisationUnitGroupsWithoutGroupSets(), IdentifiableObjectNameComparator.INSTANCE );
+        Collections.sort( dataIntegrityReport.getValidationRulesWithoutGroups(), IdentifiableObjectNameComparator.INSTANCE );
+
+        log.info( "Sorted results" );
+
+        timer.stop();
+
+        if ( taskId != null )
+        {
+            notifier.notify( taskId, NotificationLevel.INFO, "Data integrity checks completed in " + timer.toString() + ".", true )
+                .addTaskSummary( taskId, dataIntegrityReport );
+        }
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataIntegrityController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataIntegrityController.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataIntegrityController.java	2015-03-05 13:40:39 +0000
@@ -0,0 +1,83 @@
+package org.hisp.dhis.webapi.controller;
+
+/*
+ * Copyright (c) 2004-2015, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.dataintegrity.DataIntegrityService;
+import org.hisp.dhis.dataintegrity.tasks.DataIntegrityTask;
+import org.hisp.dhis.scheduling.TaskCategory;
+import org.hisp.dhis.scheduling.TaskId;
+import org.hisp.dhis.system.notification.Notifier;
+import org.hisp.dhis.system.scheduling.Scheduler;
+import org.hisp.dhis.user.CurrentUserService;
+import org.hisp.dhis.webapi.utils.ContextUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * @author Halvdan Hoem Grelland <halvdanhg@xxxxxxxxx>
+ */
+@Controller
+@RequestMapping( method = RequestMethod.GET )
+public class DataIntegrityController
+{
+    @Autowired
+    private CurrentUserService currentUserService;
+
+    @Autowired
+    private Scheduler scheduler;
+
+    @Autowired
+    private DataIntegrityService dataIntegrityService;
+
+    @Autowired
+    private Notifier notifier;
+
+    public static final String RESOURCE_PATH = "/dataIntegrity";
+
+    //--------------------------------------------------------------------------
+    // Asynchronous data integrity task
+    //--------------------------------------------------------------------------
+
+    @RequestMapping( value = DataIntegrityController.RESOURCE_PATH, method = RequestMethod.POST )
+    public void runAsyncDataIntegrity( HttpServletResponse response, HttpServletRequest request )
+    {
+        TaskId taskId = new TaskId( TaskCategory.DATAINTEGRITY, currentUserService.getCurrentUser() );
+        notifier.clear( taskId );
+
+        scheduler.executeTask( new DataIntegrityTask( taskId, dataIntegrityService, notifier ) );
+
+        response.setHeader( "Location", ContextUtils.getRootPath( request ) + "/system/tasks/" + TaskCategory.DATAINTEGRITY );
+        response.setStatus( HttpServletResponse.SC_ACCEPTED );
+    }
+}

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemController.java	2015-02-17 06:00:52 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemController.java	2015-03-05 13:40:39 +0000
@@ -131,9 +131,12 @@
 
             TaskId taskId = new TaskId( taskCategory, currentUserService.getCurrentUser() );
 
-            importSummary = (ImportSummary) notifier.getTaskSummary( taskId );
-
-            notifier.clear( taskId );
+            // TODO Support DataIntegrityReport (make task summary generic).
+            if ( !taskCategory.equals( TaskCategory.DATAINTEGRITY ) )
+            {
+                importSummary = (ImportSummary) notifier.getTaskSummary( taskId );
+                notifier.clear( taskId );
+            }
         }
 
         JacksonUtils.toJson( response.getOutputStream(), importSummary );

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/dataintegrity/GetDataIntegrityAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/dataintegrity/GetDataIntegrityAction.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/dataintegrity/GetDataIntegrityAction.java	1970-01-01 00:00:00 +0000
@@ -1,303 +0,0 @@
-package org.hisp.dhis.dataadmin.action.dataintegrity;
-
-/*
- * Copyright (c) 2004-2015, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.SortedMap;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementGroup;
-import org.hisp.dhis.dataelement.DataElementOperand;
-import org.hisp.dhis.dataintegrity.DataIntegrityService;
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.dataset.Section;
-import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.indicator.IndicatorGroup;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
-import org.hisp.dhis.period.Period;
-import org.hisp.dhis.validation.ValidationRule;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class GetDataIntegrityAction
-    implements Action
-{
-    private static final Log log = LogFactory.getLog( GetDataIntegrityAction.class );
-    
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private DataIntegrityService dataIntegrityService;
-
-    public void setDataIntegrityService( DataIntegrityService dataIntegrityService )
-    {
-        this.dataIntegrityService = dataIntegrityService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Output
-    // -------------------------------------------------------------------------
-
-    private List<DataElement> dataElementsWithoutDataSet;
-
-    public List<DataElement> getDataElementsWithoutDataSet()
-    {
-        return dataElementsWithoutDataSet;
-    }
-
-    private List<DataElement> dataElementsWithoutGroups;
-
-    public Collection<DataElement> getDataElementsWithoutGroups()
-    {
-        return dataElementsWithoutGroups;
-    }
-
-    private Map<DataElement, Collection<DataSet>> dataElementsAssignedToDataSetsWithDifferentPeriodTypes;
-
-    public Map<DataElement, Collection<DataSet>> getDataElementsAssignedToDataSetsWithDifferentPeriodTypes()
-    {
-        return dataElementsAssignedToDataSetsWithDifferentPeriodTypes;
-    }
-
-    private SortedMap<DataElement, Collection<DataElementGroup>> dataElementsViolatingExclusiveGroupSets;
-
-    public SortedMap<DataElement, Collection<DataElementGroup>> getDataElementsViolatingExclusiveGroupSets()
-    {
-        return dataElementsViolatingExclusiveGroupSets;
-    }
-    
-    private SortedMap<DataSet, Collection<DataElement>> dataElementsInDataSetNotInForm;
-
-    public SortedMap<DataSet, Collection<DataElement>> getDataElementsInDataSetNotInForm()
-    {
-        return dataElementsInDataSetNotInForm;
-    }
-
-    private Map<DataSet, Set<DataElementOperand>> categoryOptionCombosNotInDataElementCategoryCombo;
-    
-    public Map<DataSet, Set<DataElementOperand>> getCategoryOptionCombosNotInDataElementCategoryCombo()
-    {
-        return categoryOptionCombosNotInDataElementCategoryCombo;
-    }
-
-    private List<DataSet> dataSetsNotAssignedToOrganisationUnits;
-
-    public List<DataSet> getDataSetsNotAssignedToOrganisationUnits()
-    {
-        return dataSetsNotAssignedToOrganisationUnits;
-    }
-
-    private List<Section> sectionsWithInvalidCategoryCombinations;
-    
-    public List<Section> getSectionsWithInvalidCategoryCombinations()
-    {
-        return sectionsWithInvalidCategoryCombinations;
-    }
-
-    private Collection<Collection<Indicator>> indicatorsWithIdenticalFormulas;
-
-    public Collection<Collection<Indicator>> getIndicatorsWithIdenticalFormulas()
-    {
-        return indicatorsWithIdenticalFormulas;
-    }
-
-    private List<Indicator> indicatorsWithoutGroups;
-
-    public List<Indicator> getIndicatorsWithoutGroups()
-    {
-        return indicatorsWithoutGroups;
-    }
-
-    private Map<Indicator, String> invalidIndicatorNumerators;
-
-    public Map<Indicator, String> getInvalidIndicatorNumerators()
-    {
-        return invalidIndicatorNumerators;
-    }
-
-    private Map<Indicator, String> invalidIndicatorDenominators;
-
-    public Map<Indicator, String> getInvalidIndicatorDenominators()
-    {
-        return invalidIndicatorDenominators;
-    }
-
-    private SortedMap<Indicator, Collection<IndicatorGroup>> indicatorsViolatingExclusiveGroupSets;
-
-    public SortedMap<Indicator, Collection<IndicatorGroup>> getIndicatorsViolatingExclusiveGroupSets()
-    {
-        return indicatorsViolatingExclusiveGroupSets;
-    }
-
-    private List<Period> duplicatePeriods;
-    
-    public List<Period> getDuplicatePeriods()
-    {
-        return duplicatePeriods;
-    }
-
-    private List<OrganisationUnit> organisationUnitsWithCyclicReferences;
-
-    public List<OrganisationUnit> getOrganisationUnitsWithCyclicReferences()
-    {
-        return organisationUnitsWithCyclicReferences;
-    }
-
-    private List<OrganisationUnit> orphanedOrganisationUnits;
-
-    public List<OrganisationUnit> getOrphanedOrganisationUnits()
-    {
-        return orphanedOrganisationUnits;
-    }
-
-    private List<OrganisationUnit> organisationUnitsWithoutGroups;
-
-    public List<OrganisationUnit> getOrganisationUnitsWithoutGroups()
-    {
-        return organisationUnitsWithoutGroups;
-    }
-
-    private SortedMap<OrganisationUnit, Collection<OrganisationUnitGroup>> organisationUnitsViolatingExclusiveGroupSets;
-
-    public SortedMap<OrganisationUnit, Collection<OrganisationUnitGroup>> getOrganisationUnitsViolatingExclusiveGroupSets()
-    {
-        return organisationUnitsViolatingExclusiveGroupSets;
-    }
-
-    private List<OrganisationUnitGroup> organisationUnitGroupsWithoutGroupSets;
-
-    public List<OrganisationUnitGroup> getOrganisationUnitGroupsWithoutGroupSets()
-    {
-        return organisationUnitGroupsWithoutGroupSets;
-    }
-
-    private List<ValidationRule> validationRulesWithoutGroups;
-
-    public List<ValidationRule> getValidationRulesWithoutGroups()
-    {
-        return validationRulesWithoutGroups;
-    }
-
-    private Map<ValidationRule, String> invalidValidationRuleLeftSideExpressions;
-
-    public Map<ValidationRule, String> getInvalidValidationRuleLeftSideExpressions()
-    {
-        return invalidValidationRuleLeftSideExpressions;
-    }
-
-    private Map<ValidationRule, String> invalidValidationRuleRightSideExpressions;
-
-    public Map<ValidationRule, String> getInvalidValidationRuleRightSideExpressions()
-    {
-        return invalidValidationRuleRightSideExpressions;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    @Override
-    public String execute()
-    {
-        dataElementsWithoutDataSet = new ArrayList<>( dataIntegrityService.getDataElementsWithoutDataSet() );
-        dataElementsWithoutGroups = new ArrayList<>( dataIntegrityService.getDataElementsWithoutGroups() );
-        dataElementsAssignedToDataSetsWithDifferentPeriodTypes = dataIntegrityService.getDataElementsAssignedToDataSetsWithDifferentPeriodTypes();
-        dataElementsViolatingExclusiveGroupSets = dataIntegrityService.getDataElementsViolatingExclusiveGroupSets();
-        dataElementsInDataSetNotInForm = dataIntegrityService.getDataElementsInDataSetNotInForm();
-
-        log.info( "Checked data elements" );
-        
-        categoryOptionCombosNotInDataElementCategoryCombo = dataIntegrityService.getCategoryOptionCombosNotInDataElementCategoryCombo();
-        
-        log.info( "Checked operands" );
-        
-        dataSetsNotAssignedToOrganisationUnits = new ArrayList<>( dataIntegrityService.getDataSetsNotAssignedToOrganisationUnits() );
-        sectionsWithInvalidCategoryCombinations = new ArrayList<>( dataIntegrityService.getSectionsWithInvalidCategoryCombinations() );
-        
-        log.info( "Checked data sets" );
-        
-        indicatorsWithIdenticalFormulas = dataIntegrityService.getIndicatorsWithIdenticalFormulas();
-        indicatorsWithoutGroups = new ArrayList<>( dataIntegrityService.getIndicatorsWithoutGroups() );
-        invalidIndicatorNumerators = dataIntegrityService.getInvalidIndicatorNumerators();
-        invalidIndicatorDenominators = dataIntegrityService.getInvalidIndicatorDenominators();
-        indicatorsViolatingExclusiveGroupSets = dataIntegrityService.getIndicatorsViolatingExclusiveGroupSets();
-
-        log.info( "Checked indicators" );
-        
-        duplicatePeriods = dataIntegrityService.getDuplicatePeriods();
-
-        log.info( "Checked periods" );
-        
-        organisationUnitsWithCyclicReferences = new ArrayList<>( dataIntegrityService
-            .getOrganisationUnitsWithCyclicReferences() );
-        orphanedOrganisationUnits = new ArrayList<>( dataIntegrityService
-            .getOrphanedOrganisationUnits() );
-        organisationUnitsWithoutGroups = new ArrayList<>( dataIntegrityService
-            .getOrganisationUnitsWithoutGroups() );
-        organisationUnitsViolatingExclusiveGroupSets = dataIntegrityService.getOrganisationUnitsViolatingExclusiveGroupSets();
-        organisationUnitGroupsWithoutGroupSets = new ArrayList<>( dataIntegrityService
-            .getOrganisationUnitGroupsWithoutGroupSets() );
-        validationRulesWithoutGroups = new ArrayList<>( dataIntegrityService
-            .getValidationRulesWithoutGroups() );
-        
-        log.info( "Checked organisation units" );
-        
-        invalidValidationRuleLeftSideExpressions = dataIntegrityService.getInvalidValidationRuleLeftSideExpressions();
-        invalidValidationRuleRightSideExpressions = dataIntegrityService.getInvalidValidationRuleRightSideExpressions();
-
-        log.info( "Checked validation rules" );
-        
-        Collections.sort( dataElementsWithoutDataSet, IdentifiableObjectNameComparator.INSTANCE );
-        Collections.sort( dataElementsWithoutGroups, IdentifiableObjectNameComparator.INSTANCE );
-        Collections.sort( dataSetsNotAssignedToOrganisationUnits, IdentifiableObjectNameComparator.INSTANCE );
-        Collections.sort( sectionsWithInvalidCategoryCombinations, IdentifiableObjectNameComparator.INSTANCE );
-        Collections.sort( indicatorsWithoutGroups, IdentifiableObjectNameComparator.INSTANCE );
-        Collections.sort( organisationUnitsWithCyclicReferences, IdentifiableObjectNameComparator.INSTANCE );
-        Collections.sort( orphanedOrganisationUnits, IdentifiableObjectNameComparator.INSTANCE );
-        Collections.sort( organisationUnitsWithoutGroups, IdentifiableObjectNameComparator.INSTANCE );
-        Collections.sort( organisationUnitGroupsWithoutGroupSets, IdentifiableObjectNameComparator.INSTANCE );
-        Collections.sort( validationRulesWithoutGroups, IdentifiableObjectNameComparator.INSTANCE );
-
-        return SUCCESS;
-    }
-}

=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/dataintegrity/GetDataIntegrityReportAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/dataintegrity/GetDataIntegrityReportAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/dataintegrity/GetDataIntegrityReportAction.java	2015-03-04 16:26:10 +0000
@@ -0,0 +1,82 @@
+package org.hisp.dhis.dataadmin.action.dataintegrity;
+
+/*
+ * Copyright (c) 2004-2015, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import com.opensymphony.xwork2.Action;
+import org.hisp.dhis.dataintegrity.DataIntegrityReport;
+import org.hisp.dhis.scheduling.TaskCategory;
+import org.hisp.dhis.scheduling.TaskId;
+import org.hisp.dhis.system.notification.Notifier;
+import org.hisp.dhis.user.CurrentUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @author Halvdan Hoem Grelland
+ */
+public class GetDataIntegrityReportAction
+    implements Action
+{
+    @Autowired
+    private Notifier notifier;
+
+    @Autowired
+    private CurrentUserService currentUserService;
+
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
+    private TaskCategory category;
+
+    public void setCategory( TaskCategory category )
+    {
+        this.category = category;
+    }
+
+    // -------------------------------------------------------------------------
+    // Output
+    // -------------------------------------------------------------------------
+
+    private DataIntegrityReport dataIntegrityReport;
+
+    public DataIntegrityReport getDataIntegrityReport()
+    {
+        return dataIntegrityReport;
+    }
+
+    @Override
+    public String execute()
+    {
+        TaskId taskId = new TaskId( category, currentUserService.getCurrentUser() );
+
+        dataIntegrityReport = (DataIntegrityReport) notifier.getTaskSummary( taskId );
+
+        return SUCCESS;
+    }
+}

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml	2015-03-03 16:18:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml	2015-03-05 12:10:30 +0000
@@ -30,14 +30,6 @@
     scope="prototype">
   </bean>
 
-  <!-- Data integrity -->
-
-  <bean id="org.hisp.dhis.dataadmin.action.dataintegrity.GetDataIntegrityAction"
-    class="org.hisp.dhis.dataadmin.action.dataintegrity.GetDataIntegrityAction"
-    scope="prototype">
-    <property name="dataIntegrityService" ref="org.hisp.dhis.dataintegrity.DataIntegrityService" />
-  </bean>
-
   <!-- Statistics -->
 
   <bean id="org.hisp.dhis.dataadmin.action.statistics.GetStatisticsAction"

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml	2015-02-06 13:00:03 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml	2015-03-04 16:26:10 +0000
@@ -120,14 +120,16 @@
 
     <action name="displayDataIntegrityForm" class="org.hisp.dhis.dataadmin.action.NoAction">
       <result name="success" type="velocity">/main.vm</result>
-      <param name="page">/dhis-web-maintenance-dataadmin/dataIntegrityForm.vm</param>
       <param name="menu">/dhis-web-maintenance-dataadmin/menu.vm</param>
+      <param name="page">/dhis-web-maintenance-dataadmin/dataIntegrity.vm</param>
       <param name="javascripts">javascript/dataIntegrity.js</param>
       <param name="requiredAuthorities">F_PERFORM_MAINTENANCE</param>
     </action>
 
-    <action name="getDataIntegrity" class="org.hisp.dhis.dataadmin.action.dataintegrity.GetDataIntegrityAction">
+    <action name="getDataIntegrityReport" class="org.hisp.dhis.dataadmin.action.dataintegrity.GetDataIntegrityReportAction">
       <result name="success" type="velocity-json">/dhis-web-maintenance-dataadmin/responseDataIntegrity.vm</result>
+      <param name="category">DATAINTEGRITY</param>
+      <param name="onExceptionReturn">plainTextError</param>
       <param name="requiredAuthorities">F_PERFORM_MAINTENANCE</param>
     </action>
 

=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataIntegrity.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataIntegrity.vm	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataIntegrity.vm	2015-03-04 16:54:01 +0000
@@ -0,0 +1,36 @@
+#macro( integrityItem $header $id )
+<h4>${header}&nbsp;<img id="${id}Button"></h4>
+
+<div id="${id}Div" style="border:1px solid #a0a0a0; padding:10px; width:600px"></div>
+
+#end
+<h3>
+    <span id="di-title">$i18n.getString( "data_integrity" )</span><span style="display:none;" id="di-completed">$i18n.getString( "data_integrity_checks_performed" )</span> #openHelp( "dataIntegrity" )
+</h3>
+#parse( "dhis-web-commons/loader/loader.vm" )
+
+<div id="contentDiv" style="display:none">
+#integrityItem( $i18n.getString( "data_elements_without_data_set" ) "dataElementsWithoutDataSet" )
+#integrityItem( $i18n.getString( "data_elements_without_groups" ) "dataElementsWithoutGroups" )
+#integrityItem( $i18n.getString( "data_elements_violating_exclusive_group_sets" ) "dataElementsViolatingExclusiveGroupSets" )
+#integrityItem( $i18n.getString( "data_elements_in_data_set_not_in_form" ) "dataElementsInDataSetNotInForm" )
+#integrityItem( $i18n.getString( "data_elements_assigned_to_period_types_with_different_period_types" ) "dataElementsAssignedToDataSetsWithDifferentPeriodTypes" )
+#integrityItem( $i18n.getString( "category_option_combos_not_in_data_element_category_combo" ) "categoryOptionCombosNotInDataElementCategoryCombo" )
+#integrityItem( $i18n.getString( "data_sets_not_assigned_to_organisation_units" ) "dataSetsNotAssignedToOrganisationUnits" )
+#integrityItem( $i18n.getString( "sections_with_invalid_category_combinations" ) "sectionsWithInvalidCategoryCombinations" )
+#integrityItem( $i18n.getString( "indicators_with_identical_formulas" ) "indicatorsWithIdenticalFormulas" )
+#integrityItem( $i18n.getString( "indicators_without_groups" ) "indicatorsWithoutGroups" )
+#integrityItem( $i18n.getString( "invalid_indicator_numerators" ) "invalidIndicatorNumerators" )
+#integrityItem( $i18n.getString( "invalid_indicator_denominators" ) "invalidIndicatorDenominators" )
+#integrityItem( $i18n.getString( "indicators_violating_exclusive_group_sets" ) "indicatorsViolatingExclusiveGroupSets" )
+#integrityItem( $i18n.getString( "duplicate_periods" ) "duplicatePeriods" )
+#integrityItem( $i18n.getString( "organisation_units_with_cyclic_references" ) "organisationUnitsWithCyclicReferences" )
+#integrityItem( $i18n.getString( "orphaned_organisation_units" ) "orphanedOrganisationUnits" )
+#integrityItem( $i18n.getString( "organisation_units_without_groups" ) "organisationUnitsWithoutGroups" )
+#integrityItem( $i18n.getString( "organisation_units_violation_exclusive_group_sets" ) "organisationUnitsViolatingExclusiveGroupSets" )
+#integrityItem( $i18n.getString( "organisation_unit_groups_without_group_sets" ) "organisationUnitGroupsWithoutGroupSets" )
+#integrityItem( $i18n.getString( "validation_rules_without_groups" ) "validationRulesWithoutGroups" )
+#integrityItem( $i18n.getString( "invalid_validation_rule_left_side_expressions" ) "invalidValidationRuleLeftSideExpressions" )
+#integrityItem( $i18n.getString( "invalid_validation_rule_right_side_expressions" ) "invalidValidationRuleRightSideExpressions" )
+</div>
+<table id="notificationsTable"></table>

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataIntegrityForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataIntegrityForm.vm	2015-01-07 13:01:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataIntegrityForm.vm	1970-01-01 00:00:00 +0000
@@ -1,38 +0,0 @@
-
-#macro( integrityItem $header $id )
-<h4>${header}&nbsp;<img id="${id}Button"></h4>
-
-<div id="${id}Div" style="border:1px solid #a0a0a0; padding:10px; width:600px"></div>
-
-#end
-
-<h3>$i18n.getString( "data_integrity_checks_performed" ) #openHelp( "dataIntegrity" )</h3>
-
-#parse( "dhis-web-commons/loader/loader.vm" )
-
-<div id="contentDiv" style="display:none">
-
-#integrityItem( $i18n.getString( "data_elements_without_data_set" ) "dataElementsWithoutDataSet" )
-#integrityItem( $i18n.getString( "data_elements_without_groups" ) "dataElementsWithoutGroups" )
-#integrityItem( $i18n.getString( "data_elements_violating_exclusive_group_sets" ) "dataElementsViolatingExclusiveGroupSets" )
-#integrityItem( $i18n.getString( "data_elements_in_data_set_not_in_form" ) "dataElementsInDataSetNotInForm" )
-#integrityItem( $i18n.getString( "data_elements_assigned_to_period_types_with_different_period_types" ) "dataElementsAssignedToDataSetsWithDifferentPeriodTypes" )
-#integrityItem( $i18n.getString( "category_option_combos_not_in_data_element_category_combo" ) "categoryOptionCombosNotInDataElementCategoryCombo" )
-#integrityItem( $i18n.getString( "data_sets_not_assigned_to_organisation_units" ) "dataSetsNotAssignedToOrganisationUnits" )
-#integrityItem( $i18n.getString( "sections_with_invalid_category_combinations" ) "sectionsWithInvalidCategoryCombinations" )
-#integrityItem( $i18n.getString( "indicators_with_identical_formulas" ) "indicatorsWithIdenticalFormulas" )
-#integrityItem( $i18n.getString( "indicators_without_groups" ) "indicatorsWithoutGroups" )
-#integrityItem( $i18n.getString( "invalid_indicator_numerators" ) "invalidIndicatorNumerators" )
-#integrityItem( $i18n.getString( "invalid_indicator_denominators" ) "invalidIndicatorDenominators" )
-#integrityItem( $i18n.getString( "indicators_violating_exclusive_group_sets" ) "indicatorsViolatingExclusiveGroupSets" )
-#integrityItem( $i18n.getString( "duplicate_periods" ) "duplicatePeriods" )
-#integrityItem( $i18n.getString( "organisation_units_with_cyclic_references" ) "organisationUnitsWithCyclicReferences" )
-#integrityItem( $i18n.getString( "orphaned_organisation_units" ) "orphanedOrganisationUnits" )
-#integrityItem( $i18n.getString( "organisation_units_without_groups" ) "organisationUnitsWithoutGroups" )
-#integrityItem( $i18n.getString( "organisation_units_violation_exclusive_group_sets" ) "organisationUnitsViolatingExclusiveGroupSets" )
-#integrityItem( $i18n.getString( "organisation_unit_groups_without_group_sets" ) "organisationUnitGroupsWithoutGroupSets" )
-#integrityItem( $i18n.getString( "validation_rules_without_groups" ) "validationRulesWithoutGroups" )
-#integrityItem( $i18n.getString( "invalid_validation_rule_left_side_expressions" ) "invalidValidationRuleLeftSideExpressions" )
-#integrityItem( $i18n.getString( "invalid_validation_rule_right_side_expressions" ) "invalidValidationRuleRightSideExpressions" )
-
-</div>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataIntegrity.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataIntegrity.js	2015-01-07 13:01:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataIntegrity.js	2015-03-05 13:08:37 +0000
@@ -1,15 +1,33 @@
+$( document ).ready( function() {
+    showLoader();
 
-$( document ).ready( function()
-{
-	showLoader();
-	
-    $.getJSON( "getDataIntegrity.action", {}, populateIntegrityItems );
+    $.ajax({
+        url: '../api/dataIntegrity',
+        method: 'POST',
+        success: pollDataIntegrityCheckFinished,
+        error: function( xhr, txtStatus, err ) {
+            showErrorMessage( "Data integrity checks cannot be run. Request failed.", 3 );
+            throw Error( xhr.responseText );
+        }
+    } );
 } );
 
-function populateIntegrityItems( json )
-{
-	hideLoader();
-	
+var checkFinishedTimeout = null;
+
+function pollDataIntegrityCheckFinished() {
+    pingNotifications( 'DATAINTEGRITY', 'notificationsTable', function() {
+        $.getJSON( "getDataIntegrityReport.action", {}, function( json ) {
+            hideLoader();
+            $( "#di-title" ).hide();
+            $( "#di-completed" ).show();
+            populateIntegrityItems( json );
+            clearTimeout( checkFinishedTimeout );
+        } );
+    } );
+    checkFinishedTimeout = setTimeout( "pollDataIntegrityCheckFinished()", 1500 );
+}
+
+function populateIntegrityItems( json ) {
     displayViolationList( json.dataElementsWithoutDataSet, "dataElementsWithoutDataSet", false );
     displayViolationList( json.dataElementsWithoutGroups, "dataElementsWithoutGroups", false );
     displayViolationList( json.dataElementsViolatingExclusiveGroupSets, "dataElementsViolatingExclusiveGroupSets", true );
@@ -34,35 +52,32 @@
     displayViolationList( json.invalidValidationRuleRightSideExpressions, "invalidValidationRuleRightSideExpressions", true );
 }
 
-function displayViolationList( list, id, lineBreak )
-{
-    if ( list.length > 0 )
-    {
-    	// Display image "drop-down" button
-    	
-        $( "#" + id + "Button" )
-           .attr({ src: "../images/down.png", title: "View violations" })
-           .css({ cursor: "pointer" })
-           .click( function() { $( "#" + id + "Div" ).slideToggle( "fast" ); } );
+function displayViolationList( list, id, lineBreak ) {
+    var $button = $( "#" + id + "Button" );
+    var $container = $( "#" + id + "Div" );
+
+    if ( list.length > 0 ) {
+        // Display image "drop-down" button
+        $button
+           .attr( { src: "../images/down.png", title: "View violations" } )
+           .css( { cursor: "pointer" } )
+           .click( function() { $container.slideToggle( "fast" ); } );
 
         // Populate violation div
-
         var violations = "";
         
-        for ( var i = 0; i < list.length; i++ )
-        {
+        for ( var i = 0; i < list.length; i++ ) {
             violations += list[i] + "<br>";
             violations += !!lineBreak ? "<br>" : "";
         }
         
-        $( "#" + id + "Div" ).html( violations );
+        $container.html( violations );
     }
     else
     {
-    	// Display image "check" button
-    	
-        $( "#" + id + "Button" ).attr({ src: "../images/check.png", title: "No violations" });
+        // Display image "check" button
+        $button.attr({ src: "../images/check.png", title: "No violations" });
     }
         
-    $( "#" + id + "Div" ).hide();
+    $container.hide();
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseDataIntegrity.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseDataIntegrity.vm	2015-01-07 13:01:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseDataIntegrity.vm	2015-03-04 17:01:31 +0000
@@ -4,7 +4,7 @@
 #foreach( $o in $list )
 "$!encoder.jsonEncode( ${o.displayName} )"#if( $velocityCount < $size ),#end
 #end
-]
+]
 #end
 
 #macro( violationWithCollection $name $list )
@@ -22,9 +22,9 @@
 #set( $size = $map.keySet().size() )
 "$!encoder.jsonEncode( ${name} )": [
 #foreach( $o in $map.keySet() )
-"$!encoder.jsonEncode( ${o.displayName} ): $map.get( $o )"#if( $velocityCount < $size ),#end
+"$!encoder.jsonEncode( ${o.displayName} ): $map.get( $o )"#if( $velocityCount < $size ),#end
 #end
-]
+]
 #end
 
 #macro( violationWithMapList $name $map )
@@ -32,32 +32,32 @@
 "$!encoder.jsonEncode( ${name} )": [
 #foreach( $o in $map.keySet() )
 #set( $listSize = $map.get( $o ).size() )
-"$!encoder.jsonEncode( ${o.displayName} ):#foreach( $p in $map.get( $o ) ) $!encoder.jsonEncode( ${p.displayName} )#if( $velocityCount < $listSize ), #end
+"$!encoder.jsonEncode( ${o.displayName} ):#foreach( $p in $map.get( $o ) ) $!encoder.jsonEncode( ${p.displayName} )#if( $velocityCount < $listSize ), #end
 #end "#if( $velocityCount < $mapSize ),#end
 #end
-]
+]
 #end
 {
-    #violation( "dataElementsWithoutDataSet" $dataElementsWithoutDataSet ),
-    #violation( "dataElementsWithoutGroups" $dataElementsWithoutGroups ),
-    #violationWithMapList( "dataElementsViolatingExclusiveGroupSets" $dataElementsViolatingExclusiveGroupSets ),
-    #violationWithMapList( "dataElementsInDataSetNotInForm" $dataElementsInDataSetNotInForm ),
-    #violationWithMapList( "dataElementsAssignedToDataSetsWithDifferentPeriodTypes" $dataElementsAssignedToDataSetsWithDifferentPeriodTypes ),
-    #violationWithMapList( "categoryOptionCombosNotInDataElementCategoryCombo" $categoryOptionCombosNotInDataElementCategoryCombo ),
-    #violation( "dataSetsNotAssignedToOrganisationUnits" $dataSetsNotAssignedToOrganisationUnits ),
-    #violation( "sectionsWithInvalidCategoryCombinations" $sectionsWithInvalidCategoryCombinations ),
-    #violationWithCollection( "indicatorsWithIdenticalFormulas" $indicatorsWithIdenticalFormulas ),
-    #violation( "indicatorsWithoutGroups" $indicatorsWithoutGroups ),    
-    #violationWithMap( "invalidIndicatorNumerators" $invalidIndicatorNumerators ),
-    #violationWithMap( "invalidIndicatorDenominators" $invalidIndicatorDenominators ),
-    #violationWithMapList( "indicatorsViolatingExclusiveGroupSets" $indicatorsViolatingExclusiveGroupSets ),
-    #violation( "duplicatePeriods" $duplicatePeriods ),
-    #violation( "organisationUnitsWithCyclicReferences" $organisationUnitsWithCyclicReferences ),
-    #violation( "orphanedOrganisationUnits" $orphanedOrganisationUnits ),
-    #violation( "organisationUnitsWithoutGroups" $organisationUnitsWithoutGroups ),
-    #violationWithMapList( "organisationUnitsViolatingExclusiveGroupSets" $organisationUnitsViolatingExclusiveGroupSets ),
-    #violation( "organisationUnitGroupsWithoutGroupSets" $organisationUnitGroupsWithoutGroupSets ),
-    #violation( "validationRulesWithoutGroups" $validationRulesWithoutGroups ),    
-    #violationWithMap( "invalidValidationRuleLeftSideExpressions" $invalidValidationRuleLeftSideExpressions ),
-    #violationWithMap( "invalidValidationRuleRightSideExpressions" $invalidValidationRuleRightSideExpressions )
-}
\ No newline at end of file
+#violation( "dataElementsWithoutDataSet" $dataIntegrityReport.dataElementsWithoutDataSet ),
+#violation( "dataElementsWithoutGroups" $dataIntegrityReport.dataElementsWithoutGroups ),
+#violationWithMapList( "dataElementsViolatingExclusiveGroupSets" $dataIntegrityReport.dataElementsViolatingExclusiveGroupSets ),
+#violationWithMapList( "dataElementsInDataSetNotInForm" $dataIntegrityReport.dataElementsInDataSetNotInForm ),
+#violationWithMapList( "dataElementsAssignedToDataSetsWithDifferentPeriodTypes" $dataIntegrityReport.dataElementsAssignedToDataSetsWithDifferentPeriodTypes ),
+#violationWithMapList( "categoryOptionCombosNotInDataElementCategoryCombo" $dataIntegrityReport.categoryOptionCombosNotInDataElementCategoryCombo ),
+#violation( "dataSetsNotAssignedToOrganisationUnits" $dataIntegrityReport.dataSetsNotAssignedToOrganisationUnits ),
+#violation( "sectionsWithInvalidCategoryCombinations" $dataIntegrityReport.sectionsWithInvalidCategoryCombinations ),
+#violationWithCollection( "indicatorsWithIdenticalFormulas" $dataIntegrityReport.indicatorsWithIdenticalFormulas ),
+#violation( "indicatorsWithoutGroups" $dataIntegrityReport.indicatorsWithoutGroups ),
+#violationWithMap( "invalidIndicatorNumerators" $dataIntegrityReport.invalidIndicatorNumerators ),
+#violationWithMap( "invalidIndicatorDenominators" $dataIntegrityReport.invalidIndicatorDenominators ),
+#violationWithMapList( "indicatorsViolatingExclusiveGroupSets" $dataIntegrityReport.indicatorsViolatingExclusiveGroupSets ),
+#violation( "duplicatePeriods" $dataIntegrityReport.duplicatePeriods ),
+#violation( "organisationUnitsWithCyclicReferences" $dataIntegrityReport.organisationUnitsWithCyclicReferences ),
+#violation( "orphanedOrganisationUnits" $dataIntegrityReport.orphanedOrganisationUnits ),
+#violation( "organisationUnitsWithoutGroups" $dataIntegrityReport.organisationUnitsWithoutGroups ),
+#violationWithMapList( "organisationUnitsViolatingExclusiveGroupSets" $dataIntegrityReport.organisationUnitsViolatingExclusiveGroupSets ),
+#violation( "organisationUnitGroupsWithoutGroupSets" $dataIntegrityReport.organisationUnitGroupsWithoutGroupSets ),
+#violation( "validationRulesWithoutGroups" $dataIntegrityReport.validationRulesWithoutGroups ),
+#violationWithMap( "invalidValidationRuleLeftSideExpressions" $dataIntegrityReport.invalidValidationRuleLeftSideExpressions ),
+#violationWithMap( "invalidValidationRuleRightSideExpressions" $dataIntegrityReport.invalidValidationRuleRightSideExpressions )
+}