=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetAggDataElementsAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetAggDataElementsAction.java 2012-01-11 05:31:53 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetAggDataElementsAction.java 1970-01-01 00:00:00 +0000 @@ -1,149 +0,0 @@ -package org.hisp.dhis.patient.action.caseaggregation; - -/* - * 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. - */ - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.hisp.dhis.dataelement.DataElement; -import org.hisp.dhis.dataelement.DataElementCategoryCombo; -import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo; -import org.hisp.dhis.dataelement.DataElementService; - -import com.opensymphony.xwork2.Action; - -public class GetAggDataElementsAction - implements Action -{ - - // ------------------------------------------------------------------------- - // Dependency - // ------------------------------------------------------------------------- - - private DataElementService dataElementService; - - public void setDataElementService( DataElementService dataElementService ) - { - this.dataElementService = dataElementService; - } - - // ------------------------------------------------------------------------- - // Input & Output - // ------------------------------------------------------------------------- - - private List optionComboNames; - - public List getOptionComboNames() - { - return optionComboNames; - } - - private List optionComboIds; - - public List getOptionComboIds() - { - return optionComboIds; - } - - private Integer dataElementGroupId; - - public void setDataElementGroupId( Integer dataElementGroupId ) - { - this.dataElementGroupId = dataElementGroupId; - } - - private List dataElementList; - - public List getDataElementList() - { - return dataElementList; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - optionComboNames = new ArrayList(); - - optionComboIds = new ArrayList(); - - if ( dataElementGroupId == 0 ) - { - dataElementList = new ArrayList( dataElementService.getDataElementsWithoutGroups() ); - } - else - { - dataElementList = new ArrayList( dataElementService.getDataElementGroup( dataElementGroupId ) - .getMembers() ); - } - Iterator deIterator = dataElementList.iterator(); - - while ( deIterator.hasNext() ) - { - DataElement dataElement = deIterator.next(); - - if ( dataElement.getDomainType().equalsIgnoreCase( DataElement.DOMAIN_TYPE_PATIENT ) - || !dataElement.getType().equals( DataElement.VALUE_TYPE_INT ) ) - { - deIterator.remove(); - } - - } - - if ( dataElementList != null && !dataElementList.isEmpty() ) - { - deIterator = dataElementList.iterator(); - - while ( deIterator.hasNext() ) - { - DataElement de = deIterator.next(); - - DataElementCategoryCombo dataElementCategoryCombo = de.getCategoryCombo(); - - List optionCombos = new ArrayList( - dataElementCategoryCombo.getOptionCombos() ); - - Iterator optionComboIterator = optionCombos.iterator(); - - while ( optionComboIterator.hasNext() ) - { - DataElementCategoryOptionCombo decoc = optionComboIterator.next(); - - optionComboIds.add( de.getId() + "." + decoc.getId() ); - - optionComboNames.add( de.getName() + " " + decoc.getName() ); - } - } - } - - return SUCCESS; - } -} === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2012-03-16 07:50:14 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2012-03-22 03:15:47 +0000 @@ -578,15 +578,6 @@ - - - - - - === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2012-03-21 05:07:15 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2012-03-22 03:15:47 +0000 @@ -696,13 +696,6 @@ /dhis-web-commons/ajax/jsonResponseSuccess.vm - - - /dhis-web-maintenance-patient/responseAggDataElement.vm - - -