← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2158: Added Mobile DataSet Validation Status in Dashboard

 

------------------------------------------------------------
revno: 2158
committer: Mithilesh Kumar Thakur<mithilesh.hisp@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-11-24 14:57:00 +0530
message:
  Added Mobile DataSet Validation Status in Dashboard
added:
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/mobile/
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/mobile/action/
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/mobile/action/GenerateDataStatusMobileFormAction.java
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/mobile/action/GenerateValidationMobileStatusResultAction.java
  local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusMobileFront.vm
  local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/menuWithTreeForDSMobile.vm
  local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/validationMobileSatusResult.vm
modified:
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/action/GenerateDataStatusFormAction.java
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/action/GenerateValidationStatusResultAction.java
  local/in/dhis-web-dashboard/src/main/resources/META-INF/dhis/beans.xml
  local/in/dhis-web-dashboard/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties
  local/in/dhis-web-dashboard/src/main/resources/struts.xml
  local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ds.js
  local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/menu.vm
  local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/validationSatusResult.vm


--
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-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/action/GenerateDataStatusFormAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/action/GenerateDataStatusFormAction.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/action/GenerateDataStatusFormAction.java	2010-11-24 09:27:00 +0000
@@ -63,12 +63,15 @@
         
         dataSetList = new ArrayList<DataSet>( dataSetService.getAllDataSets() );
         
