dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18618
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7904: Fixed bug, min max validation caused bool data elements to be removed from data set
------------------------------------------------------------
revno: 7904
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-08-13 11:06:44 +0200
message:
Fixed bug, min max validation caused bool data elements to be removed from data set
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/MinMaxOutlierAnalysisService.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-core/src/main/java/org/hisp/dhis/dataanalysis/MinMaxOutlierAnalysisService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/MinMaxOutlierAnalysisService.java 2012-07-25 13:18:48 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/MinMaxOutlierAnalysisService.java 2012-08-13 09:06:44 +0000
@@ -92,18 +92,20 @@
public Collection<DeflatedDataValue> analyse( Collection<OrganisationUnit> organisationUnits,
Collection<DataElement> dataElements, Collection<Period> periods, Double stdDevFactor )
{
- FilterUtils.filter( dataElements, DATALEMENT_INT_FILTER );
+ Set<DataElement> elements = new HashSet<DataElement>( dataElements );
+
+ FilterUtils.filter( elements, DATALEMENT_INT_FILTER );
Set<DataElementCategoryOptionCombo> categoryOptionCombos = new HashSet<DataElementCategoryOptionCombo>();
- for ( DataElement dataElement : dataElements )
+ for ( DataElement dataElement : elements )
{
categoryOptionCombos.addAll( dataElement.getCategoryCombo().getOptionCombos() );
}
- log.info( "Starting min-max analysis, no of data elements: " + dataElements.size() + ", no of org units: " + organisationUnits.size() );
+ log.info( "Starting min-max analysis, no of data elements: " + elements.size() + ", no of org units: " + organisationUnits.size() );
- return dataAnalysisStore.getMinMaxViolations( dataElements, categoryOptionCombos, periods, organisationUnits, MAX_OUTLIERS );
+ return dataAnalysisStore.getMinMaxViolations( elements, categoryOptionCombos, periods, organisationUnits, MAX_OUTLIERS );
}
public void generateMinMaxValues( Collection<OrganisationUnit> organisationUnits,