← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4924: Merge Data Analyser from 2.3 to trunk

 

------------------------------------------------------------
revno: 4924
committer: Mithilesh Kumar Thakur<mithilesh.hisp@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-10-13 15:19:44 +0530
message:
  Merge Data Analyser from 2.3 to trunk
added:
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/sms/
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/sms/action/
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/sms/action/BulkSMSForProgSummaryFormAction.java
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/sms/action/BulkSMSForProgSummaryResultAction.java
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/util/BulkSMSHttpInterface.java
  local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/BulkSMSForProgSummaryForm.vm
  local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/BulkSMSForProgSummaryResult.vm
modified:
  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/util/DashBoardService.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/dataanalyser/i18n_module.properties
  local/in/dhis-web-dashboard/src/main/resources/struts.xml
  local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/menu.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/dataanalyser/action/DashBoardHomePageAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/action/DashBoardHomePageAction.java	2011-09-03 09:46:15 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/action/DashBoardHomePageAction.java	2011-10-13 09:49:44 +0000
@@ -196,6 +196,7 @@
         return navigationString;
     }
     
+    
     // ---------------------------------------------------------------
     // Action Implementation
     // ---------------------------------------------------------------

=== added directory 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/sms'
=== added directory 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/sms/action'
=== added file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/sms/action/BulkSMSForProgSummaryFormAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/sms/action/BulkSMSForProgSummaryFormAction.java	1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/sms/action/BulkSMSForProgSummaryFormAction.java	2011-10-13 09:49:44 +0000
@@ -0,0 +1,47 @@
+package org.hisp.dhis.dataanalyser.sms.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hisp.dhis.user.UserGroup;
+import org.hisp.dhis.user.UserGroupService;
+
+import com.opensymphony.xwork2.Action;
+
+public class BulkSMSForProgSummaryFormAction implements Action
+{
+
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+    
+    private UserGroupService userGroupService;
+
+    public void setUserGroupService( UserGroupService userGroupService )
+    {
+        this.userGroupService = userGroupService;
+    }
+    
+    // -------------------------------------------------------------------------
+    // Getter & Setter
+    // -------------------------------------------------------------------------
+
+    private List<UserGroup> userGroups;
+
+    public List<UserGroup> getUserGroups()
+    {
+        return userGroups;
+    }
+    
+    // -------------------------------------------------------------------------
+    // Action Implementation
+    // -------------------------------------------------------------------------
+    
+    public String execute() throws Exception
+    {
+        userGroups = new ArrayList<UserGroup>( userGroupService.getAllUserGroups() );
+        
+        return SUCCESS;
+    }
+    
+}