-        Iterator dataSetListIterator = dataSetList.iterator();
+        //dataSetList = new ArrayList<DataSet>( dataSetService.getDataSetsForMobile( ));
+        
+        Iterator<DataSet> dataSetListIterator = dataSetList.iterator();
         
         while(dataSetListIterator.hasNext())
         {
              DataSet d = (DataSet) dataSetListIterator.next();
 
+            
             if ( d.getSources().size() <= 0 )
 			{
                 dataSetListIterator.remove();

=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/action/GenerateValidationStatusResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/action/GenerateValidationStatusResultAction.java	2010-11-23 09:59:00 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/action/GenerateValidationStatusResultAction.java	2010-11-24 09:27:00 +0000
@@ -494,6 +494,7 @@
                 {
                     dsValidationPassResults.add( new Integer(0) );
                     //System.out.println(o.getName()+ " : 0");
+                    
                 }
                 
             }

=== added directory 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/mobile'
=== added directory 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/mobile/action'
=== added file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/mobile/action/GenerateDataStatusMobileFormAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/mobile/action/GenerateDataStatusMobileFormAction.java	1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/mobile/action/GenerateDataStatusMobileFormAction.java	2010-11-24 09:27:00 +0000
@@ -0,0 +1,143 @@
+/*
+ * 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.
+ */
+package org.hisp.dhis.dashboard.ds.mobile.action;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.dataset.DataSetService;
+import org.hisp.dhis.dataset.comparator.DataSetNameComparator;
+import org.hisp.dhis.period.Period;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Mithilesh Kumar Thakur
+ *
+ * @version GenerateDataStatusMobileFormAction.java Nov 24, 2010 2:34:42 PM
+ */
+public class GenerateDataStatusMobileFormAction
+implements Action
+{
+
+    /* Dependencies */
+/*
+    @SuppressWarnings("unused")
+    private PeriodService periodService;
+
+    public void setPeriodService( PeriodService periodService )
+    {
+        this.periodService = periodService;
+    }
+*/
+    private DataSetService dataSetService;
+
+    public void setDataSetService( DataSetService dataSetService )
+    {
+        this.dataSetService = dataSetService;
+    }
+
+    /* Output Parameters */
+    private List<DataSet> dataSetList;
+
+    public List<DataSet> getDataSetList()
+    {
+        return dataSetList;
+    }
+
+    private List<Period> monthlyPeriods;
+
+    public List<Period> getMonthlyPeriods()
+    {
+        return monthlyPeriods;
+    }
+
+    private SimpleDateFormat simpleDateFormat;
+
+    public SimpleDateFormat getSimpleDateFormat()
+    {
+        return simpleDateFormat;
+    }
+
+    public String execute()
+        throws Exception
+    {
+        /* DataSet List */
+        
+        dataSetList = new ArrayList<DataSet>( dataSetService.getAllDataSets() );
+        
+        //dataSetList = new ArrayList<DataSet>( dataSetService.getDataSetsForMobile( ));
+        
+        Iterator<DataSet> dataSetListIterator = dataSetList.iterator();
+        
+        while(dataSetListIterator.hasNext())
+        {
+            DataSet d = (DataSet) dataSetListIterator.next();
+
+            if ( d.getSources().size() <= 0 )
+            {
+                dataSetListIterator.remove();
+            }
+            else
+            {                       
+                // -------------------------------------------------------------------------
+                // Added to remove Indian Linelisting datasets
+                // -------------------------------------------------------------------------
+                
+                if ( d.getId() == 8 || d.getId() == 9 || d.getId() == 10 || d.getId() == 14
+                        || d.getId() == 15 || d.getId() == 35 || d.getId() == 36 || d.getId() == 37
+                        || d.getId() == 38 )
+                {
+                        dataSetListIterator.remove();
+                } 
+                
+                // Remove datasets which are nor mobile datasets
+                else if ( d.getMobile() == null || !d.getMobile())
+                {
+                   dataSetListIterator.remove();
+                }
+            }
+        }
+       
+        Collections.sort( dataSetList, new DataSetNameComparator() );
+        System.out.println("Size of DataSet List is : " + dataSetList.size());
+
+        /* Monthly Periods */
+        //monthlyPeriods = new ArrayList<Period>( periodService.getPeriodsByPeriodType( new MonthlyPeriodType() ) );
+        //Collections.sort( monthlyPeriods, new PeriodStartDateComparator() );
+        //simpleDateFormat = new SimpleDateFormat( "yyyy-MM-dd" );
+
+        return SUCCESS;
+    }
+ 
+
+}// class end
+

=== added file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/mobile/action/GenerateValidationMobileStatusResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/mobile/action/GenerateValidationMobileStatusResultAction.java	1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ds/mobile/action/GenerateValidationMobileStatusResultAction.java	2010-11-24 09:27:00 +0000
@@ -0,0 +1,670 @@
+/*
+ * 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.
+ */
+package org.hisp.dhis.dashboard.ds.mobile.action;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.hisp.dhis.dashboard.util.DashBoardService;
+import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataset.CompleteDataSetRegistration;
+import org.hisp.dhis.dataset.CompleteDataSetRegistrationService;
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.dataset.DataSetService;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
+import org.hisp.dhis.organisationunit.OrganisationUnitService;
+import org.hisp.dhis.organisationunit.comparator.OrganisationUnitNameComparator;
+import org.hisp.dhis.organisationunit.comparator.OrganisationUnitShortNameComparator;
+import org.hisp.dhis.period.Period;
+import org.hisp.dhis.period.PeriodService;
+import org.hisp.dhis.period.PeriodType;
+import org.hisp.dhis.source.Source;
+import org.hisp.dhis.user.User;
+import org.hisp.dhis.user.UserStore;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Mithilesh Kumar Thakur
+ *
+ * @version GenerateValidationMobileStatusResultAction.java Nov 24, 2010 2:32:53 PM
+ */
+public class GenerateValidationMobileStatusResultAction
+implements Action
+{
+    // ---------------------------------------------------------------
+    // Dependencies
+    // ---------------------------------------------------------------
+   
+    private OrganisationUnitService organisationUnitService;
+
+    public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
+    {
+        this.organisationUnitService = organisationUnitService;
+    }
+
+    public OrganisationUnitService getOrganisationUnitService()
+    {
+        return organisationUnitService;
+    }
+
+    private PeriodService periodService;
+
+    public void setPeriodService( PeriodService periodService )
+    {
+        this.periodService = periodService;
+    }
+
+    private DataSetService dataSetService;
+
+    public void setDataSetService( DataSetService dataSetService )
+    {
+        this.dataSetService = dataSetService;
+    }
+
+    public DataSetService getDataSetService()
+    {
+        return dataSetService;
+    }
+
+    private DashBoardService dashBoardService;
+
+    public void setDashBoardService( DashBoardService dashBoardService )
+    {
+        this.dashBoardService = dashBoardService;
+    }
+    
+    private CompleteDataSetRegistrationService registrationService;
+
+    public void setRegistrationService( CompleteDataSetRegistrationService registrationService )
+    {
+        this.registrationService = registrationService;
+    }
+    
+    private UserStore userStore;
+
+    public void setUserStore( UserStore userStore )
+    {
+        this.userStore = userStore;
+    }
+    
+    // ---------------------------------------------------------------
+    // Output Parameters
+    // ---------------------------------------------------------------
+
+    private Map<OrganisationUnit, List<Integer>> ouMapValidationPassStatusResult;
+
+    public Map<OrganisationUnit, List<Integer>> getOuMapValidationPassStatusResult()
+    {
+        return ouMapValidationPassStatusResult;
+    }
+    
+    private Map<OrganisationUnit, String> ouMapUserPhoneNo;
+    
+    public Map<OrganisationUnit, String> getOuMapUserPhoneNo()
+    {
+        return ouMapUserPhoneNo;
+    }
+
+   // private Map<OrganisationUnit, List<String>> ouMapUserPhoneNo;
+    
+    private Collection<Period> periodList;
+
+    public Collection<Period> getPeriodList()
+    {
+        return periodList;
+    }
+
+    private List<OrganisationUnit> orgUnitList;
+
+    public List<OrganisationUnit> getOrgUnitList()
+    {
+        return orgUnitList;
+    }
+
+    private List<DataSet> dataSetList;
+
+    public List<DataSet> getDataSetList()
+    {
+        return dataSetList;
+    }
+
+    private List<Integer> results;
+
+    public List<Integer> getResults()
+    {
+        return results;
+    }
+
+    List<Period> selectedPeriodList;
+
+    public List<Period> getSelectedPeriodList()
+    {
+        return selectedPeriodList;
+    }
+
+    List<String> levelNames;
+
+    public List<String> getLevelNames()
+    {
+        return levelNames;
+    }
+
+    private int maxOULevel;
+
+    public int getMaxOULevel()
+    {
+        return maxOULevel;
+    }
+    
+    private String userPhoneNo;
+    
+    public String getUserPhoneNo()
+    {
+        return userPhoneNo;
+    }
+    // ---------------------------------------------------------------
+    // Input Parameters
+    // ---------------------------------------------------------------
+
+    private String dsId;
+
+    public void setDsId( String dsId )
+    {
+        this.dsId = dsId;
+    }
+
+    private String includeZeros;
+
+    public void setIncludeZeros( String includeZeros )
+    {
+        this.includeZeros = includeZeros;
+    }
+    
+    public String getIncludeZeros()
+    {
+        return includeZeros;
+    }
+
+    private String ouId;
+
+    public void setOuId( String ouId )
+    {
+        this.ouId = ouId;
+    }
+
+    private String immChildOption;
+
+    public void setImmChildOption( String immChildOption )
+    {
+        this.immChildOption = immChildOption;
+    }
+
+    private int sDateLB;
+
+    public void setSDateLB( int dateLB )
+    {
+        sDateLB = dateLB;
+    }
+
+    public int getSDateLB()
+    {
+        return sDateLB;
+    }
+
+    private int eDateLB;
+
+    public void setEDateLB( int dateLB )
+    {
+        eDateLB = dateLB;
+    }
+
+    public int getEDateLB()
+    {
+        return eDateLB;
+    }
+
+    private String facilityLB;
+
+    public void setFacilityLB( String facilityLB )
+    {
+        this.facilityLB = facilityLB;
+    }
+
+    private List<String> orgUnitListCB;
+
+    public void setOrgUnitListCB( List<String> orgUnitListCB )
+    {
+        this.orgUnitListCB = orgUnitListCB;
+    }
+
+    private List<String> selectedDataSets;
+
+    public void setSelectedDataSets( List<String> selectedDataSets )
+    {
+        this.selectedDataSets = selectedDataSets;
+    }
+
+    public List<String> getSelectedDataSets()
+    {
+        return selectedDataSets;
+    }
+
+    private int minOULevel;
+
+    public int getMinOULevel()
+    {
+        return minOULevel;
+    }
+
+    private int number;
+
+    public int getNumber()
+    {
+        return number;
+    }
+
+    private DataSet selDataSet;
+
+    public DataSet getSelDataSet()
+    {
+        return selDataSet;
+    }
+
+    private List<String> periodNameList;
+
+    public List<String> getPeriodNameList()
+    {
+        return periodNameList;
+    }
+
+   String orgUnitInfo;
+
+    String periodInfo;
+
+    String deInfo;
+
+    int orgUnitCount;
+
+    @SuppressWarnings( { "unchecked" } )
+    public String execute()
+        throws Exception
+    {
+        orgUnitCount = 0;
+        
+        // Intialization
+        periodNameList = new ArrayList<String>();
+        ouMapValidationPassStatusResult = new HashMap<OrganisationUnit, List<Integer>>();
+        ouMapUserPhoneNo = new HashMap<OrganisationUnit,String>();
+        
+        results = new ArrayList<Integer>();
+        maxOULevel = 1;
+        minOULevel = organisationUnitService.getNumberOfOrganisationalLevels();
+
+        if ( immChildOption != null && immChildOption.equalsIgnoreCase( "yes" ) )
+        {
+            orgUnitListCB = new ArrayList<String>();
+            orgUnitListCB.add( ouId );
+            facilityLB = "immChildren";
+            selectedDataSets = new ArrayList<String>();
+            selectedDataSets.add( dsId );
+        }
+
+        // DataSet Related Info
+        dataSetList = new ArrayList<DataSet>();
+
+        deInfo = "-1";
+        if ( selectedDataSets == null )
+        {
+            System.out.println( "slectedDataSets is empty" );
+        }
+        else
+        {
+        }
+        for ( String ds : selectedDataSets )
+        {
+            DataSet dSet = dataSetService.getDataSet( Integer.parseInt( ds ) );
+            selDataSet = dSet;
+            for ( DataElement de : dSet.getDataElements() )
+                deInfo += "," + de.getId();
+        }
+
+        // OrgUnit Related Info
+        OrganisationUnit selectedOrgUnit = new OrganisationUnit();
+        orgUnitList = new ArrayList<OrganisationUnit>();
+        if ( facilityLB.equals( "children" ) )
+        {
+            selectedOrgUnit = organisationUnitService.getOrganisationUnit( Integer.parseInt( orgUnitListCB.get( 0 ) ) );
+            orgUnitList = getChildOrgUnitTree( selectedOrgUnit );
+        }
+        else if ( facilityLB.equals( "immChildren" ) )
+        {
+            @SuppressWarnings( "unused" )
+            int number;
+            selectedOrgUnit = organisationUnitService.getOrganisationUnit( Integer.parseInt( orgUnitListCB.get( 0 ) ) );
+            number = selectedOrgUnit.getChildren().size();
+            orgUnitList = new ArrayList<OrganisationUnit>();
+            Iterator<String> orgUnitIterator = orgUnitListCB.iterator();
+            while ( orgUnitIterator.hasNext() )
+            {
+                OrganisationUnit o = organisationUnitService.getOrganisationUnit( Integer
+                    .parseInt( (String) orgUnitIterator.next() ) );
+                List<OrganisationUnit> organisationUnits = new ArrayList<OrganisationUnit>( o.getChildren() );
+                Collections.sort( organisationUnits, new OrganisationUnitShortNameComparator() );
+                orgUnitList.addAll( organisationUnits );
+                orgUnitList.add( 0, o );
+            }
+            //System.out.println( "Selected is immediate children" );
+        }
+        else
+        {
+            Iterator<String> orgUnitIterator = orgUnitListCB.iterator();
+            OrganisationUnit o;
+            while ( orgUnitIterator.hasNext() )
+            {
+                o = organisationUnitService.getOrganisationUnit( Integer.parseInt( orgUnitIterator.next() ) );
+                orgUnitList.add( o );
+            }
+        }
+
+        Set<Source> dSetSource = selDataSet.getSources();      
+        orgUnitInfo = "-1";
+        Iterator<OrganisationUnit> ouIt = orgUnitList.iterator();
+        while ( ouIt.hasNext() )
+        {
+            OrganisationUnit ou = ouIt.next();
+            orgUnitCount = 0;
+            if ( !dSetSource.contains( ou ) )
+            {
+                getDataSetAssignedOrgUnitCount( ou, dSetSource );
+                if ( orgUnitCount > 0 )
+                {
+                    orgUnitInfo += "," + ou.getId();
+                    getOrgUnitInfo( ou );
+                }
+                else
+                {
+                    ouIt.remove();
+                }
+            }
+            else
+            {
+                orgUnitInfo += "," + ou.getId();
+            }
+        }
+       
+        // Period Related Info
+        Period startPeriod = periodService.getPeriod( sDateLB );
+        Period endPeriod = periodService.getPeriod( eDateLB );
+
+        PeriodType dataSetPeriodType = selDataSet.getPeriodType();       
+        periodList = new ArrayList<Period>( periodService.getIntersectingPeriodsByPeriodType( dataSetPeriodType,
+            startPeriod.getStartDate(), endPeriod.getEndDate() ) );
+
+        periodInfo = "-1";
+        for ( Period p : periodList )
+            periodInfo += "," + p.getId();
+
+        Iterator<OrganisationUnit> orgUnitListIterator = orgUnitList.iterator();
+        OrganisationUnit o;
+        Set<Source> dso = new HashSet<Source>();
+        Iterator periodIterator;
+        dso = selDataSet.getSources();
+        String orgUnitId = "";
+        
+        while ( orgUnitListIterator.hasNext() )
+        {
+            //System.out.println( "Getting into first orgunit loop" );
+            o = (OrganisationUnit) orgUnitListIterator.next();
+            
+            // user phone no
+            userPhoneNo = "";
+            
+            List<User> users = new ArrayList<User>( userStore.getUsersByOrganisationUnit( o ) );
+            
+            for ( User user : users )
+            {
+                if ( user != null && user.getPhoneNumber() != null  && !user.getPhoneNumber().trim().equalsIgnoreCase( "" ) )
+                {
+                    userPhoneNo += user.getPhoneNumber() + ", ";
+                }
+            }    
+            
+            ouMapUserPhoneNo.put( o, userPhoneNo );
+            
+            orgUnitInfo = "" + o.getId();
+
+            if ( maxOULevel < organisationUnitService.getLevelOfOrganisationUnit( o ) )
+                maxOULevel = organisationUnitService.getLevelOfOrganisationUnit( o );
+
+            if ( minOULevel > organisationUnitService.getLevelOfOrganisationUnit( o ) )
+                minOULevel = organisationUnitService.getLevelOfOrganisationUnit( o );
+
+            periodIterator = periodList.iterator();
+            Period p;
+            //List<Integer> dsResults = new ArrayList<Integer>();
+            List<Integer> dsValidationPassResults = new ArrayList<Integer>();
+           
+            while ( periodIterator.hasNext() )
+            {
+                p = (Period) periodIterator.next();
+                periodInfo = "" + p.getId();
+                //System.out.println( "Getting into period loop periodInfo = "+periodInfo );
+
+                if ( dso == null )
+                {
+                    //dsResults.add( -1 );
+                    dsValidationPassResults.add( -1 );
+                    continue;
+                }
+                else if ( !dso.contains( o ) )
+                {
+                    List<OrganisationUnit> childOrgUnits = new ArrayList<OrganisationUnit>();
+                    childOrgUnits = filterChildOrgUnitsByDataSet( dataSetService.getDataSet( Integer
+                        .valueOf( selectedDataSets.get( 0 ) ) ), o );
+                    Iterator assignedChildrenIterator = childOrgUnits.iterator();
+                    Integer dataStatusCount = 0;
+                                        
+                    while ( assignedChildrenIterator.hasNext() )
+                    {
+                        OrganisationUnit cUnit = (OrganisationUnit) assignedChildrenIterator.next();
+                        orgUnitInfo = "-1";
+                        orgUnitId = "-1,";
+                        orgUnitId += String.valueOf( cUnit.getId() );
+                        orgUnitCount = 0;
+                        getOrgUnitInfo( o, dso );
+
+                        CompleteDataSetRegistration completeDataSetRegistration = registrationService.getCompleteDataSetRegistration( selDataSet, p, cUnit );
+
+                        if ( completeDataSetRegistration != null )
+                        {
+                            dataStatusCount += 1;
+                        }
+                       
+                        
+                        
+                    }
+                    //System.out.println("\ndataStatusCount : " + dataStatusCount);
+                   // System.out.println(o.getName()+ " , " + o.getComment()  + " : " +dataStatusCount);
+                   // System.out.println( "user phone No is : " + userPhoneNo );
+                    dsValidationPassResults.add( dataStatusCount );
+
+                    continue;
+                }
+
+               // System.out.println("\no = "+o.getName() + " dsValidationPassResults size = "+dsValidationPassResults.size());
+                
+                orgUnitInfo = "" + o.getId();
+
+                CompleteDataSetRegistration completeDataSetRegistration = registrationService.getCompleteDataSetRegistration( selDataSet, p, o );
+                
+                if ( completeDataSetRegistration != null )
+                {
+                    dsValidationPassResults.add( new Integer(1) );
+                   // System.out.println(o.getName()+ " : 1");
+                }
+                else
+                {
+                    dsValidationPassResults.add( new Integer(0) );
+                    //System.out.println(o.getName()+ " : 0");
+                    
+                }
+                
+            }
+            //System.out.println("o = "+o.getName() + " dsValidationPassResults size = "+dsValidationPassResults.size());
+            ouMapValidationPassStatusResult.put( o, dsValidationPassResults );
+            
+        }
+/*      
+        
+        for( OrganisationUnit orgUnit : ouMapUserPhoneNo.keySet() )
+        {
+            System.out.print( orgUnit.getName()+ " : " + orgUnit.getComment() );
+            for( String phoneNo : ouMapUserPhoneNo.values() )
+            {
+                System.out.print( " - "+ phoneNo );
+            }
+            System.out.println("");
+        }
+*/       
+        // For Level Names
+        String ouLevelNames[] = new String[organisationUnitService.getNumberOfOrganisationalLevels() + 1];
+        
+        for ( int i = 0; i < ouLevelNames.length; i++ )
+        {
+            ouLevelNames[i] = "Level" + i;
+        }
+
+        List<OrganisationUnitLevel> ouLevels = new ArrayList<OrganisationUnitLevel>( organisationUnitService.getFilledOrganisationUnitLevels() );
+        
+        for ( OrganisationUnitLevel ouL : ouLevels )
+        {
+            ouLevelNames[ouL.getLevel()] = ouL.getName();
+        }
+
+        levelNames = new ArrayList<String>();
+        int count1 = minOULevel;
+        
+        while ( count1 <= maxOULevel )
+        {
+            levelNames.add( ouLevelNames[count1] );
+            count1++;
+        }
+
+        periodNameList = dashBoardService.getPeriodNamesByPeriodType( dataSetPeriodType, periodList );
+        return SUCCESS;
+    }
+
+    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<Source> dso )
+    {
+        Collection<OrganisationUnit> children = organisationUnit.getChildren();
+        Iterator<OrganisationUnit> childIterator = children.iterator();
+        OrganisationUnit child;
+        
+        while ( childIterator.hasNext() )
+        {
+            child = childIterator.next();
+            if ( dso.contains( child ) )
+            {
+                orgUnitCount++;
+            }
+            getDataSetAssignedOrgUnitCount( child, dso );
+        }
+    }
+
+    // Returns the OrgUnitTree for which Root is the orgUnit
+    @SuppressWarnings( "unchecked" )
+    public List<OrganisationUnit> getChildOrgUnitTree( OrganisationUnit orgUnit )
+    {
+        List<OrganisationUnit> orgUnitTree = new ArrayList<OrganisationUnit>();
+        orgUnitTree.add( orgUnit );
+        List<OrganisationUnit> children = new ArrayList<OrganisationUnit>( orgUnit.getChildren() );
+        Collections.sort( children, new OrganisationUnitNameComparator() );
+        Iterator childIterator = children.iterator();
+        OrganisationUnit child;
+        
+        while ( childIterator.hasNext() )
+        {
+            child = (OrganisationUnit) childIterator.next();
+            orgUnitTree.addAll( getChildOrgUnitTree( child ) );
+        }
+        return orgUnitTree;
+    }// getChildOrgUnitTree end
+
+    private void getOrgUnitInfo( OrganisationUnit organisationUnit )
+    {
+        Collection<OrganisationUnit> children = organisationUnit.getChildren();
+        Iterator<OrganisationUnit> childIterator = children.iterator();
+        OrganisationUnit child;
+        while ( childIterator.hasNext() )
+        {
+            child = childIterator.next();
+            orgUnitInfo += "," + child.getId();
+            getOrgUnitInfo( child );
+        }
+    }
+
+    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<Source> dso )
+    {
+        Collection<OrganisationUnit> children = organisationUnit.getChildren();
+        Iterator<OrganisationUnit> childIterator = children.iterator();
+        OrganisationUnit child;
+        
+        while ( childIterator.hasNext() )
+        {
+            child = childIterator.next();
+            if ( dso.contains( child ) )
+            {
+                orgUnitInfo += "," + child.getId();
+                orgUnitCount++;
+            }
+            getOrgUnitInfo( child, dso );
+        }
+    }
+
+    private List<OrganisationUnit> filterChildOrgUnitsByDataSet( DataSet selectedDataSet,
+        OrganisationUnit selectedOrganisationUnit )
+    {
+        List<OrganisationUnit> filteredOrganisationUnits = getChildOrgUnitTree( selectedOrganisationUnit );
+
+        @SuppressWarnings( "unused" )
+        List<OrganisationUnit> assignedOrganisationUnits = new ArrayList<OrganisationUnit>();
+        Set<Source> assignedSources = selectedDataSet.getSources();
+        filteredOrganisationUnits.retainAll( assignedSources );
+        return filteredOrganisationUnits;
+    }
+
+}// class end
+

=== modified file 'local/in/dhis-web-dashboard/src/main/resources/META-INF/dhis/beans.xml'
--- local/in/dhis-web-dashboard/src/main/resources/META-INF/dhis/beans.xml	2010-11-22 13:02:23 +0000
+++ local/in/dhis-web-dashboard/src/main/resources/META-INF/dhis/beans.xml	2010-11-24 09:27:00 +0000
@@ -424,6 +424,41 @@
         <property name="jdbcTemplate" ref="jdbcTemplate"/>
     </bean>
 	
+	<!-- DataStatus For Mobile start  -->
+
+	<bean id="org.hisp.dhis.dashboard.ds.mobile.action.GenerateDataStatusMobileFormAction"
+        class="org.hisp.dhis.dashboard.ds.mobile.action.GenerateDataStatusMobileFormAction"
+        scope="prototype">
+        <property name="dataSetService">
+            <ref bean="org.hisp.dhis.dataset.DataSetService"/>
+        </property>
+<!--    <property name="periodService">
+            <ref bean="org.hisp.dhis.period.PeriodService"/>
+        </property>-->
+    </bean>	
+    <bean id="org.hisp.dhis.dashboard.ds.mobile.action.GenerateValidationMobileStatusResultAction"
+        class="org.hisp.dhis.dashboard.ds.mobile.action.GenerateValidationMobileStatusResultAction"
+        scope="prototype">
+        <property name="dashBoardService">
+            <ref bean="org.hisp.dhis.dashboard.util.DashBoardService"/>
+        </property>
+        <property name="dataSetService">
+            <ref bean="org.hisp.dhis.dataset.DataSetService"/>
+        </property>
+        <property name="periodService">
+            <ref bean="org.hisp.dhis.period.PeriodService"/>
+        </property>
+        <property name="organisationUnitService">
+            <ref bean="org.hisp.dhis.organisationunit.OrganisationUnitService"/>
+        </property>
+        <property name="registrationService" ref="org.hisp.dhis.dataset.CompleteDataSetRegistrationService"/>
+		<property name="userStore" ref="org.hisp.dhis.user.UserStore">
+		</property>
+    </bean>
+    <!-- DataStatus For Mobile end  -->	
+	
+	
+	
     <bean
 		id="org.hisp.dhis.dashboard.ds.action.GenerateSummaryDataStatusResultAction"
 		class="org.hisp.dhis.dashboard.ds.action.GenerateSummaryDataStatusResultAction"

