← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11222: Small change the detail result from case aggregate query builder.

 

------------------------------------------------------------
revno: 11222
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-06-18 10:33:56 +0700
message:
  Small change the detail result from case aggregate query builder.
modified:
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/jdbc/JdbcCaseAggregationConditionManager.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-patient/src/main/java/org/hisp/dhis/caseaggregation/jdbc/JdbcCaseAggregationConditionManager.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/jdbc/JdbcCaseAggregationConditionManager.java	2013-06-18 02:41:49 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/jdbc/JdbcCaseAggregationConditionManager.java	2013-06-18 03:33:56 +0000
@@ -409,13 +409,17 @@
                     DateUtils.getMediumDateString( period.getStartDate() ),
                     DateUtils.getMediumDateString( period.getEndDate() ) );
         }
-        else if ( hasPatients || operator.equals( CaseAggregationCondition.AGGRERATION_COUNT ) )
-        {
-            sql += "p.firstName, p.middleName, p.lastName, p.gender, p.birthDate, p.phoneNumber, ";
-        }
-        else if ( hasDataelement )
-        {
-            sql += "pdv.value,";
+        else
+        {
+            if ( hasPatients || operator.equals( CaseAggregationCondition.AGGRERATION_COUNT ) )
+            {
+                sql += "p.firstName, p.middleName, p.lastName, p.gender, p.birthDate, p.phoneNumber, ";
+            }
+
+            if ( hasDataelement )
+            {
+                sql += "pdv.value,";
+            }
         }
 
         sql += "pgs.name as program_stage, psi.executiondate as report_date ";
@@ -1081,7 +1085,6 @@
             String match = matcher.group();
 
             match = match.replaceAll( "[\\[\\]]", "" );
-
             String[] info = match.split( SEPARATOR_OBJECT );
 
             if ( info[0].equalsIgnoreCase( CaseAggregationCondition.OBJECT_PROGRAM_STAGE_DATAELEMENT ) )