=== added file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/sms/action/BulkSMSForProgSummaryResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/sms/action/BulkSMSForProgSummaryResultAction.java	1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/sms/action/BulkSMSForProgSummaryResultAction.java	2011-10-13 09:49:44 +0000
@@ -0,0 +1,97 @@
+package org.hisp.dhis.dataanalyser.sms.action;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.hisp.dhis.dataanalyser.util.BulkSMSHttpInterface;
+import org.hisp.dhis.dataanalyser.util.DashBoardService;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.user.User;
+import org.hisp.dhis.user.UserGroup;
+import org.hisp.dhis.user.UserGroupService;
+
+import com.opensymphony.xwork2.Action;
+
+public class BulkSMSForProgSummaryResultAction implements Action
+{
+
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private UserGroupService userGroupService;
+
+    public void setUserGroupService( UserGroupService userGroupService )
+    {
+        this.userGroupService = userGroupService;
+    }
+
+    private DashBoardService dashBoardService;
+
+    public void setDashBoardService( DashBoardService dashBoardService )
+    {
+        this.dashBoardService = dashBoardService;
+    }
+
+    // -------------------------------------------------------------------------
+    // Getter & Setter
+    // -------------------------------------------------------------------------
+    
+    private List<Integer> usergroups;
+    
+    public void setUsergroups( List<Integer> usergroups )
+    {
+        this.usergroups = usergroups;
+    }
+
+    private String resultMessage;
+    
+    public String getResultMessage()
+    {
+        return resultMessage;
+    }
+    
+    // -------------------------------------------------------------------------
+    // Action Implementation
+    // -------------------------------------------------------------------------
+
+    public String execute() throws Exception
+    {
+        Map<OrganisationUnit,String> tempOrgUnitMap = new HashMap<OrganisationUnit, String>();
+        
+        BulkSMSHttpInterface bulkSMSHTTPInterface = new BulkSMSHttpInterface();;
+        
+        try
+        {
+            for( Integer userGroupId : usergroups )
+            {
+                UserGroup userGroup = userGroupService.getUserGroup( userGroupId );
+                
+                for( User user : userGroup.getMembers() )
+                {
+                    String phoneNumber = user.getPhoneNumber();
+                    
+                    for( OrganisationUnit orgUnit : user.getOrganisationUnits() )
+                    {
+                        String prgWiseSummaryMsg = tempOrgUnitMap.get( orgUnit );
+                        
+                        if( prgWiseSummaryMsg == null )
+                        {
+                            prgWiseSummaryMsg = dashBoardService.getProgramwiseSummarySMS( orgUnit );
+                        }
+                        
+                        bulkSMSHTTPInterface.sendMessage( prgWiseSummaryMsg, phoneNumber );
+                    }
+                }
+            }
+            
+            resultMessage = bulkSMSHTTPInterface.checkBalance();
+        }
+        catch( Exception e )
+        {
+            resultMessage = "Not able to sent SMS to the group bec of "+e.getMessage();
+        }
+        return SUCCESS;
+    }
+}

