dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20662
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9566: Add ad-hoc aggregated reports in Tabular reports (WIP).
------------------------------------------------------------
revno: 9566
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-01-21 16:52:11 +0700
message:
Add ad-hoc aggregated reports in Tabular reports (WIP).
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientreport/PatientAggregateReport.java
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientreport/hibernate/PatientAggregateReport.hbm.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/SaveAggregateReportAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularAggregateReport.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReport.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReportResult.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-api/src/main/java/org/hisp/dhis/patientreport/PatientAggregateReport.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientreport/PatientAggregateReport.java 2013-01-21 07:29:15 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientreport/PatientAggregateReport.java 2013-01-21 09:52:11 +0000
@@ -64,18 +64,19 @@
public static final int POSITION_ROW_ORGUNIT_COLUMN_DATA = 7;
public static final int POSITION_ROW_DATA = 8;
-
+
public static final int POSITION_ROW_DATA_COLUMN_PERIOD = 9; // PIVOT FROM 6
-
- public static final int POSITION_ROW_DATA_COLUMN_ORGUNIT = 10; // PIVOT FROM A
+
+ public static final int POSITION_ROW_DATA_COLUMN_ORGUNIT = 10; // PIVOT FROM
+ // 7
private ProgramStage programStage;
// Date period range
- private Date startDate;
+ private List<Date> startDates;
- private Date endDate;
+ private List<Date> endDates;
// Relative periods
@@ -105,6 +106,12 @@
private String aggregateType;
+ private Boolean useCompletedEvents;
+
+ private Boolean userOrganisationUnit;
+
+ private Boolean userOrganisationUnitChildren;
+
// User created
private User user;
@@ -131,25 +138,25 @@
{
this.programStage = programStage;
}
-
- public Date getStartDate()
- {
- return startDate;
- }
-
- public void setStartDate( Date startDate )
- {
- this.startDate = startDate;
- }
-
- public Date getEndDate()
- {
- return endDate;
- }
-
- public void setEndDate( Date endDate )
- {
- this.endDate = endDate;
+
+ public List<Date> getStartDates()
+ {
+ return startDates;
+ }
+
+ public void setStartDates( List<Date> startDates )
+ {
+ this.startDates = startDates;
+ }
+
+ public List<Date> getEndDates()
+ {
+ return endDates;
+ }
+
+ public void setEndDates( List<Date> endDates )
+ {
+ this.endDates = endDates;
}
public Set<String> getRelativePeriods()
@@ -252,4 +259,34 @@
this.user = user;
}
+ public Boolean getUseCompletedEvents()
+ {
+ return useCompletedEvents;
+ }
+
+ public void setUseCompletedEvents( Boolean useCompletedEvents )
+ {
+ this.useCompletedEvents = useCompletedEvents;
+ }
+
+ public Boolean getUserOrganisationUnit()
+ {
+ return userOrganisationUnit;
+ }
+
+ public void setUserOrganisationUnit( Boolean userOrganisationUnit )
+ {
+ this.userOrganisationUnit = userOrganisationUnit;
+ }
+
+ public Boolean getUserOrganisationUnitChildren()
+ {
+ return userOrganisationUnitChildren;
+ }
+
+ public void setUserOrganisationUnitChildren( Boolean userOrganisationUnitChildren )
+ {
+ this.userOrganisationUnitChildren = userOrganisationUnitChildren;
+ }
+
}
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientreport/hibernate/PatientAggregateReport.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientreport/hibernate/PatientAggregateReport.hbm.xml 2013-01-17 07:31:43 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientreport/hibernate/PatientAggregateReport.hbm.xml 2013-01-21 09:52:11 +0000
@@ -17,11 +17,20 @@
<many-to-one name="programStage" class="org.hisp.dhis.program.ProgramStage"
column="programstageid" foreign-key="fk_patientaggregatereport_programstage" />
-
- <property name="startDate" />
-
- <property name="endDate" />
-
+
+ <list name="startDates" table="patientaggregatereport_startdates">
+ <key column="patientaggregatereportid"/>
+ <list-index column="sort_order" />
+ <element type="date" column="startdate" />
+ </list>
+
+
+ <list name="endDates" table="patientaggregatereport_enddates">
+ <key column="patientaggregatereportid"/>
+ <list-index column="sort_order" />
+ <element type="date" column="enddate" />
+ </list>
+
<set name="relativePeriods" table="patientaggregatereport_relativeperiods">
<key column="patientaggregatereportid"
foreign-key="fk_patientaggregatereportid_relativeperiods" />
@@ -59,6 +68,12 @@
<many-to-one name="user" class="org.hisp.dhis.user.User"
column="userid" foreign-key="fk_patientaggregatereport_userid" />
+
+ <property name="useCompletedEvents" />
+
+ <property name="userOrganisationUnit" />
+
+ <property name="userOrganisationUnitChildren" />
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/SaveAggregateReportAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/SaveAggregateReportAction.java 2013-01-16 13:25:48 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/SaveAggregateReportAction.java 2013-01-21 09:52:11 +0000
@@ -27,7 +27,13 @@
package org.hisp.dhis.caseentry.action.report;
-import com.opensymphony.xwork2.Action;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
import org.hisp.dhis.dataelement.DataElementService;
import org.hisp.dhis.i18n.I18nFormat;
import org.hisp.dhis.organisationunit.OrganisationUnit;
@@ -37,11 +43,7 @@
import org.hisp.dhis.program.ProgramStageService;
import org.hisp.dhis.user.CurrentUserService;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
+import com.opensymphony.xwork2.Action;
/**
* @author Chau Thu Tran
@@ -149,18 +151,18 @@
this.relativePeriods = relativePeriods;
}
- private String startDate;
+ private List<String> startDates;
- public void setStartDate( String startDate )
+ public void setStartDates( List<String> startDates )
{
- this.startDate = startDate;
+ this.startDates = startDates;
}
- private String endDate;
+ private List<String> endDates;
- public void setEndDate( String endDate )
+ public void setEndDates( List<String> endDates )
{
- this.endDate = endDate;
+ this.endDates = endDates;
}
private String facilityLB; // All, children, current
@@ -191,6 +193,27 @@
this.deGroupBy = deGroupBy;
}
+ private Boolean useCompletedEvents;
+
+ public void setUseCompletedEvents( Boolean useCompletedEvents )
+ {
+ this.useCompletedEvents = useCompletedEvents;
+ }
+
+ private Boolean userOrganisationUnit;
+
+ public void setUserOrganisationUnit( Boolean userOrganisationUnit )
+ {
+ this.userOrganisationUnit = userOrganisationUnit;
+ }
+
+ private Boolean userOrganisationUnitChildren;
+
+ public void setUserOrganisationUnitChildren( Boolean userOrganisationUnitChildren )
+ {
+ this.userOrganisationUnitChildren = userOrganisationUnitChildren;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -204,10 +227,18 @@
aggregateReport.setName( name );
aggregateReport.setProgramStage( programStageService.getProgramStage( programStageId ) );
- if ( startDate != null && endDate != null )
+ if ( startDates != null && endDates != null )
{
- aggregateReport.setStartDate( format.parseDate( startDate ) );
- aggregateReport.setEndDate( format.parseDate( endDate ) );
+ List<Date> start = new ArrayList<Date>();
+ List<Date> end = new ArrayList<Date>();
+
+ for ( int i = 0; i < startDates.size(); i++ )
+ {
+ start.add( format.parseDate( startDates.get( i ) ) );
+ end.add( format.parseDate( startDates.get( i ) ) );
+ }
+ aggregateReport.setStartDates( start );
+ aggregateReport.setEndDates( end );
}
aggregateReport.setRelativePeriods( relativePeriods );
@@ -225,6 +256,21 @@
aggregateReport.setDeGroupBy( dataElementService.getDataElement( deGroupBy ) );
}
+ if ( useCompletedEvents != null )
+ {
+ aggregateReport.setUseCompletedEvents( useCompletedEvents );
+ }
+
+ if ( userOrganisationUnit != null )
+ {
+ aggregateReport.setUserOrganisationUnit( userOrganisationUnit );
+ }
+
+ if ( userOrganisationUnitChildren != null )
+ {
+ aggregateReport.setUserOrganisationUnitChildren( userOrganisationUnitChildren );
+ }
+
aggregateReport.setAggregateType( aggregateType );
aggregateReport.setUser( currentUserService.getCurrentUser() );
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2013-01-21 07:29:15 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2013-01-21 09:52:11 +0000
@@ -854,7 +854,7 @@
caseBasedReport:{
create: function(fn, isupdate) {
TR.util.mask.showMask(TR.cmp.caseBasedFavorite.window, TR.i18n.saving + '...');
- var p = TR.state.getParams();
+ var p = TR.state.caseBasedReport.getParams(false);
p.name = TR.cmp.caseBasedFavorite.name.getValue();
if (isupdate) {
@@ -931,11 +931,16 @@
Ext.getCmp('facilityLBCombobox').setValue( f.facilityLB );
Ext.getCmp('levelCombobox').setValue( f.level );
- TR.state.orgunitIds = f.orgunitIds;
+ // Orgunits
- /* for (var i = 0; i < f.orgunitIds.length; i++) {
- TR.cmp.params.organisationunit.records.push({id: f.organisationUnits[i].id, name: TR.conf.util.jsonEncodeString(f.organisationUnits[i].name)});
- } */
+ var treepanel = TR.cmp.params.organisationunit.treepanel;
+ treepanel.getSelectionModel().deselectAll();
+ TR.state.orgunitIds = [];
+ treepanel.numberOfRecords = f.orgunitIds.length;
+ for (var i = 0; i < f.orgunitIds.length; i++) {
+ treepanel.multipleExpand(f.orgunitIds[i].id, f.orgunitIds[i].path);
+ TR.state.orgunitIds.push( f.orgunitIds[i].localid );
+ }
// Data element
TR.cmp.params.dataelement.objects = [];
@@ -977,9 +982,9 @@
aggregateReport:{
create: function(fn, isupdate) {
- TR.util.mask.showMask(TR.cmp.caseBasedFavorite.window, TR.i18n.saving + '...');
+ TR.util.mask.showMask(TR.cmp.aggregateFavorite.window, TR.i18n.saving + '...');
var p = TR.state.getParams();
- p.name = TR.cmp.caseBasedFavorite.name.getValue();
+ p.name = TR.cmp.aggregateFavorite.name.getValue();
if (isupdate) {
p.uid = TR.store.aggregateFavorite.getAt(TR.store.aggregateFavorite.findExact('name', p.name)).data.id;
@@ -1049,11 +1054,18 @@
Ext.getCmp('programCombobox').setValue( f.programId );
Ext.getCmp('programStageCombobox').setValue( f.programStageId );
-
- // Date range
-
- Ext.getCmp('startDate').setValue( f.startDate );
- Ext.getCmp('endDate').setValue( f.endDate );
+ Ext.getCmp('userOrgunit').setValue( f.userOrganisationUnit );
+ Ext.getCmp('userOrgunitChildren').setValue( f.userOrganisationUnitChildren );
+
+ // Date period range
+
+ TR.store.dateRange.removeAll();
+ for( var i=0;i<f.startDates.length;i++)
+ {
+ TR.store.dateRange.add(
+ {'startDate': f.startDates[i],'endDate': f.endDates[i]}
+ );
+ }
// Relative periods
@@ -1122,6 +1134,7 @@
}
}
+ Ext.getCmp('completedEventsOpt').setValue(f.useCompletedEvents);
Ext.getCmp('facilityLBCombobox').setValue( f.facilityLB );
Ext.getCmp('limitOption').setValue( f.limitRecords );
TR.util.positionFilter.convert( f.position );
@@ -1471,7 +1484,7 @@
p.startDate = TR.cmp.settings.startDate.rawValue;
p.endDate = TR.cmp.settings.endDate.rawValue;
p.facilityLB = TR.cmp.settings.facilityLB.getValue();
- p.level = TR.cmp.settings.level.getValue();
+ p.level = Ext.getCmp('levelCombobox').getValue();
// orders
p.orderByOrgunitAsc = this.orderByOrgunitAsc;
@@ -1481,7 +1494,7 @@
p.currentPage = this.currentPage;
// organisation unit
- p.orgunitIds = TR.state.orgunitIds;
+ p.orgunitIds = TR.state.orgunitIds;
// Get searching values
p.searchingValues = [];
@@ -1511,20 +1524,26 @@
},
getURLParams: function( isSorted ) {
var p = "";
+
p += "startDate=" + TR.cmp.settings.startDate.rawValue;
p += "&endDate=" + TR.cmp.settings.endDate.rawValue;
p += "&facilityLB=" + TR.cmp.settings.facilityLB.getValue();
- p += "&level=" + TR.cmp.settings.level.getValue();
+ p += "&level=" + Ext.getCmp('levelCombobox').getValue();
+
+ // orders
p += "&orderByOrgunitAsc=" + this.orderByOrgunitAsc;
p += "&orderByExecutionDateByAsc=" + this.orderByExecutionDateByAsc;
+
p += "&programStageId=" + TR.cmp.params.programStage.getValue();
-
- // organisation units
-
- for( var i=0; i<TR.state.orgunitIds.length; i++ ){
- p += '&orgunitIds=' + TR.state.orgunitIds[i];
+ p += "¤tPage=" + this.currentPage;
+
+ // organisation unit
+ for( var i=0; i<TR.state.orgunitIds.length; i++ )
+ {
+ p += "&orgunitIds=" + TR.state.orgunitIds[i];
}
+ // Get searching values
if( !TR.state.caseBasedReport.isParamChanged() || isSorted )
{
var cols = TR.datatable.datatable.columns;
@@ -1544,7 +1563,7 @@
{
// Data elements
TR.cmp.params.dataelement.selected.store.each( function(r) {
- p += "&searchingValues=" + r.data.id + '_false_';
+ p += "&searchingValues=" + r.data.id + '_false_';
});
}
@@ -1808,11 +1827,9 @@
// orgunits
- // p.orgunitIds = TR.state.orgunitIds;
p.orgunitIds = TR.state.orgunitIds;
-
- p.userOrganisationUnit = TR.cmp.aggregateFavorite.userorganisationunit.getValue();
- p.userOrganisationUnitChildren = TR.cmp.aggregateFavorite.userorganisationunitchildren.getValue();
+ p.userOrganisationUnit = Ext.getCmp('userOrgunit').getValue();
+ p.userOrganisationUnitChildren = Ext.getCmp('userOrgunitChildren').getValue();
p.limitRecords = Ext.getCmp('limitOption').getValue();
@@ -1896,38 +1913,73 @@
getURLParams: function(isSorted) {
var p = "";
- p = "programStageId=" + TR.cmp.params.programStage.getValue();
+ p += "programStageId=" + TR.cmp.params.programStage.getValue();
p += "&aggregateType=" + Ext.getCmp('aggregateType').getValue().aggregateType;
+
+ // orgunits
+
+ // p.orgunitIds = TR.state.orgunitIds;
p += "&orgunitIds=" + TR.state.orgunitIds;
- p += "&limit=" + Ext.getCmp('limitOption').getValue();
+
+ p += "&userOrganisationUnit=" + TR.cmp.aggregateFavorite.userorganisationunit.getValue();
+ p += "&userOrganisationUnitChildren=" + TR.cmp.aggregateFavorite.userorganisationunitchildren.getValue();
+
+ p += "&limitRecords=" + Ext.getCmp('limitOption').getValue();
var position = TR.state.aggregateReport.getPosition();
- if( TR.cmp.settings.dataElementGroupBy.getValue() != null ){
- p += "&dataElementId=" + TR.cmp.settings.dataElementGroupBy.getValue().split('_')[1];
+ if( Ext.getCmp('dataElementGroupByCbx').getValue() != null ){
+ p += "&deGroupBy=" + Ext.getCmp('dataElementGroupByCbx').getValue().split('_')[1];
}
// Filter values
+
+ p.deFilters = [];
TR.cmp.params.dataelement.selected.store.each( function(r) {
+ var valueType = r.data.valueType;
var deId = r.data.id;
var filterOpt = Ext.getCmp('filter_opt_' + deId).rawValue;
var filterValue = Ext.getCmp('filter_' + deId).rawValue;
- var filter = deId.split('_')[1] + "_" + filterOpt + "_" + filterValue;
+ var filter = deId.split('_')[1] + "_" + filterOpt + '_';
- var valueType = r.data.valueType;
- if( valueType != 'string' && valueType != 'trueOnly'
- && valueType != 'bool' && valueType != 'list')
- {
- var deId = deId + '_1';
+ if( valueType == 'string' || valueType == 'trueOnly'
+ || valueType == 'bool' || valueType == 'list' )
+ {
+ var filterValues = filterValue.split(";");
+ filter +=" (";
+ for(var i=0;i<filterValues.length;i++)
+ {
+ filter += "'"+ filterValues[i] +"',";
+ }
+ filter = filter.substr(0,filter.length - 1) + " ) ";
+ }
+ else
+ {
+ filter += filterValue;
+
+ var deId = deId + '_1';
+ if( Ext.getCmp('filter_' + deId) != undefined
+ && Ext.getCmp('filter_' + deId).rawValue != '' )
+ {
filterOpt = Ext.getCmp('filter_opt_' + deId).rawValue;
filterValue = Ext.getCmp('filter_' + deId).rawValue;
filter += "_" + filterOpt + "_" + filterValue;
}
+
+ }
p += "&deFilters=" + filter;
});
+ // Period range
+
+ TR.store.dateRange.data.each( function(r) {
+ p += "&startDates=" + r.data.startDate;
+ p += "&endDates=" + r.data.endDate;
+ });
+
// Fixed periods
+ p.fixedPeriods = [];
TR.cmp.params.fixedperiod.selected.store.each( function(r) {
p += "&fixedPeriods=" + r.data.id;
});
@@ -1942,14 +1994,9 @@
}
});
- // Period range
-
- p += "&startDate=" + TR.cmp.settings.startDate.rawValue;
- p += "&endDate=" + TR.cmp.settings.endDate.rawValue;
-
p += "&facilityLB=" + TR.cmp.settings.facilityLB.getValue();
p += "&position=" + position;
-
+ p += "&useCompletedEvents=" + Ext.getCmp('completedEventsOpt').getValue();
return p;
},
@@ -2820,7 +2867,7 @@
maxValue: new Date(),
listeners: {
added: function() {
- TR.cmp.settings.startDate = this;
+ TR.cmp.settings.startDateRange = this;
},
change:function(){
var startDate = TR.cmp.settings.startDate.getValue();
@@ -2843,7 +2890,7 @@
maxValue: new Date(),
listeners: {
added: function() {
- TR.cmp.settings.endDate = this;
+ TR.cmp.settings.startDateRange = this;
},
change:function(){
var endDate = TR.cmp.settings.endDate.getValue();
@@ -3299,6 +3346,7 @@
items: [
{
xtype: 'checkbox',
+ id: 'userOrgunit',
columnWidth: 0.5,
boxLabel: TR.i18n.user_orgunit,
labelWidth: TR.conf.layout.form_label_width,
@@ -3315,6 +3363,7 @@
},
{
xtype: 'checkbox',
+ id: 'userOrgunitChildren',
columnWidth: 0.5,
boxLabel: TR.i18n.user_orgunit_children,
labelWidth: TR.conf.layout.form_label_width,
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularAggregateReport.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularAggregateReport.vm 2013-01-21 06:18:31 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularAggregateReport.vm 2013-01-21 09:52:11 +0000
@@ -13,13 +13,25 @@
"type": "${programStage.program.type}",
"programStageId": "${programStage.id}",
"programStageName": "${programStage.name}",
- "startDate": "$!format.formatDate( $aggregateReport.startDate )",
- "endDate": "$!format.formatDate( ${aggregateReport.endDate} )",
+ "startDates": [
+ #set( $size = ${aggregateReport.startDates.size()} )
+ #foreach( $startDate in $!aggregateReport.startDates )
+ "$format.formatDate( $startDate )"
+ #if( $velocityCount < $size ),#end
+ #end
+ ],
+ "endDates": [
+ #set( $size = $aggregateReport.endDates.size() )
+ #foreach( $endDate in $!$aggregateReport.endDates )
+ "$format.formatDate( $endDate )"
+ #if( $velocityCount < $size ),#end
+ #end
+ ],
"relativePeriods": [
- #set( $size = $aggregateReport.relativePeriods.size() )
+ #set( $size = ${aggregateReport.startDates.size()} )
#set( $relativePeriods = ${aggregateReport.relativePeriods} )
#foreach( ${relativePeriod} in $!{relativePeriods} )
- '$relativePeriod'
+ "$relativePeriod"
#if( $velocityCount < $size ),#end
#end
],
@@ -47,7 +59,7 @@
#set( $size = $aggregateReport.filterValues.size() )
#set( $filterValues = ${aggregateReport.filterValues} )
#foreach( ${filterValue} in $!{filterValues} )
- '$filterValue'
+ "$filterValue"
#if( $velocityCount < $size ),#end
#end
],
@@ -71,5 +83,8 @@
"limitRecords": "$!aggregateReport.limitRecords",
"position": "${aggregateReport.position}",
"deGroupBy": "$!aggregateReport.deGroupBy.id",
- "aggregateType": "${aggregateReport.aggregateType}"
+ "aggregateType": "${aggregateReport.aggregateType}",
+ "useCompletedEvents": "$!aggregateReport.useCompletedEvents",
+ "userOrganisationUnit": "$!aggregateReport.userOrganisationUnit",
+ "userOrganisationUnitChildren": "$!aggregateReport.userOrganisationUnitChildren"
}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReport.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReport.vm 2012-12-10 12:54:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReport.vm 2013-01-21 09:52:11 +0000
@@ -21,7 +21,11 @@
#set( $size = $tabularReport.organisationUnits.size() )
#set( $organisationUnits = ${tabularReport.organisationUnits} )
#foreach( ${organisationUnit} in $!{organisationUnits} )
- $organisationUnit.id
+ {
+ "id": "$organisationUnit.uid",
+ "localid": "$organisationUnit.id",
+ "path":"#foreach($anc in $organisationUnit.getAncestors())/${anc.uid}#end"
+ }
#if( $velocityCount < $size ),#end
#end
],
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReportResult.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReportResult.vm 2012-12-10 12:54:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReportResult.vm 2013-01-21 09:52:11 +0000
@@ -27,7 +27,12 @@
#foreach( $row in $grid.getRows() )
[
#foreach( $col in $row )
- "$!encoder.jsonEncode($!col)"#if( $velocityCount < $noHeader ),#end
+ #if( $velocityCount < 3)
+ "$!col"
+ #else
+ "$!encoder.jsonEncode($!col)"
+ #end
+ #if( $velocityCount < $noHeader ),#end
#end
]#if( $velocityCount < $noRows ),#end
#end