← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3909: Added DataEntry Status services

 

------------------------------------------------------------
revno: 3909
committer: Mithilesh Kumar Thakur<mithilesh.hisp@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-06-15 11:20:55 +0530
message:
  Added DataEntry Status services
added:
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/pom.xml
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/org/
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/org/hisp/
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/org/hisp/dhis/
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/org/hisp/dhis/dataentrystatus/
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/org/hisp/dhis/dataentrystatus/DefaultDataEntryStatusService.java
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/org/hisp/dhis/dataentrystatus/hibernate/
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/org/hisp/dhis/dataentrystatus/hibernate/HibernateDataEntryStatusStore.java
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/META-INF/
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/META-INF/dhis/
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/META-INF/dhis/beans.xml
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/org/
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/org/hisp/
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/org/hisp/dhis/
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/org/hisp/dhis/dataentrystatus/
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/org/hisp/dhis/dataentrystatus/hibernate/
  local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/org/hisp/dhis/dataentrystatus/hibernate/DataEntryStatus.hbm.xml
modified:
  local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/DefaultReportService.java
  local/in/dhis-in-services/pom.xml


--
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
=== added directory 'local/in/dhis-in-services/dhis-in-service-dataentrystatus'
=== added file 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/pom.xml'
--- local/in/dhis-in-services/dhis-in-service-dataentrystatus/pom.xml	1970-01-01 00:00:00 +0000
+++ local/in/dhis-in-services/dhis-in-service-dataentrystatus/pom.xml	2011-06-15 05:50:55 +0000
@@ -0,0 +1,50 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+  
+  <parent>
+    <groupId>org.hisp.dhis</groupId>
+    <artifactId>dhis-in-services</artifactId>
+    <version>2.3-SNAPSHOT</version>
+  </parent>
+  
+  <artifactId>dhis-in-service-dataentrystatus</artifactId>
+  <packaging>jar</packaging>
+  <name>DHIS India DataEntryStatus Service</name>
+  
+  <dependencies>
+    
+    <!-- DHIS -->
+    
+    <dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-in-api</artifactId>
+	  <version>${project.version}</version>
+    </dependency>	
+    <dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-service-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-support-system</artifactId>
+    </dependency>
+    
+    <!-- Other -->
+    
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>commons-math</groupId>
+      <artifactId>commons-math</artifactId>
+    </dependency>
+    
+  </dependencies>
+</project>

