=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ProgramEnrollmentSelectAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ProgramEnrollmentSelectAction.java 2010-11-09 02:09:53 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ProgramEnrollmentSelectAction.java 2011-01-11 07:06:28 +0000 @@ -33,8 +33,6 @@ import org.hisp.dhis.patient.PatientService; import org.hisp.dhis.patient.state.SelectedStateManager; import org.hisp.dhis.program.Program; -import org.hisp.dhis.program.ProgramAttribute; -import org.hisp.dhis.program.ProgramAttributeService; import org.hisp.dhis.program.ProgramInstance; import org.hisp.dhis.program.ProgramService; @@ -74,13 +72,6 @@ this.programService = programService; } - private ProgramAttributeService programAttributeService; - - public void setProgramAttributeService( ProgramAttributeService programAttributeService ) - { - this.programAttributeService = programAttributeService; - } - // ------------------------------------------------------------------------- // Input/Output // ------------------------------------------------------------------------- @@ -140,13 +131,6 @@ this.programInstance = programInstance; } - private Collection attributes; - - public Collection getAttributes() - { - return attributes; - } - // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- @@ -154,7 +138,6 @@ public String execute() throws Exception { - // --------------------------------------------------------------------- // Validate selected Patient // --------------------------------------------------------------------- @@ -207,7 +190,6 @@ programId = selectedProgram.getId(); selectedStateManager.setSelectedProgram( selectedProgram ); } - else { programId = null; @@ -217,12 +199,6 @@ return SUCCESS; } - // --------------------------------------------------------------------- - // Load Program Attribute - // --------------------------------------------------------------------- - - attributes = programAttributeService.getAllProgramAttributes(); - return PROGRAM_ENROLLMENT_FORM; } } === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/RemoveEnrollmentAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/RemoveEnrollmentAction.java 2010-11-09 06:45:07 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/RemoveEnrollmentAction.java 2011-01-11 07:06:28 +0000 @@ -324,7 +324,7 @@ } } } - +System.out.println("\n\n ++++++++ \n programAttributes : " + programAttributes ); programInstance.setAttributes( programAttributes ); programInstanceService.updateProgramInstance( programInstance ); === added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/RemoveEnrollmentSelectAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/RemoveEnrollmentSelectAction.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/RemoveEnrollmentSelectAction.java 2011-01-11 07:06:28 +0000 @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2004-2010, 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.patient.action.patient; + +import java.util.Collection; + +import org.hisp.dhis.program.ProgramAttribute; +import org.hisp.dhis.program.ProgramAttributeService; +import org.hisp.dhis.program.ProgramInstance; + +import com.opensymphony.xwork2.Action; + +/** + * @author Chau Thu Tran + * @version $ID : RemoveEnrollmentSelectAction.java Jan 11, 2011 10:00:55 AM $ + */ +public class RemoveEnrollmentSelectAction + implements Action +{ + // ------------------------------------------------------------------------- + // Dependency + // ------------------------------------------------------------------------- + + private ProgramAttributeService programAttributeService; + + // ------------------------------------------------------------------------- + // Input/Output + // ------------------------------------------------------------------------- + + private Integer id; + + private Integer programId; + + private ProgramInstance programInstance; + + private Collection programAttributes; + + + // ------------------------------------------------------------------------- + // Getter + // ------------------------------------------------------------------------- + + public void setProgramAttributeService( ProgramAttributeService programAttributeService ) + { + this.programAttributeService = programAttributeService; + } + + public void setId( Integer id ) + { + this.id = id; + } + + public Integer getId() + { + return id; + } + + public void setProgramId( Integer programId ) + { + this.programId = programId; + } + + public ProgramInstance getProgramInstance() + { + return programInstance; + } + + public void setProgramInstance( ProgramInstance programInstance ) + { + this.programInstance = programInstance; + } + + public Integer getProgramId() + { + return programId; + } + + public Collection getProgramAttributes() + { + return programAttributes; + } + + // ------------------------------------------------------------------------- + // Implementation Action + // ------------------------------------------------------------------------- + + @Override + public String execute() + throws Exception + { + programAttributes = programAttributeService.getAllProgramAttributes(); + + return SUCCESS; + } + +} === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SaveProgramEnrollmentAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SaveProgramEnrollmentAction.java 2010-11-09 02:09:53 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SaveProgramEnrollmentAction.java 2011-01-11 07:06:28 +0000 @@ -35,8 +35,6 @@ import org.hisp.dhis.patient.PatientService; import org.hisp.dhis.patient.state.SelectedStateManager; import org.hisp.dhis.program.Program; -import org.hisp.dhis.program.ProgramAttribute; -import org.hisp.dhis.program.ProgramAttributeService; import org.hisp.dhis.program.ProgramInstance; import org.hisp.dhis.program.ProgramInstanceService; import org.hisp.dhis.program.ProgramService; @@ -93,13 +91,6 @@ this.selectedStateManager = selectedStateManager; } - private ProgramAttributeService programAttributeService; - - public void setProgramAttributeService( ProgramAttributeService programAttributeService ) - { - this.programAttributeService = programAttributeService; - } - private I18nFormat format; public void setFormat( I18nFormat format ) @@ -196,13 +187,6 @@ return message; } - private Collection attributes; - - public Collection getAttributes() - { - return attributes; - } - // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- @@ -279,8 +263,6 @@ } } - attributes = programAttributeService.getAllProgramAttributes(); - 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 2010-12-27 07:59:27 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2011-01-11 07:06:28 +0000 @@ -526,8 +526,6 @@ - - - - + + + + === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2011-01-11 01:56:03 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2011-01-11 07:06:28 +0000 @@ -459,4 +459,6 @@ no_patients_found = No Patients Found similar_patients = Similar patients orgunit = Organisation Unit -please_enter_a_valid_full_name = Please enter a valid full name. \ No newline at end of file +please_enter_a_valid_full_name = Please enter a valid full name. +program_unenrollment = Program UnEnrollment + === 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 2011-01-11 01:56:03 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2011-01-11 07:06:28 +0000 @@ -537,10 +537,36 @@ ../dhis-web-commons/javascripts/date.js, javascript/patient.js - + + + enrollChain + unEnrollmentFormChain + F_PATIENT_UPDATE + + + + unEnrollmentFormChain + + + + + /main.vm + /dhis-web-maintenance-patient/patientAndProgramMenuWithTree.vm + 321 + /dhis-web-maintenance-patient/programUnenrollmentForm.vm + + ../dhis-web-commons/ouwt/ouwt.js, + ../dhis-web-commons/javascripts/date.js, + javascript/patient.js + F_PATIENT_UPDATE + + - showProgramEnrollmentForm.action + showProgramUnEnrollmentForm.action?id=${id} F_PATIENT_DELETE === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm 2011-01-11 01:56:03 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm 2011-01-11 07:06:28 +0000 @@ -60,7 +60,7 @@ - + === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipPatientForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipPatientForm.vm 2011-01-11 01:56:03 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipPatientForm.vm 2011-01-11 07:06:28 +0000 @@ -57,7 +57,7 @@ - + === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatient.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatient.vm 2011-01-11 02:05:50 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatient.vm 2011-01-11 07:06:28 +0000 @@ -21,7 +21,7 @@ $i18n.getString( "total_result" )     - $total + $!total @@ -113,6 +113,7 @@ $i18n.getString( "manage_program_enrollment" ) + $i18n.getString( "show_details" ) $i18n.getString( "edit_profile" ) $i18n.getString( "manage_relationship" ) $i18n.getString( "add_dependent" ) === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programEnrollmentForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programEnrollmentForm.vm 2010-11-09 02:09:53 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programEnrollmentForm.vm 2011-01-11 07:06:28 +0000 @@ -36,40 +36,6 @@ ( $!selectedProgram.dateOfIncidentDescription ) -#if($!programInstance.enrollmentDate) - -

