dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #22967
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11168: Fix bug - Don't run aggregate formulas with many periods.
------------------------------------------------------------
revno: 11168
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-06-07 15:15:22 +0700
message:
Fix bug - Don't run aggregate formulas with many periods.
modified:
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/jdbc/JdbcCaseAggregationConditionManager.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultAction.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-05-29 08:36:29 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/jdbc/JdbcCaseAggregationConditionManager.java 2013-06-07 08:15:22 +0000
@@ -160,9 +160,9 @@
{
Collection<Integer> _orgunitIds = getServiceOrgunit( DateUtils.getMediumDateString( period.getStartDate() ),
DateUtils.getMediumDateString( period.getEndDate() ) );
- orgunitIds.retainAll( _orgunitIds );
+ _orgunitIds.retainAll( orgunitIds );
- if ( orgunitIds.size() > 0 )
+ if ( _orgunitIds.size() > 0 )
{
Grid grid = new ListGrid();
grid.setTitle( caseAggregationCondition.getDisplayName() );
@@ -184,11 +184,11 @@
caseAggregationCondition.getOperator(), caseAggregationCondition.getAggregationDataElement().getId(),
caseAggregationCondition.getAggregationDataElement().getDisplayName(), caseAggregationCondition
.getOptionCombo().getId(), caseAggregationCondition.getOptionCombo().getDisplayName(), deSumId,
- orgunitIds, period );
+ _orgunitIds, period );
SqlRowSet rs = jdbcTemplate.queryForRowSet( sql );
grid.addRows( rs );
-
+
return grid;
}
@@ -369,7 +369,7 @@
}
sql = sql.replaceAll( "COMBINE", "" );
-
+
return sql;
}
@@ -967,7 +967,7 @@
sql += " UNION ";
sql += "( select distinct organisationunitid from patient where registrationdate>='" + startDate
+ "' and registrationdate<='" + endDate + "')";
-
+
Collection<Integer> orgunitIds = new HashSet<Integer>();
orgunitIds = jdbcTemplate.query( sql, new RowMapper<Integer>()
{
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultAction.java 2013-05-14 09:24:09 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultAction.java 2013-06-07 08:15:22 +0000
@@ -30,20 +30,15 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
-import java.util.Map;
import java.util.Set;
import org.hisp.dhis.caseaggregation.CaseAggregationCondition;
import org.hisp.dhis.caseaggregation.CaseAggregationConditionService;
import org.hisp.dhis.common.Grid;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
import org.hisp.dhis.dataset.DataSet;
import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.datavalue.DataValue;
import org.hisp.dhis.datavalue.DataValueService;
import org.hisp.dhis.i18n.I18n;
import org.hisp.dhis.i18n.I18nFormat;
@@ -59,13 +54,7 @@
public class CaseAggregationResultAction
implements Action
{
- private String ADD_STATUS = "add";
-
- private String UPDATE_STATUS = "update";
-
- private String DELETE_STATUS = "delete";
-
- // -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------