=== added directory 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src'
=== added directory 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main'
=== added directory 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java'
=== added directory 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/org'
=== added directory 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/org/hisp'
=== added directory 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/org/hisp/dhis'
=== added directory 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/org/hisp/dhis/dataentrystatus'
=== added file 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/org/hisp/dhis/dataentrystatus/DefaultDataEntryStatusService.java'
--- local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/org/hisp/dhis/dataentrystatus/DefaultDataEntryStatusService.java	1970-01-01 00:00:00 +0000
+++ local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/org/hisp/dhis/dataentrystatus/DefaultDataEntryStatusService.java	2011-06-15 05:50:55 +0000
@@ -0,0 +1,130 @@
+package org.hisp.dhis.dataentrystatus;
+
+import java.util.Collection;
+
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.period.Period;
+import org.springframework.transaction.annotation.Transactional;
+
+@Transactional
+public class DefaultDataEntryStatusService implements DataEntryStatusService
+{
+    //private static final Log log = LogFactory.getLog( DefaultDataEntryStatusService.class );
+    
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+    
+    private DataEntryStatusStore dataEntryStatusStore;
+    
+    public void setDataEntryStatusStore( DataEntryStatusStore dataEntryStatusStore )
+    {
+        this.dataEntryStatusStore = dataEntryStatusStore;
+    }
+
+    // -------------------------------------------------------------------------
+    // Basic DataValue
+    // -------------------------------------------------------------------------
+    
+    public void addDataEntryStatus( DataEntryStatus dataEntryStatus )
+    {
+       if ( !dataEntryStatus.isNullValue() )
+       {
+           dataEntryStatusStore.addDataEntryStatus( dataEntryStatus );
+       }
+    }
+    
+    public void updateDataEntryStatus( DataEntryStatus dataEntryStatus )
+    {
+       if ( dataEntryStatus.isNullValue() )
+        {
+            this.deleteDataEntryStatus( dataEntryStatus );
+        }
+       else 
+       {
+            dataEntryStatusStore.updateDataEntryStatus( dataEntryStatus );
+       }
+    }
+    
+    @Transactional
+    public void deleteDataEntryStatus( DataEntryStatus dataEntryStatus )
+    {
+        dataEntryStatusStore.deleteDataEntryStatus( dataEntryStatus );
+    }
+    
+    
+    @Transactional
+    public int deleteDataEntryStatusBySource( OrganisationUnit organisationUnit )
+    {
+        return dataEntryStatusStore.deleteDataEntryStatusBySource( organisationUnit );
+    }
+
+    @Transactional
+    public int deleteDataEntryStatusByDataSet( DataSet dataSet )
+    {
+        return dataEntryStatusStore.deleteDataEntryStatusByDataSet( dataSet );
+    }
+    
+    public DataEntryStatus getDataEntryStatusValue( DataSet dataSet, OrganisationUnit organisationUnit, Period period, String includeZero )
+    {
+        return dataEntryStatusStore.getDataEntryStatusValue( dataSet, organisationUnit, period, includeZero );
+    }
+
+    public String getValue( int dataSetId,  int organisationUnitId, int periodId ,String includeZero )
+    {
+        return dataEntryStatusStore.getValue( dataSetId, organisationUnitId, periodId , includeZero );
+    }
+    
+    // -------------------------------------------------------------------------
+    // Collections of DataEntryStatus
+    // -------------------------------------------------------------------------
+
+    public Collection<DataEntryStatus> getAllDataEntryStatusValues()
+    {
+        return dataEntryStatusStore.getAllDataEntryStatusValues();
+        
+    }
+    
+    public Collection<DataEntryStatus> getDataEntryStatusValues( OrganisationUnit organisationUnit, Period period )
+    {
+        return dataEntryStatusStore.getDataEntryStatusValues( organisationUnit, period );
+    }
+    
+    public Collection<DataEntryStatus> getDataEntryStatusValues( DataSet dataSet, OrganisationUnit organisationUnit )
+    {
+        return dataEntryStatusStore.getDataEntryStatusValues( dataSet, organisationUnit );
+    }
+    
+    public Collection<DataEntryStatus> getDataEntryStatusValues( DataSet dataSet )
+    {
+        return dataEntryStatusStore.getDataEntryStatusValues( dataSet );
+    }
+    
+    
+    public Collection<DataEntryStatus> getDataEntryStatusValues( DataSet dataSet, Collection<OrganisationUnit> organisationUnits  )
+    {
+        return dataEntryStatusStore.getDataEntryStatusValues( dataSet, organisationUnits );
+    }
+    
+    
+    public Collection<DataEntryStatus> getDataEntryStatusValues( Collection<DataSet> dataSets, OrganisationUnit organisationUnit, Period period )
+    {
+        return dataEntryStatusStore.getDataEntryStatusValues( dataSets, organisationUnit, period );
+    }
+    
+    public Collection<DataEntryStatus> getDataEntryStatusValues( DataSet dataSet, Collection<OrganisationUnit> organisationUnits, Period period )
+    {
+        return dataEntryStatusStore.getDataEntryStatusValues( dataSet, organisationUnits, period );
+    }
+    
+    public Collection<DataEntryStatus> getDataEntryStatusValues( DataSet dataSet, Collection<OrganisationUnit> organisationUnits, Collection<Period> periods )
+    {
+        return dataEntryStatusStore.getDataEntryStatusValues( dataSet, organisationUnits, periods );
+    }
+    
+    public Collection<DataEntryStatus> getDataEntryStatusValues( Collection<DataSet> dataSets )
+    {
+        return dataEntryStatusStore.getDataEntryStatusValues( dataSets );
+    }
+}

