← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6608: (patient) Show/hide columns in tabular report.

 

------------------------------------------------------------
revno: 6608
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-04-17 10:46:23 +0700
message:
  (patient) Show/hide columns in tabular report.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateTabularReportAction.java
  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
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/css/style.css
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularInitialize.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/program/ProgramStageInstanceService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java	2012-04-11 06:25:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java	2012-04-17 03:46:23 +0000
@@ -91,9 +91,9 @@
             
     List<ProgramStageInstance> searchProgramStageInstances( ProgramStage programStage, Map<Integer,String> searchingIdenKeys, Map<Integer,String> searchingAttrKeys, Map<Integer,String> searchingDEKeys, Collection<Integer> orgunitIds, Date startDate, Date endDate, boolean orderByOrgunitAsc, boolean orderByExecutionDateByAsc, int min, int max );
 
-    Grid getTabularReport( ProgramStage programStage, List<PatientIdentifierType> idens, List<PatientAttribute> attributes, List<DataElement> dataElements, Map<Integer,String> searchingIdenKeys, Map<Integer,String> searchingAttrKeys, Map<Integer,String> searchingDEKeys, Collection<Integer> orgunitIds, int level, Date startDate, Date endDate, boolean orderByOrgunitAsc, boolean orderByExecutionDateByAsc, int min, int max, I18nFormat format, I18n i18n );
+    Grid getTabularReport( ProgramStage programStage, List<Boolean> hiddenCols, List<PatientIdentifierType> idens, List<PatientAttribute> attributes, List<DataElement> dataElements, Map<Integer,String> searchingIdenKeys, Map<Integer,String> searchingAttrKeys, Map<Integer,String> searchingDEKeys, Collection<Integer> orgunitIds, int level, Date startDate, Date endDate, boolean orderByOrgunitAsc, boolean orderByExecutionDateByAsc, int min, int max, I18nFormat format, I18n i18n );
     
-    Grid getTabularReport( ProgramStage programStage, List<PatientIdentifierType> idens, List<PatientAttribute> attributes, List<DataElement> dataElements, Map<Integer,String> searchingIdenKeys, Map<Integer,String> searchingAttrKeys, Map<Integer,String> searchingDEKeys, Collection<Integer> orgunitIds, int level, Date startDate, Date endDate, boolean orderByOrgunitAsc, boolean orderByExecutionDateByAsc, I18nFormat format, I18n i18n );
+    Grid getTabularReport( ProgramStage programStage, List<Boolean> hiddenCols, List<PatientIdentifierType> idens, List<PatientAttribute> attributes, List<DataElement> dataElements, Map<Integer,String> searchingIdenKeys, Map<Integer,String> searchingAttrKeys, Map<Integer,String> searchingDEKeys, Collection<Integer> orgunitIds, int level, Date startDate, Date endDate, boolean orderByOrgunitAsc, boolean orderByExecutionDateByAsc, I18nFormat format, I18n i18n );
 
     int countProgramStageInstances( ProgramStage programStage, Map<Integer,String> searchingIdenKeys, Map<Integer,String> searchingAttrKeys, Map<Integer,String> searchingDEKeys, Collection<Integer> orgunitIds, Date startDate, Date endDate );
     

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java	2012-04-11 06:25:02 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java	2012-04-17 03:46:23 +0000
@@ -232,32 +232,32 @@
             orgunitIds, startDate, endDate, orderByOrgunitAsc, orderByExecutionDateByAsc );
     }
 