=== added file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/util/BulkSMSHttpInterface.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/util/BulkSMSHttpInterface.java	1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/util/BulkSMSHttpInterface.java	2011-10-13 09:49:44 +0000
@@ -0,0 +1,296 @@
+package org.hisp.dhis.dataanalyser.util;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+
+public class BulkSMSHttpInterface
+{
+    private String username, password, message, phoneNo, senderName;
+
+    private URL url;
+
+    private String url_string, data, response = "";
+
+    Properties properties;
+
+    public BulkSMSHttpInterface() throws FileNotFoundException, IOException
+    {
+        /*****this constructor takes the username , password and sendername from a file a file**********/
+        // FileReader bulkSMSconfig= new FileReader( "BulkSMS.conf");
+        properties = new Properties();
+
+        properties.load( new FileReader( System.getenv( "DHIS2_HOME" ) + File.separator + "SMSServer.conf" ) );
+        username = getUsername();
+        password = getPassword();
+        senderName = getSenderName();
+    }
+
+    public String getUsername()
+    {
+        return properties.getProperty( "username" );
+    }
+
+    public String getPassword()
+    {
+        return properties.getProperty( "password" );
+    }
+
+    public String getSenderName()
+    {
+        return properties.getProperty( "sendername" );
+    }
+
+    public BulkSMSHttpInterface( String username, String password, String senderName )
+    {
+        this.username = username;
+        this.password = password;
+        this.senderName = senderName;
+    }
+
+    public String sendMessage( String message, String phoneNo ) throws MalformedURLException, IOException
+    {
+        //Populating the data according to the api link
+        data = "username=" + username + "&password=" + password + "&sendername=" + senderName + "&mobileno=" + phoneNo + "&message=" + message;
+
+        //this link is used for sending sms(there are different links for different functions.refer to the api for more details)
+        url_string = "http://bulksms.mysmsmantra.com:8080/WebSMS/SMSAPI.jsp?";;
+
+        url = new URL( url_string );
+        URLConnection conn = url.openConnection();
+        conn.setDoOutput( true );
+        
+        //sending data:
+        OutputStreamWriter out = new OutputStreamWriter( conn.getOutputStream() );
+        out.write( data );
+        out.flush();
+
+        //recieving response:
+        InputStreamReader in = new InputStreamReader( conn.getInputStream() );
+        BufferedReader buff_in = new BufferedReader( in );
+        while ( buff_in.ready() )
+        {
+            response += buff_in.readLine() + "   ";
+            //System.out.println( response + " " + data );
+        }
+
+        buff_in.close();
+        out.close();
+
+        return response;
+    }
+
+    public String sendMessages( String message, List<String> phonenos ) throws MalformedURLException, IOException
+    {
+
+        Iterator it = phonenos.iterator();
+
+        while ( it.hasNext() )
+        {
+            if ( phoneNo == null )
+            {
+                phoneNo = (String) it.next();
+            } else
+            {
+                phoneNo += "," + it.next();
+            }
+        }
+        //System.out.println("-------------------->"+phoneNo);
+
+
+
+        data = "username=" + username + "&password=" + password + "&sendername=" + senderName + "&mobileno=" + phoneNo + "&message=" + message;
+
+        //for sending multiple sms (same as single sms)
+        url_string = "http://bulksms.mysmsmantra.com:8080/WebSMS/SMSAPI.jsp?";;
+
+        url = new URL( url_string );
+        URLConnection conn = url.openConnection();
+        conn.setDoOutput( true );
+
+        OutputStreamWriter out = new OutputStreamWriter( conn.getOutputStream() );
+        out.write( data );
+        out.flush();
+
+        InputStreamReader in = new InputStreamReader( conn.getInputStream() );
+        BufferedReader buff_in = new BufferedReader( in );
+
+        while ( buff_in.ready() )
+        {
+            response += buff_in.readLine() + "   ";
+            System.out.println( response + " " + data );
+
+        }
+
+        buff_in.close();
+        out.close();
+
+        return response;
+
+
+    }
+
+    /* this method is for testing only */
+    public String sendMessages( String message, String filename ) throws FileNotFoundException, IOException
+    {
+        properties = new Properties();
+        List<String> phoneno = new ArrayList<String>();
+        FileReader fr = new FileReader( System.getenv( "DHIS2_HOME" ) + "test.prop" );
+        BufferedReader bfr = new BufferedReader( fr );
+
+        while ( bfr.ready() )
+        {
+
+            if ( phoneNo == null )
+            {
+                phoneNo = bfr.readLine();
+            } else
+            {
+                phoneNo += "," + bfr.readLine();
+            }
+        }
+        System.out.println( phoneNo );
+
+        data = "username=" + username + "&password=" + password + "&sendername=" + senderName + "&mobileno=" + phoneNo + "&message=" + message;
+
+        //for sending multiple sms (same as single sms)
+        url_string = "http://bulksms.mysmsmantra.com:8080/WebSMS/SMSAPI.jsp?";;
+
+        url = new URL( url_string );
+        URLConnection conn = url.openConnection();
+        conn.setDoOutput( true );
+
+        OutputStreamWriter out = new OutputStreamWriter( conn.getOutputStream() );
+        out.write( data );
+        out.flush();
+
+        InputStreamReader in = new InputStreamReader( conn.getInputStream() );
+        BufferedReader buff_in = new BufferedReader( in );
+
+        while ( buff_in.ready() )
+        {
+            response += buff_in.readLine() + "   ";
+            System.out.println( response + " " + data );
+        }
+
+        buff_in.close();
+        out.close();
+
+        return response;
+    }
+
+    public String sendMessages( String message, String filename, int repeat ) throws FileNotFoundException, IOException
+    {
+        properties = new Properties();
+        List<String> phonenoList = new ArrayList<String>();
+        FileReader fr = new FileReader( System.getenv( "DHIS2_HOME" ) + "test.prop" );
+        BufferedReader bfr = new BufferedReader( fr );
+        //get nos from file
+        String str;
+        while ( bfr.ready() )
+        {
+            //str=bfr.readLine();
+            //if (!str.equals( "") )
+            phonenoList.add( bfr.readLine() );
+        }
+        //put them in a list
+        int phoneListSizeOriginal = phonenoList.size();
+        for ( int i = 0; i < repeat; i++ )
+        {
+            for ( int j = 0; j < phoneListSizeOriginal; j++ )
+            {
+                phonenoList.add( phonenoList.get( j ) );
+            }
+        }
+        for ( int i = 0; i < phonenoList.size(); i++ )
+        {
+            System.out.print( phonenoList.get( i ) + " " );
+        }
+
+        //append them in a string
+        for ( int i = 0; i < phonenoList.size(); i++ )
+        {
+            if ( phoneNo == null )
+            {
+                phoneNo = phonenoList.get( i );
+                // System.out.println("->"+phoneNo);
+
+            } else
+            {
+                phoneNo += "," + phonenoList.get( i );
+                //   System.out.println("-->"+phoneNo+"   ----"+phonenoList.get( i ) );
+            }
+        }
+
+
+        System.out.println( phoneNo );
+
+        data = "username=" + username + "&password=" + password + "&sendername=" + senderName + "&mobileno=" + phoneNo + "&message=" + message;
+
+        //for sending multiple sms (same as single sms)
+        url_string = "http://bulksms.mysmsmantra.com:8080/WebSMS/SMSAPI.jsp?";;
+
+        url = new URL( url_string );
+        URLConnection conn = url.openConnection();
+        conn.setDoOutput( true );
+
+        OutputStreamWriter out = new OutputStreamWriter( conn.getOutputStream() );
+        out.write( data );
+        out.flush();
+
+        InputStreamReader in = new InputStreamReader( conn.getInputStream() );
+        BufferedReader buff_in = new BufferedReader( in );
+
+        while ( buff_in.ready() )
+        {
+            response += buff_in.readLine() + "   ";
+            System.out.println( response + " " + data );
+
+        }
+
+        buff_in.close();
+        out.close();
+
+        return response;
+    }
+
+    public String checkBalance() throws MalformedURLException, IOException
+    {
+        data = "username=" + username + "&password=" + password;
+
+        //for checking balance
+        url_string = "http://bulksms.mysmsmantra.com:8080/WebSMS/balance.jsp?";;
+        url = new URL( url_string );
+        URLConnection conn = url.openConnection();
+        conn.setDoOutput( true );
+
+        OutputStreamWriter out = new OutputStreamWriter( conn.getOutputStream() );
+        out.write( data );
+        out.flush();
+
+        InputStreamReader in = new InputStreamReader( conn.getInputStream() );
+        BufferedReader buff_in = new BufferedReader( in );
+
+        while ( buff_in.ready() )
+        {
+            response += buff_in.readLine() + "<br/>";
+        }
+
+        buff_in.close();
+        out.close();
+
+        return response;
+    }
+
+}

