← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10035: Analytics, using all group sets instead of compulsory only

 

------------------------------------------------------------
revno: 10035
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-03-07 10:42:11 +0100
message:
  Analytics, using all group sets instead of compulsory only
modified:
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTableManager.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTargetTableManager.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/action/InitializeAction.java


--
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
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java	2013-03-01 13:02:32 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java	2013-03-07 09:42:11 +0000
@@ -113,7 +113,9 @@
             Date startDate = period.getStartDate();
             Date endDate = period.getEndDate();
             
-            populateTable( table, startDate, endDate, "cast(dv.value as double precision)", "int", "dv.value != ''" );
+            String intClause = "dv.value != '' and dv.value != 'true' and dv.value != 'false' and dv.value not like '%-%'";
+            
+            populateTable( table, startDate, endDate, "cast(dv.value as double precision)", "int", intClause );
             
             populateTable( table, startDate, endDate, "1" , "bool", "dv.value = 'true'" );
     
@@ -170,10 +172,10 @@
         List<String[]> columns = new ArrayList<String[]>();
 
         Collection<DataElementGroupSet> dataElementGroupSets =
-            dataElementService.getCompulsoryDataElementGroupSets();
+            dataElementService.getAllDataElementGroupSets();
         
         Collection<OrganisationUnitGroupSet> orgUnitGroupSets = 
-            organisationUnitGroupService.getCompulsoryOrganisationUnitGroupSets();
+            organisationUnitGroupService.getAllOrganisationUnitGroupSets();
         
         Collection<OrganisationUnitLevel> levels =
             organisationUnitService.getOrganisationUnitLevels();

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTableManager.java	2013-02-19 11:54:49 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTableManager.java	2013-03-07 09:42:11 +0000
@@ -131,7 +131,7 @@
         List<String[]> columns = new ArrayList<String[]>();
 
         Collection<OrganisationUnitGroupSet> orgUnitGroupSets = 
-            organisationUnitGroupService.getCompulsoryOrganisationUnitGroupSets();
+            organisationUnitGroupService.getAllOrganisationUnitGroupSets();
         
         Collection<OrganisationUnitLevel> levels =
             organisationUnitService.getOrganisationUnitLevels();

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTargetTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTargetTableManager.java	2013-02-21 18:18:15 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTargetTableManager.java	2013-03-07 09:42:11 +0000
@@ -112,7 +112,7 @@
         List<String[]> columns = new ArrayList<String[]>();
 
         Collection<OrganisationUnitGroupSet> orgUnitGroupSets = 
-            organisationUnitGroupService.getCompulsoryOrganisationUnitGroupSets();
+            organisationUnitGroupService.getAllOrganisationUnitGroupSets();
         
         Collection<OrganisationUnitLevel> levels =
             organisationUnitService.getOrganisationUnitLevels();

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2013-02-27 16:14:56 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2013-03-07 09:42:11 +0000
@@ -450,6 +450,9 @@
         executeSql( "update users set disabled = false where disabled is null" );
         executeSql( "update dataentryform set format = 1 where format is null" );
 
+        executeSql( "update dataelementgroup set shortname=name where shortname is null and length(name)<=50" );
+        executeSql( "update orgunitgroup set shortname=name where shortname is null and length(name)<=50" );
+        
         // report, reporttable, chart groups
 
         executeSql( "DROP TABLE reportgroupmembers" );

=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/action/InitializeAction.java'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/action/InitializeAction.java	2013-03-06 11:00:06 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/java/org/hisp/dhis/pivot/action/InitializeAction.java	2013-03-07 09:42:11 +0000
@@ -210,9 +210,9 @@
             rootNodes.add( new OrganisationUnit() );
         }
 
-        organisationUnitGroupSets = organisationUnitGroupService.getCompulsoryOrganisationUnitGroupSets();
+        organisationUnitGroupSets = organisationUnitGroupService.getAllOrganisationUnitGroupSets();
         
-        dataElementGroupSets = dataElementService.getCompulsoryDataElementGroupSets();
+        dataElementGroupSets = dataElementService.getAllDataElementGroupSets();
 
         RelativePeriods rp = new RelativePeriods();