-    public Grid getTabularReport( ProgramStage programStage, List<PatientIdentifierType> idens,
-        List<PatientAttribute> attributes, List<DataElement> dataElements, Map<Integer, String> searchingIdenKeys,
-        Map<Integer, String> searchingAttrKeys, Map<Integer, String> searchingDEKeys, Collection<Integer> orgunitIds,
-        int level, Date startDate, Date endDate, boolean orderByOrgunitAsc, boolean orderByExecutionDateByAsc, int min,
-        int max, I18nFormat format, I18n i18n )
+    public Grid getTabularReport( ProgramStage programStage, List<Boolean> hiddenCols,
+        List<PatientIdentifierType> idens, List<PatientAttribute> attributes, List<DataElement> dataElements,
+        Map<Integer, String> searchingIdenKeys, Map<Integer, String> searchingAttrKeys,
+        Map<Integer, String> searchingDEKeys, Collection<Integer> orgunitIds, int level, Date startDate, Date endDate,
+        boolean orderByOrgunitAsc, boolean orderByExecutionDateByAsc, int min, int max, I18nFormat format, I18n i18n )
     {
         List<ProgramStageInstance> programStageInstances = searchProgramStageInstances( programStage,
             searchingIdenKeys, searchingAttrKeys, searchingDEKeys, orgunitIds, startDate, endDate, orderByOrgunitAsc,
             orderByExecutionDateByAsc, min, max );
 
-        return createTabularGrid( level, programStage, programStageInstances, idens, attributes, dataElements,
-            startDate, endDate, format, i18n );
+        return createTabularGrid( level, hiddenCols, programStage, programStageInstances, idens, attributes,
+            dataElements, startDate, endDate, format, i18n );
     }
 
-    public Grid getTabularReport( ProgramStage programStage, List<PatientIdentifierType> idens,
-        List<PatientAttribute> attributes, List<DataElement> dataElements, Map<Integer, String> searchingIdenKeys,
-        Map<Integer, String> searchingAttrKeys, Map<Integer, String> searchingDEKeys, Collection<Integer> orgunitIds,
-        int level, Date startDate, Date endDate, boolean orderByOrgunitAsc, boolean orderByExecutionDateByAsc,
-        I18nFormat format, I18n i18n )
+    public Grid getTabularReport( ProgramStage programStage, List<Boolean> hiddenCols,
+        List<PatientIdentifierType> idens, List<PatientAttribute> attributes, List<DataElement> dataElements,
+        Map<Integer, String> searchingIdenKeys, Map<Integer, String> searchingAttrKeys,
+        Map<Integer, String> searchingDEKeys, Collection<Integer> orgunitIds, int level, Date startDate, Date endDate,
+        boolean orderByOrgunitAsc, boolean orderByExecutionDateByAsc, I18nFormat format, I18n i18n )
     {
         List<ProgramStageInstance> programStageInstances = searchProgramStageInstances( programStage,
             searchingIdenKeys, searchingAttrKeys, searchingDEKeys, orgunitIds, startDate, endDate, orderByOrgunitAsc,
             orderByExecutionDateByAsc );
 
-        return createTabularGrid( level, programStage, programStageInstances, idens, attributes, dataElements,
-            startDate, endDate, format, i18n );
+        return createTabularGrid( level, hiddenCols, programStage, programStageInstances, idens, attributes,
+            dataElements, startDate, endDate, format, i18n );
     }
 
     @Override
@@ -340,7 +340,7 @@
     // Supportive methods
     // -------------------------------------------------------------------------
 
