← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7074: (patient) Tabular report (WIP)

 

------------------------------------------------------------
revno: 7074
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-05-29 14:37:37 +0700
message:
  (patient) Tabular report (WIP)
modified:
  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/SaveTabularReportAction.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/resources/struts.xml
  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/i18n.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/responseDataElements.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-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-05-28 10:17:04 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateTabularReportAction.java	2012-05-29 07:37:37 +0000
@@ -31,6 +31,7 @@
 import static org.hisp.dhis.patientreport.PatientTabularReport.PREFIX_IDENTIFIER_TYPE;
 import static org.hisp.dhis.patientreport.PatientTabularReport.PREFIX_META_DATA;
 import static org.hisp.dhis.patientreport.PatientTabularReport.PREFIX_PATIENT_ATTRIBUTE;
+import static org.hisp.dhis.patientreport.PatientTabularReport.PREFIX_FIXED_ATTRIBUTE;
 import static org.hisp.dhis.patientreport.PatientTabularReport.VALUE_TYPE_OPTION_SET;
 
 import java.util.ArrayList;
@@ -347,8 +348,6 @@
                 null, null );
         }
 
-        System.out.println();
-        System.out.println(grid);
         return type == null ? SUCCESS : type;
     }
 
@@ -373,14 +372,19 @@
         {
             String[] infor = searchingValue.split( "_" );
             String objectType = infor[0];
-            int objectId = Integer.parseInt( infor[1] );
-
+            
             if ( objectType.equals( PREFIX_META_DATA ) )
             {
                 hiddenCols.add( Boolean.parseBoolean( infor[2] ) );
             }
+            else if ( objectType.equals( PREFIX_FIXED_ATTRIBUTE ) )
+            {
+                fixedAttributes.add( infor[1] );
+                hiddenCols.add( Boolean.parseBoolean( infor[2] ) );
+            }
             else if ( objectType.equals( PREFIX_IDENTIFIER_TYPE ) )
             {
+                int objectId = Integer.parseInt( infor[1] );
                 PatientIdentifierType identifierType = identifierTypeService.getPatientIdentifierType( objectId );
                 identifierTypes.add( identifierType );
 
@@ -402,6 +406,7 @@
             }
             else if ( objectType.equals( PREFIX_PATIENT_ATTRIBUTE ) )
             {
+                int objectId = Integer.parseInt( infor[1] );
                 PatientAttribute attribute = patientAttributeService.getPatientAttribute( objectId );
                 patientAttributes.add( attribute );
 
@@ -429,6 +434,7 @@
             }
             else if ( objectType.equals( PREFIX_DATA_ELEMENT ) )
             {
+                int objectId = Integer.parseInt( infor[1] );
                 DataElement dataElement = dataElementService.getDataElement( objectId );
                 dataElements.add( dataElement );
 

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/SaveTabularReportAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/SaveTabularReportAction.java	2012-05-10 01:21:56 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/SaveTabularReportAction.java	2012-05-29 07:37:37 +0000
@@ -28,6 +28,7 @@
 package org.hisp.dhis.caseentry.action.report;
 
 import static org.hisp.dhis.patientreport.PatientTabularReport.PREFIX_DATA_ELEMENT;
+import static org.hisp.dhis.patientreport.PatientTabularReport.PREFIX_FIXED_ATTRIBUTE;
 import static org.hisp.dhis.patientreport.PatientTabularReport.PREFIX_IDENTIFIER_TYPE;
 import static org.hisp.dhis.patientreport.PatientTabularReport.PREFIX_PATIENT_ATTRIBUTE;
 
@@ -131,8 +132,6 @@
 
     private Integer programStageId;
 
-    private List<String> fixedAttributes = new ArrayList<String>();
-
     private List<String> searchingValues = new ArrayList<String>();
 
     private Integer orgunitId;
@@ -172,11 +171,6 @@
         this.orderByOrgunitAsc = orderByOrgunitAsc;
     }
 
-    public void setFixedAttributes( List<String> fixedAttributes )
-    {
-        this.fixedAttributes = fixedAttributes;
-    }
-
     public void setEndDate( String endDate )
     {
         this.endDate = endDate;
@@ -231,23 +225,30 @@
         List<PatientAttribute> attributes = new ArrayList<PatientAttribute>();
 
         List<DataElement> dataElements = new ArrayList<DataElement>();
-
+        List<String> fixedAttributes = new ArrayList<String>();
+        
         for ( String searchingValue : searchingValues )
         {
             String[] infor = searchingValue.split( "_" );
             String objectType = infor[0];
-            int objectId = Integer.parseInt( infor[1] );
 
             if ( objectType.equals( PREFIX_IDENTIFIER_TYPE ) )
             {
+                int objectId = Integer.parseInt( infor[1] );
                 identifiers.add( identifierTypeService.getPatientIdentifierType( objectId ) );
             }
+            else if ( objectType.equals( PREFIX_FIXED_ATTRIBUTE ) )
+            {
+                fixedAttributes.add( infor[1] );
+            }
             else if ( objectType.equals( PREFIX_PATIENT_ATTRIBUTE ) )
             {
+                int objectId = Integer.parseInt( infor[1] );
                 attributes.add( patientAttributeService.getPatientAttribute( objectId ) );
             }
             else if ( objectType.equals( PREFIX_DATA_ELEMENT ) )
             {
+                int objectId = Integer.parseInt( infor[1] );
                 DataElement dataElement = dataElementService.getDataElement( objectId );
                 dataElements.add( dataElement );
             }

=== modified file '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/META-INF/dhis/beans.xml	2012-05-24 05:13:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml	2012-05-29 07:37:37 +0000
@@ -834,6 +834,16 @@
 			ref="org.hisp.dhis.patient.PatientIdentifierTypeService" />
 	</bean>
 	
+	<bean id="org.hisp.dhis.caseentry.action.report.LoadPatientPropertiesAction"
+		class="org.hisp.dhis.caseentry.action.report.LoadPatientPropertiesAction"
+		scope="prototype">
+		<property name="programService" ref="org.hisp.dhis.program.ProgramService" />
+		<property name="identifierTypeService"
+			ref="org.hisp.dhis.patient.PatientIdentifierTypeService" />
+		<property name="attributeService"
+			ref="org.hisp.dhis.patient.PatientAttributeService" />
+	</bean>
+	
 	<bean id="org.hisp.dhis.caseentry.action.report.LoadProgramStagesAction"
 		class="org.hisp.dhis.caseentry.action.report.LoadProgramStagesAction"
 		scope="prototype">

=== 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-05-28 16:54:25 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2012-05-29 07:37:37 +0000
@@ -261,7 +261,6 @@
 false = No
 data = Data
 get_report_as_xls=Download as Excel 
-get_report_as_pdf =Download as PDF
 set_complete_status = Set complete status
 orgunit_provided_service = Organisation unit provided service
 how_to_search_tabular_report = Quotes (") match phrases. Text values support %%, %=, =% and =. Numeric values support >=, >, <=, <, = and != operators.
@@ -309,7 +308,6 @@
 attribute = Attribute
 download = Download
 xls = XLS
-pdf = PDF
 show_hide_settings = Show/hide settings
 page = Page
 et_no_data = No data returned from server
@@ -342,4 +340,7 @@
 loading = Loading
 save_favorite = Save favorite
 search_by_selected_unit = Search by selected unit 
-identifiers_and_attributes = Identifiers and Attributes
\ No newline at end of file
+identifiers_and_attributes = Identifiers and Attributes
+first_name = First name
+middle_name = Middle name
+last_name = Last name
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml	2012-05-24 14:30:38 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml	2012-05-29 07:37:37 +0000
@@ -666,6 +666,12 @@
 				/dhis-web-caseentry/jsonIdentifierTypes.vm</result>
 		</action>
 		
+		<action name="loadPatientProperties"
+			class="org.hisp.dhis.caseentry.action.report.LoadPatientPropertiesAction">
+			<result name="success" type="velocity-json">
+				/dhis-web-caseentry/jsonPatientProperties.vm</result>
+		</action>
+		
 		<action name="loadReportProgramStages"
 			class="org.hisp.dhis.caseentry.action.report.LoadProgramStagesAction">
 			<result name="success" type="velocity-json">/dhis-web-caseentry/responseProgramStages.vm</result>

=== 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-05-28 16:54:25 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2012-05-29 07:37:37 +0000
@@ -37,8 +37,7 @@
             path_images: 'images/',
 			initialize: 'tabularInitialize.action',
 			program_get: 'getReportPrograms.action',
-			identifiertypes_get: 'loadReportIdentifierTypes.action',
-			patientattributes_get: 'loadReportAttributes.action',
+			patientproperties_get: 'loadPatientProperties.action',
 			programstages_get: 'loadReportProgramStages.action',
 			dataelements_get: 'loadDataElements.action',
 			organisationunitchildren_get: 'getOrganisationUnitChildren.action',
@@ -69,13 +68,9 @@
 					filter: TR.i18n.wm_multiple_filter_orgunit
 				}
             },
-            identifierType: {
-                value: 'identifierType',
-                rawvalue: TR.i18n.identifiers
-            },
-            patientAttribute: {
-                value: 'patientAttribute',
-                rawvalue: TR.i18n.attributes
+            patientProperties: {
+                value: 'patientProperties',
+                rawvalue: TR.i18n.patientProperties
             },
             programStage: {
                 value: 'programStage',
@@ -147,14 +142,10 @@
         settings: {},
         params: {
             program:{},
-			identifierType: {},
-			patientAttribute: {},
+			patientProperty: {},
 			programStage: {},
 			dataelement: {},
-			organisationunit: {},
-			fixedAttributes:{
-				checkbox: []
-			}
+			organisationunit: {}
         },
         options: {},
         toolbar: {
@@ -199,7 +190,7 @@
                 return ((screen.height/2)-((cmp.height/2)-100));
             },
             resizeParams: function() {
-				var a = [TR.cmp.params.identifierType.panel, TR.cmp.params.dataelement.panel, 
+				var a = [TR.cmp.params.patientProperty.panel, TR.cmp.params.dataelement.panel, 
 						 TR.cmp.params.organisationunit.treepanel];
 				for (var i = 0; i < a.length; i++) {
 					if (!a[i].collapsed) {
@@ -266,7 +257,6 @@
                     });
                     return filter;
                 });
-                a.store.sort('name', 'ASC');
             },
 			filterSelector: function(selectors, queryString) {
                 var elements = selectors.boundList.all.elements;
@@ -285,7 +275,7 @@
             },
             setHeight: function(ms, panel, fill) {
 				for (var i = 0; i < ms.length; i++) {
-					ms[i].setHeight(panel.getHeight() - 250);
+					ms[i].setHeight(panel.getHeight() - 49);
 				}
 			}
         },
@@ -409,33 +399,6 @@
 			
 			return value;
 		},
-		setEnabledFixedAttr: function()
-		{
-			var fixedAttributes = TR.cmp.params.fixedAttributes.checkbox;
-			Ext.Array.each(fixedAttributes, function(item) {
-				item.enable();
-			});
-		},
-		setDisabledFixedAttr: function()
-		{
-			var fixedAttributes = TR.cmp.params.fixedAttributes.checkbox;
-			Ext.Array.each(fixedAttributes, function(item) {
-				item.setValue(false);
-				item.disable();
-			});
-		},
-		getSelectedFixedAttr: function()
-		{
-			var p = [];
-			var fixedAttributes = TR.cmp.params.fixedAttributes.checkbox;
-			Ext.Array.each(fixedAttributes, function(item) {
-				if( item.value )
-				{
-					p.push( item.paramName );
-				}
-			});
-			return p;
-		},
         crud: {
             favorite: {
                 create: function(fn, isupdate) {
@@ -521,76 +484,37 @@
 							Ext.getCmp('levelCombobox').setValue( f.level );
 							TR.state.orgunitId = f.organisationUnitId;
 							
-							TR.cmp.params.identifierType.objects = [];
-							TR.cmp.params.patientAttribute.objects = [];
-							TR.cmp.params.fixedAttributes.objects = [];
+							TR.cmp.params.patientProperty.objects = [];
 							TR.cmp.params.dataelement.objects = [];
 							
-							// IDENTIFIER TYPE
-							TR.store.identifierType.selected.removeAll();
-							if (f.identifiers && f.type != "3" ) {
-								for (var i = 0; i < f.identifiers.length; i++) {
-									TR.cmp.params.identifierType.objects.push({id: f.identifiers[i].id, name: TR.util.string.getEncodedString(f.identifiers[i].name)});
-								}
-								TR.store.identifierType.selected.add(TR.cmp.params.identifierType.objects);
-							
-								var storeIdentifierType = TR.store.identifierType.available;
-								storeIdentifierType.parent = f.programId;
-								if (TR.util.store.containsParent(storeIdentifierType)) {
-									TR.util.store.loadFromStorage(storeIdentifierType);
-									TR.util.multiselect.filterAvailable(TR.cmp.params.identifierType.available, TR.cmp.params.identifierType.selected);
-								}
-								else {
-									storeIdentifierType.load({params: {programId: f.programId}});
-								}
-							}
-							
-							// PATIENT ATTRIBUTE
-							TR.store.patientAttribute.selected.removeAll();
-							if (f.attributes && f.type != "3") {
-								for (var i = 0; i < f.attributes.length; i++) {
-									TR.cmp.params.patientAttribute.objects.push({id: f.attributes[i].id, name: TR.util.string.getEncodedString(f.attributes[i].name)});
-								}
-								TR.store.patientAttribute.selected.add(TR.cmp.params.patientAttribute.objects);
-								
-								var storePatientAttribute = TR.store.patientAttribute.available;
-								storePatientAttribute.parent = f.programId;
-								if (TR.util.store.containsParent(storePatientAttribute)) {
-									TR.util.store.loadFromStorage(storePatientAttribute);
-									TR.util.multiselect.filterAvailable(TR.cmp.params.patientAttribute.available, TR.cmp.params.patientAttribute.selected);						
-								}
-								else {
-									storePatientAttribute.load({params: {programId: f.programId}});
-								}
-							}
-							
-							// FIXED ATTRIBUTES
-							TR.util.setEnabledFixedAttr();
-							if (f.fixedAttributes && f.type != "3") {
-								var fixedAttributes = TR.cmp.params.fixedAttributes.checkbox;
-								Ext.Array.each(fixedAttributes, function(item) {
-									for (var i = 0; i < f.fixedAttributes.length; i++) {
-										var flag = false;
-										if( item.paramName == f.fixedAttributes[i] )
-										{
-											item.setValue( true );
-											flag = true;
-											break;
-										}
-									}
-									if( !flag ){
-										item.setValue( false );
-									}
-								});
-							}
-							
-							// PROGRAM-STAGE										
+							// Patient properties
+							TR.store.patientProperty.selected.removeAll();
+							
+							// programs with registration
+							if (f.patientProperties && f.type != "3" ) {
+								for (var i = 0; i < f.patientProperties.length; i++) {
+									TR.cmp.params.patientProperty.objects.push({id: f.patientProperties[i].id, name: TR.util.string.getEncodedString(f.patientProperties[i].name)});
+								}
+								TR.store.patientProperty.selected.add(TR.cmp.params.patientProperty.objects);
+							
+								var storePatientProperty = TR.store.patientProperty.available;
+								storePatientProperty.parent = f.programId;
+								if (TR.util.store.containsParent(storePatientProperty)) {
+									TR.util.store.loadFromStorage(storePatientProperty);
+									TR.util.multiselect.filterAvailable(TR.cmp.params.patientProperty.available, TR.cmp.params.patientProperty.selected);
+								}
+								else {
+									storePatientProperty.load({params: {programId: f.programId}});
+								}
+							}
+							
+							// Program stage									
 							var storeProgramStage = TR.store.programStage;
 							storeProgramStage.parent = f.programStageId;
 							storeProgramStage.load({params: {programId: f.programId}});
 							Ext.getCmp('programStageCombobox').setValue( f.programStageId );
 							
-							// DATAELEMENT
+							// Data element
 							TR.store.dataelement.selected.removeAll();
 							if (f.dataElements) {
 								for (var i = 0; i < f.dataElements.length; i++) {
@@ -623,50 +547,24 @@
                 fields: ['id', 'name', 'type'],
 				data:TR.init.system.program
             }),
-		identifierType: {
-            available: Ext.create('Ext.data.Store', {
-                fields: ['id', 'name'],
-                proxy: {
-                    type: 'ajax',
-                    url: TR.conf.finals.ajax.path_commons + TR.conf.finals.ajax.identifiertypes_get,
-                    reader: {
-                        type: 'json',
-                        root: 'identifierTypes'
-                    }
-                },
-				isloaded: false,
-                storage: {},
-                listeners: {
-                    load: function(s) {
-						this.isloaded = true;
-                        TR.util.store.addToStorage(s);
-                        TR.util.multiselect.filterAvailable(TR.cmp.params.identifierType.available, TR.cmp.params.identifierType.selected);
-                    }
-                }
-            }),
-            selected: Ext.create('Ext.data.Store', {
-                fields: ['id', 'name'],
-                data: []
-            })
-        },
-		patientAttribute: {
-            available: Ext.create('Ext.data.Store', {
-                fields: ['id', 'name'],
-                proxy: {
-                    type: 'ajax',
-                    url: TR.conf.finals.ajax.path_commons + TR.conf.finals.ajax.patientattributes_get,
-                    reader: {
-                        type: 'json',
-                        root: 'patientAttributes'
-                    }
-                },
-				isloaded: false,
-                storage: {},
-                listeners: {
-                    load: function(s) {
-						this.isloaded = true;
-                        TR.util.store.addToStorage(s);
-                        TR.util.multiselect.filterAvailable(TR.cmp.params.patientAttribute.available, TR.cmp.params.patientAttribute.selected);
+		patientProperty: {
+            available: Ext.create('Ext.data.Store', {
+                fields: ['id', 'name'],
+                proxy: {
+                    type: 'ajax',
+                    url: TR.conf.finals.ajax.path_commons + TR.conf.finals.ajax.patientproperties_get,
+                    reader: {
+                        type: 'json',
+                        root: 'patientProperties'
+                    }
+                },
+				isloaded: false,
+                storage: {},
+                listeners: {
+                    load: function(s) {
+						this.isloaded = true;
+						TR.util.store.addToStorage(s);
+                        TR.util.multiselect.filterAvailable(TR.cmp.params.patientProperty.available, TR.cmp.params.patientProperty.selected);
                     }
                 }
             }),
@@ -802,7 +700,7 @@
 			}
 			// Get url
 			var url = TR.conf.finals.ajax.path_root + TR.conf.finals.ajax.generatetabularreport_get;
-			// Export to XLS or PDF
+			// Export to XLS 
 			if( type)
 			{
 				window.location.href = url + "?" + this.getURLParams(type);
@@ -868,54 +766,41 @@
 			p.programStageId = TR.cmp.params.programStage.getValue();
 			p.currentPage = this.currentPage;
 			
-			// Get fixed attributes
-			p.fixedAttributes = TR.util.getSelectedFixedAttr();
-			
 			// Get searching values
 			p.searchingValues = [];
 			if( !TR.state.paramChanged() )
 			{
-				var grid = TR.datatable.datatable;
-				var cols = grid.columns;
-				var editor = grid.getStore().getAt(0);
-				var colLen = cols.length;
-				for( var i=0; i<colLen; i++ )
+				var cols = TR.datatable.datatable.columns;
+				for( var i=0; i<cols.length; i++ )
 				{
-					var col = cols[i];	
-					var dataIndex = col.dataIndex;
-					
-					if( col.name )
+					var col = cols[i];
+					if( col.name && col.name.indexOf('meta_')!=-1 )
 					{
-						var value = editor.data[dataIndex];
-						var hidden = (col.hidden==undefined)? false : col.hidden;
-						if( value!=null && value!= '')
-						{
-							value = TR.util.getValueFormula(value);
-							p.searchingValues.push( col.name + hidden + "_" + value );
-						}
-						else
-						{
-							p.searchingValues.push( col.name + hidden + "_" );
-						}
+						var param = TR.state.getFilterValueByColumn(col.name);
+						p.searchingValues.push(param);
 					}
 				}
+				var colNames = new Array();
+				TR.cmp.params.patientProperty.selected.store.each( function(r) {
+					var param = TR.state.getFilterValueByColumn(r.data.id);
+					p.searchingValues.push(param);
+				});
+				TR.cmp.params.dataelement.selected.store.each( function(r) {
+					var param = TR.state.getFilterValueByColumn(r.data.id);
+					p.searchingValues.push(param);
+				});
 			}
 			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_' );
+				// Patient properties
+				TR.cmp.params.patientProperty.selected.store.each( function(r) {
+					p.searchingValues.push( r.data.id + '_false_' );
 				});
 				// Data elements
 				TR.cmp.params.dataelement.selected.store.each( function(r) {
-					p.searchingValues.push( 'de_' + r.data.id +  '_false_' );
+					p.searchingValues.push( r.data.id +  '_false_' );
 				});
 			}
-		
             return p;
         },
 		getURLParams: function( type ) {
@@ -930,65 +815,77 @@
 			p += "&programStageId=" + TR.cmp.params.programStage.getValue();
 			p += "&type=" + type;
 			
-			// Get fixed attributes
-			var fixedAttributes = TR.cmp.params.fixedAttributes.checkbox;
-			Ext.Array.each(fixedAttributes, function(item) {
-				if( item.value )
-					p+="&fixedAttributes=" + item.paramName;
-			});
-			
 			if( !TR.state.paramChanged() )
 			{
-				var grid = TR.datatable.datatable;
-				var cols = grid.columns;
-				var editor = grid.getStore().getAt(0);
-				var colLen = cols.length;
-				for( var i=0; i<colLen; i++ )
+				var colNames = new Array();
+				TR.cmp.params.patientProperty.selected.store.each( function(r) {
+					var param = TR.state.getFilterValueByColumn(r.data.id);
+					p += "&searchingValues=" + param;
+				});
+				TR.cmp.params.dataelement.selected.store.each( function(r) {
+					var param = TR.state.getFilterValueByColumn(r.data.id);
+					p += "&searchingValues=" + param;
+				});
+				var cols = TR.datatable.datatable.columns;
+				for( var i=0; i<cols.length; i++ )
 				{
-					var col = cols[i];	
-					if( col.name )
+					var col = cols[i];
+					if( col.name && col.name.indexOf('meta_')!=-1 )
 					{
-						var dataIndex = col.dataIndex;
-						var value = editor.data[dataIndex];
-						if( value!=null && value!= '')
-						{
-							value = TR.util.getValueFormula(value);
-						}
-						var hidden = (col.hidden==undefined)? false : col.hidden;
-						p += "&searchingValues=" +  col.name + hidden + "_" + value;
+						var param = TR.state.getFilterValueByColumn(col.name);
+						p += "&searchingValues=" + param;
 					}
 				}
 			}
 			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_';
+				// Patient properties
+				TR.cmp.params.patientProperty.selected.store.each( function(r) {
+					p += "&searchingValues=" + r.data.id + '_false_';
 				});
 				// Data elements
 				TR.cmp.params.dataelement.selected.store.each( function(r) {
-					p += "&searchingValues=" + 'de_' + r.data.id + '_false_';
+					p += "&searchingValues=" + r.data.id + '_false_';
 				});
 			}
 			
             return p;
         },
+		getFilterValueByColumn: function( colname ) {
+			var grid = TR.datatable.datatable;
+			var cols = grid.columns;
+			var editor = grid.getStore().getAt(0);
+			var p = "";
+			for( var i=0; i<cols.length; i++ )
+			{
+				var col = cols[i];
+				if( col.name && col.name == colname )
+				{
+					var value = editor.data[col.dataIndex];
+					var hidden = (col.hidden==undefined)? false : col.hidden;
+					if( value!=null && value!= '')
+					{
+						value = TR.util.getValueFormula(value);
+						p = colname + '_' + hidden + "_" + value ;
+					}
+					else 
+					{
+						p = colname + '_' + col.hidden + "_";
+					}
+					return p;
+				}
+			}		
+			return colname + "_false_";
+		},
 		paramChanged: function() {
 			if( TR.store.datatable && TR.store.datatable.data.length)
 			{
 				var colNames = new Array();
-				TR.cmp.params.identifierType.selected.store.each( function(r) {
-					colNames.push( 'iden_' + r.data.id + '_' );
-				});
-				TR.cmp.params.patientAttribute.selected.store.each( function(r) {
-					colNames.push( 'attr_' + r.data.id + '_' );
+				TR.cmp.params.patientProperty.selected.store.each( function(r) {
+					colNames.push( r.data.id );
 				});
 				TR.cmp.params.dataelement.selected.store.each( function(r) {
-					colNames.push( 'de_' + r.data.id + '_' );
+					colNames.push( r.data.id );
 				});
 					
 				var cols = TR.datatable.datatable.columns;
@@ -1086,72 +983,27 @@
 					header: TR.value.columns[index].name, 
 					dataIndex: 'col' + index,
 					height: TR.conf.layout.east_gridcolumn_height,
-					name: 'meta_' + index + '_',
+					name: 'meta_' + index,
 					sortable: false,
 					draggable: false,
 					hidden: eval(TR.value.columns[index].hidden)
 				}
 			}
 			
-			// Fixed attributes
-			
-			Ext.Array.each(TR.cmp.params.fixedAttributes.checkbox, function(item) {
-				if( item.value )
-				{
-					cols[++index] = {
-						header: TR.value.columns[index].name, 
-						dataIndex: 'col' + index,
-						height: TR.conf.layout.east_gridcolumn_height,
-						name: item.paramName,
-						sortable: false,
-						draggable: false,
-						hidden: eval(TR.value.columns[index].hidden )
-					}
-				}
-			});
-			
-			
-			// Identifier columns
-			
-			TR.cmp.params.identifierType.selected.store.each( function(r) {
+			// Patient properties columns
+			
+			TR.cmp.params.patientProperty.selected.store.each( function(r) {
 				cols[++index] = {
-					header: TR.value.columns[index].name, 
+					header: r.data.name, 
 					dataIndex: 'col' + index,
 					height: TR.conf.layout.east_gridcolumn_height,
-					name: 'iden_' + r.data.id + '_',
+					name: r.data.id,
 					sortable: false,
 					draggable: false,
 					hidden: eval(TR.value.columns[index].hidden )
 				}
 			});
 			
-			// Attribute columns
-			
-			TR.cmp.params.patientAttribute.selected.store.each( function(r) {	
-				cols[++index] = {
-					header: TR.value.columns[index].name, 
-					dataIndex: 'col' + index,
-					height: TR.conf.layout.east_gridcolumn_height,
-					name: 'attr_' + r.data.id + '_',
-					hidden: eval(TR.value.columns[index].hidden ),
-					sortable: false,
-					draggable: true,
-					emptyText: TR.i18n.et_no_data,
-					editor: {
-						xtype: TR.value.columns[index].valueType,
-						queryMode: 'local',
-						editable: true,
-						valueField: 'name',
-						displayField: 'name',
-						allowBlank: true,
-						store:  new Ext.data.ArrayStore({
-							fields: ['name'],
-							data: TR.value.columns[index].suggested
-						})
-					}
-				};
-			});
-			
 			// Data element columns
 			
 			TR.cmp.params.dataelement.selected.store.each( function(r) {
@@ -1159,7 +1011,7 @@
 					header: TR.value.columns[index].name, 
 					dataIndex: 'col' + index,
 					height: TR.conf.layout.east_gridcolumn_height,
-					name: "de_"+ r.data.id + "_",
+					name: r.data.id,
 					hidden: eval(TR.value.columns[index].hidden ),
 					sortable: false,
 					draggable: true,
@@ -1424,44 +1276,26 @@
 									},
 									select: function(cb) {
 										var pId = cb.getValue();
+										// Regular programs
 										if( cb.displayTplData[0].type !='3' )
 										{
-											// IDENTIFIER TYPE
-											var storeIdentifierType = TR.store.identifierType.available;
-											TR.store.identifierType.selected.removeAll();
-											storeIdentifierType.parent = pId;
-											
-											if (TR.util.store.containsParent(storeIdentifierType)) {
-												TR.util.store.loadFromStorage(storeIdentifierType);
-												TR.util.multiselect.filterAvailable(TR.cmp.params.identifierType.available, TR.cmp.params.identifierType.selected);
-											}
-											else {
-												storeIdentifierType.load({params: {programId: pId}});
-											}
-											
-											// PATIENT ATTRIBUTE
-											var storePatientAttribute = TR.store.patientAttribute.available;
-											storePatientAttribute.parent = pId;
-											TR.store.patientAttribute.selected.removeAll();
-											
-											if (TR.util.store.containsParent(storePatientAttribute)) {
-												TR.util.store.loadFromStorage(storePatientAttribute);
-												TR.util.multiselect.filterAvailable(TR.cmp.params.patientAttribute.available, TR.cmp.params.patientAttribute.selected);
-											}
-											else {
-												storePatientAttribute.load({params: {programId: pId}});
-											}
-											TR.util.setEnabledFixedAttr();
+											// IDENTIFIER TYPE && PATIENT ATTRIBUTES
+											var storePatientProperty = TR.store.patientProperty.available;
+											TR.store.patientProperty.selected.removeAll();
+											storePatientProperty.parent = pId;
+											
+											if (TR.util.store.containsParent(storePatientProperty)) {
+												TR.util.store.loadFromStorage(storePatientProperty);
+												TR.util.multiselect.filterAvailable(TR.cmp.params.patientProperty.available, TR.cmp.params.patientProperty.selected);
+											}
+											else {
+												storePatientProperty.load({params: {programId: pId}});
+											}
 										}
 										else
 										{
-											TR.util.setDisabledFixedAttr();
-											
-											TR.store.identifierType.available.removeAll();
-											TR.store.identifierType.selected.removeAll();
-											
-											TR.store.patientAttribute.available.removeAll();
-											TR.store.patientAttribute.selected.removeAll();
+											TR.store.patientProperty.available.removeAll();
+											TR.store.patientProperty.selected.removeAll();
 										}
 										
 										// PROGRAM-STAGE										
@@ -1617,155 +1451,18 @@
 											{
 												xtype: 'panel',
 												layout: 'column',
-												bodyStyle: 'border-style:none; padding:0px 0 0px 0px;',
-												items: [
-													{
-														xtype: 'checkbox',
-														id: 'selectAll',
-														handler: function() {
-															var checked = Ext.getCmp('selectAll').value;
-															Ext.Array.each(TR.cmp.params.fixedAttributes.checkbox, function(item) {
-																item.setValue( checked );
-															});
-														}
-													},{
-														xtype: 'label',
-														text: TR.i18n.fixed_attributes,
-														style: 'font-size:11px; font-weight:bold; color:#444; padding:0 0 0 3px'
-													}
-													
-												]
-											},
-											{
-												xtype: 'panel',
-												layout: 'column',
-												bodyStyle: 'border-style:none; padding:5px 0 5px 8px;',
-												items: [
-													{
-														xtype: 'panel',
-														layout: 'anchor',
-														bodyStyle: 'border-style:none; padding:0 0 0 5px',
-														defaults: {
-															labelSeparator: '',
-															listeners: {
-																added: function(chb) {
-																	if (chb.xtype === 'checkbox') {
-																		TR.cmp.params.fixedAttributes.checkbox.push(chb);
-																	}
-																}
-															}
-														},
-														items: [
-															{
-																xtype: 'checkbox',
-																paramName: 'fullName',
-																boxLabel: TR.i18n.full_name
-															},
-															{
-																xtype: 'checkbox',
-																paramName: 'gender',
-																boxLabel: TR.i18n.gender
-															}
-														]
-													},
-													{
-														xtype: 'panel',
-														layout: 'anchor',
-														bodyStyle: 'border-style:none; padding:0 0 0 5px',
-														defaults: {
-															labelSeparator: '',
-															listeners: {
-																added: function(chb) {
-																	if (chb.xtype === 'checkbox') {
-																		TR.cmp.params.fixedAttributes.checkbox.push(chb);
-																	}
-																}
-															}
-														},
-														items: [
-															{
-																xtype: 'checkbox',
-																paramName: 'birthDate',
-																boxLabel: TR.i18n.date_of_birth
-															},
-															{
-																xtype: 'checkbox',
-																paramName: 'dobType',
-																boxLabel: TR.i18n.dob_type
-															}
-														]
-													},
-													{
-														xtype: 'panel',
-														layout: 'anchor',
-														bodyStyle: 'border-style:none; padding:0 0 0 5px',
-														defaults: {
-															labelSeparator: '',
-															listeners: {
-																added: function(chb) {
-																	if (chb.xtype === 'checkbox') {
-																		TR.cmp.params.fixedAttributes.checkbox.push(chb);
-																	}
-																}
-															}
-														},
-														items: [
-															{
-																xtype: 'checkbox',
-																paramName: 'phoneNumber',
-																boxLabel: TR.i18n.phone_number
-															},
-															{
-																xtype: 'checkbox',
-																paramName: 'deathdate',
-																boxLabel: TR.i18n.death_date
-															}
-														]
-													},
-													{
-														xtype: 'panel',
-														layout: 'anchor',
-														bodyStyle: 'border-style:none; padding:0 0 0 5px',
-														defaults: {
-															labelSeparator: '',
-															listeners: {
-																added: function(chb) {
-																	if (chb.xtype === 'checkbox') {
-																		TR.cmp.params.fixedAttributes.checkbox.push(chb);
-																	}
-																}
-															}
-														},
-														items: [
-															{
-																xtype: 'checkbox',
-																paramName: 'dobType',
-																boxLabel: TR.i18n.dob_type
-															}
-														]
-													}
-												]
-											},
-											{
-												xtype: 'label',
-												text: TR.i18n.identifiers,
-												style: 'font-size:11px; font-weight:bold; color:#444; padding:0 0 0 3px'
-											},
-											{
-												xtype: 'panel',
-												layout: 'column',
 												bodyStyle: 'border-style:none',
 												items: [
 													{
 														xtype: 'multiselect',
-														name: 'availableIdentifierTypes',
+														name: 'availablePatientProperties',
 														cls: 'tr-toolbar-multiselect-left',
 														width: (TR.conf.layout.west_fieldset_width - TR.conf.layout.west_width_subtractor) / 2,
 														height: TR.conf.layout.west_multiselect,
 														displayField: 'name',
 														valueField: 'id',
 														queryMode: 'local',
-														store: TR.store.identifierType.available,
+														store: TR.store.patientProperty.available,
 														tbar: [
 															{
 																xtype: 'label',
@@ -1778,7 +1475,7 @@
 																icon: 'images/arrowright.png',
 																width: 22,
 																handler: function() {
-																	TR.util.multiselect.select(TR.cmp.params.identifierType.available, TR.cmp.params.identifierType.selected);
+																	TR.util.multiselect.select(TR.cmp.params.patientProperty.available, TR.cmp.params.patientProperty.selected);
 																}
 															},
 															{
@@ -1786,25 +1483,25 @@
 																icon: 'images/arrowrightdouble.png',
 																width: 22,
 																handler: function() {
-																	TR.util.multiselect.selectAll(TR.cmp.params.identifierType.available, TR.cmp.params.identifierType.selected);
+																	TR.util.multiselect.selectAll(TR.cmp.params.patientProperty.available, TR.cmp.params.patientProperty.selected);
 																}
 															},
 															' '
 														],
 														listeners: {
 															added: function() {
-																TR.cmp.params.identifierType.available = this;
+																TR.cmp.params.patientProperty.available = this;
 															},                                                                
 															afterrender: function() {
 																this.boundList.on('itemdblclick', function() {
-																	TR.util.multiselect.select(this, TR.cmp.params.identifierType.selected);
+																	TR.util.multiselect.select(this, TR.cmp.params.patientProperty.selected);
 																}, this);
 															}
 														}
 													},                                            
 													{
 														xtype: 'multiselect',
-														name: 'selectedIdentifierTypes',
+														name: 'selectedPatientProperties',
 														cls: 'tr-toolbar-multiselect-right',
 														width: (TR.conf.layout.west_fieldset_width - TR.conf.layout.west_width_subtractor) / 2,
 														height: TR.conf.layout.west_multiselect,
@@ -1812,7 +1509,7 @@
 														valueField: 'id',
 														ddReorder: true,
 														queryMode: 'local',
-														store: TR.store.identifierType.selected,
+														store: TR.store.patientProperty.selected,
 														tbar: [
 															' ',
 															{
@@ -1820,7 +1517,7 @@
 																icon: 'images/arrowleftdouble.png',
 																width: 22,
 																handler: function() {
-																	TR.util.multiselect.unselectAll(TR.cmp.params.identifierType.available, TR.cmp.params.identifierType.selected);
+																	TR.util.multiselect.unselectAll(TR.cmp.params.patientProperty.available, TR.cmp.params.patientProperty.selected);
 																}
 															},
 															{
@@ -1828,7 +1525,7 @@
 																icon: 'images/arrowleft.png',
 																width: 22,
 																handler: function() {
-																	TR.util.multiselect.unselect(TR.cmp.params.identifierType.available, TR.cmp.params.identifierType.selected);
+																	TR.util.multiselect.unselect(TR.cmp.params.patientProperty.available, TR.cmp.params.patientProperty.selected);
 																}
 															},
 															'->',
@@ -1840,149 +1537,33 @@
 														],
 														listeners: {
 															added: function() {
-																TR.cmp.params.identifierType.selected = this;
+																TR.cmp.params.patientProperty.selected = this;
 															},          
 															afterrender: function() {
 																this.boundList.on('itemdblclick', function() {
-																	TR.util.multiselect.unselect(TR.cmp.params.identifierType.available, this);
+																	TR.util.multiselect.unselect(TR.cmp.params.patientProperty.available, this);
 																}, this);
 															}
 														}
 													}
 												]
-											},
-											{
-												xtype: 'panel',
-												bodyStyle: 'border-style:none;padding:5px 0 10px 0px;',
-												items: [
-													{
-														xtype: 'label',
-														text: TR.i18n.dynamic_attributes,
-														style: 'font-size:11px; font-weight:bold; color:#444; padding:0 0 0 3px'
-													},
-													{
-														xtype: 'panel',
-														layout: 'column',
-														bodyStyle: 'border-style:none',														
-														items: [
-															{
-																xtype: 'multiselect',
-																name: 'availablePatientAttributes',
-																cls: 'tr-toolbar-multiselect-left',
-																width: (TR.conf.layout.west_fieldset_width - TR.conf.layout.west_width_subtractor) / 2,
-																height: TR.conf.layout.west_multiselect,
-																displayField: 'name',
-																valueField: 'id',
-																queryMode: 'local',
-																store: TR.store.patientAttribute.available,
-																tbar: [
-																	{
-																		xtype: 'label',
-																		text: TR.i18n.available,
-																		cls: 'tr-toolbar-multiselect-left-label'
-																	},
-																	'->',
-																	{
-																		xtype: 'button',
-																		icon: 'images/arrowright.png',
-																		width: 22,
-																		handler: function() {
-																			TR.util.multiselect.select(TR.cmp.params.patientAttribute.available, TR.cmp.params.patientAttribute.selected);
-																		}
-																	},
-																	{
-																		xtype: 'button',
-																		icon: 'images/arrowrightdouble.png',
-																		width: 22,
-																		handler: function() {
-																			TR.util.multiselect.selectAll(TR.cmp.params.patientAttribute.available, TR.cmp.params.patientAttribute.selected);
-																		}
-																	},
-																	' '
-																],
-																listeners: {
-																	added: function() {
-																		TR.cmp.params.patientAttribute.available = this;
-																	},                                                                
-																	afterrender: function() {
-																		this.boundList.on('itemdblclick', function() {
-																			TR.util.multiselect.select(this, TR.cmp.params.patientAttribute.selected);
-																		}, this);
-																	}
-																}
-															},                                            
-															{
-																xtype: 'multiselect',
-																name: 'selectedPatientAttribute',
-																cls: 'tr-toolbar-multiselect-right',
-																width: (TR.conf.layout.west_fieldset_width - TR.conf.layout.west_width_subtractor) / 2,
-																height: TR.conf.layout.west_multiselect,
-																displayField: 'name',
-																valueField: 'id',
-																ddReorder: true,
-																queryMode: 'local',
-																store: TR.store.patientAttribute.selected,
-																tbar: [
-																	' ',
-																	{
-																		xtype: 'button',
-																		icon: 'images/arrowleftdouble.png',
-																		width: 22,
-																		handler: function() {
-																			TR.util.multiselect.unselectAll(TR.cmp.params.patientAttribute.available, TR.cmp.params.patientAttribute.selected);
-																		}
-																	},
-																	{
-																		xtype: 'button',
-																		icon: 'images/arrowleft.png',
-																		width: 22,
-																		handler: function() {
-																			TR.util.multiselect.unselect(TR.cmp.params.patientAttribute.available, TR.cmp.params.patientAttribute.selected);
-																		}
-																	},
-																	'->',
-																	{
-																		xtype: 'label',
-																		text: TR.i18n.selected,
-																		cls: 'tr-toolbar-multiselect-right-label'
-																	}
-																],
-																listeners: {
-																	added: function() {
-																		TR.cmp.params.patientAttribute.selected = this;
-																	},          
-																	afterrender: function() {
-																		this.boundList.on('itemdblclick', function() {
-																			TR.util.multiselect.unselect(TR.cmp.params.patientAttribute.available, this);
-																		}, this);
-																	}
-																}
-															}
-														]
-													}
-												]
 											}
+											
 										],
 										listeners: {
 											added: function() {
-												TR.cmp.params.identifierType.panel = this;
+												TR.cmp.params.patientProperty.panel = this;
 											},
 											expand: function() {
 												// IDENTIFIER TYPE
 												TR.util.multiselect.setHeight(
-													[TR.cmp.params.identifierType.available, TR.cmp.params.identifierType.selected],
-													TR.cmp.params.identifierType.panel
+													[TR.cmp.params.patientProperty.available, TR.cmp.params.patientProperty.selected],
+													TR.cmp.params.patientProperty.panel
 												);
 												
 												var programId = TR.cmp.settings.program.getValue();													
-												if (programId != null && !TR.store.identifierType.available.isloaded) {
-													TR.store.identifierType.available.load({params: {programId: programId}});
-												}
-												
-												// PATIENT-ATTRIBUTE
-												var programId = TR.cmp.settings.program.getValue();													
-												if ( programId!=null && !TR.store.patientAttribute.available.isloaded ) {
-													TR.store.patientAttribute.available.load({params: {programId: programId}});
+												if (programId != null && !TR.store.patientProperty.available.isloaded) {
+													TR.store.patientProperty.available.load({params: {programId: programId}});
 												}
 											}
 										}

=== 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-05-28 16:54:25 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm	2012-05-29 07:37:37 +0000
@@ -1,6 +1,6 @@
 TR.i18n = {
 title:'$encoder.jsEscape($i18n.getString( 'title' ) , "'")',
-programs: '$encoder.jsEscape($i18n.getString( 'program' ) , "'")',
+program: '$encoder.jsEscape($i18n.getString( 'program' ) , "'")',
 identifiers_and_attributes:'$encoder.jsEscape($i18n.getString( 'identifiers_and_attributes' ) , "'")',
 identifiers:'$encoder.jsEscape($i18n.getString( 'identifiers' ) , "'")',
 attributes:'$encoder.jsEscape($i18n.getString( 'attributes' ) , "'")',
@@ -24,7 +24,6 @@
 et_no_dataelement:'$encoder.jsEscape($i18n.getString( 'et_no_dataelement' ) , "'")',
 download:'$encoder.jsEscape($i18n.getString( 'download' ) , "'")',
 xls:'$encoder.jsEscape($i18n.getString( 'xls' ) , "'")',
-pdf:'$encoder.jsEscape($i18n.getString( 'pdf' ) , "'")',
 filter:'$encoder.jsEscape($i18n.getString( 'filter' ) , "'")',
 cancel:'$encoder.jsEscape($i18n.getString( 'cancel' ) , "'")',
 clear:'$encoder.jsEscape($i18n.getString( 'clear' ) , "'")',
@@ -36,7 +35,7 @@
 update:'$encoder.jsEscape($i18n.getString( 'update' ) , "'")',
 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' ) , "'")',
+organisation_unit:'$encoder.jsEscape($i18n.getString( 'organisation_units' ) , "'")',
 commons:'$encoder.jsEscape($i18n.getString( 'commons' ) , "'")',
 options:'$encoder.jsEscape($i18n.getString( 'options' ) , "'")',
 reset:'$encoder.jsEscape($i18n.getString( 'reset' ) , "'")',
@@ -70,5 +69,6 @@
 save_favorite:'$encoder.jsEscape($i18n.getString( 'save_favorite' ) , "'")',
 overwrite:'$encoder.jsEscape($i18n.getString( 'overwrite' ) , "'")',
 et_no_programs: '$encoder.jsEscape($i18n.getString( 'et_no_programs' ) , "'")',
-favorites:'$encoder.jsEscape($i18n.getString( 'favorites' ) , "'")'
+favorites:'$encoder.jsEscape($i18n.getString( 'favorites' ) , "'")',
+name_already_in_use: '$encoder.jsEscape($i18n.getString( 'name_already_in_use' ) , "'")'
 };
\ 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-05-23 15:02:50 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReport.vm	2012-05-29 07:37:37 +0000
@@ -12,23 +12,26 @@
 	"level": "${tabularReport.level}",
 	"sortedOrgunitAsc": "${tabularReport.sortedOrgunitAsc}",
 	"facilityLB": "${tabularReport.facilityLB}",
-	"identifiers": [
-		#set( $size = ${tabularReport.identifiers.size()} )
+	"patientProperties": [
+		#set( $fixedAttributes = ${tabularReport.fixedAttributes} )
+		#foreach( ${fixedAttribute} in $!{fixedAttributes} )
+			{
+				"id": "fixedAttr_${fixedAttribute}",
+				"name": "${fixedAttribute}"
+			},
+		#end
 		#set( $identifiers = ${tabularReport.identifiers} )
 		#foreach( ${identifier} in $!{identifiers} )
 			{
-				"id": "${identifier.id}",
+				"id": "iden_${identifier.id}",
 				"name": "${identifier.name}"
-			}
-			#if( $velocityCount < $size ),#end
+			},
 		#end
-	],
-	"attributes": [
 		#set( $size = ${tabularReport.attributes.size()} )
 		#set( $attributes = ${tabularReport.attributes} )
 		#foreach( ${attribute} in $!{attributes} )
 			{
-				"id": "${attribute.id}",
+				"id": "attr_${attribute.id}",
 				"name": "${attribute.name}"
 			}
 			#if( $velocityCount < $size ),#end
@@ -38,7 +41,7 @@
 		#set( $size = ${tabularReport.fixedAttributes.size()} )
 		#set( $fixedAttributes = ${tabularReport.fixedAttributes} )
 		#foreach( ${fixedAttribute} in $!{fixedAttributes} )
-			"${fixedAttribute}"
+			"fixedAttr_${fixedAttribute}"
 			#if( $velocityCount < $size ),#end
 		#end
 	],
@@ -47,7 +50,7 @@
 		#set( $dataElements = ${tabularReport.dataElements} )
 		#foreach( ${dataElement} in $!{dataElements} )
 			{
-				"id": "${dataElement.id}",
+				"id": "de_${dataElement.id}",
 				"name": "${dataElement.name}"
 			}
 			#if( $velocityCount < $size ),#end

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responseDataElements.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responseDataElements.vm	2012-03-05 04:22:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responseDataElements.vm	2012-05-29 07:37:37 +0000
@@ -2,7 +2,7 @@
 { "dataElements": [
 #foreach( $psDataElement in $psDataElements )
   {
-    "id": $!{psDataElement.dataElement.id},
+    "id": "de_$!{psDataElement.dataElement.id}",
     "name": "$encoder.xmlEncode(${psDataElement.dataElement.name} )"
   }#if( $velocityCount < $size ),#end
 	#end]