dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #17044
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6656: (patient) Remove unused file.
------------------------------------------------------------
revno: 6656
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-04-20 13:51:37 +0700
message:
(patient) Remove unused file.
removed:
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/LoadAttributeGroupsAction.java
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/LoadAttributesAction.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/struts.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/LoadAttributeGroupsAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/LoadAttributeGroupsAction.java 2012-04-11 06:25:02 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/LoadAttributeGroupsAction.java 1970-01-01 00:00:00 +0000
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.hisp.dhis.caseentry.action.report;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import org.hisp.dhis.patient.PatientAttributeGroup;
-import org.hisp.dhis.patient.PatientAttributeGroupService;
-import org.hisp.dhis.patient.comparator.PatientAttributeGroupSortOrderComparator;
-import org.hisp.dhis.program.Program;
-import org.hisp.dhis.program.ProgramService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- *
- * @version $LoadAttributeGroupsAction.java Apr 3, 2012 8:42:24 AM$
- */
-public class LoadAttributeGroupsAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private ProgramService programService;
-
- private PatientAttributeGroupService attributeGroupService;
-
- // -------------------------------------------------------------------------
- // Input/Output
- // -------------------------------------------------------------------------
-
- private Integer programId;
-
- private List<PatientAttributeGroup> attributeGroups = new ArrayList<PatientAttributeGroup>();
-
- // -------------------------------------------------------------------------
- // Getter && Setters
- // -------------------------------------------------------------------------
-
- public Collection<PatientAttributeGroup> getAttributeGroups()
- {
- return attributeGroups;
- }
-
- public void setAttributeGroupService( PatientAttributeGroupService attributeGroupService )
- {
- this.attributeGroupService = attributeGroupService;
- }
-
- public void setProgramService( ProgramService programService )
- {
- this.programService = programService;
- }
-
- public void setProgramId( Integer programId )
- {
- this.programId = programId;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- @Override
- public String execute()
- throws Exception
- {
- Program program = programService.getProgram( programId );
-
- attributeGroups = new ArrayList<PatientAttributeGroup>( attributeGroupService
- .getPatientAttributeGroups( program ) );
- Collections.sort( attributeGroups, new PatientAttributeGroupSortOrderComparator() );
-
- return SUCCESS;
- }
-
-}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/LoadAttributesAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/LoadAttributesAction.java 2012-04-18 10:28:39 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/LoadAttributesAction.java 2012-04-20 06:51:37 +0000
@@ -62,8 +62,6 @@
private Integer programId;
- private Integer attributeGroupId;
-
private Collection<PatientAttribute> patientAttributes = new HashSet<PatientAttribute>();
// -------------------------------------------------------------------------
@@ -80,11 +78,6 @@
return patientAttributes;
}
- public void setAttributeGroupId( Integer attributeGroupId )
- {
- this.attributeGroupId = attributeGroupId;
- }
-
public void setAttributeService( PatientAttributeService attributeService )
{
this.attributeService = attributeService;
@@ -109,19 +102,10 @@
throws Exception
{
Program program = programService.getProgram( programId );
- patientAttributes = attributeService.getAllPatientAttributes();
+
+ patientAttributes.addAll( attributeService.getPatientAttributes( null, null ) );
- patientAttributes.addAll( attributeService.getPatientAttributes( program ) );
-
- if ( attributeGroupId == null )
- {
- patientAttributes.addAll( attributeService.getPatientAttributes( null, null ) );
- }
- else
- {
- patientAttributes.retainAll( attributeGroupService.getPatientAttributeGroup( attributeGroupId )
- .getAttributes() );
- }
+ patientAttributes.addAll( attributeService.getPatientAttributes( program ) );
return SUCCESS;
=== 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-04-16 21:39:05 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2012-04-20 06:51:37 +0000
@@ -287,15 +287,6 @@
ref="org.hisp.dhis.patient.PatientIdentifierTypeService" />
</bean>
- <bean
- id="org.hisp.dhis.caseentry.action.report.LoadAttributeGroupsAction"
- class="org.hisp.dhis.caseentry.action.report.LoadAttributeGroupsAction"
- scope="prototype">
- <property name="programService" ref="org.hisp.dhis.program.ProgramService" />
- <property name="attributeGroupService"
- ref="org.hisp.dhis.patient.PatientAttributeGroupService" />
- </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/struts.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2012-04-17 12:12:42 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2012-04-20 06:51:37 +0000
@@ -300,12 +300,6 @@
/dhis-web-caseentry/jsonIdentifierTypes.vm</result>
</action>
- <action name="loadReportAttributeGroups"
- class="org.hisp.dhis.caseentry.action.report.LoadAttributeGroupsAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonPatientAttributeGroups.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-04-20 06:29:25 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2012-04-20 06:51:37 +0000
@@ -148,9 +148,6 @@
};
TR.util = {
- getCmp: function(q) {
- return TR.viewport.query(q)[0];
- },
getUrlParam: function(s) {
var output = '';
var href = window.location.href;
@@ -381,45 +378,10 @@
};
TR.store = {
- params: function() {
- return Ext.create('Ext.data.Store', {
- fields: ['id', 'name'],
- data: [
- {id: TR.conf.finals.params.data.value, name: TR.conf.finals.params.data.rawvalue},
- //{id: TR.conf.finals.params.program.value, name: TR.conf.finals.params.program.rawvalue},
- {id: TR.conf.finals.params.organisationunit.value, name: TR.conf.finals.params.organisationunit.rawvalue},
- {id: TR.conf.finals.params.identifierType.value, name: TR.conf.finals.params.identifierType.rawvalue},
- {id: TR.conf.finals.params.patientAttribute.value, name: TR.conf.finals.params.patientAttribute.rawvalue},
- {id: TR.conf.finals.params.programStage.value, name: TR.conf.finals.params.programStage.rawvalue},
- {id: TR.conf.finals.params.dataelement.value, name: TR.conf.finals.params.dataelement.rawvalue}
- ]
- });
- },
- program: {
- available: Ext.create('Ext.data.Store', {
+ program: Ext.create('Ext.data.Store', {
fields: ['id', 'name', 'anonymous'],
- proxy: {
- type: 'ajax',
- url: TR.conf.finals.ajax.path_commons + TR.conf.finals.ajax.programs_get,
- reader: {
- type: 'json',
- root: 'programs'
- }
- },
- data:TR.init.system.program,
- storage: {},
- listeners: {
- load: function(s) {
- s.add({id: 0, name: TR.i18n.please_select, index: -1});
- s.sort('index', 'ASC');
- }
- }
+ data:TR.init.system.program
}),
- selected: Ext.create('Ext.data.Store', {
- fields: ['id', 'name'],
- data: []
- })
- },
identifierType: {
available: Ext.create('Ext.data.Store', {
fields: ['id', 'name'],
@@ -1229,7 +1191,7 @@
valueField: 'id',
displayField: 'name',
width: TR.conf.layout.west_fieldset_width,
- store: TR.store.program.available,
+ store: TR.store.program,
listeners: {
added: function() {
TR.cmp.settings.program = this;
@@ -1330,7 +1292,6 @@
]
}
-
]
}]
},