← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7149: local-in replace dashboard tracker from dataanalyser to alert

 

------------------------------------------------------------
revno: 7149
committer: Mithilesh Kumar Thakur<mithilesh.hisp@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-06-02 14:19:58 +0530
message:
  local-in replace dashboard tracker from dataanalyser to alert
modified:
  local/in/dhis-web-alert/pom.xml
  local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/action/ExportToExcelAction.java
  local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/action/HomePageAction.java
  local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/util/AlertUtility.java
  local/in/dhis-web-alert/src/main/resources/META-INF/dhis/beans.xml
  local/in/dhis-web-alert/src/main/resources/org/hisp/dhis/alert/i18n_module.properties
  local/in/dhis-web-alert/src/main/resources/struts.xml
  local/in/dhis-web-alert/src/main/webapp/dhis-web-alert/menu.vm
  local/in/dhis-web-alert/src/main/webapp/dhis-web-alert/welcome.vm
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/action/DashBoardHomePageAction.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 'local/in/dhis-web-alert/pom.xml'
--- local/in/dhis-web-alert/pom.xml	2012-05-10 12:05:02 +0000
+++ local/in/dhis-web-alert/pom.xml	2012-06-02 08:49:58 +0000
@@ -22,125 +22,96 @@
 		<!-- DHIS -->
 		
 		<dependency>