=== added directory 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/org/hisp/dhis/dataentrystatus/hibernate'
=== added file 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/org/hisp/dhis/dataentrystatus/hibernate/HibernateDataEntryStatusStore.java'
--- local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/org/hisp/dhis/dataentrystatus/hibernate/HibernateDataEntryStatusStore.java	1970-01-01 00:00:00 +0000
+++ local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/java/org/hisp/dhis/dataentrystatus/hibernate/HibernateDataEntryStatusStore.java	2011-06-15 05:50:55 +0000
@@ -0,0 +1,276 @@
+package org.hisp.dhis.dataentrystatus.hibernate;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+
+import org.amplecode.quick.StatementManager;
+import org.hibernate.Criteria;
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Order;
+import org.hibernate.criterion.Restrictions;
+import org.hisp.dhis.dataentrystatus.DataEntryStatus;
+import org.hisp.dhis.dataentrystatus.DataEntryStatusStore;
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.datavalue.DataValue;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.period.Period;
+import org.hisp.dhis.period.PeriodStore;
+
+
+public class HibernateDataEntryStatusStore implements DataEntryStatusStore
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private SessionFactory sessionFactory;
+
+    public void setSessionFactory( SessionFactory sessionFactory )
+    {
+        this.sessionFactory = sessionFactory;
+    }
+
+    private StatementManager statementManager;
+
+    public void setStatementManager( StatementManager statementManager )
+    {
+        this.statementManager = statementManager;
+    }
+
+    private PeriodStore periodStore;
+
+    public void setPeriodStore( PeriodStore periodStore )
+    {
+        this.periodStore = periodStore;
+    }
+    
+    // -------------------------------------------------------------------------
+    // Basic DataValue
+    // -------------------------------------------------------------------------
+
+    public void addDataEntryStatus( DataEntryStatus dataEntryStatus )
+    {
+        dataEntryStatus.setPeriod( periodStore.reloadForceAddPeriod( dataEntryStatus.getPeriod() ) );
+
+        Session session = sessionFactory.getCurrentSession();
+
+        session.save( dataEntryStatus );
+    }
+    
+    public void updateDataEntryStatus( DataEntryStatus dataEntryStatus )
+    {
+        dataEntryStatus.setPeriod( periodStore.reloadForceAddPeriod( dataEntryStatus.getPeriod() ) );
+
+        Session session = sessionFactory.getCurrentSession();
+
+        session.update( dataEntryStatus );
+    }
+
+    public void deleteDataEntryStatus( DataEntryStatus dataEntryStatus )
+    {
+        Session session = sessionFactory.getCurrentSession();
+
+        session.delete( dataEntryStatus );
+    }
+
+    public int deleteDataEntryStatusBySource( OrganisationUnit organisationUnit )
+    {
+        Session session = sessionFactory.getCurrentSession();
+
+        Query query = session.createQuery( "delete value where organisationunit = :organisationUnit" );
+        query.setEntity( "organisationunit", organisationUnit );
+
+        return query.executeUpdate();
+    }
+
+    public int deleteDataEntryStatusByDataSet( DataSet dataSet )
+    {
+        Session session = sessionFactory.getCurrentSession();
+
+        Query query = session.createQuery( "delete DataValue where dataset = :dataSet" );
+        query.setEntity( "dataset", dataSet );
+
+        return query.executeUpdate();
+    }
+    
+    
+    public DataEntryStatus getDataEntryStatusValue( DataSet dataSet, OrganisationUnit organisationUnit, Period period, String includeZero )
+    {
+        Session session = sessionFactory.getCurrentSession();
+
+        Period storedPeriod = periodStore.reloadPeriod( period );
+
+        if ( storedPeriod == null )
+        {
+            return null;
+        }
+
+        Criteria criteria = session.createCriteria( DataEntryStatus.class );
+        criteria.add( Restrictions.eq( "dataset", dataSet ) );
+        criteria.add( Restrictions.eq( "organisationunit", organisationUnit ) );
+        criteria.add( Restrictions.eq( "period", storedPeriod ) );
+        criteria.add( Restrictions.eq( "includeZero", includeZero ) );
+        
+        return (DataEntryStatus) criteria.uniqueResult();
+    }
+
+    public String getValue( int dataSetId,  int organisationUnitId, int periodId ,String includeZero )
+    {
+        final String sql = "SELECT value " + "FROM dataentrystatus " + "WHERE datasetid='" + dataSetId + "' "
+            + "AND organisationunitid='" + organisationUnitId + "' " + "AND periodid='" + periodId + "' " + "AND includezero ='" + includeZero + " '" ;
+        
+        return statementManager.getHolder().queryForString( sql );
+    }
+    
+    
+    // -------------------------------------------------------------------------
+    // Collections of DataEntryStatus
+    // -------------------------------------------------------------------------
+
+    @SuppressWarnings( "unchecked" )
+    public Collection<DataEntryStatus> getAllDataEntryStatusValues()
+    {
+        Session session = sessionFactory.getCurrentSession();
+
+        Criteria criteria = session.createCriteria( DataEntryStatus.class );
+
+        return criteria.list();
+    }
+    
+    @SuppressWarnings( "unchecked" )
+    public Collection<DataEntryStatus> getDataEntryStatusValues( OrganisationUnit organisationUnit, Period period )
+    {
+        Period storedPeriod = periodStore.reloadPeriod( period );
+
+        if ( storedPeriod == null )
+        {
+            return Collections.emptySet();
+        }
+
+        Session session = sessionFactory.getCurrentSession();
+
+        Criteria criteria = session.createCriteria( DataEntryStatus.class );
+        criteria.add( Restrictions.eq( "organisationunit", organisationUnit ) );
+        criteria.add( Restrictions.eq( "period", storedPeriod ) );
+
+        return criteria.list();
+    }
+    
+    @SuppressWarnings( "unchecked" )
+    public Collection<DataEntryStatus> getDataEntryStatusValues( DataSet dataSet, OrganisationUnit organisationUnit )
+    {
+        Session session = sessionFactory.getCurrentSession();
+
+        Criteria criteria = session.createCriteria( DataEntryStatus.class );
+        criteria.add( Restrictions.eq( "dataset", dataSet ) );
+        criteria.add( Restrictions.eq( "organisationunit", organisationUnit ) );
+        
+        return criteria.list();
+    }
+    
+    
+    @SuppressWarnings( "unchecked" )
+    public Collection<DataEntryStatus> getDataEntryStatusValues( DataSet dataSet )
+    {
+        Session session = sessionFactory.getCurrentSession();
+
+        Criteria criteria = session.createCriteria( DataEntryStatus.class );
+        criteria.add( Restrictions.eq( "dataset", dataSet ) );
+
+        return criteria.list();
+    }
+    
+    
+    @SuppressWarnings( "unchecked" )
+    public Collection<DataEntryStatus> getDataEntryStatusValues( DataSet dataSet, Collection<OrganisationUnit> organisationUnits  )
+    {
+        Session session = sessionFactory.getCurrentSession();
+
+        Criteria criteria = session.createCriteria( DataEntryStatus.class );
+        criteria.add( Restrictions.eq( "dataset", dataSet ) );
+        criteria.add( Restrictions.in( "organisationunit", organisationUnits ) );
+        
+        return criteria.list();
+    }
+    
+    @SuppressWarnings( "unchecked" )
+    public Collection<DataEntryStatus> getDataEntryStatusValues( Collection<DataSet> dataSets, OrganisationUnit organisationUnit, Period period )
+    {
+        Period storedPeriod = periodStore.reloadPeriod( period );
+
+        if ( storedPeriod == null )
+        {
+            return Collections.emptySet();
+        }
+
+        Session session = sessionFactory.getCurrentSession();
+
+        Criteria criteria = session.createCriteria( DataEntryStatus.class );
+        criteria.add( Restrictions.in( "dataset", dataSets ) );
+        criteria.add( Restrictions.eq( "organisationunit", organisationUnit ) );
+        criteria.add( Restrictions.eq( "period", storedPeriod ) );
+        
+        return criteria.list();
+    }
+    
+    @SuppressWarnings( "unchecked" )
+    public Collection<DataEntryStatus> getDataEntryStatusValues( DataSet dataSet, Collection<OrganisationUnit> organisationUnits, Period period )
+    {
+        Period storedPeriod = periodStore.reloadPeriod( period );
+
+        if ( storedPeriod == null )
+        {
+            return new HashSet<DataEntryStatus>();
+        }
+
+        Session session = sessionFactory.getCurrentSession();
+
+        Criteria criteria = session.createCriteria( DataEntryStatus.class );
+        criteria.add( Restrictions.eq( "dataset", dataSet ) );
+        criteria.add( Restrictions.in( "organisationunit", organisationUnits ) );
+        criteria.add( Restrictions.eq( "period", storedPeriod ) );
+        criteria.addOrder( Order.asc( "organisationunit" ));
+        return criteria.list();
+    }
+    
+    @SuppressWarnings( "unchecked" )
+    public Collection<DataEntryStatus> getDataEntryStatusValues( DataSet dataSet, Collection<OrganisationUnit> organisationUnits, Collection<Period> periods )
+    {
+        Collection<Period> storedPeriods = new ArrayList<Period>();
+
+        for ( Period period : periods )
+        {
+            Period storedPeriod = periodStore.reloadPeriod( period );
+
+            if ( storedPeriod != null )
+            {
+                storedPeriods.add( storedPeriod );
+            }
+        }
+
+        Session session = sessionFactory.getCurrentSession();
+
+        Criteria criteria = session.createCriteria( DataEntryStatus.class );
+        criteria.add( Restrictions.eq( "dataset", dataSet ) );
+        criteria.add( Restrictions.in( "organisationunit", organisationUnits ) );
+        criteria.add( Restrictions.in( "period", storedPeriods ) );
+        criteria.addOrder( Order.asc( "organisationunit" ));
+        criteria.addOrder( Order.asc( "period" ));
+        return criteria.list();
+    }
+    
+    @SuppressWarnings( "unchecked" )
+    public Collection<DataEntryStatus> getDataEntryStatusValues( Collection<DataSet> dataSets )
+    {
+        Session session = sessionFactory.getCurrentSession();
+
+        Criteria criteria = session.createCriteria( DataValue.class );
+        criteria.add( Restrictions.in( "dataset", dataSets ) );
+
+        return criteria.list();
+    }
+}