=== modified file 'local/in/dhis-web-dashboard/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties'
--- local/in/dhis-web-dashboard/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties	2010-11-22 13:02:23 +0000
+++ local/in/dhis-web-dashboard/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties	2010-11-24 09:27:00 +0000
@@ -60,8 +60,15 @@
 
 ds_datastatus = DataStatus
 ds_dataset_list = DataSet List
+mobile_ds_dataset_list = Mobile DataSet List
 ds_local_language = Local Language
 ds_viewstatus = View Status
+ds_mobile     = Data Status Mobile
+ds_form_mobile = Data Status Form For  Mobile
+ds_validation_status_mobile = Validation Status For Mobile DataSet
+ds_mobile = Mobile DataSet
+ds_mobile_anm_name = ANM Name
+ds_mobile_anm_phone = ANM Mobile No.
 
 #-------DataStatusOrganisationUnitGroupWise---------------------------#
 

=== modified file 'local/in/dhis-web-dashboard/src/main/resources/struts.xml'
--- local/in/dhis-web-dashboard/src/main/resources/struts.xml	2010-11-22 13:02:23 +0000
+++ local/in/dhis-web-dashboard/src/main/resources/struts.xml	2010-11-24 09:27:00 +0000
@@ -257,6 +257,27 @@
 			<param name="stylesheets">css/StylesForTags.css</param>
 		</action>
 		