-			<groupId>org.hisp.dhis</groupId>
-			<artifactId>dhis-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.hisp.dhis</groupId>
-			<artifactId>dhis-service-core</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.hisp.dhis</groupId>
-			<artifactId>dhis-service-patient</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		
-		<dependency>
-			<groupId>org.hisp.dhis</groupId>
-			<artifactId>dhis-in-service-linelisting</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.hisp.dhis</groupId>
-			<artifactId>dhis-in-service-dbmanager</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		
-		<dependency>
-			<groupId>org.hisp.dhis</groupId>
-			<artifactId>dhis-web-commons</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.hisp.dhis</groupId>
-			<artifactId>dhis-web-commons-resources</artifactId>
-			<type>war</type>
-		</dependency>
-		<dependency>
-			<groupId>org.hisp.dhis</groupId>
-			<artifactId>dhis-service-aggregationengine-default</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.hisp.dhis</groupId>
-			<artifactId>dhis-support-external</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.hisp.dhis</groupId>
-			<artifactId>dhis-support-system</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-in-service-survey</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.hisp.dhis</groupId>
-			<artifactId>dhis-in-service-configuration</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.hisp.dhis</groupId>
-			<artifactId>dhis-in-service-reports</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.hisp.dhis</groupId>
-			<artifactId>dhis-in-service-dataentrystatus</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<!-- Other -->
-		<!--	     
-		<dependency>
-		<groupId>org.springframework</groupId>
-		<artifactId>spring-orm</artifactId>
-		</dependency>
-		
-		<dependency>
-		<groupId>junit</groupId>
-		<artifactId>junit</artifactId>
-		</dependency>
-		-->
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-context-support</artifactId>
-			<version>${spring.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>opensymphony</groupId>
-			<artifactId>quartz</artifactId>
-			<version>1.6.3</version>
-		</dependency>
-		
-		<dependency>
-			<groupId>jfree</groupId>
-			<artifactId>jfreechart</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>jfree</groupId>
-			<artifactId>jfreechart-experimental</artifactId>
-			<version>1.0.3</version>
-		</dependency>
-		<dependency>
-			<groupId>jfree</groupId>
-			<artifactId>jcommon</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.lowagie</groupId>
-			<artifactId>itext</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>javax.servlet</groupId>
-			<artifactId>servlet-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>net.sourceforge.jexcelapi</groupId>
-			<artifactId>jxl</artifactId>
-		</dependency>
+            <groupId>org.hisp.dhis</groupId>
+            <artifactId>dhis-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hisp.dhis</groupId>
+            <artifactId>dhis-service-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hisp.dhis</groupId>
+            <artifactId>dhis-service-patient</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hisp.dhis</groupId>
+            <artifactId>dhis-web-commons</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hisp.dhis</groupId>
+            <artifactId>dhis-web-commons-resources</artifactId>
+            <type>war</type>
+        </dependency>
+        <dependency>
+            <groupId>org.hisp.dhis</groupId>
+            <artifactId>dhis-support-external</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hisp.dhis</groupId>
+            <artifactId>dhis-support-system</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-in-service-configuration</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hisp.dhis</groupId>
+            <artifactId>dhis-in-service-dataentrystatus</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+		<dependency>
+            <groupId>org.hisp.dhis</groupId>
+            <artifactId>dhis-in-service-survey</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+		<dependency>
+            <groupId>org.hisp.dhis</groupId>
+            <artifactId>dhis-in-service-reports</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>			
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context-support</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>opensymphony</groupId>
+            <artifactId>quartz</artifactId>
+            <version>1.6.3</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>jfree</groupId>
+            <artifactId>jfreechart</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>jfree</groupId>
+            <artifactId>jfreechart-experimental</artifactId>
+            <version>1.0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>jfree</groupId>
+            <artifactId>jcommon</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.lowagie</groupId>
+            <artifactId>itext</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>net.sourceforge.jexcelapi</groupId>
+            <artifactId>jxl</artifactId>
+        </dependency>
 	</dependencies>
 	<properties>
 		<rootDir>../../</rootDir>

=== modified file 'local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/action/ExportToExcelAction.java'
--- local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/action/ExportToExcelAction.java	2012-04-04 05:46:52 +0000
+++ local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/action/ExportToExcelAction.java	2012-06-02 08:49:58 +0000
@@ -1,20 +1,49 @@
 package org.hisp.dhis.alert.action;
 
+/*
+ * Copyright (c) 2004-2007, 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.io.BufferedInputStream;
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
-
 import com.opensymphony.xwork2.Action;
 
-public class ExportToExcelAction implements Action
+/**
+ * @author Samta Bajpai
+ * 
+ * @version TrackerDashBoardAction.java May 28, 2012 12:45 PM
+ */
+
+public class ExportToExcelAction
+    implements Action
 {
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    // -------------------------------------------------------------------------
-    // Input & output
-    // -------------------------------------------------------------------------
+    // ---------------------------------------------------------------
+    // Input & Output
+    // ---------------------------------------------------------------
     
     private InputStream inputStream;
 
@@ -22,7 +51,7 @@
     {
         return inputStream;
     }
-    
+
     private String fileName;
 
     public String getFileName()
@@ -31,37 +60,21 @@
     }
 
     private String htmlCode;
-    
+
     public void setHtmlCode( String htmlCode )
     {
         this.htmlCode = htmlCode;
     }
-    
-    private String htmlCode1;
-    
-    public void setHtmlCode1( String htmlCode1 )
-    {
-        this.htmlCode1 = htmlCode1;
-    }
 
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
 
-    public String execute() throws Exception
-    {                        
-        fileName = "Dashboard.xls";
-        
-        if( htmlCode != null )
-        {
-            inputStream = new BufferedInputStream( new ByteArrayInputStream( htmlCode.getBytes("UTF-8") ) );
-        }
-        else 
-        {
-            inputStream = new BufferedInputStream( new ByteArrayInputStream( htmlCode1.getBytes("UTF-8") ) );
-        }
-        
+    public String execute()
+        throws Exception
+    {
+        fileName = "Output.xls";
+        inputStream = new BufferedInputStream( new ByteArrayInputStream( htmlCode.getBytes() ) );
         return SUCCESS;
-    }
-
+    }  
 }

=== modified file 'local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/action/HomePageAction.java'
--- local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/action/HomePageAction.java	2012-02-13 05:28:04 +0000
+++ local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/action/HomePageAction.java	2012-06-02 08:49:58 +0000
@@ -1,7 +1,5 @@
 package org.hisp.dhis.alert.action;
 
