dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15485
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5629: Wrong result when calculating with sum-operator.
------------------------------------------------------------
revno: 5629
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-12-28 12:10:42 +0700
message:
Wrong result when calculating with sum-operator.
modified:
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.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
=== 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-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java 2011-12-28 05:10:42 +0000
@@ -204,7 +204,7 @@
Period period )
{
String sql = convertCondition( aggregationCondition, orgunit, period );
-
+
Collection<Integer> patientIds = aggregationConditionStore.executeSQL( sql );
if ( patientIds == null )
@@ -798,11 +798,11 @@
sql = "SELECT pi.patientid ";
}
- return sql + "FROM programstageinstance as psi "
- + "INNER JOIN programinstance as pgi ON psi.programinstanceid = pgi.programinstanceid "
- + "INNER JOIN patient as pi ON pi.patientid = pgi.patientid " + "WHERE pgi.programid=" + programId + " "
- + "AND pi.organisationunitid = " + orgunitId + " " + "AND pgi.enrollmentdate >= '" + startDate
- + "' AND pgi.enrollmentdate <= '" + endDate + "' ";
+ return sql + "FROM programinstance as pgi "
+ + "INNER JOIN patient as pi ON pi.patientid = pgi.patientid "
+ + "WHERE pgi.programid=" + programId + " "
+ + "AND pi.organisationunitid = " + orgunitId + " " + "AND pgi.enrollmentdate >= '" + startDate
+ + "' AND pgi.enrollmentdate <= '" + endDate + "' ";
}
private String getSQL( List<String> conditions, List<String> operators )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm 2011-12-05 05:00:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm 2011-12-28 05:10:42 +0000
@@ -29,7 +29,7 @@
<tr>
<td width="20em"><label for="dataElementGroup">$i18n.getString( "dataelement_group" )</label></td>
<td>
- <select id="dataElementGroup" name="dataElementGroup" style="min-width:30.5em" onchange="getAggDataElements();">
+ <select id="dataElementGroup" name="dataElementGroup" style="width:30.5em" onchange="getAggDataElements();">
<option value="">[$i18n.getString('please_select')]</option>
#foreach( $dataElementGroup in $dataElementGroups)
<option value="$dataElementGroup.id" >$dataElementGroup.name</option>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm 2011-12-05 05:00:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm 2011-12-28 05:10:42 +0000
@@ -31,7 +31,7 @@
<tr>
<td width="20em"><label for="dataElementGroup">$i18n.getString( "dataelement_group" )</label></td>
<td>
- <select id="dataElementGroup" name="dataElementGroup" style="min-width:30.5em" onchange="getAggDataElements();">
+ <select id="dataElementGroup" name="dataElementGroup" style="width:30.5em" onchange="getAggDataElements();">
<option value="0">[$i18n.getString('please_select')]</option>
#foreach( $dataElementGroup in $dataElementGroups)
<option value="$dataElementGroup.id" >$dataElementGroup.name</option>