$i18n.getString('patient_info')

- - #foreach($attribute in $attributes) - - $attribute.name - - #if( $attribute.valueType == "YES/NO" ) - - #elseif( $attribute.valueType == "DATE" ) - - - #elseif( $attribute.valueType == "COMBO" ) - - #else - - #end - - #if($!programAttribute.description) ($!programAttribute.description) #end - - - #end @@ -77,14 +43,11 @@ -
-#end
-
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programUnenrollmentForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programUnenrollmentForm.vm 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programUnenrollmentForm.vm 2011-01-11 07:06:28 +0000 @@ -0,0 +1,104 @@ + + + +
+ +#parse( "/dhis-web-maintenance-patient/programUnenrollmentSelectForm.vm" ) + + + + + + + + + + + + + + + + +#if($!programInstance.enrollmentDate) + + + + #foreach($attribute in $programAttributes) + + + + + #end + + + + + +
( $!selectedProgram.dateOfEnrollmentDescription )
( $!selectedProgram.dateOfIncidentDescription )

$attribute.name + #if( $attribute.valueType == "YES/NO" ) + + #elseif( $attribute.valueType == "DATE" ) + + + #elseif( $attribute.valueType == "COMBO" ) + + #else + + #end + + #if($!programAttribute.description) ($!programAttribute.description) #end +
+#end + + + + + +
+ +
+ +
+ + + + === added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programUnenrollmentSelectForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programUnenrollmentSelectForm.vm 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programUnenrollmentSelectForm.vm 2011-01-11 07:06:28 +0000 @@ -0,0 +1,51 @@ +
+ +
+ + +

$i18n.getString( "program_unenrollment" )

+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + +
$i18n.getString( "full_name" ):$encoder.htmlEncode( $patient.getFullName() )
$i18n.getString( "gender" ):$encoder.htmlEncode( $patient.gender )
$i18n.getString( "date_of_birth" ):$format.formatDate( $patient.birthDate )
$i18n.getString( "age" ):$encoder.htmlEncode( $patient.getAge() )
 
+ +
+ + + + + + + +
+ +
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/underAgeForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/underAgeForm.vm 2011-01-11 01:56:03 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/underAgeForm.vm 2011-01-11 07:06:28 +0000 @@ -166,7 +166,7 @@ - + === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm 2011-01-11 01:56:03 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm 2011-01-11 07:06:28 +0000 @@ -200,7 +200,7 @@ #end #else - + #end