=== added directory 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources'
=== added directory 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/META-INF'
=== added directory 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/META-INF/dhis'
=== added file 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/META-INF/dhis/beans.xml'
--- local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/META-INF/dhis/beans.xml	1970-01-01 00:00:00 +0000
+++ local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/META-INF/dhis/beans.xml	2011-06-15 05:50:55 +0000
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd";>
+  
+<!-- DataEntryStatus Store definitions -->
+
+  <bean id="org.hisp.dhis.dataentrystatus.DataEntryStatusStore"
+    class="org.hisp.dhis.dataentrystatus.hibernate.HibernateDataEntryStatusStore">
+		<property name="sessionFactory" ref="sessionFactory"/>
+		<property name="statementManager" ref="statementManager"/>
+		<property name="periodStore" ref="org.hisp.dhis.period.PeriodStore" />     
+  </bean>
+  
+	
+	  
+<!-- DataEntryStatus Service definitions -->
+
+	<bean id="org.hisp.dhis.dataentrystatus.DataEntryStatusService" class="org.hisp.dhis.dataentrystatus.DefaultDataEntryStatusService">
+		<property name="dataEntryStatusStore" ref="org.hisp.dhis.dataentrystatus.DataEntryStatusStore" />
+	</bean>
+
+</beans>