-import com.opensymphony.xwork2.Action;
-
 /*
  * Copyright (c) 2004-2007, University of Oslo
  * All rights reserved.
@@ -29,32 +27,34 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-public class HomePageAction implements Action
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Samta Bajpai
+ * 
+ * @version TrackerDashBoardAction.java May 28, 2012 12:45 PM
+ */
+
+public class HomePageAction
+    implements Action
 {
-    private static final String DASHBOARD_PAGE = "dashboardpage";
-    
-    // ---------------------------------------------------------------
-    // Dependencies
-    // ---------------------------------------------------------------
-
-    
-    // ---------------------------------------------------------------
-    // Input & Output
-    // ---------------------------------------------------------------
-
-    
+    private static final String TRACKER_DASHBOARD_PAGE = "trackerdashboardpage";
+
+    String drillDownOrgUnitId;
+
+    public void setDrillDownOrgUnitId( String drillDownOrgUnitId )
+    {
+        this.drillDownOrgUnitId = drillDownOrgUnitId;
+    }
+
     // ---------------------------------------------------------------
     // Action Implementation
     // ---------------------------------------------------------------
-    public String execute() throws Exception
+
+    public String execute()
+        throws Exception
     {
-        String resultPage = DASHBOARD_PAGE;
-        
-        if( resultPage.equalsIgnoreCase( DASHBOARD_PAGE ) )
-        {
-            return resultPage;
-        }
-        
-        return SUCCESS;
+        return TRACKER_DASHBOARD_PAGE;
+
     }
 }

=== modified file 'local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/util/AlertUtility.java'
--- local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/util/AlertUtility.java	2012-04-04 05:46:52 +0000
+++ local/in/dhis-web-alert/src/main/java/org/hisp/dhis/alert/util/AlertUtility.java	2012-06-02 08:49:58 +0000
@@ -1,5 +1,32 @@
 package org.hisp.dhis.alert.util;
 
+/*
+ * Copyright (c) 2004-2007, 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 static org.hisp.dhis.dataentryform.DataEntryFormService.DATAELEMENT_TOTAL_PATTERN;
 import static org.hisp.dhis.dataentryform.DataEntryFormService.IDENTIFIER_PATTERN;
 import static org.hisp.dhis.dataentryform.DataEntryFormService.INDICATOR_PATTERN;
@@ -12,27 +39,24 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.TreeMap;
 import java.util.regex.Matcher;
 
-import org.hisp.dhis.aggregation.AggregatedDataValueService;
-import org.hisp.dhis.aggregation.AggregationService;
 import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.dataentryform.DataEntryForm;
 import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.datavalue.DataValue;
-import org.hisp.dhis.datavalue.DataValueService;
 import org.hisp.dhis.i18n.I18nFormat;
 import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.period.Period;
 import org.hisp.dhis.reports.ReportService;
-import org.hisp.dhis.setting.SystemSettingManager;
-import org.hisp.dhis.system.filter.AggregatableDataElementFilter;
-import org.hisp.dhis.system.util.FilterUtils;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.jdbc.support.rowset.SqlRowSet;
 
+/**
+ * @author Samta Bajpai
+ * 
+ * @version TrackerDashBoardAction.java May 28, 2012 11:47:12 AM
+ */
 
 public class AlertUtility
 {
@@ -45,34 +69,7 @@
 
     // ---------------------------------------------------------------
     // Dependencies
-    // ---------------------------------------------------------------
-    private DataValueService dataValueService;
-
-    public void setDataValueService( DataValueService dataValueService )
-    {
-        this.dataValueService = dataValueService;
-    }
-
-    private AggregationService aggregationService;
-
-    public void setAggregationService( AggregationService aggregationService )
-    {
-        this.aggregationService = aggregationService;
-    }
-
-    private AggregatedDataValueService aggregatedDataValueService;
-
-    public void setAggregatedDataValueService( AggregatedDataValueService aggregatedDataValueService )
-    {
-        this.aggregatedDataValueService = aggregatedDataValueService;
-    }
-
-    private SystemSettingManager systemSettingManager;
-
-    public void setSystemSettingManager( SystemSettingManager systemSettingManager )
-    {
-        this.systemSettingManager = systemSettingManager;
-    }
+    // ---------------------------------------------------------------  
     
     private ReportService reportService;
 
@@ -87,6 +84,12 @@
     {
         this.organisationUnitService = organisationUnitService;
     }
+    private JdbcTemplate jdbcTemplate;
+
+    public void setJdbcTemplate( JdbcTemplate jdbcTemplate )
+    {
+        this.jdbcTemplate = jdbcTemplate;
+    }
 
 
     // ---------------------------------------------------------------
@@ -107,88 +110,6 @@
         return prepareReportContent( dataSet.getDataEntryForm(), aggregatedDataValueMap, aggregatedIndicatorMap );
     }
 
-	/*
-    private Map<String, String> getAggregatedValueMap( DataSet dataSet, OrganisationUnit unit, Period period,
-        boolean selectedUnitOnly, I18nFormat format )
-    {
-        String aggregationStrategy = (String) systemSettingManager.getSystemSetting( KEY_AGGREGATION_STRATEGY,
-            DEFAULT_AGGREGATION_STRATEGY );
-
-        Collection<DataElement> dataElements = new ArrayList<DataElement>( dataSet.getDataElements() );
-
-        FilterUtils.filter( dataElements, new AggregatableDataElementFilter() );
-
-        Map<String, String> map = new TreeMap<String, String>();
-
-        for ( DataElement dataElement : dataElements )
-        {
-            for ( DataElementCategoryOptionCombo categoryOptionCombo : dataElement.getCategoryCombo().getOptionCombos() )
-            {
-                String value;
-
-                if ( selectedUnitOnly )
-                {
-                    DataValue dataValue = dataValueService.getDataValue( unit, dataElement, period, categoryOptionCombo );
-                    value = (dataValue != null) ? dataValue.getValue() : null;
-                }
-                else
-                {
-                    Double aggregatedValue = aggregationStrategy.equals( AGGREGATION_STRATEGY_REAL_TIME ) ? 
-                        aggregationService.getAggregatedDataValue( dataElement, categoryOptionCombo, period.getStartDate(), period.getEndDate(), unit ) : 
-                        aggregatedDataValueService.getAggregatedValue( dataElement, categoryOptionCombo, period, unit );
-
-                    value = format.formatValue( aggregatedValue );
-                }
-
-                if ( value != null )
-                {
-                    map.put( dataElement.getId() + SEPARATOR + categoryOptionCombo.getId(), value );
-                }
-            }
-            
-            Double aggregatedValue = aggregationStrategy.equals( AGGREGATION_STRATEGY_REAL_TIME ) ? 
-                aggregationService.getAggregatedDataValue( dataElement, null, period.getStartDate(), period.getEndDate(), unit ) : 
-                aggregatedDataValueService.getAggregatedValue( dataElement, period, unit );
-                
-            String value = format.formatValue( aggregatedValue );
-            
-            if ( value != null )
-            {
-                map.put( String.valueOf( dataElement.getId() ), value );
-            }
-        }
-
-        return map;
-    }
-*/
-
-/*	
-    private Map<Integer, String> getAggregatedIndicatorValueMap( DataSet dataSet, OrganisationUnit unit, Period period,
-        I18nFormat format )
-    {
-        String aggregationStrategy = (String) systemSettingManager.getSystemSetting( KEY_AGGREGATION_STRATEGY,
-            DEFAULT_AGGREGATION_STRATEGY );
-
-        Map<Integer, String> map = new TreeMap<Integer, String>();
-
-        for ( Indicator indicator : dataSet.getIndicators() )
-        {
-            Double aggregatedValue = aggregationStrategy.equals( AGGREGATION_STRATEGY_REAL_TIME ) ? 
-                aggregationService.getAggregatedIndicatorValue( indicator, period.getStartDate(), period.getEndDate(), unit ) : 
-                aggregatedDataValueService.getAggregatedValue( indicator, period, unit );
-
-            String value = format.formatValue( aggregatedValue );
-
-            if ( value != null )
-            {
-                map.put( indicator.getId(), value );
-            }
-        }
-
-        return map;
-    }
-*/
-
     private String prepareReportContent( DataEntryForm dataEntryForm, Map<String, String> dataValues,
         Map<Integer, String> indicatorValues )
     {
@@ -357,5 +278,106 @@
         
         return aggDeMap;
     }
