← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2214: Bug Fixed: Displaying Hyperlink for regular dataelements which doesn't calculate from Benificiay ...

 

------------------------------------------------------------
revno: 2214
committer: Bharath <chbharathk@xxxxxxxxx>
branch nick: trunk
timestamp: Thu 2010-09-23 18:46:55 +0530
message:
  Bug Fixed: Displaying Hyperlink for regular dataelements which doesn't calculate from Benificiay Info
modified:
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ga/action/charts/GenerateChartDataAction.java
  local/in/dhis-web-dashboard/src/main/resources/META-INF/dhis/beans.xml
  local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisResult.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/ga/action/charts/GenerateChartDataAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ga/action/charts/GenerateChartDataAction.java	2010-09-23 11:04:04 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ga/action/charts/GenerateChartDataAction.java	2010-09-23 13:16:55 +0000
@@ -47,6 +47,8 @@
 import org.amplecode.quick.StatementManager;
 import org.apache.struts2.ServletActionContext;
 import org.hisp.dhis.aggregation.AggregationService;
+import org.hisp.dhis.caseaggregation.CaseAggregationMapping;
+import org.hisp.dhis.caseaggregation.CaseAggregationMappingService;
 import org.hisp.dhis.dashboard.util.DashBoardService;
 import org.hisp.dhis.dashboard.util.SurveyData;
 import org.hisp.dhis.dataelement.DataElement;
@@ -151,6 +153,13 @@
         this.dataValueService = dataValueService;
     }
 
+    private CaseAggregationMappingService caseAggregationMappingService;
+    
+    public void setCaseAggregationMappingService( CaseAggregationMappingService caseAggregationMappingService )
+    {
+        this.caseAggregationMappingService = caseAggregationMappingService;
+    }
+    
     // -------------------------------------------------------------------------
     // Comparator
     // -------------------------------------------------------------------------
@@ -348,10 +357,18 @@
     
     private List<String> selectedValues;
 
-    public List<String> getSelectedValues() {
+    public List<String> getSelectedValues() 
+    {
         return selectedValues;
     }
 
+    private List<String> selectedStatus;
+    
+    public List<String> getSelectedStatus()
+    {
+        return selectedStatus;
+    }
+
     private String deSelection;
 
     public void setDeSelection( String deSelection )
@@ -465,6 +482,7 @@
         denList = new ArrayList<List<String>>();
         targetList = new ArrayList<Double>();
         selectedValues = new ArrayList<String>();
+        selectedStatus = new ArrayList<String>();
         selectedOptionComboList = new ArrayList<DataElementCategoryOptionCombo>();
 
         // OrgUnit Related Info
@@ -882,6 +900,17 @@
                         {
                             String values = selectedOrgUnit.getId() + ":"+ dElement.getId() + ":"+ decoc.getId() + ":" + p.getId();
                             selectedValues.add(values);
+                            
+                            CaseAggregationMapping caseAggMapping = caseAggregationMappingService.getCaseAggregationMappingByOptionCombo( dElement, decoc );
+                            
+                            if( caseAggMapping == null )
+                            {
+                                selectedStatus.add( "no" );
+                            }
+                            else
+                            {
+                                selectedStatus.add( "yes" );
+                            }
 
                             if( aggDataCB == null )
                             {
@@ -957,6 +986,17 @@
                                 String values = selectedOrgUnit.getId() + ":"+ dElement.getId() + ":"+ decoc1.getId() + ":" + p.getId();
                                 selectedValues.add(values);
 
+                                CaseAggregationMapping caseAggMapping = caseAggregationMappingService.getCaseAggregationMappingByOptionCombo( dElement, decoc1 );
+                                
+                                if( caseAggMapping == null )
+                                {
+                                    selectedStatus.add( "no" );
+                                }
+                                else
+                                {
+                                    selectedStatus.add( "yes" );
+                                }
+
                                 if ( aggDataCB == null )
                                 {
                                     DataValue dv1 = dataValueService.getDataValue( selectedOrgUnit, dElement, p, decoc1 );

=== 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-09-23 11:04:04 +0000
+++ local/in/dhis-web-dashboard/src/main/resources/META-INF/dhis/beans.xml	2010-09-23 13:16:55 +0000
@@ -82,6 +82,9 @@
         <property name="dataValueService">
             <ref bean="org.hisp.dhis.datavalue.DataValueService"/>
         </property>
+        <property name="caseAggregationMappingService">
+            <ref bean="org.hisp.dhis.caseaggregation.CaseAggregationMappingService"/>
+        </property>
     </bean>
 	
     <bean id="org.hisp.dhis.dashboard.ga.action.charts.GenerateChartAction"

=== modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisResult.vm'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisResult.vm	2010-08-31 11:27:36 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisResult.vm	2010-09-23 13:16:55 +0000
@@ -424,7 +424,7 @@
 			<td class="TableHeadingCellStyles" style="border-style: dotted; border-width: 1">$yseriesList.get($count1)</td>
                 
 			#foreach($data in $onedataList)
-				#if( $categoryLB.equals( "period" ) && !$ougSetCB && $riRadio.equals( "dataElementsRadio" ) )
+				#if( $categoryLB.equals( "period" ) && !$ougSetCB && $riRadio.equals( "dataElementsRadio" ) && $selectedStatus.get($count3).equals("yes") )
 					<td class="TableDataCellStyles" align="center" style="border-style: dotted; border-width: 1"><a href="#" onclick="javascript:drillDownResult( event, '$selectedValues.get($count3)' )" target="_blank">$data</a></td>               		             
 					#set( $count3 = $count3 + 1 )
 				#else