← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5112: Minor fix.

 

------------------------------------------------------------
revno: 5112
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-11-04 13:13:38 +0700
message:
  Minor fix.
modified:
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.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/DefaultCaseAggregationConditionService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java	2011-11-04 02:53:33 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java	2011-11-04 06:13:38 +0000
@@ -664,11 +664,11 @@
     private String getConditionForNotDataElement( int programStageId, String operator, int dataElementId,
         int optionComboId, int orgunitId, String startDate, String endDate )
     {
-        String sql = "SELECT distinct(pi.patient) ";
+        String sql = "SELECT distinct(pi.patientid) ";
 
         if ( operator.equals( AGGRERATION_SUM ) )
         {
-            sql = "SELECT pi.patient ";
+            sql = "SELECT pi.patientid ";
         }
 
         return sql + "FROM programstageinstance as psi "
@@ -709,11 +709,11 @@
     private String getConditionForPatientAttribute( int attributeId, String operator, int orgunitId, String startDate,
         String endDate )
     {
-        String sql = "SELECT distinct(pi.patient) ";
+        String sql = "SELECT distinct(pi.patientid) ";
 
         if ( operator.equals( AGGRERATION_SUM ) )
         {
-            sql = "SELECT pi.patient ";
+            sql = "SELECT pi.patientid ";
         }
 
         return sql + "FROM programstageinstance as psi "
@@ -728,11 +728,11 @@
 
     private String getConditionForPatient( int orgunitId, String operator, String startDate, String endDate )
     {
-        String sql = "SELECT distinct(p.patient) ";
+        String sql = "SELECT distinct(p.patientid) ";
 
         if ( operator.equals( AGGRERATION_SUM ) )
         {
-            sql = "SELECT p.patient ";
+            sql = "SELECT p.patientid ";
         }
 
         sql += "FROM patient as p WHERE p.organisationunitid = " + orgunitId + " " + "AND p.registrationdate >= '"
@@ -744,11 +744,11 @@
     private String getConditionForPatientProperty( String propertyName, String operator, int orgunitId,
         String startDate, String endDate )
     {
-        String sql = "SELECT distinct(p.patient) ";
+        String sql = "SELECT distinct(p.patientid) ";
 
         if ( operator.equals( AGGRERATION_SUM ) )
         {
-            sql = "SELECT p.patient ";
+            sql = "SELECT p.patientid ";
         }
 
         sql += "FROM programstageinstance as psi INNER JOIN programstage as ps "
@@ -773,11 +773,11 @@
 
     private String getConditionForProgramProperty( int orgunitId, String operator, String startDate, String endDate )
     {
-        String sql = "SELECT distinct(p.patient) ";
+        String sql = "SELECT distinct(p.patientid) ";
 
         if ( operator.equals( AGGRERATION_SUM ) )
         {
-            sql = "SELECT p.patient ";
+            sql = "SELECT p.patientid ";
         }
         
         return sql + "FROM programstageinstance as psi "
@@ -789,11 +789,11 @@
     private String getConditionForProgram( String programId, String operator, int orgunitId, String startDate,
         String endDate )
     {
-        String sql = "SELECT distinct(p.patient) ";
+        String sql = "SELECT distinct(p.patientid) ";
 
         if ( operator.equals( AGGRERATION_SUM ) )
         {
-            sql = "SELECT p.patient ";
+            sql = "SELECT p.patientid ";
         }
 
         return sql + "FROM programstageinstance as psi "