-    
+    public Map<Integer, Integer> getTotalEnrolledNumber( String orgUnitIdsByComma )
+    {
+        Map<Integer, Integer> aggDeMap = new HashMap<Integer, Integer>();
+        try
+        {
+            String query = "SELECT programinstance.programid, COUNT(*) FROM programinstance INNER JOIN patient " +
+                                        " ON programinstance.patientid = patient.patientid " +
+                                        " WHERE patient.organisationunitid IN ("+ orgUnitIdsByComma +") GROUP BY programid";
+
+            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
+            
+            while ( rs.next() )
+            {
+                Integer programId = rs.getInt( 1 );
+                Integer totalCount = rs.getInt( 2 );
+                {
+                    aggDeMap.put( programId, totalCount );
+                }
+            }
+            
+            return aggDeMap;
+        }
+        catch( Exception e )
+        {
+            throw new RuntimeException( e );
+        }
+    }
+
+    public Map<Integer, Integer> getTotalEnrolledNumberForSelectedDate( String orgUnitIdsByComma, String toDaysDate )
+    {
+        Map<Integer, Integer> aggDeMap = new HashMap<Integer, Integer>();
+        try
+        {
+            String query = "SELECT programinstance.programid, COUNT(*) FROM programinstance INNER JOIN patient " +
+                                        " ON programinstance.patientid = patient.patientid " +
+                                        " WHERE patient.organisationunitid IN ("+ orgUnitIdsByComma +") AND " +
+                                        " patient.registrationdate LIKE '"+ toDaysDate+"%' GROUP BY programid";
+
+            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
+            
+            while ( rs.next() )
+            {
+                Integer programId = rs.getInt( 1 );
+                Integer totalCount = rs.getInt( 2 );
+                {
+                    aggDeMap.put( programId, totalCount );
+                }
+            }
+            
+            return aggDeMap;
+        }
+        catch( Exception e )
+        {
+            throw new RuntimeException( e );
+        }
+    }
+
+    public Integer getTotalRegisteredCount( String orgUnitIdsByComma )
+    {
+        Integer totalRegCount = 0;
+        try
+        {
+            String query = "SELECT COUNT(*) FROM patient " +    " WHERE organisationunitid IN ("+ orgUnitIdsByComma+")";
+
+            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
+            
+            if ( rs != null && rs.next() )
+            {
+                totalRegCount = rs.getInt( 1 );
+            }
+            
+            return totalRegCount;
+        }
+        catch( Exception e )
+        {
+            throw new RuntimeException( e );
+        }
+    }
+
+    public Integer getTotalRegisteredCountForSelDate( String orgUnitIdsByComma, String selDate )
+    {
+        Integer totalRegCount = 0;
+        try
+        {
+            String query = "SELECT COUNT(*) FROM patient " +
+                               " WHERE organisationunitid IN ("+ orgUnitIdsByComma +") AND " +
+                                " registrationdate LIKE '"+ selDate+"%'";
+
+            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
+            
+            if ( rs != null && rs.next() )
+            {
+                totalRegCount = rs.getInt( 1 );
+            }
+            
+            return totalRegCount;
+        }
+        catch( Exception e )
+        {
+            throw new RuntimeException( e );
+        }
+    }
 }

=== modified file 'local/in/dhis-web-alert/src/main/resources/META-INF/dhis/beans.xml'
--- local/in/dhis-web-alert/src/main/resources/META-INF/dhis/beans.xml	2012-04-04 05:46:52 +0000
+++ local/in/dhis-web-alert/src/main/resources/META-INF/dhis/beans.xml	2012-06-02 08:49:58 +0000
@@ -4,35 +4,72 @@
 	xsi:schemaLocation="
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd";>
 
+	<!-- Service  -->
+	
+	<bean id="org.hisp.dhis.alert.util.AlertUtility"
+        class="org.hisp.dhis.alert.util.AlertUtility"
+        scope="prototype">
+        <property name="reportService" ref="org.hisp.dhis.reports.ReportService" />
+        <property name="jdbcTemplate" ref="jdbcTemplate" />
+        <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
+        
+    </bean>
+	
+	<!-- Common Action  -->
+	
 	<bean id="org.hisp.dhis.alert.action.HomePageAction"
         class="org.hisp.dhis.alert.action.HomePageAction"
         scope="prototype">
     </bean>
-	
-    <bean id="org.hisp.dhis.alert.action.DashBoardAction"
-        class="org.hisp.dhis.alert.action.DashBoardAction"
-        scope="prototype">
-        <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
-		<property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
+    
+	<bean id="org.hisp.dhis.alert.action.ExportToExcelAction"
+        class="org.hisp.dhis.alert.action.ExportToExcelAction"
+        scope="prototype">		
+    </bean>
+	
+	<!-- Dashboard Action  -->
+	
+    <bean id="org.hisp.dhis.alert.db.action.DashBoardAction"
+        class="org.hisp.dhis.alert.db.action.DashBoardAction"
+        scope="prototype">
+        <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
+        <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
+        <property name="alertUtility" ref="org.hisp.dhis.alert.util.AlertUtility" />
+        <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
+        <property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
+    </bean>
+ 
+    <!-- Tracker Dashboard Action  -->    
+	
+	<bean id="org.hisp.dhis.alert.tdb.action.TrackerDashBoardAction"
+        class="org.hisp.dhis.alert.tdb.action.TrackerDashBoardAction"
+        scope="prototype">
+        <property name="statementManager" ref="statementManager" />
+        <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
+		<property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
+        <property name="aggregationService" ref="org.hisp.dhis.aggregation.AggregationService" />
+		<property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
+        <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
 		<property name="alertUtility" ref="org.hisp.dhis.alert.util.AlertUtility" />