=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/util/DashBoardService.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/util/DashBoardService.java	2011-09-03 09:46:15 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/util/DashBoardService.java	2011-10-13 09:49:44 +0000
@@ -27,6 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import static org.hisp.dhis.system.util.ConversionUtils.getIdentifiers;
+import static org.hisp.dhis.system.util.TextUtils.getCommaDelimitedString;
+
 import java.sql.Connection;
 import java.sql.Statement;
 import java.text.SimpleDateFormat;
@@ -115,14 +118,59 @@
         this.jdbcTemplate = jdbcTemplate;
     }
 
+    
+    
+    public String getProgramwiseSummarySMS( OrganisationUnit orgUnit )
+    {
+        List<OrganisationUnit> childTree = new ArrayList<OrganisationUnit>( organisationUnitService.getOrganisationUnitWithChildren( orgUnit.getId() ) );
+        String orgUnitIdsByComma = getCommaDelimitedString( getIdentifiers( OrganisationUnit.class, childTree ) );
+        String prgWiseSummaryMsg = "";
+     
+        try
+        {
+            String query = "SELECT COUNT(*) FROM patient " +
+                                " WHERE organisationunitid IN ("+ orgUnitIdsByComma +")";
+    
+            SqlRowSet rs1 = jdbcTemplate.queryForRowSet( query );
+    
+            if ( rs1 != null && rs1.next() )
+            {
+                Integer totalRegCount = rs1.getInt( 1 );
+                
+                prgWiseSummaryMsg = orgUnit.getShortName()+";TotalReg:"+totalRegCount+";";
+            }
+            
+            query = "SELECT program.name, COUNT(*) FROM programinstance " +
+            		" INNER JOIN patient ON programinstance.patientid = patient.patientid " +
+            		" INNER JOIN program ON programinstance.programid = program.programid " +
+            		" WHERE patient.organisationunitid IN ("+ orgUnitIdsByComma +") GROUP BY program.programid";
+            
+            SqlRowSet rs2 = jdbcTemplate.queryForRowSet( query );
+            
+            while ( rs2.next() )
+            {
+                String programName = rs2.getString( 1 );
+                Integer totalCount = rs2.getInt( 2 );
+                
+                prgWiseSummaryMsg += programName+":"+totalCount+";";
+            }
+        }
+        catch( Exception e )
+        {
+            throw new RuntimeException( e );
+        }
+        
+        return prgWiseSummaryMsg;
+    }
+    
     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";
