=== 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-11-07 14:57:54 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2012-11-07 15:05:14 +0000 @@ -40,7 +40,6 @@ path_api: '../../api/', path_images: 'images/', initialize: 'tabularInitialize.action', - patientproperties_get: 'loadPatientProperties.action', programstages_get: 'loadReportProgramStages.action', dataelements_get: 'loadDataElements.action', organisationunitchildren_get: 'getOrganisationUnitChildren.action', @@ -151,7 +150,6 @@ settings: {}, params: { program:{}, - patientProperty: {}, programStage: {}, dataelement: {}, organisationunit: {} @@ -199,7 +197,7 @@ return ((screen.height/2)-((cmp.height/2)-100)); }, resizeParams: function() { - var a = [TR.cmp.params.patientProperty.panel, TR.cmp.params.dataelement.panel, + var a = [TR.cmp.params.dataelement.panel, TR.cmp.params.organisationunit.treepanel]; for (var i = 0; i < a.length; i++) { if (!a[i].collapsed) { @@ -492,32 +490,8 @@ Ext.getCmp('levelCombobox').setValue( f.level ); TR.state.orgunitIds = f.orgunitIds; - TR.cmp.params.patientProperty.objects = []; + // Data element TR.cmp.params.dataelement.objects = []; - - // 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}}); - } - - } - - // Data element TR.store.dataelement.selected.removeAll(); if (f.dataElements) { for (var i = 0; i < f.dataElements.length; i++) { @@ -570,32 +544,6 @@ } } }), - 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); - } - } - }), - selected: Ext.create('Ext.data.Store', { - fields: ['id', 'name'], - data: [] - }) - }, programStage: Ext.create('Ext.data.Store', { fields: ['id', 'name'], proxy: { @@ -857,10 +805,6 @@ } else { - // 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( r.data.id + '_false_' ); @@ -901,10 +845,6 @@ } else { - // 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=" + r.data.id + '_false_'; @@ -961,17 +901,12 @@ { var orgUnitCols = TR.init.system.maxLevels + 1 - TR.cmp.settings.level.getValue(); var orgUnitColsInTable = ( TR.datatable.datatable.columns.length - - TR.cmp.params.patientProperty.selected.store.data.length - TR.cmp.params.dataelement.selected.store.data.length - 3 ); if( orgUnitCols!=orgUnitColsInTable ) { return true; } - var colNames = new Array(); - 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( r.data.id ); }); @@ -1151,23 +1086,6 @@ } } - // Patient properties columns - - TR.cmp.params.patientProperty.selected.store.each( function(r) { - cols[++index] = { - header: r.data.name, - dataIndex: 'col' + index, - height: TR.conf.layout.east_gridcolumn_height, - name: r.data.id, - sortable: false, - draggable: false, - hidden: eval(TR.value.columns[index].hidden ), - filter:{ - type: "string" - } - } - }); - // Data element columns TR.cmp.params.dataelement.selected.store.each( function(r) { @@ -1514,28 +1432,6 @@ }, select: function(cb) { var pId = cb.getValue(); - // Regular programs - if( cb.displayTplData[0].type !='3' ) - { - // 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.store.patientProperty.available.removeAll(); - TR.store.patientProperty.selected.removeAll(); - } - // PROGRAM-STAGE var storeProgramStage = TR.store.programStage; TR.store.dataelement.available.removeAll(); @@ -1733,133 +1629,6 @@ } }, - // IDENTIFIER TYPE and PATIENT-ATTRIBUTE - { - title: '