+		<!-- DataStatus For Mobile start-->
+		
+        <action name="dataStatusMobileForm"
+            class="org.hisp.dhis.dashboard.ds.mobile.action.GenerateDataStatusMobileFormAction">
+            <result name="success" type="velocity">/main.vm</result>
+            <param name="page">/dhis-web-dashboard/dataStatusMobileFront.vm</param>
+            <param name="menu">/dhis-web-dashboard/menuWithTreeForDSMobile.vm</param>
+            <param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/ds.js,javascript/db.js,javascript/date.js,javascript/hashtable.js</param>
+            <param name="stylesheets">css/StylesForTags.css</param>
+            <interceptor-ref name="organisationUnitTreeStack"/>
+        </action>		
+		
+       <action name="validationMobileStatusResult"
+            class="org.hisp.dhis.dashboard.ds.mobile.action.GenerateValidationMobileStatusResultAction">
+            <result name="success" type="velocity">/dhis-web-dashboard/validationMobileSatusResult.vm</result>
+            <param name="javascripts">javascript/ds.js,javascript/hashtable.js</param>
+            <param name="stylesheets">css/StylesForTags.css</param>
+       </action>
+			
+        <!-- DataStatus For Mobile end  -->	
+			
 		<action name="summaryStatusResult"
 			class="org.hisp.dhis.dashboard.ds.action.GenerateSummaryDataStatusResultAction">		
 			<result name="success" type="velocity">