+            				" ON programinstance.patientid = patient.patientid " +
+            				" WHERE patient.organisationunitid IN ("+ orgUnitIdsByComma +") GROUP BY programid";
 
             SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
             

=== 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	2011-09-03 09:46:15 +0000
+++ local/in/dhis-web-dashboard/src/main/resources/META-INF/dhis/beans.xml	2011-10-13 09:49:44 +0000
@@ -1387,5 +1387,19 @@
         </property>
         <property name="jdbcTemplate" ref="jdbcTemplate"/>
 	</bean>		
+
+    <!-- BULK SMS -->
+    <!-- BULK SMS: Programwise Summary -->
+    <bean id="org.hisp.dhis.dataanalyser.sms.action.BulkSMSForProgSummaryFormAction"
+        class="org.hisp.dhis.dataanalyser.sms.action.BulkSMSForProgSummaryFormAction"
+        scope="prototype">
+        <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService"/>
+    </bean>     
+    <bean id="org.hisp.dhis.dataanalyser.sms.action.BulkSMSForProgSummaryResultAction"
+        class="org.hisp.dhis.dataanalyser.sms.action.BulkSMSForProgSummaryResultAction"
+        scope="prototype">
+        <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
+		<property name="dashBoardService" ref="org.hisp.dhis.dataanalyser.util.DashBoardService" />
+    </bean>     
 		
 </beans>
\ No newline at end of file

=== modified file 'local/in/dhis-web-dashboard/src/main/resources/org/hisp/dhis/dataanalyser/i18n_module.properties'
--- local/in/dhis-web-dashboard/src/main/resources/org/hisp/dhis/dataanalyser/i18n_module.properties	2011-06-17 04:57:05 +0000
+++ local/in/dhis-web-dashboard/src/main/resources/org/hisp/dhis/dataanalyser/i18n_module.properties	2011-10-13 09:49:44 +0000
@@ -154,6 +154,7 @@
 back = Back
 organisation_not_selected = There is no organization unit selected
 period_not_selected = Select Available Period
-dataset_not_selected = Select Available data sets 
+dataset_not_selected = Select Available data sets
+bulk_sms = Bulk SMS
 
 

=== modified file 'local/in/dhis-web-dashboard/src/main/resources/struts.xml'
--- local/in/dhis-web-dashboard/src/main/resources/struts.xml	2011-09-03 09:46:15 +0000
+++ local/in/dhis-web-dashboard/src/main/resources/struts.xml	2011-10-13 09:49:44 +0000
@@ -34,13 +34,12 @@
 		
 		<action name="generateChartDataElement"
 			class="org.hisp.dhis.dataanalyser.ga.action.charts.GenerateChartDataElementAction">
-			<result name="success" type="velocity">/popup.vm</result>
-			<param name="page">
-				/dhis-web-dashboard/graphicalAnalysisDataElementResult.vm</param>
+			<!--<result name="success" type="velocity">/popup.vm</result>-->
+			<result name="success" type="velocity">/content.vm</result>
+			<param name="page">/dhis-web-dashboard/graphicalAnalysisDataElementResult.vm</param>
 			
 			<!--<result name="success" type="velocity">/dhis-web-dashboard/graphicalAnalysisDataElementResult.vm</result>-->