-    private Grid createTabularGrid( Integer level, ProgramStage programStage,
+    private Grid createTabularGrid( Integer level, List<Boolean> hiddenCols, ProgramStage programStage,
         List<ProgramStageInstance> programStageInstances, List<PatientIdentifierType> idens,
         List<PatientAttribute> attributes, List<DataElement> dataElements, Date startDate, Date endDate,
         I18nFormat format, I18n i18n )
@@ -366,11 +366,13 @@
             grid.addHeader( new GridHeader( i18n.getString( "report_unit" ), false, true ) );
             grid.addHeader( new GridHeader( i18n.getString( "report_date" ), false, true ) );
 
+            int index = 0;
             if ( idens != null && idens.size() > 0 )
             {
                 for ( PatientIdentifierType identifierType : idens )
                 {
-                    grid.addHeader( new GridHeader( identifierType.getName(), false, true ) );
+                    grid.addHeader( new GridHeader( identifierType.getName(), hiddenCols.get( index ), true ) );
+                    index++;
                 }
             }
 
@@ -378,7 +380,8 @@
             {
                 for ( PatientAttribute attribute : attributes )
                 {
-                    grid.addHeader( new GridHeader( attribute.getName(), false, true ) );
+                    grid.addHeader( new GridHeader( attribute.getName(), hiddenCols.get( index ), true ) );
+                    index++;
                 }
             }
 
@@ -386,7 +389,8 @@
             {
                 for ( DataElement dataElement : dataElements )
                 {
-                    grid.addHeader( new GridHeader( dataElement.getName(), false, true ) );
+                    grid.addHeader( new GridHeader( dataElement.getName(), hiddenCols.get( index ), true ) );
+                    index++;
                 }
             }
 

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2012-04-16 05:10:40 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2012-04-17 03:46:23 +0000
@@ -273,7 +273,7 @@
         condition += " WHERE psi.executiondate >= '" + DateUtils.getMediumDateString( startDate )
             + "' AND psi.executiondate <= '" + DateUtils.getMediumDateString( endDate ) + "' "
             + " AND psi.organisationunitid in " + splitListHelper( orgunitIds )
-            + " psi.programstageid = " + programStage.getId() + " ";
+            + " AND psi.programstageid = " + programStage.getId() + " ";
 
         // ---------------------------------------------------------------------
         // Searching program-stage-instances by patient-identifiers

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateTabularReportAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateTabularReportAction.java	2012-04-15 08:08:22 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateTabularReportAction.java	2012-04-17 03:46:23 +0000
@@ -67,7 +67,7 @@
     private String PREFIX_PATIENT_ATTRIBUTE = "attr";
 
     private String PREFIX_DATA_ELEMENT = "de";
-    
+
     private String VALUE_TYPE_OPTION_SET = "optionSet";
 
     // -------------------------------------------------------------------------
@@ -161,7 +161,7 @@
     {
         this.searchingValues = searchingValues;
     }
-
+    
     private boolean orderByOrgunitAsc;
 
     public void setOrderByOrgunitAsc( boolean orderByOrgunitAsc )
@@ -266,6 +266,8 @@
 
     private Map<Integer, String> searchingDEKeys = new HashMap<Integer, String>();
 
+    private List<Boolean> hiddenCols = new ArrayList<Boolean>();
+    
     // -------------------------------------------------------------------------
     // Implementation Action
     // -------------------------------------------------------------------------
@@ -328,7 +330,7 @@
 
             this.paging = createPaging( totalRecords );
 
-            grid = programStageInstanceService.getTabularReport( programStage, identifierTypes, patientAttributes,
+            grid = programStageInstanceService.getTabularReport( programStage, hiddenCols, identifierTypes, patientAttributes,
                 dataElements, searchingIdenKeys, searchingAttrKeys, searchingDEKeys, orgunitIds, level, startValue,
                 endValue, orderByOrgunitAsc, orderByExecutionDateByAsc, paging.getStartPos(), paging.getPageSize(),
                 format, i18n );
@@ -336,7 +338,7 @@
             return SUCCESS;
         }
 
-        grid = programStageInstanceService.getTabularReport( programStage, identifierTypes, patientAttributes,
+        grid = programStageInstanceService.getTabularReport( programStage, hiddenCols, identifierTypes, patientAttributes,
             dataElements, searchingIdenKeys, searchingAttrKeys, searchingDEKeys, orgunitIds, level, startValue,
             endValue, orderByOrgunitAsc, orderByExecutionDateByAsc, format, i18n );
 
@@ -372,12 +374,13 @@
 
                 // Get value-type && suggested-values
                 valueTypes.add( identifierType.getType() );
+                hiddenCols.add( Boolean.parseBoolean( infor[2] ) );
 
                 // Get searching-value
-                if ( infor.length == 3 )
+                if ( infor.length == 4 )
                 {
-                    searchingIdenKeys.put( objectId, infor[2].trim() );
-                    values.add( infor[2].trim() );
+                    searchingIdenKeys.put( objectId, infor[3].trim() );
+                    values.add( infor[3].trim() );
                 }
                 else
                 {
@@ -388,16 +391,17 @@
             {
                 PatientAttribute attribute = patientAttributeService.getPatientAttribute( objectId );
                 patientAttributes.add( attribute );
-
+                
                 // Get value-type && suggested-values
                 valueTypes.add( attribute.getValueType() );
                 mapSuggestedValues.put( index, getSuggestedAttrValues( attribute ) );
+                hiddenCols.add( Boolean.parseBoolean( infor[2] ) );
 
                 // Get searching-value
-                if ( infor.length == 3 )
+                if ( infor.length == 4 )
                 {
-                    searchingAttrKeys.put( objectId, infor[2].trim() );
-                    values.add( infor[2].trim() );
+                    searchingAttrKeys.put( objectId, infor[3].trim() );
+                    values.add( infor[3].trim() );
                 }
                 else
                 {
@@ -408,16 +412,17 @@
             {
                 DataElement dataElement = dataElementService.getDataElement( objectId );
                 dataElements.add( dataElement );
-
+                
                 // Get value-type && suggested-values
-                String valueType = ( dataElement.getOptionSet() != null ) ? VALUE_TYPE_OPTION_SET : dataElement.getType();
+                String valueType = (dataElement.getOptionSet() != null) ? VALUE_TYPE_OPTION_SET : dataElement.getType();
                 valueTypes.add( valueType );
                 mapSuggestedValues.put( index, getSuggestedDEValues( dataElement ) );
+                hiddenCols.add( Boolean.parseBoolean( infor[2] ) );
 
-                if ( infor.length == 3 )
+                if ( infor.length == 4 )
                 {
-                    searchingDEKeys.put( objectId, infor[2].trim() );
-                    values.add( infor[2].trim() );
+                    searchingDEKeys.put( objectId, infor[3].trim() );
+                    values.add( infor[3].trim() );
                 }
                 else
                 {

=== modified file '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/resources/org/hisp/dhis/caseentry/i18n_module.properties	2012-04-15 08:08:22 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2012-04-17 03:46:23 +0000
@@ -312,4 +312,5 @@
 show_hide_settings_panel = Show/Hide Settings Panel
 page = Page
 et_no_data = No data returned from server
-et_no_dataelement = Please select at least one data element.
\ No newline at end of file
+et_no_dataelement = Please select at least one data element.
+em_no_orgunits = Please select an organisation unit.
\ No newline at end of file

=== 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	2012-04-15 08:08:22 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2012-04-17 03:46:23 +0000
@@ -101,7 +101,7 @@
         west_width_subtractor: 18,
         west_fill: 117,
         west_fill_accordion_organisationunit: 75,
-        west_maxheight_accordion_organisationunit: 700,
+        west_maxheight_accordion_organisationunit: 225,
         center_tbar_height: 31,
         east_gridcolumn_height: 30,
         form_label_width: 90
@@ -520,15 +520,14 @@
 				storage: {}
 			});
         }
-    };
+	}
     
     TR.state = {
-        filterValues:[],
-		currentPage: 1,
+        currentPage: 1,
 		total: 1,
 		generateReport: function( type ) {
 			// Validation
-			if( this.filterValues.length==0 && !this.validation.objects() )
+			if( !this.validation.objects() )
 			{
 				return;
 			}
@@ -537,21 +536,18 @@
 			// Export to XLS or PDF
 			if( type)
 			{
-				url += "?" + "type=" + type + "&";
-				var params = ( this.filterValues.length==0 ) ? this.getURLParams() : this.getURLFilterValues() ;
-				window.location.href = url + params;
+				window.location.href = url + "?" + this.getURLParams(type);
 			}
 			// Show report on grid
 			else
 			{
-				var params = ( this.filterValues.length == 0 ) ? TR.state.getParams() : this.filterValues;
 				TR.util.mask.showMask(TR.cmp.region.center, TR.i18n.loading);
 			
 				Ext.Ajax.request({
 					url: url,
 					method: "POST",
 					scope: this,
-					params: params,
+					params: this.getParams(),
 					success: function(r) {
 						var json = Ext.JSON.decode(r.responseText);
 						TR.state.total = json.total;
@@ -576,25 +572,8 @@
 			}
 			TR.util.notification.ok();
 		},
-		getBaseParams: function() {
-            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.orgunitId = TR.cmp.params.organisationunit.treepanel.getSelectionModel().getSelection()[0].data.id
-			p.orderByOrgunitAsc = 'true';
-			p.orderByExecutionDateByAsc= 'true';
-			p.programStageId = TR.cmp.params.programStage.getValue();
-			p.currentPage = this.currentPage;
-			p.pageSize = this.pageSize;
-			
-            return p;
-        },
 		getParams: function() {
-            var p = {};
-            //p.program = TR.cmp.settings.program.getValue();
+			var p = {};
             p.startDate = TR.cmp.settings.startDate.rawValue;
             p.endDate = TR.cmp.settings.endDate.rawValue;
 			p.facilityLB = TR.cmp.settings.facilityLB.getValue();
@@ -604,25 +583,47 @@
 			p.orderByExecutionDateByAsc= 'true';
 			p.programStageId = TR.cmp.params.programStage.getValue();
 			p.currentPage = this.currentPage;
-			p.pageSize = this.pageSize;
-			 
+			
 			p.searchingValues = [];
-			// Identifier Types
-			TR.cmp.params.identifierType.selected.store.each( function(r) {
-				p.searchingValues.push( 'iden_' + r.data.id + '_');
-			});
-			// Patient Attributes
-			TR.cmp.params.patientAttribute.selected.store.each( function(r) {
-				p.searchingValues.push( 'attr_' + r.data.id + '_');
-			});
-			// Data elements
-			TR.cmp.params.dataelement.selected.store.each( function(r) {
-				p.searchingValues.push( 'de_' + r.data.id + '_');
-			});
-			
+			if( TR.datatable.datatable )
+			{
+				var grid = TR.datatable.datatable;
+				var editor = grid.getStore().getAt(0);
+				var colLen = grid.columns.length;
+				for( var i=0; i<colLen; i++ )
+				{
+					var col = grid.columns[i];	
+					if( col.name )
+					{
+						var dataIndex = col.dataIndex;
+						var value = editor.data[dataIndex];
+						if( value!=null && value!= '')
+						{
+							value = TR.util.getValueFormula(value);
+						}
+						p.searchingValues.push( col.name + col.hidden + "_" + value );
+					}
+				}
+			}
+			else
+			{
+				// Identifier Types
+				TR.cmp.params.identifierType.selected.store.each( function(r) {
+					p.searchingValues.push( 'iden_' + r.data.id + '_false_' );
+				});
+				// Patient Attributes
+				TR.cmp.params.patientAttribute.selected.store.each( function(r) {
+					p.searchingValues.push( 'attr_' + r.data.id + '_false_' );
+				});
+				// Data elements
+				TR.cmp.params.dataelement.selected.store.each( function(r) {
+					p.searchingValues.push( 'de_' + r.data.id +  '_false_' );
+				});
+			}
+		
             return p;
         },
-		getURLParams: function() {
+		getURLParams: function( type ) {
             var p = "";
             p += "startDate=" + TR.cmp.settings.startDate.rawValue;
             p += "&endDate=" + TR.cmp.settings.endDate.rawValue;
@@ -632,43 +633,46 @@
 			p += "&orderByOrgunitAsc=" + 'true';
 			p += "&orderByExecutionDateByAsc=" +'true';
 			p += "&programStageId=" + TR.cmp.params.programStage.getValue();
-			p += "&currentPage=" + this.currentPage;
-			p += "&pageSize=" + this.pageSize;
-			 
-			// Identifier Types
-			TR.cmp.params.identifierType.selected.store.each( function(r) {
-				p += "&searchingValues=" + 'iden_' + r.data.id + '_';
-			});
-			// Patient Attributes
-			TR.cmp.params.patientAttribute.selected.store.each( function(r) {
-				p += "&searchingValues=" +'attr_' + r.data.id + '_';
-			});
-			// Data elements
-			TR.cmp.params.dataelement.selected.store.each( function(r) {
-				p += "&searchingValues=" + 'de_' + r.data.id + '_';
-			});
+			p += "&type=" + type;
+			
+			if( TR.datatable.datatable )
+			{
+				var grid = TR.datatable.datatable;
+				var editor = grid.getStore().getAt(0);
+				var colLen = grid.columns.length;
+				for( var i=0; i<colLen; i++ )
+				{
+					var col = grid.columns[i];	
+					if( col.name )
+					{
+						var dataIndex = col.dataIndex;
+						var value = editor.data[dataIndex];
+						if( value!=null && value!= '')
+						{
+							value = TR.util.getValueFormula(value);
+						}
+						p += "&searchingValues=" + col.name + col.hidden + "_" + value;
+					}
+				}
+			}
+			else
+			{
+				// Identifier Types
+				TR.cmp.params.identifierType.selected.store.each( function(r) {
+					p += "&searchingValues=" + 'iden_' + r.data.id + '_false_';
+				});
+				// Patient Attributes
+				TR.cmp.params.patientAttribute.selected.store.each( function(r) {
+					p += "&searchingValues=" +'attr_' + r.data.id + '_false_';
+				});
+				// Data elements
+				TR.cmp.params.dataelement.selected.store.each( function(r) {
+					p += "&searchingValues=" + 'de_' + r.data.id + '_false_';
+				});
+			}
 			
             return p;
         },
-		getURLFilterValues: function() {
-			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 += "&orgunitId=" + TR.cmp.params.organisationunit.treepanel.getSelectionModel().getSelection()[0].data.id
-			p += "&orderByOrgunitAsc=" + 'true';
-			p += "&orderByExecutionDateByAsc=" +'true';
-			p += "&programStageId=" + TR.cmp.params.programStage.getValue();
-			p += "&currentPage=" + this.currentPage;
-			p += "&pageSize=" + this.pageSize;
-			
-			// Searching values
-			for( var i = 0; i<this.filterValues.searchingValues.length; i++ ){
-				p += "&searchingValues=" + this.filterValues.searchingValues[i];
-			}
-			return p;
-		},
 		validation: {
 			params: function() {
 				if (!TR.c.params.program ) {
@@ -724,7 +728,7 @@
     
     TR.value = {
 		valueTypes: [],
-        fields: [],
+		fields: [],
 		values: []
     };
       
@@ -832,13 +836,11 @@
 					}
 				};
 				index++;
-			}); 
+			});
 			
 			// grid
 			this.datatable = Ext.create('Ext.grid.Panel', {
                 height: TR.util.viewport.getSize().y - 68,
-				cls: 'x-grid-row-alt',
-				stripeRows: true,
 				columns: cols,
 				lbar: [
 					{
@@ -855,23 +857,6 @@
 						width: 30,
 						listeners: {
 							click: function() {
-								var p = TR.state.getBaseParams();
-								p.searchingValues = [];
-								var cols = TR.datatable.datatable.columns;
-								for( var i=0; i<cols.length; i++ )
-								{
-									var dataIndex = cols[i].dataIndex;
-									if( TR.store.datatable.first() )
-									{
-										TR.store.datatable.first().data[dataIndex] = "";
-									}
-									if( cols[i].name )
-									{
-										p.searchingValues.push( cols[i].name );
-									}
-								};
-								
-								TR.state.filterValues = p;
 								TR.exe.execute();
 							}
 						}
@@ -980,33 +965,11 @@
 								}
 							},
 							edit: function( editor, e ){
-								var p = TR.state.getBaseParams();
-								p.searchingValues = [];
-								var colLen = editor.grid.columns.length;
-								for( var i=0; i<colLen; i++ )
-								{
-									var col = editor.grid.columns[i];	
-									if( col.name )
-									{
-										var dataIndex = col.dataIndex;
-										var value = col.field.rawValue;
-										if( value!=null && value!= '')
-										{
-											value = TR.util.getValueFormula(value);
-										}
-										p.searchingValues.push( col.name + value );
-									}
-								};
-								
-								TR.state.filterValues = p;
 								TR.exe.execute();
-								TR.datatable.getDataTable();
 							}
 						}
 					})
-					//, group
-				
-			],
+				],
 				store: TR.store.datatable
 				,listeners: {
 					celldblclick: function(grid,rowIndex,cellIndex,e){
@@ -1223,7 +1186,7 @@
 								activeOnTop: true,
 								cls: 'tr-accordion',
 								bodyStyle: 'border:0 none',
-								height: 350,
+								height: 430,
 								items: [
 									// ORGANISATION UNIT
 									{

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/css/style.css'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/css/style.css	2012-04-15 08:08:22 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/css/style.css	2012-04-17 03:46:23 +0000
@@ -108,39 +108,6 @@
     background-position: -25px -60px;
 }
 
-/* Grid / Tree panel font color */
-.x-grid-row .x-grid-cell {
-    color: #222;
-    background-color: transparent;
-    border: 1px solid transparent;
-}
-
-.x-grid-row-selected .x-grid-cell {
-    border: 1px solid transparent;
-}
-
-.x-grid-row-over {
-    background-color: #f1f1f1;
-}
-
-.x-grid-row-over .x-grid-cell-first, .x-grid-row-selected .x-grid-cell-first {
-    -moz-border-radius: 2px 0 0 2px;
-    -webkit-border-radius: 2px 0 0 2px;
-    -o-border-radius: 2px 0 0 2px;
-    -ms-border-radius: 2px 0 0 2px;
-    -khtml-border-radius: 2px 0 0 2px;
-    border-radius: 2px 0 0 2px;
-}
-
-.x-grid-row-over .x-grid-cell-last, .x-grid-row-selected .x-grid-cell-last {
-    -moz-border-radius: 0 2px 2px 0;
-    -webkit-border-radius: 0 2px 2px 0;
-    -o-border-radius: 0 2px 2px 0;
-    -ms-border-radius: 0 2px 2px 0;
-    -khtml-border-radius: 0 2px 2px 0;
-    border-radius: 0 2px 2px 0;
-}
-
 /* TR menu grid */
 .tr-menugrid .x-grid-row .x-grid-cell, .tr-menugrid .x-grid-row-selected .x-grid-cell {
     border: 0 none;
@@ -373,40 +340,6 @@
     cursor: hand;
 }
 
-/* Grid datatable column chooser */
-.x-column-header-over .x-column-header-trigger, .x-column-header-open .x-column-header-trigger {
-    display: none;
-}
-
-/* Toolbar second bar chart settings */
-#chartsettings_tb {
-    background: #f5f5f5;
-    padding: 5px 0 0 8px;
-    border-style: none;
-    border-top: 1px dashed #ccc;
-}
-
-#chartoptions_tb {
-    background: #f5f5f5;
-	height: 100%;
-    padding: 6px 0 0 8px;
-    border-top: 2px ridge #e1e1e1;
-    border-right: 0 none;
-    border-bottom: 1px solid #ccc;
-    border-left: 0 none;
-}
-
-/* Toolbar favorites */
-#favorite_t {
-    border-bottom-width: 1px !important;
-    -moz-border-radius: 2px 2px 2px 2px;
-    -webkit-border-radius: 2px 2px 2px 2px;
-    -o-border-radius: 2px 2px 2px 2px;
-    -ms-border-radius: 2px 2px 2px 2px;
-    -khtml-border-radius: 2px 2px 2px 2px;
-    border-radius: 2px 2px 2px 2px;
-}    
-
 /* Multiselect dock border radius */
 .tr-toolbar-multiselect-left .x-docked-top {    
     -o-border-top-left-radius: 2px;
@@ -735,30 +668,4 @@
 }
 .tr-accordion .tr-combo .x-form-item-label { /* accordion combo box label */
 	padding: 4px 0 0;
-}
-
-.x-grid-row-alt
-{
-	background-color: #F4F4F4; 
-	border-bottom-color: #CCCCCC; 
-    border-bottom-style: solid; 
-    border-top-color: #CCCCCC; 
-    border-top-style: solid; 
-}
-
-.custom-grid .x-grid-row-over .x-grid-cell { 
-    background-color: #ff6; 
-    border-bottom-color: #999; 
-    border-bottom-style: dashed; 
-    border-top-color: #999; 
-    border-top-style: dashed; 
-} 
- 
-/* Grid cells in the selected row */ 
-.custom-grid .x-grid-row-selected .x-grid-cell { 
-    background-color: #ff0 !important; 
-    border-bottom-color: #999; 
-    border-bottom-style: solid; 
-    border-top-color: #999; 
-    border-top-style: solid; 
-}
+}
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm	2012-04-15 08:08:22 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm	2012-04-17 03:46:23 +0000
@@ -32,6 +32,7 @@
 page:'$encoder.jsEscape($i18n.getString( 'page' ) , "'")',
 loading:'$encoder.jsEscape($i18n.getString( 'loading' ) , "'")',
 generate:'$encoder.jsEscape($i18n.getString( 'generate' ) , "'")',
-et_no_data : '$encoder.jsEscape($i18n.getString( 'et_no_data' ) , "'")',
-
+et_no_data:'$encoder.jsEscape($i18n.getString( 'et_no_data' ) , "'")',
+em_no_orgunits:'$encoder.jsEscape($i18n.getString( 'em_no_orgunits' ) , "'")',
+organisation_units:'$encoder.jsEscape($i18n.getString( 'organisation_units' ) , "'")',
 };
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularInitialize.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularInitialize.vm	2012-04-15 08:08:22 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularInitialize.vm	2012-04-17 03:46:23 +0000
@@ -27,7 +27,7 @@
 		#foreach( $level in $levels )
 		  {
 			"value":  "${level.level}" ,
-			"name": "${level.level}"
+			"name": "${level.name}"
 		  }#if($velocityCount < $levels.size()),#end
 		#end
 	]