@@ -275,12 +296,10 @@
 			<param name="stylesheets">css/StylesForTags.css</param>
 		</action>
 
-                <action name="validationStatusResult"
+        <action name="validationStatusResult"
 			class="org.hisp.dhis.dashboard.ds.action.GenerateValidationStatusResultAction">
-			<result name="success" type="velocity">
-				/dhis-web-dashboard/validationSatusResult.vm</result>
-			<param name="javascripts">
-				javascript/ds.js,javascript/hashtable.js</param>
+			<result name="success" type="velocity">/dhis-web-dashboard/validationSatusResult.vm</result>
+			<param name="javascripts">javascript/ds.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 		</action>
 

=== added file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusMobileFront.vm'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusMobileFront.vm	1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusMobileFront.vm	2010-11-24 09:27:00 +0000
@@ -0,0 +1,122 @@
+<style type='text/css'>
+    .hidden{ display: none; }
+</style>
+
+<script>
+    // Global Variables
+    var selCategory = "";
+    var selFacility = "";
+    var ouName="";
+    var dsName="";
+    var sDateIndex=0;
+    var eDateIndex=0;
+    var sDate="";
+    var eDate="";
+    var curPeriodType="";
+</script>
+
+<h1>$i18n.getString( "ds_form_mobile" )</h1>
+<hr />
+<form id="ChartGenerationForm" name="ChartGenerationForm" method="get" target="chartWindow1">
+    <table align="center" style=" border-collapse: collapse; margin-top: 0;" cellpadding="0" cellspacing="0" width="730" border=0>
+        <colgroup>
+            <col width="325">
+            <col width="80">
+            <col width="325">
+        </colgroup>
+
+        <tr>
+            <td class="NormalB" align="center">
+                <table>
+                    <tr>
+                        <td class="NormalB" colspan="2">
+                            $i18n.getString( "mobile_ds_dataset_list" ) : <br>
+                            <select id="selectedDataSets" name="selectedDataSets" onchange="getdSetPeriods()" >
+                                #foreach ( $dataSet in $dataSetList )
+                                    <option value='$dataSet.id' title='$dataSet.name'>$dataSet.name</option>
+                                #end
+                            </select>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="NormalB">&nbsp;</td>
+                    </tr>
+                    <tr>
+                        <td colspan="2" class="NormalB">
+                            $i18n.getString( "ga_facilityby" )<br>
+                                <select id="facilityLB" name="facilityLB" onchange="facilityChangeFunction(event)">
+                                    <option value="random" >Selected</option>
+                                    <option value="immChildren" selected>Immediate Children</option>
+                                    <option value="children" >Child Tree</option>
+                                </select>
+                        </td>
+                        <td class="NormalB" display="none">
+                            <br>
+                            <select class='hidden' id="categoryLB" name="categoryLB" onchange="categoryChangeFunction(event)" disabled>
+                                <option value="period">Period</option>
+                                <option value="facility" selected>Facility</option>
+                            </select>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="NormalB">&nbsp;</td>
+                    </tr>
+                    <tr>
+                        <td class="NormalB">
+                            $i18n.getString( "ga_from" )<br>
+                            <select id="sDateLB" name="sDateLB"></select>
+                        </td>
+                        <td class="NormalB">
+                            $i18n.getString( "ga_to" )<br>
+                            <select id="eDateLB" name="eDateLB"></select>
+                        </td>
+                    </tr>
+                </table>
+            </td>
+            <td class="NormalB">&nbsp; </td>
+            <td class="NormalB">
+                <table>
+                    <tr>
+                        <td class="NormalB">
+                            <input type="checkbox" name="includeZeros" id="includeZeros" checked> Include Zero
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="NormalB">
+                            $i18n.getString( "ga_orgunit" )<br>
+                            <select name="orgUnitListCB" id="orgUnitListCB" multiple style="width: 325px;height: 110px" ondblclick="remOUFunction()">
+                            </select>
+                        </td>
+                    </tr>
+               </table>
+            </td>
+        </tr>
+        <tr>
+            <td align="center" class="NormalB"> </td>
+            <td class="NormalB"> </td>
+            <td class="NormalB"> </td>
+            <td class="NormalB"> </td>
+        </tr>
+        <tr>
+            <td>
+                
+                <input type="button" name="ViewSummary" value="View DataSummary" style="font-family: Arial; font-weight: bold; color: rgb(0, 0, 0);" onclick="textvalue('SummaryStatus')"/>
+                <input type="button" name="ViewStatus" value="View DataStatus" style="font-family: Arial; font-weight: bold; color: rgb(0, 0, 0);" onclick="textvalue('DataStatus')"/>
+            </td>
+            <td class="NormalB">
+                <br/><br/><br/><br/><br/>
+                <input type="button" name="LastUpdatedStatus" value="   User Details   " style="font-family: Arial; font-weight: bold; color: rgb(0, 0, 0);" onclick="textvalue('LastUpdatedStatus')"/>
+            </td>
+            <td>
+                
+                <input type="button" name="ViewGroupWise" value="View By Data Element Group" style="font-family: Arial; font-weight: bold; color: rgb(0, 0, 0);" onclick="textvalue('GroupWiseStatus')"/>
+                <input type="button" name="ValidationStatus" value="Validation Status" style="font-family: Arial; font-weight: bold; color: rgb(0, 0, 0);" onclick="textvalue('ValidationMobileStatus')"/>
+            </td>
+        </tr>
+    </table>
+    <input type="hidden" name="selectedButton" id="selectedButton"/>
+</form>
+
+<script>
+    getdSetPeriods();
+</script>            
\ No newline at end of file

=== modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ds.js'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ds.js	2010-09-08 08:13:41 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ds.js	2010-11-24 09:27:00 +0000
@@ -71,7 +71,7 @@
 {
   
     document.getElementById("selectedButton").value = summary;
-  
+   // alert(summary);
     if(formValidationsForDataStatus())
     {
         if(summary == "SummaryStatus")
@@ -88,7 +88,13 @@
         }
         else if(summary == "ValidationStatus")
         {
-            document.ChartGenerationForm.action = "validationStatusResult.action";
+        	document.ChartGenerationForm.action = "validationStatusResult.action";
+        	//alert("inside validation status reult");
+            document.ChartGenerationForm.submit();
+        }
+        else if(summary == "ValidationMobileStatus")
+        {
+            document.ChartGenerationForm.action = "validationMobileStatusResult.action";
             document.ChartGenerationForm.submit();
         }
         else if(summary == "LastUpdatedStatus")

=== modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/menu.vm'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/menu.vm	2010-11-03 09:50:21 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/menu.vm	2010-11-24 09:27:00 +0000
@@ -14,6 +14,7 @@
 		<li>Data Status</li>
 			<ul>				
 		   		<li><a href="dataStatusForm.action">Data Status</a></li>
+		   		<li><a href="dataStatusMobileForm.action">$i18n.getString( "ds_mobile" )</a></li>
 				<li><a href="dataStatusOrgnisationunitGroupSetWiseForm.action">OrgUnitGroupwise Data Status</a></li>
 				<li><a href="NullReporter.action">Null Reporter</a></li>	
 	    		<!-- <li><a href="commentsForm.action">Comments</a></li>

=== added file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/menuWithTreeForDSMobile.vm'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/menuWithTreeForDSMobile.vm	1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/menuWithTreeForDSMobile.vm	2010-11-24 09:27:00 +0000
@@ -0,0 +1,34 @@
+<h2>DashBoard</h2>
+    <ul>
+        <li>Data Status</li>
+        <ul>
+            <li>Mobile Data Status</li>
+         </ul>
+    </ul>
+<div style=" float:right; font-size:6pt; cursor:pointer; margin-top:-20px; ">
+        <a href="index.action">
+          <img src="images/goback.png" width="36" height="30" alt="$i18n.getString( "go_back" )"></a>
+</div>
+#parse( "/dhis-web-commons/ouwt/orgunittree.vm" )
+
+<!-- The script that registeres selctions in the orgunit tree -->
+<script type="text/javascript">
+
+function orgUnitHasBeenSelected( orgUnitIds )
+{    
+    if(orgUnitIds == null || orgUnitIds == "" )
+    {
+        return;
+    }
+
+    if(orgUnitIds != null)
+        getOUDetails(orgUnitIds);   
+}
+           
+selection.setListenerFunction( orgUnitHasBeenSelected );
+
+</script>
+
+
+
+

=== added file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/validationMobileSatusResult.vm'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/validationMobileSatusResult.vm	1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/validationMobileSatusResult.vm	2010-11-24 09:27:00 +0000
@@ -0,0 +1,96 @@
+
+<link type="text/css" rel="stylesheet" media="screen" href="css/StylesForTags.css"> 
+
+<script>
+    var startDate = "$sDateLB";
+    var endDate = "$eDateLB";
+    var dsType = "$selectedButton";
+
+    function getImmChildInfo(evt, dsId, selOrgUnit)
+    {
+        immChildOption = "yes";
+        evt.target.href = "validationMobileStatusResult.action?immChildOption="+immChildOption+"&dsId="+dsId+"&sDateLB="+startDate+"&eDateLB="+endDate+"&ouId="+selOrgUnit+"&selectedButton="+dsType;
+    }
+
+    function exportDataStatusResultToWorkBook()
+    {
+        document.getElementById('htmlCode').value = document.getElementById('formResult').innerHTML;
+        return true;
+    }
+</script>
+
+<form id="form1" name="form1" action="exportDataStatusToExcel.action" method="post" onsubmit="return exportDataStatusResultToWorkBook()" target="_newtab">
+    <input type="hidden" name="htmlCode" id="htmlCode" />
+    <div align="right" class="NormalB">
+        <input type="submit" name="ExportToWorkBook" value="Export To WorkBook" style="width: 160; height: 25; font-family:Arial; font-weight:bold; color:#000000">
+    </div>
+
+    <div id="formResult">
+        <div align="center" class="NormalB">$i18n.getString( "ds_validation_status_mobile" )</div>
+        
+        <div align="right">
+            <table width="30%">
+                <tr class="TableHeadingCellStyles" >
+                    <td  bgcolor="#a0c0a0">&nbsp;</td>
+                    <td  align="left"><strong>Validation Check Performed On Data Entry Screen</strong></td>
+                </tr>
+                <tr class="TableHeadingCellStyles">
+                    <td  bgcolor="#ff0000">&nbsp;</td>
+                    <td  align="left"><strong>Validation Check Not Performed On Data Entry Screen</strong></td>
+                </tr>
+            </table>
+        </div>
+        
+        #set($count2 = 0)
+
+        <br/>
+        
+        <div align="left" class="NormalB">$i18n.getString( "ds_mobile" ) : $selDataSet.name</div>
+            <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-style: solid" bordercolor="black" width="100%">
+                <tr class="TableHeadingCellStyles" align="center">
+                    #foreach($levelName in $levelNames)
+                        <td class="TableHeadingCellStyles"  bgcolor="#C0C0C0"><strong>$!levelName</strong></td>
+                    #end
+                   <td class="TableHeadingCellStyles"  bgcolor="#C0C0C0"><strong>$i18n.getString( "ds_mobile_anm_name" )</strong></td>
+                   <td class="TableHeadingCellStyles"  bgcolor="#C0C0C0"><strong>$i18n.getString( "ds_mobile_anm_phone" )</strong></td>
+                    #foreach( $periodname in $periodNameList )
+                        <td class="TableHeadingCellStyles"  bgcolor="#C0C0C0"><strong>$periodname</strong></td>
+                    #end
+                </tr>
+
+                #foreach( $chiildorgUnit in $orgUnitList )
+                    #set( $count1 = $minOULevel )
+                    #set( $curOrgUnitLevel = $organisationUnitService.getLevelOfOrganisationUnit($chiildorgUnit) )
+                    <tr class="TableHeadingCellStyles" >
+                        #foreach($levelName in $levelNames)
+                            #if($count1 == $curOrgUnitLevel)
+                               <td><a href="#" onclick="javascript:getImmChildInfo(event, '$selDataSet.id', '$chiildorgUnit.id')" target="_blank">$chiildorgUnit.name</a></td>                               
+                            #else
+                               <td>&nbsp;</td>
+                            #end
+                            #set($count1 = $count1 + 1)
+                        #end
+                         #set( $dsValidationPhoneNo = $ouMapUserPhoneNo.get($chiildorgUnit) )
+                        
+                        <td class="TableHeadingCellStyles">$!chiildorgUnit.comment</td>
+                         
+                        <td class="TableHeadingCellStyles">$dsValidationPhoneNo</td>
+                        
+                        #set( $dsValidationPassResults = $ouMapValidationPassStatusResult.get($chiildorgUnit) )
+                        
+                        #foreach( $result in $dsValidationPassResults )     
+                            #if($result < 0)
+                                <td  bgcolor="white">&nbsp;</td>
+                            #elseif($result == 0)
+                                <td align="center" bgcolor="#ff0000"><font color="#ffffff">0</font></td>
+                            #elseif($result == 1)
+                                <td  align="center" bgcolor="#a0c0a0"><font color="#ffffff">1</font></td>
+                            #elseif($result > 1)
+                                <td align="center" bgcolor="#a0c0a0"><font color="#ffffff">$result</font></td>                           
+                            #end
+                        #end
+                    </tr>
+                #end
+        </table>
+    </div>
+</form>

=== modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/validationSatusResult.vm'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/validationSatusResult.vm	2010-11-23 09:59:00 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/validationSatusResult.vm	2010-11-24 09:27:00 +0000
@@ -31,12 +31,12 @@
         <div align="right">
             <table width="30%">
                 <tr class="TableHeadingCellStyles" >
-                    <td class="TableHeadingCellStyles" bgcolor="#a0c0a0">&nbsp;</td>
-                    <td class="TableHeadingCellStyles" align="left"><strong>Validation Check Performed On Data Entry Screen</strong></td>
+                    <td  bgcolor="#a0c0a0">&nbsp;</td>
+                    <td  align="left"><strong>Validation Check Performed On Data Entry Screen</strong></td>
                 </tr>
                 <tr class="TableHeadingCellStyles">
-                    <td class="TableHeadingCellStyles" bgcolor="#ff0000">&nbsp;</td>
-                    <td class="TableHeadingCellStyles" align="left"><strong>Validation Check Not Performed On Data Entry Screen</strong></td>
+                    <td bgcolor="#ff0000">&nbsp;</td>
+                    <td align="left"><strong>Validation Check Not Performed On Data Entry Screen</strong></td>
                 </tr>
             </table>
         </div>
@@ -46,7 +46,7 @@
         <br/>
         
         <div align="left" class="NormalB">DataSet : $selDataSet.name</div>
-            <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse  border-style: solid" bordercolor="black" width="100%">
+            <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse;  border-style: solid" bordercolor="black" width="100%">
 	            <tr class="TableHeadingCellStyles" align="center">
 	                #foreach($levelName in $levelNames)
 	                    <td class="TableHeadingCellStyles"  bgcolor="#C0C0C0"><strong>$!levelName</strong></td>