-		<property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
-		<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
+        <property name="programService" ref="org.hisp.dhis.program.ProgramService" />
     </bean>
- 
-    <bean id="org.hisp.dhis.alert.util.AlertUtility"
-        class="org.hisp.dhis.alert.util.AlertUtility"
-        scope="prototype">
-		<property name="dataValueService" ref="org.hisp.dhis.datavalue.DataValueService" />
-		<property name="systemSettingManager" ref="org.hisp.dhis.setting.SystemSettingManager" />
-		<property name="aggregatedDataValueService" ref="org.hisp.dhis.aggregation.AggregatedDataValueService" />
-		<property name="aggregationService" ref="org.hisp.dhis.aggregation.AggregationService" />
+	
+	<bean id="org.hisp.dhis.alert.tdb.action.GetPatientDataRecordsAction" class="org.hisp.dhis.alert.tdb.action.GetPatientDataRecordsAction"
+		scope="prototype">
 		<property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
-		<property name="reportService" ref="org.hisp.dhis.reports.ReportService" />
-    </bean>
-
-    <bean id="org.hisp.dhis.alert.action.ExportToExcelAction"
-        class="org.hisp.dhis.alert.action.ExportToExcelAction"
-        scope="prototype">
-    </bean>
+		<property name="programService" ref="org.hisp.dhis.program.ProgramService" />
+		<property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
+		<property name="programStageInstanceService" ref="org.hisp.dhis.program.ProgramStageInstanceService" />
+		<property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
+		<property name="patientAttributeService" ref="org.hisp.dhis.patient.PatientAttributeService" />
+		<property name="patientAttributeValueService" ref="org.hisp.dhis.patientattributevalue.PatientAttributeValueService" />
+  </bean>
 	
+	<bean id="org.hisp.dhis.alert.tdb.action.GetPatientDetailsAction" class="org.hisp.dhis.alert.tdb.action.GetPatientDetailsAction"
+		scope="prototype">
+		<property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
+		<property name="patientIdentifierService" ref="org.hisp.dhis.patient.PatientIdentifierService" />
+		<property name="programService" ref="org.hisp.dhis.program.ProgramService" />
+		<property name="patientAttributeValueService" ref="org.hisp.dhis.patientattributevalue.PatientAttributeValueService" />
+  </bean>
 </beans>
\ No newline at end of file

=== modified file 'local/in/dhis-web-alert/src/main/resources/org/hisp/dhis/alert/i18n_module.properties'
--- local/in/dhis-web-alert/src/main/resources/org/hisp/dhis/alert/i18n_module.properties	2012-02-13 05:28:04 +0000
+++ local/in/dhis-web-alert/src/main/resources/org/hisp/dhis/alert/i18n_module.properties	2012-06-02 08:49:58 +0000
@@ -1,4 +1,7 @@
 
 alert_intro = Alert HomePage
 alert = Alert
-dashboard_intro = Dashboard HomePage
\ No newline at end of file
+dashboard_intro = Dashboard HomePage
+dhis-web-alert= Dhis Web Alert
+tracker_dashboard= Tracker Dashboard
+welcome_tdb= Welcome to Tracker Dashboard
\ No newline at end of file

=== modified file 'local/in/dhis-web-alert/src/main/resources/struts.xml'
--- local/in/dhis-web-alert/src/main/resources/struts.xml	2012-04-04 05:46:52 +0000
+++ local/in/dhis-web-alert/src/main/resources/struts.xml	2012-06-02 08:49:58 +0000
@@ -8,21 +8,41 @@
 	<package name="dhis-web-alert" extends="dhis-web-commons"
 		namespace="/dhis-web-alert">
 		
+		<!-- Index action -->
         <action name="index"
             class="org.hisp.dhis.alert.action.HomePageAction">