-			<param name="javascripts">
-				../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/ga.js,javascript/hashtable.js,javascript/gadataelement.js</param>
+			<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/ga.js,javascript/hashtable.js,javascript/gadataelement.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
@@ -966,7 +965,23 @@
 			<param name="page">/dhis-web-dashboard/dataEntrySummaryStatusResult.vm</param>
 			<param name="javascripts">javascript/ds.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
-		</action>					
-				
+		</action>
+
+	<!-- BULK SMS -->
+	<!-- BULK SMS: Programwise Summary -->
+        <action name="prgwiseSummaryBulkSMSForm"
+            class="org.hisp.dhis.dataanalyser.sms.action.BulkSMSForProgSummaryFormAction">
+            <result name="success" type="velocity">/main.vm</result>
+            <param name="page">/dhis-web-dashboard/BulkSMSForProgSummaryForm.vm</param>
+            <param name="menu">/dhis-web-dashboard/menu.vm</param>
+        </action>
+        <action name="prgwiseSummaryBulkSMSResult"
+            class="org.hisp.dhis.dataanalyser.sms.action.BulkSMSForProgSummaryResultAction">
+            <result name="success" type="velocity">/main.vm</result>
+            <param name="page">/dhis-web-dashboard/BulkSMSForProgSummaryResult.vm</param>
+            <param name="menu">/dhis-web-dashboard/menu.vm</param>
+        </action>
+
+
 	</package>
 </struts>
\ No newline at end of file

=== added file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/BulkSMSForProgSummaryForm.vm'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/BulkSMSForProgSummaryForm.vm	1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/BulkSMSForProgSummaryForm.vm	2011-10-13 09:49:44 +0000
@@ -0,0 +1,23 @@
+
+<h3>BULK SMS Form</h3>
+<hr />
+
+<form id="form1" name="form1" method="get" action="prgwiseSummaryBulkSMSResult.action">
+	<table>
+		<tr>
+			<td>
+				<select id="usergroups" name="usergroups" multiple style="width:300px;height:150px">
+					#foreach( $usergroup in $userGroups )
+						<option value="$usergroup.id">$usergroup.name</option>
+					#end
+				</select>
+			</td>
+		</tr>
+		<tr><td>&nbsp;</td></tr>
+		<tr>
+			<td>
+				<input type="submit" name="sendsms" value="send sms - prg wise summary" />
+			</td>
+		</tr>
+	</table>
+</form>
\ No newline at end of file

=== added file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/BulkSMSForProgSummaryResult.vm'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/BulkSMSForProgSummaryResult.vm	1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/BulkSMSForProgSummaryResult.vm	2011-10-13 09:49:44 +0000
@@ -0,0 +1,5 @@
+
+<input type="button" value="Back" onclick="location.href='prgwiseSummaryBulkSMSForm.action'" />
+<br/>
+
+<h4>$resultMessage</h4>
\ No newline at end of file

=== 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	2011-06-07 05:58:08 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/menu.vm	2011-10-13 09:49:44 +0000
@@ -23,5 +23,10 @@
 				<li><a href="dataStatusDataSetWiseForm.action">$i18n.getString( "ds_dataset_wise" )</a></li>	
 	    		<!-- <li><a href="commentsForm.action">Comments</a></li>
 		   		<li><a href="dashBoardMatrixForm.action">DashBoard matrix</a></li> -->
-		   	</ul>		   	
+		   	</ul>
+		<li>$i18n.getString( "bulk_sms" )</li>
+			<ul>
+				<li><a href="#">$i18n.getString( "Due Dates" )</a></li>
+				<li><a href="prgwiseSummaryBulkSMSForm.action">$i18n.getString( "Programwise Summary" )</a></li>
+			</ul>
 	</ul>
\ No newline at end of file