=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/DefineProgramListForValidationCriteriaAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/DefineProgramListForValidationCriteriaAction.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/DefineProgramListForValidationCriteriaAction.java 1970-01-01 00:00:00 +0000 @@ -1,127 +0,0 @@ -package org.hisp.dhis.patient.action.validation; - -/* - * Copyright (c) 2004-2013, 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.HashSet; -import java.util.Set; - -import org.hisp.dhis.program.Program; -import org.hisp.dhis.program.ProgramService; -import org.hisp.dhis.validation.ValidationCriteria; -import org.hisp.dhis.validation.ValidationCriteriaService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Chau Thu Tran - * @version DefineProgramListForValidationCriteriaAction.java May 17, 2010 - */ -public class DefineProgramListForValidationCriteriaAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependency - // ------------------------------------------------------------------------- - - private ValidationCriteriaService validationCriteriaService; - - private ProgramService programService; - - // ------------------------------------------------------------------------- - // Input && Output - // ------------------------------------------------------------------------- - private Integer criteriaId; - - private Integer[] programIds; - - // ------------------------------------------------------------------------- - // Setters - // ------------------------------------------------------------------------- - - public void setValidationCriteriaService( ValidationCriteriaService validationCriteriaService ) - { - this.validationCriteriaService = validationCriteriaService; - } - - public void setProgramIds( Integer[] programIds ) - { - this.programIds = programIds; - } - - public void setProgramService( ProgramService programService ) - { - this.programService = programService; - } - - public void setCriteriaId( Integer criteriaId ) - { - this.criteriaId = criteriaId; - } - - // ------------------------------------------------------------------------- - // Action Implementation - // ------------------------------------------------------------------------- - - @Override - public String execute() - throws Exception - { - ValidationCriteria validationCriteria = validationCriteriaService.getValidationCriteria( criteriaId ); - - Set selectedProgram = new HashSet(); - - if ( programIds != null ) - { - for ( Integer id : programIds ) - { - Program program = programService.getProgram( id ); - - program.getPatientValidationCriteria().add( validationCriteria ); - - selectedProgram.add( program ); - - programService.updateProgram( program ); - - } - } - - Set removePrograms = new HashSet( programService.getAllPrograms() ); - removePrograms.removeAll( selectedProgram ); - - for ( Program program : removePrograms ) - { - program.getPatientValidationCriteria().remove( validationCriteria ); - - programService.updateProgram( program ); - } - - return SUCCESS; - } - -} === removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/GetProgramListForValidationCriteriaAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/GetProgramListForValidationCriteriaAction.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/GetProgramListForValidationCriteriaAction.java 1970-01-01 00:00:00 +0000 @@ -1,119 +0,0 @@ -package org.hisp.dhis.patient.action.validation; - -/* - * Copyright (c) 2004-2013, 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.Collection; - -import org.hisp.dhis.program.Program; -import org.hisp.dhis.program.ProgramService; -import org.hisp.dhis.validation.ValidationCriteria; -import org.hisp.dhis.validation.ValidationCriteriaService; - -import com.opensymphony.xwork2.Action; - -/** - * @author Chau Thu Tran - * @version GetProgramListForValidationCriteriaAction.java May 17, 2010 - */ -public class GetProgramListForValidationCriteriaAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private ValidationCriteriaService validationCriteriaService; - - private ProgramService programService; - - // ------------------------------------------------------------------------- - // Input && Output - // ------------------------------------------------------------------------- - - private Integer criteriaId; - - private Collection selectedPrograms; - - private Collection availablePrograms; - - private ValidationCriteria validationCriteria; - - // ------------------------------------------------------------------------- - // Setters - // ------------------------------------------------------------------------- - - public void setValidationCriteriaService( ValidationCriteriaService validationCriteriaService ) - { - this.validationCriteriaService = validationCriteriaService; - } - - public Collection getSelectedPrograms() - { - return selectedPrograms; - } - - public ValidationCriteria getValidationCriteria() - { - return validationCriteria; - } - - public Collection getAvailablePrograms() - { - return availablePrograms; - } - - public void setProgramService( ProgramService programService ) - { - this.programService = programService; - } - - public void setCriteriaId( Integer criteriaId ) - { - this.criteriaId = criteriaId; - } - - // ------------------------------------------------------------------------- - // Action Implementation - // ------------------------------------------------------------------------- - - @Override - public String execute() - throws Exception - { - validationCriteria = validationCriteriaService.getValidationCriteria( criteriaId ); - - selectedPrograms = programService.getPrograms( validationCriteria ); - - availablePrograms = programService.getAllPrograms(); - availablePrograms.removeAll( selectedPrograms ); - availablePrograms.removeAll( programService.getPrograms( Program.SINGLE_EVENT_WITHOUT_REGISTRATION ) ); - - 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 2013-12-26 08:38:18 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2013-12-31 07:25:24 +0000 @@ -920,31 +920,7 @@ - - - - - - - - - - - - - - - - - - - + - - /main.vm - /dhis-web-maintenance-patient/programsForValidationCriteriaAssociations.vm - javascript/program.js - F_PROGRAM_PUBLIC_ADD,F_PROGRAM_PRIVATE_ADD - - - - - validationCriteria.action - - F_PROGRAM_PUBLIC_ADD,F_PROGRAM_PRIVATE_ADD - - $i18n.getString( "assign_validation_for_programs" ) -

$validationCriteria.name

- -
- - - - - - - - - - - - - - - - - - - - - - - - - -
$i18n.getString('available_program')$i18n.getString('filter')$i18n.getString('selected_program')
- - - -
-
- -
- -
- - -
-
- - === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/validationCriteria.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/validationCriteria.vm 2013-12-21 23:14:17 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/validationCriteria.vm 2013-12-31 07:25:24 +0000 @@ -3,7 +3,6 @@