-			<result name="dashboardpage" type="redirect">dashboardPage.action</result>
+			<result name="trackerdashboardpage" type="redirect">trackerDashboardPage.action</result>
+        </action>
+		
+		<!-- Tracker Dashboard -->
+		<action name="trackerDashboardPage"
+            class="org.hisp.dhis.alert.tdb.action.TrackerDashBoardAction">
             <result name="success" type="velocity">/main.vm</result>
-            <param name="page">/dhis-web-alert/welcome.vm</param>
-            <param name="menu">/dhis-web-alert/menu.vm</param>
+			<param name="page">/dhis-web-alert/welcome.vm</param>            
+            <param name="javascripts">javascript/ext-all.js,javascript/db.js</param>
+            <param name="stylesheets">css/ext-all.css,example.css</param>
         </action>
 		
+		<action name="getPatientDataRecords" class="org.hisp.dhis.alert.tdb.action.GetPatientDataRecordsAction">
+		  <result name="success" type="velocity">/content.vm</result>
+		  <param name="page">/dhis-web-alert/viewPatientDataRecords.vm</param>
+		  <param name="stylesheets">../dhis-web-commons/paging/paging.css</param>
+		</action>
+
+		<action name="getPatientDetails" class="org.hisp.dhis.alert.tdb.action.GetPatientDetailsAction">
+		  <result name="success" type="velocity-xml">/dhis-web-alert/responsePatient.vm</result>
+		  <param name="onExceptionReturn">plainTextError</param>
+		</action>               
+		
+		<!-- Dashboard Page based on Dataentry screen design -->
         <action name="dashboardPage"
-            class="org.hisp.dhis.alert.action.DashBoardAction">
+            class="org.hisp.dhis.alert.db.action.DashBoardAction">
             <result name="success" type="velocity">/main.vm</result>
             <param name="page">/dhis-web-alert/dashboardPage.vm</param>
             <param name="menu">/dhis-web-alert/menu.vm</param>
         </action>
 
+		<!-- Common Actions -->
         <action name="exportToExcel"
             class="org.hisp.dhis.alert.action.ExportToExcelAction">
             <result name="success" type="stream">
@@ -33,7 +53,7 @@
                 <param name="bufferSize">1024</param>
             </result>
         </action>
-						
+		
 	</package>
 
 </struts>
\ No newline at end of file

=== modified file 'local/in/dhis-web-alert/src/main/webapp/dhis-web-alert/menu.vm'
--- local/in/dhis-web-alert/src/main/webapp/dhis-web-alert/menu.vm	2012-02-13 05:28:04 +0000
+++ local/in/dhis-web-alert/src/main/webapp/dhis-web-alert/menu.vm	2012-06-02 08:49:58 +0000
@@ -1,2 +0,0 @@
-
-<h2>$i18n.getString( "alert" )</h2>

=== modified file 'local/in/dhis-web-alert/src/main/webapp/dhis-web-alert/welcome.vm'
--- local/in/dhis-web-alert/src/main/webapp/dhis-web-alert/welcome.vm	2012-02-13 05:28:04 +0000
+++ local/in/dhis-web-alert/src/main/webapp/dhis-web-alert/welcome.vm	2012-06-02 08:49:58 +0000
@@ -1,3 +1,7 @@
 
-
-<p>$i18n.getString( "alert_intro" )</p>
+#if( $programList.size() <= 0 )
+    <h3><a href="index.action">$i18n.getString( "tracker_dashboard" )</a></h3>
+    <p>$i18n.getString( "welcome_tdb" )</p>
+#else
+    #parse( "/dhis-web-alert/welcomeTracker.vm" )
+#end

=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/action/DashBoardHomePageAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/action/DashBoardHomePageAction.java	2012-06-01 10:12:47 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/action/DashBoardHomePageAction.java	2012-06-02 08:49:58 +0000
@@ -240,7 +240,7 @@
     public String execute()
         throws Exception
     {
-        statementManager.initialise();
+        //statementManager.initialise();
 
         immChildrenList = new ArrayList<OrganisationUnit>();
         totalEnrollCountMap = new HashMap<String, Integer>();
@@ -381,7 +381,7 @@
             }
         }
         
-        statementManager.destroy();
+        //statementManager.destroy();
 
         return SUCCESS;
     }