[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 11690: Renamed template

2013-08-18 Thread noreply

revno: 11690
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Sun 2013-08-18 20:54:32 +0200
message:
  Renamed template
renamed:
  
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm
 => 
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/dashboard.vm
modified:
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml
  
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/dashboard.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 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml	2013-07-24 15:58:43 +
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml	2013-08-18 18:54:32 +
@@ -13,7 +13,7 @@
 
 
   /main.vm
-  /dhis-web-dashboard-integration/mainForm.vm
+  /dhis-web-dashboard-integration/dashboard.vm
   true
   style/dashboard.css
   javascript/dashboard.js

=== renamed file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm' => 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/dashboard.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm	2013-08-13 16:25:17 +
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/dashboard.vm	2013-08-18 18:54:32 +
@@ -39,8 +39,8 @@
 	
 		$i18n.getString( "add" )
 		$i18n.getString( "manage" )
-		<
-		>
+		<
+		>
 	
 
 

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 11691: PNG charts, impl support for radar charts

2013-08-18 Thread noreply

revno: 11691
committer: Lars Helge Øverland 
branch nick: dhis2
timestamp: Sun 2013-08-18 22:23:08 +0200
message:
  PNG charts, impl support for radar charts
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java
  
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.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 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java	2013-08-15 11:30:31 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java	2013-08-18 20:23:08 +
@@ -72,6 +72,7 @@
 public static final String TYPE_LINE = "line";
 public static final String TYPE_AREA = "area";
 public static final String TYPE_PIE = "pie";
+public static final String TYPE_RADAR = "radar"; // Spider web
 
 private String domainAxisLabel;
 

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java	2013-08-15 11:30:31 +
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java	2013-08-18 20:23:08 +
@@ -34,6 +34,7 @@
 import static org.hisp.dhis.chart.Chart.TYPE_PIE;
 import static org.hisp.dhis.chart.Chart.TYPE_STACKED_BAR;
 import static org.hisp.dhis.chart.Chart.TYPE_STACKED_COLUMN;
+import static org.hisp.dhis.chart.Chart.TYPE_RADAR;
 import static org.hisp.dhis.common.DimensionalObject.DIMENSION_SEP;
 import static org.hisp.dhis.system.util.ConversionUtils.getArray;
 
@@ -90,6 +91,7 @@
 import org.jfree.chart.plot.MultiplePiePlot;
 import org.jfree.chart.plot.PiePlot;
 import org.jfree.chart.plot.PlotOrientation;
+import org.jfree.chart.plot.SpiderWebPlot;
 import org.jfree.chart.plot.ValueMarker;
 import org.jfree.chart.renderer.category.AreaRenderer;
 import org.jfree.chart.renderer.category.BarRenderer;
@@ -550,6 +552,10 @@
 {
 return getStackedBarChart( chart, dataSets[0], true );
 }
+else if ( chart.isType( TYPE_RADAR ) )
+{
+return getRadarChart( chart, dataSets[0] );
+}
 else
 {
 throw new IllegalArgumentException( "Illegal or no chart type: " + chart.getType() );
@@ -623,6 +629,20 @@
 return areaChart;
 }
 
+private JFreeChart getRadarChart( Chart chart, CategoryDataset dataSet )
+{
+SpiderWebPlot plot = new SpiderWebPlot( dataSet, TableOrder.BY_ROW );
+plot.setBackgroundPaint( Color.WHITE );
+plot.setOutlinePaint( Color.WHITE );
+plot.setLabelFont( labelFont );
+
+JFreeChart jFreeChart = new JFreeChart( chart.getName(), titleFont, plot, !chart.isHideLegend() );
+jFreeChart.setAntiAlias( true );
+jFreeChart.setBackgroundPaint( Color.WHITE );
+
+return jFreeChart;
+}
+
 private JFreeChart getStackedBarChart( Chart chart, CategoryDataset dataSet, boolean horizontal )
 {
 JFreeChart stackedBarChart = ChartFactory.createStackedBarChart( chart.getName(), chart.getDomainAxisLabel(),

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] Data Element Category Combinations

2013-08-18 Thread Farai Mutero
Hi All

I've been taking a closer look at the object model for Categories and
Category Combinations in Postgresql. While putting together the object
model I noticed that the *categoryoptioncombo* table* *is not dependent on
any other table in the database, yet contains critical values that are also
referenced in the *datavalue* table.

My questions is, why *categoryoptioncombos? *Why link a datavalue table row
to a *categoryoptioncomboid* instead of a* dataelementcategoryoptionid*?

Regards

-- 
Farai Mutero
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 11692: Add function for validating name of tabular report.

2013-08-18 Thread noreply

revno: 11692
committer: Tran Chau 
branch nick: dhis2
timestamp: Mon 2013-08-19 10:45:04 +0700
message:
  Add function for validating name of tabular report.
modified:
  
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientreport/PatientTabularReportService.java
  
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientreport/DefaultPatientTabularReportService.java
  
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/ValidateTabularReportAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml
  
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
  
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js


--
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 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientreport/PatientTabularReportService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientreport/PatientTabularReportService.java	2013-04-02 04:33:34 +
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientreport/PatientTabularReportService.java	2013-08-19 03:45:04 +
@@ -41,6 +41,8 @@
 void saveOrUpdate( PatientTabularReport patientTabularReport );
 
 PatientTabularReport getPatientTabularReport( int id );
+
+PatientTabularReport getPatientTabularReport( String name );
 
 void deletePatientTabularReport( PatientTabularReport patientTabularReport );
 

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientreport/DefaultPatientTabularReportService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientreport/DefaultPatientTabularReportService.java	2013-04-02 04:33:34 +
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientreport/DefaultPatientTabularReportService.java	2013-08-19 03:45:04 +
@@ -73,7 +73,13 @@
 {
 return tabularReportStore.get( id );
 }
-
+
+@Override
+public PatientTabularReport getPatientTabularReport( String name )
+{
+return tabularReportStore.getByName( name );
+}
+
 @Override
 public Collection getPatientTabularReports( User user, String query, Integer min, Integer max )
 {
@@ -85,7 +91,7 @@
 {
 tabularReportStore.save( patientTabularReport );
 }
-
+
 @Override
 public int countPatientTabularReportList( User user, String query )
 {

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/ValidateTabularReportAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/ValidateTabularReportAction.java	2012-03-12 08:10:06 +
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/ValidateTabularReportAction.java	2013-08-19 03:45:04 +
@@ -27,9 +27,9 @@
 
 package org.hisp.dhis.caseentry.action.report;
 
-import org.hisp.dhis.caseentry.state.SelectedStateManager;
 import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.patientreport.PatientTabularReport;
+import org.hisp.dhis.patientreport.PatientTabularReportService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -45,11 +45,11 @@
 // Dependencies
 // -
 
-private SelectedStateManager selectedStateManager;
+private PatientTabularReportService tabularReportService;
 
-public void setSelectedStateManager( SelectedStateManager selectedStateManager )
+public void setTabularReportService( PatientTabularReportService tabularReportService )
 {
-this.selectedStateManager = selectedStateManager;
+this.tabularReportService = tabularReportService;
 }
 
 private I18n i18n;
@@ -62,12 +62,19 @@
 // -
 // Input && Output
 // -
-
-private String facilityLB;
-
-public void setFacilityLB( String facilityLB )
-{
-this.facilityLB = facilityLB;
+
+private Integer id;
+
+public void setId( Integer id )
+{
+this.id = id;
+}
+
+private String name;
+
+public void setName( String name )
+{
+this.name = name;
 }
 
 private String message;
@@ -84,19 +91,18 @@
 public String execute()
 throws Exception
 {
-OrganisationUnit selectedOrgunit = selectedStateManager.getSelectedOrganisationUnit();
-
-if ( selectedOrgunit == null )
- 

Re: [Dhis2-devs] Data Element Category Combinations

2013-08-18 Thread Lars Helge Øverland
Hi Farai,

the categoryoptioncombo table is in fact very much part of the schema and
has foreign keys from the categoryoptioncombos_categoryoptions
and categorycombos_optioncombos join tables.

The point with category option combos is that we need a single foreign key
in the datavalue table which links it to the category model - this because
a data value can be linked to any number of category options and we cannot
have a dynamic number of columns/foreign keys in the datavalue table to
each of them. So the categoryoptioncombos represent a unique set of
category options, allowing a single row in a single table to be linked to a
data value.

regards,

Lars






On Mon, Aug 19, 2013 at 1:03 AM, Farai Mutero  wrote:

> Hi All
>
> I've been taking a closer look at the object model for Categories and
> Category Combinations in Postgresql. While putting together the object
> model I noticed that the *categoryoptioncombo* table* *is not dependent
> on any other table in the database, yet contains critical values that are
> also referenced in the *datavalue* table.
>
> My questions is, why *categoryoptioncombos? *Why link a datavalue table
> row to a *categoryoptioncomboid* instead of a* dataelementcategoryoptionid
> *?
>
> Regards
>
> --
> Farai Mutero
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp