dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #07062
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1980: Implemented new option for data completeness based on number of data values registered for each d...
Merge authors:
Lars <larshelg@larshelg-laptop>
------------------------------------------------------------
revno: 1980 [merge]
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Fri 2010-08-27 10:07:10 +0200
message:
Implemented new option for data completeness based on number of data values registered for each dataset
added:
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/RatioDataSetCompletenessService.java
renamed:
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/ObjectiveDataSetCompletenessService.java => dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/CompulsoryDataSetCompletenessService.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/SubjectiveDataSetCompletenessService.java => dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/RegistrationDataSetCompletenessService.java
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessStore.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/PivotDataSetAssociationTable.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/AbstractDataSetCompletenessService.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/jdbc/JDBCDataSetCompletenessStore.java
dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceExportTest.java
dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceTest.java
dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.vm
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/CompulsoryDataSetCompletenessService.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/RegistrationDataSetCompletenessService.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-api/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessStore.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessStore.java 2010-08-27 07:07:57 +0000
@@ -69,4 +69,6 @@
int getRegistrations( DataSet dataSet, Collection<? extends Source> children, Period period );
int getRegistrations( DataSet dataSet, Collection<? extends Source> children, Period period, Date deadline );
+
+ int getNumberOfValues( DataSet dataSet, Collection<? extends Source> children, Period period, Date deadline );
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/PivotDataSetAssociationTable.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/PivotDataSetAssociationTable.java 2010-08-20 07:54:16 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/PivotDataSetAssociationTable.java 2010-08-27 07:07:57 +0000
@@ -31,7 +31,6 @@
import org.hisp.dhis.aggregation.AggregatedDataSetAssociation;
import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.period.PeriodType;
/**
* @author Chau Thu Tran
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java 2010-05-18 15:42:54 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java 2010-08-27 08:07:10 +0000
@@ -105,7 +105,7 @@
"FROM datavalue AS dv " +
"JOIN period AS pe USING (periodid) " +
"JOIN periodtype AS pt USING (periodtypeid) " +
- "LEFT JOIN categoryoptioncomboname AS cc USING (categoryoptioncomboid) " +
+ "LEFT JOIN _categoryoptioncomboname AS cc USING (categoryoptioncomboid) " +
"WHERE dv.dataelementid='" + dataElement.getId() + "' " +
"AND dv.categoryoptioncomboid='" + categoryOptionCombo.getId() + "' " +
"AND dv.periodid IN (" + periodIds + ") " +
@@ -199,7 +199,7 @@
"JOIN periodtype AS pt using (periodtypeid) " +
"JOIN source AS sr using (sourceid) " +
"LEFT JOIN organisationunit AS ou on ou.organisationunitid=sr.sourceid " +
- "LEFT JOIN categoryoptioncomboname AS cc using (categoryoptioncomboid) " +
+ "LEFT JOIN _categoryoptioncomboname AS cc using (categoryoptioncomboid) " +
"WHERE dv.followup=true";
try
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java 2010-08-19 21:37:22 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java 2010-08-27 07:07:57 +0000
@@ -422,7 +422,7 @@
"FROM dataelement as de " +
"JOIN categorycombo as cc on de.categorycomboid=cc.categorycomboid " +
"JOIN categorycombos_optioncombos as ccoc on cc.categorycomboid=ccoc.categorycomboid " +
- "JOIN _categoryoptioncomboname as cocn on ccoc.categoryoptioncomboid=cocn.categoryoptioncomboid;";
+ "LEFT JOIN _categoryoptioncomboname as cocn on ccoc.categoryoptioncomboid=cocn.categoryoptioncomboid;";
try
{
@@ -447,7 +447,7 @@
"FROM dataelement as de " +
"JOIN categorycombo as cc on de.categorycomboid=cc.categorycomboid " +
"JOIN categorycombos_optioncombos as ccoc on cc.categorycomboid=ccoc.categorycomboid " +
- "JOIN _categoryoptioncomboname as cocn on ccoc.categoryoptioncomboid=cocn.categoryoptioncomboid " +
+ "LEFT JOIN _categoryoptioncomboname as cocn on ccoc.categoryoptioncomboid=cocn.categoryoptioncomboid " +
"WHERE de.dataelementid IN (" + dataElementString + ");";
try
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/AbstractDataSetCompletenessService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/AbstractDataSetCompletenessService.java 2010-05-17 21:05:26 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/AbstractDataSetCompletenessService.java 2010-08-27 07:07:57 +0000
@@ -41,6 +41,7 @@
import org.hisp.dhis.completeness.DataSetCompletenessResult;
import org.hisp.dhis.completeness.DataSetCompletenessService;
import org.hisp.dhis.completeness.DataSetCompletenessStore;
+import org.hisp.dhis.dataelement.DataElementService;
import org.hisp.dhis.dataset.DataSet;
import org.hisp.dhis.dataset.DataSetService;
import org.hisp.dhis.external.configuration.ConfigurationManager;
@@ -108,7 +109,14 @@
this.dataSetService = dataSetService;
}
- private PeriodService periodService;
+ protected DataElementService dataElementService;
+
+ public void setDataElementService( DataElementService dataElementService )
+ {
+ this.dataElementService = dataElementService;
+ }
+
+ protected PeriodService periodService;
public void setPeriodService( PeriodService periodService )
{
@@ -140,6 +148,8 @@
public abstract int getRegistrationsOnTime( DataSet dataSet, Collection<? extends Source> children, Period period, Date deadline );
+ public abstract int getSources( DataSet dataSet, Collection<? extends Source> children );
+
// -------------------------------------------------------------------------
// DataSetCompleteness
// -------------------------------------------------------------------------
@@ -229,7 +239,7 @@
result.setName( dataSet.getName() );
result.setRegistrations( getRegistrations( dataSet, children, period ) );
result.setRegistrationsOnTime( deadline != null ? getRegistrationsOnTime( dataSet, children, period, deadline ) : 0 );
- result.setSources( dataSetService.getSourcesAssociatedWithDataSet( dataSet, children ) );
+ result.setSources( getSources( dataSet, children ) );
result.setDataSetId( dataSet.getId() );
result.setPeriodId( periodId );
@@ -266,7 +276,7 @@
result.setName( unit.getName() );
result.setRegistrations( getRegistrations( dataSet, children, period ) );
result.setRegistrationsOnTime( deadline != null ? getRegistrationsOnTime( dataSet, children, period, deadline ) : 0 );
- result.setSources( dataSetService.getSourcesAssociatedWithDataSet( dataSet, children ) );
+ result.setSources( getSources( dataSet, children ) );
result.setDataSetId( dataSetId );
result.setPeriodId( periodId );
@@ -287,7 +297,7 @@
result.setName( unit.getName() );
result.setRegistrations( getRegistrations( dataSet, children, period ) );
result.setRegistrationsOnTime( deadline != null ? getRegistrationsOnTime( dataSet, children, period, deadline ) : 0 );
- result.setSources( dataSetService.getSourcesAssociatedWithDataSet( dataSet, children ) );
+ result.setSources( getSources( dataSet, children ) );
result.setDataSetId( dataSet.getId() );
result.setPeriodId( period.getId() );
=== renamed file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/ObjectiveDataSetCompletenessService.java' => 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/CompulsoryDataSetCompletenessService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/ObjectiveDataSetCompletenessService.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/CompulsoryDataSetCompletenessService.java 2010-08-27 07:07:57 +0000
@@ -37,7 +37,7 @@
/**
* @author Lars Helge Overland
*/
-public class ObjectiveDataSetCompletenessService
+public class CompulsoryDataSetCompletenessService
extends AbstractDataSetCompletenessService
{
public int getRegistrations( DataSet dataSet, Collection<? extends Source> children, Period period )
@@ -49,4 +49,9 @@
{
return completenessStore.getRegistrations( dataSet, children, period, deadline );
}
+
+ public int getSources( DataSet dataSet, Collection<? extends Source> children )
+ {
+ return dataSetService.getSourcesAssociatedWithDataSet( dataSet, children );
+ }
}
=== added file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/RatioDataSetCompletenessService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/RatioDataSetCompletenessService.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/RatioDataSetCompletenessService.java 2010-08-27 07:07:57 +0000
@@ -0,0 +1,61 @@
+package org.hisp.dhis.completeness.impl;
+
+/*
+ * Copyright (c) 2004-2010, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import java.util.Collection;
+import java.util.Date;
+
+import org.hisp.dhis.dataelement.DataElementOperand;
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.period.Period;
+import org.hisp.dhis.source.Source;
+
+/**
+ * @author Lars Helge Overland
+ * @version $Id$
+ */
+public class RatioDataSetCompletenessService
+ extends AbstractDataSetCompletenessService
+{
+ public int getRegistrations( DataSet dataSet, Collection<? extends Source> children, Period period )
+ {
+ return completenessStore.getNumberOfValues( dataSet, children, period, null );
+ }
+
+ public int getRegistrationsOnTime( DataSet dataSet, Collection<? extends Source> children, Period period, Date deadline )
+ {
+ return completenessStore.getNumberOfValues( dataSet, children, period, null );
+ }
+
+ public int getSources( DataSet dataSet, Collection<? extends Source> children )
+ {
+ Collection<DataElementOperand> operands = dataElementService.getAllGeneratedOperands( dataSet.getDataElements() );
+
+ return operands != null && children != null ? operands.size() * children.size() : 0; // Number of operands in data set times number of organisation units
+ }
+}
=== renamed file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/SubjectiveDataSetCompletenessService.java' => 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/RegistrationDataSetCompletenessService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/SubjectiveDataSetCompletenessService.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/RegistrationDataSetCompletenessService.java 2010-08-27 07:07:57 +0000
@@ -38,7 +38,7 @@
/**
* @author Lars Helge Overland
*/
-public class SubjectiveDataSetCompletenessService
+public class RegistrationDataSetCompletenessService
extends AbstractDataSetCompletenessService
{
private CompleteDataSetRegistrationService registrationService;
@@ -57,4 +57,9 @@
{
return registrationService.getCompleteDataSetRegistrationsForDataSet( dataSet, children, period, deadline );
}
+
+ public int getSources( DataSet dataSet, Collection<? extends Source> children )
+ {
+ return dataSetService.getSourcesAssociatedWithDataSet( dataSet, children );
+ }
}
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/jdbc/JDBCDataSetCompletenessStore.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/jdbc/JDBCDataSetCompletenessStore.java 2010-05-18 20:05:58 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/jdbc/JDBCDataSetCompletenessStore.java 2010-08-27 07:07:57 +0000
@@ -97,10 +97,7 @@
public int getRegistrations( DataSet dataSet, Collection<? extends Source> children, Period period, Date deadline )
{
- final int compulsoryElements = dataSet.getCompulsoryDataElementOperands().size();
- final int periodId = period.getId();
- final int dataSetId = dataSet.getId();
-
+ final int compulsoryElements = dataSet.getCompulsoryDataElementOperands().size();
final String childrenIds = TextUtils.getCommaDelimitedString( ConversionUtils.getIdentifiers( Source.class, children ) );
final String deadlineCriteria = deadline != null ? "AND lastupdated < '" + DateUtils.getMediumDateString( deadline ) + "' " : "";
@@ -110,11 +107,27 @@
"FROM datavalue " +
"JOIN dataelementoperand USING (dataelementid, categoryoptioncomboid) " +
"JOIN datasetoperands USING (dataelementoperandid) " +
- "WHERE periodid = " + periodId + " " + deadlineCriteria +
+ "WHERE periodid = " + period.getId() + " " + deadlineCriteria +
"AND sourceid IN (" + childrenIds + ") " +
- "AND datasetid = " + dataSetId + " GROUP BY sourceid) AS completed " +
+ "AND datasetid = " + dataSet.getId() + " GROUP BY sourceid) AS completed " +
"WHERE completed.sources = " + compulsoryElements;
return statementManager.getHolder().queryForInteger( sql );
- }
+ }
+
+ public int getNumberOfValues( DataSet dataSet, Collection<? extends Source> children, Period period, Date deadline )
+ {
+ final String childrenIds = TextUtils.getCommaDelimitedString( ConversionUtils.getIdentifiers( Source.class, children ) );
+ final String deadlineCriteria = deadline != null ? "AND lastupdated < '" + DateUtils.getMediumDateString( deadline ) + "' " : "";
+
+ final String sql =
+ "SELECT count(*) FROM datavalue " +
+ "JOIN datasetmembers USING (dataelementid) " +
+ "JOIN dataset USING (datasetid) " +
+ "WHERE datasetid = " + dataSet.getId() + " " + deadlineCriteria +
+ "AND periodid = " + period.getId() + " " +
+ "AND sourceid IN (" + childrenIds + ")";
+
+ return statementManager.getHolder().queryForInteger( sql );
+ }
}
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml 2010-07-25 12:54:27 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml 2010-08-27 07:07:57 +0000
@@ -57,7 +57,7 @@
<property name="dataMartService"
ref="org.hisp.dhis.datamart.DataMartService"/>
<property name="completenessService"
- ref="subjectiveDataCompletenessService"/>
+ ref="registrationDataCompletenessService"/>
</bean>
<!-- Report -->
@@ -125,19 +125,23 @@
<property name="services">
<map>
<entry>
- <key><value>subjective</value></key>
- <ref bean="subjectiveDataCompletenessService"/>
- </entry>
- <entry>
- <key><value>objective</value></key>
- <ref bean="objectiveDataCompletenessService"/>
- </entry>
+ <key><value>registration</value></key>
+ <ref bean="registrationDataCompletenessService"/>
+ </entry>
+ <entry>
+ <key><value>compulsory</value></key>
+ <ref bean="compulsoryDataCompletenessService"/>
+ </entry>
+ <entry>
+ <key><value>ratio</value></key>
+ <ref bean="ratioDataCompletenessService"/>
+ </entry>
</map>
</property>
</bean>
- <bean id="objectiveDataCompletenessService"
- class="org.hisp.dhis.completeness.impl.ObjectiveDataSetCompletenessService">
+ <bean id="compulsoryDataCompletenessService"
+ class="org.hisp.dhis.completeness.impl.CompulsoryDataSetCompletenessService">
<property name="configDir" value="reports"/>
<property name="configFile" value="dataSetCompletenessConfiguration.xml"/>
<property name="batchHandlerFactory" ref="batchHandlerFactory"/>
@@ -145,15 +149,21 @@
ref="org.hisp.dhis.organisationunit.OrganisationUnitService"/>
<property name="dataSetService"
ref="org.hisp.dhis.dataset.DataSetService"/>
+ <property name="dataElementService"
+ ref="org.hisp.dhis.dataelement.DataElementService"/>
<property name="periodService"
ref="org.hisp.dhis.period.PeriodService"/>
<property name="completenessStore"
ref="org.hisp.dhis.completeness.DataSetCompletenessStore"/>
</bean>
- <bean id="subjectiveDataCompletenessService"
- class="org.hisp.dhis.completeness.impl.SubjectiveDataSetCompletenessService"
- parent="objectiveDataCompletenessService">
+ <bean id="ratioDataCompletenessService"
+ class="org.hisp.dhis.completeness.impl.RatioDataSetCompletenessService"
+ parent="compulsoryDataCompletenessService"/>
+
+ <bean id="registrationDataCompletenessService"
+ class="org.hisp.dhis.completeness.impl.RegistrationDataSetCompletenessService"
+ parent="compulsoryDataCompletenessService">
<property name="registrationService"
ref="org.hisp.dhis.dataset.CompleteDataSetRegistrationService"/>
</bean>
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceExportTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceExportTest.java 2010-06-23 17:50:25 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceExportTest.java 2010-08-27 07:07:57 +0000
@@ -85,7 +85,7 @@
{
completenessStore = (DataSetCompletenessStore) getBean( DataSetCompletenessStore.ID );
- completenessService = (DataSetCompletenessService) getBean( "subjectiveDataCompletenessService" );
+ completenessService = (DataSetCompletenessService) getBean( "registrationDataCompletenessService" );
periodService = (PeriodService) getBean( PeriodService.ID );
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceTest.java 2010-05-17 21:05:26 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceTest.java 2010-08-27 07:07:57 +0000
@@ -112,7 +112,7 @@
registrationService = (CompleteDataSetRegistrationService) getBean( CompleteDataSetRegistrationService.ID );
- completenessService = (DataSetCompletenessService) getBean( "subjectiveDataCompletenessService" );
+ completenessService = (DataSetCompletenessService) getBean( "registrationDataCompletenessService" );
periodType = periodService.getAllPeriodTypes().iterator().next();
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml 2010-07-25 13:53:50 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml 2010-08-27 08:07:10 +0000
@@ -471,14 +471,14 @@
class="org.hisp.dhis.reporting.completeness.action.GetDataCompletenessConfigurationAction"
scope="prototype">
<property name="completenessService"
- ref="subjectiveDataCompletenessService"/>
+ ref="registrationDataCompletenessService"/>
</bean>
<bean id="org.hisp.dhis.reporting.completeness.action.SetDataCompletenessConfigurationAction"
class="org.hisp.dhis.reporting.completeness.action.SetDataCompletenessConfigurationAction"
scope="prototype">
<property name="completenessService"
- ref="subjectiveDataCompletenessService"/>
+ ref="registrationDataCompletenessService"/>
</bean>
<!-- Tallysheet -->
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2010-08-25 09:31:57 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2010-08-27 07:07:57 +0000
@@ -284,8 +284,9 @@
get_updated_data = Get updated aggregated data
use_existing_data = Use existing aggregated data
generate_before_export = Please generate table before exporting
-based_on_subjective = Based on complete data set registrations
-based_on_objective = Based on compulsory data elements
+based_on_registration = Based on complete data set registrations
+based_on_compulsory = Based on compulsory data elements
+based_on_ratio = Based on number of registered data values
deleting_existing_aggregated_data= Deleting existing aggregated data
crosstabulating_data= Crosstabulating data
exporting_data_for_data_elements= Exporting data for data elements
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.vm 2010-07-25 09:58:51 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.vm 2010-08-27 07:07:57 +0000
@@ -24,10 +24,12 @@
type="button" value="$i18n.getString( 'generate_workbook' )" style="width:150px"
onclick="window.location.href='getDataCompletenessWorkbook.action'"><br><br>
- <input type="radio" name="criteria" id="subjectiveRadio" value="subjective" checked="checked" onclick="displayCompleteness()">
- <label for="subjectiveRadio">$i18n.getString( 'based_on_subjective' )</label><br>
- <input type="radio" name="criteria" id="objectiveRadio" value="objective" onclick="displayCompleteness()">
- <label for="objectiveRadio">$i18n.getString( 'based_on_objective' )</label><br><br>
+ <input type="radio" name="criteria" id="registrationRadio" value="registration" checked="checked" onclick="displayCompleteness()">
+ <label for="registrationRadio">$i18n.getString( 'based_on_registration' )</label><br>
+ <input type="radio" name="criteria" id="compulsoryRadio" value="compulsory" onclick="displayCompleteness()">
+ <label for="compulsoryRadio">$i18n.getString( 'based_on_compulsory' )</label><br>
+ <input type="radio" name="criteria" id="ratioRadio" value="ratio" onclick="displayCompleteness()">
+ <label for="ratioRadio">$i18n.getString( 'based_on_ratio' )</label><br><br>
<!-- DataSet -->