=== added directory 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/org'
=== added directory 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/org/hisp'
=== added directory 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/org/hisp/dhis'
=== added directory 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/org/hisp/dhis/dataentrystatus'
=== added directory 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/org/hisp/dhis/dataentrystatus/hibernate'
=== added file 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/org/hisp/dhis/dataentrystatus/hibernate/DataEntryStatus.hbm.xml'
--- local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/org/hisp/dhis/dataentrystatus/hibernate/DataEntryStatus.hbm.xml	1970-01-01 00:00:00 +0000
+++ local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/org/hisp/dhis/dataentrystatus/hibernate/DataEntryStatus.hbm.xml	2011-06-15 05:50:55 +0000
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+  "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd";>
+
+<hibernate-mapping>
+  <class name="org.hisp.dhis.dataentrystatus.DataEntryStatus" table="dataentrystatus">
+	
+    <composite-id>
+	  <key-many-to-one name="dataset" class="org.hisp.dhis.dataset.DataSet" column="datasetid" foreign-key="fk_dataentrystatus_datasetid" />
+      <key-many-to-one name="organisationunit" class="org.hisp.dhis.organisationunit.OrganisationUnit" column="organisationunitid" foreign-key="fk_dataentrystatus_organisationunitid" />
+      <key-many-to-one name="period" class="org.hisp.dhis.period.Period" column="periodid" foreign-key="fk_dataentrystatus_periodid" />
+	  <key-property name="includeZero" column="includezero" length="1" />
+    </composite-id>
+	
+    <property name="value" />
+
+    <property name="storedBy" column="storedby" length="50" />
+
+    <property name="timestamp" column="lastupdated" type="date" />
+	
+  </class>
+</hibernate-mapping>

=== modified file 'local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/DefaultReportService.java'
--- local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/DefaultReportService.java	2011-05-27 11:25:15 +0000
+++ local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/DefaultReportService.java	2011-06-15 05:50:55 +0000
@@ -272,7 +272,7 @@
         {
             dataElementid = 1020;
         }
-        else if ( lltype.equalsIgnoreCase( "lldeath-l4DECodes.xml" ) || lltype.equalsIgnoreCase( "lldeath-l5DECodes.xml" ) || lltype.equalsIgnoreCase( "lldeath-l6DECodes.xml" ) )
+        else if ( lltype.equalsIgnoreCase( "lldeath-l4DECodes.xml" ) || lltype.equalsIgnoreCase( "lldeath-l5DECodes.xml" ) || lltype.equalsIgnoreCase( "lldeath-l6DECodes.xml" ) || lltype.equalsIgnoreCase( "monthly_SCWebPortalDECodes.xml" ) )
         {
            dataElementid = 1027;
         }

=== modified file 'local/in/dhis-in-services/pom.xml'
--- local/in/dhis-in-services/pom.xml	2011-04-27 16:07:05 +0000
+++ local/in/dhis-in-services/pom.xml	2011-06-15 05:50:55 +0000
@@ -19,6 +19,7 @@
 	<module>dhis-in-service-linelisting</module> 
 	<module>dhis-in-service-reports</module>
     <module>dhis-in-service-survey</module>
+	<module>dhis-in-service-dataentrystatus</module>
   </modules>
   
   <dependencies>