← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7189: [mobile] change tracker flow (3rd version)

 

------------------------------------------------------------
revno: 7189
committer: Long <thanhlongngo1988@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-06-05 14:38:12 +0700
message:
  [mobile] change tracker flow (3rd version)
modified:
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/FindBeneficiarytAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetPatientProgramListAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetProgramStageFormAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetRepeatableEventRegistrationFormAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/SaveProgramStageFormAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/utils/NamebasedUtils.java
  dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties
  dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryList.vm
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/programStageForm.vm
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/repeatableEventRegistrationForm.vm


--
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
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/FindBeneficiarytAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/FindBeneficiarytAction.java	2012-05-24 14:51:18 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/FindBeneficiarytAction.java	2012-06-05 07:38:12 +0000
@@ -34,6 +34,7 @@
 public class FindBeneficiarytAction
     implements Action
 {
+    private static final String REDIRECT = "redirect";
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
@@ -89,6 +90,18 @@
     {
         this.organisationUnitId = organisationUnitId;
     }
+    
+    private Integer patientId;
+    
+    public Integer getPatientId()
+    {
+        return patientId;
+    }
+
+    public void setPatientId( Integer patientId )
+    {
+        this.patientId = patientId;
+    }
 
     @Override
     public String execute()
@@ -106,6 +119,11 @@
         }
 
         patients = patientService.getPatientsForMobile( keyword, organisationUnitId );
+        if (patients.size() == 1) {
+            Patient patient = patients.iterator().next();
+            patientId = patient.getId();
+            return REDIRECT;
+        }
         return SUCCESS;
     }
 

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetPatientProgramListAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetPatientProgramListAction.java	2012-05-28 21:23:50 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetPatientProgramListAction.java	2012-06-05 07:38:12 +0000
@@ -27,13 +27,21 @@
 
 package org.hisp.dhis.light.namebaseddataentry.action;
 
+import java.util.ArrayList;
+import java.util.Collection;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
 
+import org.hisp.dhis.light.utils.NamebasedUtils;
 import org.hisp.dhis.patient.Patient;
 import org.hisp.dhis.patient.PatientService;
+import org.hisp.dhis.program.Program;
 import org.hisp.dhis.program.ProgramInstance;
 import org.hisp.dhis.program.ProgramInstanceService;
+import org.hisp.dhis.program.ProgramService;
+import org.hisp.dhis.relationship.Relationship;
+import org.hisp.dhis.relationship.RelationshipService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -56,6 +64,18 @@
         this.programInstanceService = programInstanceService;
     }
 
+    private ProgramService programService;
+
+    public ProgramService getProgramService()
+    {
+        return programService;
+    }
+
+    public void setProgramService( ProgramService programService )
+    {
+        this.programService = programService;
+    }
+
     private PatientService patientService;
 
     public PatientService getPatientService()
@@ -68,6 +88,30 @@
         this.patientService = patientService;
     }
 
+    private NamebasedUtils util;
+
+    public NamebasedUtils getUtil()
+    {
+        return util;
+    }
+
+    public void setUtil( NamebasedUtils util )
+    {
+        this.util = util;
+    }
+
+    private RelationshipService relationshipService;
+
+    public RelationshipService getRelationshipService()
+    {
+        return relationshipService;
+    }
+
+    public void setRelationshipService( RelationshipService relationshipService )
+    {
+        this.relationshipService = relationshipService;
+    }
+
     // -------------------------------------------------------------------------
     // Input & Output
     // -------------------------------------------------------------------------
@@ -108,11 +152,37 @@
         this.patient = patient;
     }
 
+    private List<Program> enrollmentProgramList;
+
+    public List<Program> getEnrollmentProgramList()
+    {
+        return enrollmentProgramList;
+    }
+
+    public void setEnrollmentProgramList( List<Program> enrollmentProgramList )
+    {
+        this.enrollmentProgramList = enrollmentProgramList;
+    }
+
+    private List<Patient> relatedPeople;
+
+    public List<Patient> getRelatedPeople()
+    {
+        return relatedPeople;
+    }
+
+    public void setRelatedPeople( List<Patient> relatedPeople )
+    {
+        this.relatedPeople = relatedPeople;
+    }
+
     @Override
     public String execute()
         throws Exception
     {
         programInstances.clear();
+        relatedPeople = new ArrayList<Patient>();
+
         patient = patientService.getPatient( patientId );
         for ( ProgramInstance programInstance : programInstanceService.getProgramInstances( patient ) )
         {
@@ -121,7 +191,40 @@
                 programInstances.add( programInstance );
             }
         }
-        
+
+        enrollmentProgramList = this.generateEnrollmentProgramList();
+        Collection<Relationship> relationships = relationshipService.getRelationshipsForPatient( patient );
+
+        for ( Relationship relationship : relationships )
+        {
+            if ( relationship.getPatientA().getId() != patient.getId() )
+            {
+                relatedPeople.add( relationship.getPatientA() );
+            }
+
+            if ( relationship.getPatientB().getId() != patient.getId() )
+            {
+                relatedPeople.add( relationship.getPatientB() );
+            }
+        }
+
         return SUCCESS;
     }
+
+    private List<Program> generateEnrollmentProgramList()
+    {
+        List<Program> programs = new ArrayList<Program>();
+        for ( Program program : programService.getPrograms( patient.getOrganisationUnit() ) )
+
+        {
+            if ( !program.isSingleEvent() )
+            {
+                if ( programInstanceService.getProgramInstances( patient, program ).size() == 0 )
+                {
+                    programs.add( program );
+                }
+            }
+        }
+        return programs;
+    }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetProgramStageFormAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetProgramStageFormAction.java	2012-05-24 14:51:18 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetProgramStageFormAction.java	2012-06-05 07:38:12 +0000
@@ -35,7 +35,6 @@
 import org.hisp.dhis.api.mobile.model.Activity;
 import org.hisp.dhis.api.mobile.model.ActivityPlan;
 import org.hisp.dhis.api.mobile.model.DataElement;
-import org.hisp.dhis.api.mobile.model.Program;
 import org.hisp.dhis.api.mobile.model.ProgramStage;
 import org.hisp.dhis.light.utils.NamebasedUtils;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
@@ -43,6 +42,7 @@
 import org.hisp.dhis.patient.PatientService;
 import org.hisp.dhis.patientdatavalue.PatientDataValue;
 import org.hisp.dhis.patientdatavalue.PatientDataValueService;
+import org.hisp.dhis.program.Program;
 import org.hisp.dhis.program.ProgramStageInstanceService;
 
 import com.opensymphony.xwork2.Action;
@@ -270,6 +270,7 @@
         programStage = util.getProgramStage( programId, programStageId );
         patient = patientService.getPatient( patientId );
         dataElements = programStage.getDataElements();
+        program = programStageInstanceService.getProgramStageInstance( programStageInstanceId ).getProgramInstance().getProgram();
         Collection<PatientDataValue> patientDataValues = patientDataValueService
             .getPatientDataValues( programStageInstanceService.getProgramStageInstance( programStageInstanceId ) );
         for ( PatientDataValue patientDataValue : patientDataValues )

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetRepeatableEventRegistrationFormAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetRepeatableEventRegistrationFormAction.java	2012-05-30 08:49:09 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetRepeatableEventRegistrationFormAction.java	2012-06-05 07:38:12 +0000
@@ -26,6 +26,7 @@
  */
 package org.hisp.dhis.light.namebaseddataentry.action;
 
+import org.hisp.dhis.program.ProgramInstanceService;
 import org.hisp.dhis.program.ProgramStage;
 import org.hisp.dhis.program.ProgramStageService;
 
@@ -37,7 +38,7 @@
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
-    
+
     private ProgramStageService programStageService;
 
     public ProgramStageService getProgramStageService()
@@ -49,7 +50,19 @@
     {
         this.programStageService = programStageService;
     }
-    
+
+    private ProgramInstanceService programInstanceService;
+
+    public ProgramInstanceService getProgramInstanceService()
+    {
+        return programInstanceService;
+    }
+
+    public void setProgramInstanceService( ProgramInstanceService programInstanceService )
+    {
+        this.programInstanceService = programInstanceService;
+    }
+
     // -------------------------------------------------------------------------
     // Input & Output
     // -------------------------------------------------------------------------
@@ -77,9 +90,9 @@
     {
         this.programStageId = programStageId;
     }
-    
+
     private ProgramStage programStage;
-    
+
     public ProgramStage getProgramStage()
     {
         return programStage;
@@ -89,9 +102,9 @@
     {
         this.programStage = programStage;
     }
-    
+
     private Integer currentProgramStageInstanceId;
-    
+
     public Integer getCurrentProgramStageInstanceId()
     {
         return currentProgramStageInstanceId;
@@ -102,11 +115,24 @@
         this.currentProgramStageInstanceId = currentProgramStageInstanceId;
     }
 
+    private Integer patientId;
+
+    public Integer getPatientId()
+    {
+        return patientId;
+    }
+
+    public void setPatientId( Integer patientId )
+    {
+        this.patientId = patientId;
+    }
+
     @Override
     public String execute()
         throws Exception
     {
         programStage = programStageService.getProgramStage( programStageId );
+        patientId = programInstanceService.getProgramInstance( programInstanceId ).getPatient().getId();
         return SUCCESS;
     }
 

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/SaveProgramStageFormAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/SaveProgramStageFormAction.java	2012-06-01 06:34:08 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/SaveProgramStageFormAction.java	2012-06-05 07:38:12 +0000
@@ -329,11 +329,10 @@
             return ERROR;
         }
 
-        // if ( programStageService.getProgramStage( programStageId
-        // ).getIrregular() )
-        // {
-        // return REGISTER_NEXT_DUEDATE;
-        // }
+        if ( programStageService.getProgramStage( programStageId ).getIrregular() )
+        {
+            return REGISTER_NEXT_DUEDATE;
+        }
 
         if ( orgUnitId != 0 )
         {

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/utils/NamebasedUtils.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/utils/NamebasedUtils.java	2012-04-10 06:49:47 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/utils/NamebasedUtils.java	2012-06-05 07:38:12 +0000
@@ -28,10 +28,13 @@
 package org.hisp.dhis.light.utils;
 
 import java.util.Collection;
+import java.util.Set;
+
 import org.hisp.dhis.api.mobile.IProgramService;
 import org.hisp.dhis.api.mobile.model.Program;
 import org.hisp.dhis.api.mobile.model.ProgramStage;
 import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.program.ProgramStageInstance;
 
 public class NamebasedUtils
 {
@@ -61,7 +64,7 @@
         }
         return null;
     }
-    
+
     public String getTypeViolation( DataElement dataElement, String value )
     {
         String type = dataElement.getType();
@@ -114,4 +117,16 @@
         }
         return null;
     }
+
+    public ProgramStageInstance getNextStage( Set<ProgramStageInstance> programStageInstances )
+    {
+        for ( ProgramStageInstance programStageInstance : programStageInstances )
+        {
+            if ( !programStageInstance.isCompleted() )
+            {
+                return programStageInstance;
+            }
+        }
+        return null;
+    }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml	2012-05-31 09:37:26 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml	2012-06-05 07:38:12 +0000
@@ -231,6 +231,12 @@
 			ref="org.hisp.dhis.patient.PatientService"/>
 		<property name="programInstanceService"
 			ref="org.hisp.dhis.program.ProgramInstanceService"/>
+		<property name="programService"
+			ref="org.hisp.dhis.program.ProgramService"/>
+		<property name="relationshipService"
+			ref="org.hisp.dhis.relationship.RelationshipService"/>
+		<property name="util"
+			ref="org.hisp.dhis.light.utils.NamebasedUtils"/>
 	</bean>
 	
 	<bean
@@ -247,6 +253,8 @@
 		class="org.hisp.dhis.light.namebaseddataentry.action.GetRepeatableEventRegistrationFormAction">
 		<property name="programStageService"
 			ref="org.hisp.dhis.program.ProgramStageService"/>
+		<property name="programInstanceService"
+			ref="org.hisp.dhis.program.ProgramInstanceService"/>
 	</bean>
 	
 	<bean

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties	2012-06-01 06:34:08 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties	2012-06-05 07:38:12 +0000
@@ -83,4 +83,7 @@
 due_date=Due Date
 register_due_date_for=Register Due Date For
 register=Register
-please_select=Please Select
\ No newline at end of file
+please_select=Please Select
+enroll_in_program=Enroll In Program
+relationships=Relationships
+phone_number=Phone Number
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml	2012-05-31 09:37:26 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml	2012-06-05 07:38:12 +0000
@@ -131,6 +131,7 @@
 				/mobile/selectBeneficiary.action?organisationUnitId=${orgUnitId}&amp;current=${current}&amp;validated=true</result>
 			<result name="success_back_to_programstage" type="redirect">
 				/mobile/showPatientProgramStageList.action?patientId=${patientId}&amp;programInstanceId=${programInstanceId}&amp;programId=${programId}&amp;validated=true</result>
+			<result name="register_next_duedate" type="redirect">showRepeatableEventRegistrationForm.action?programInstanceId=${programInstanceId}&amp;programStageId=${programStageId}&amp;currentProgramStageInstanceId=${programStageInstanceId}</result>
 			<result name="error" type="velocity">/dhis-web-light/main.vm</result>
 			<param name="page">/dhis-web-light/namebased/programStageForm.vm</param>
 		</action>
@@ -160,6 +161,7 @@
 		
 		<action name="findBeneficiary"
 			class="org.hisp.dhis.light.namebaseddataentry.action.FindBeneficiarytAction">
+			<result name="redirect" type="redirect">showPatientProgramList.action?patientId=${patientId}</result>
 			<result name="success" type="velocity">
 				/dhis-web-light/main.vm</result>
 			<param name="page">

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryList.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryList.vm	2012-05-24 14:51:18 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryList.vm	2012-06-05 07:38:12 +0000
@@ -13,7 +13,7 @@
 #end
 </ul>
 </p>
-
+<p><strong>Total found: $patients.size()</strong></p>
 <div id="footer">
 <h2>$i18n.getString( "navigate_to" )</h2>
 <ul>

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm	2012-05-24 14:51:18 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm	2012-06-05 07:38:12 +0000
@@ -1,25 +1,59 @@
 <h2>$!encoder.htmlEncode( ${patient.getFullName()} )</h2>
 <p>
 	<ul>
-		<li>
-			<a href="showBeneficiaryDetail.action?patientId=$patient.getId()&current=true&organisationUnitId=0"> $i18n.getString( "details" ) </a>
-		</li> 
-	</ul>
-<ul>
-#foreach( $programInstance in $programInstances )
-	<li>
-		<a href="showPatientProgramStageList.action?patientId=$patientId&programInstanceId=$programInstance.getId()&programId=$programInstance.getProgram().getId()&validated=false">
-			 $programInstance.getProgram().getName()
-		</a> 
-	</li>
-#end
-</ul>
-</p>
-
+		#foreach( $programInstance in $programInstances )
+			<li>
+				<a href="showPatientProgramStageList.action?patientId=$patientId&programInstanceId=$programInstance.getId()&programId=$programInstance.getProgram().getId()&validated=false">
+					 $programInstance.getProgram().getName()
+				</a> 
+			</li>
+			#set($nextStage = $util.getNextStage( $programInstance.getProgramStageInstances()))
+			#if($nextStage)
+				<li>
+					<a href="showProgramStageForm.action?programId=$programInstance.getProgram().getId()&programStageId=$nextStage.getProgramStage().getId()&programStageInstanceId=$nextStage.getId()&patientId=$patient.getId()&programInstanceId=$programInstance.getId()&orgUnitId=0"> - Next: $nextStage.getProgramStage().getName()</a>
+				</li>
+			#end
+		#end
+	</ul>
+</p>
+
+<h2>$i18n.getString("details")</h2>
+<p>
+	<ul>
+		<li><strong>$i18n.getString("id"):</strong>  $patient.id</li>
+		<li><strong>$i18n.getString("gender"):</strong>  #if ($patient.gender == "F") Female #else Male #end</li>
+		#set($day = $patient.birthDate.date)
+		#set($month = $patient.birthDate.month+1)
+		#set($year = $patient.birthDate.year + 1900)
+		<li><strong>$i18n.getString("date_of_birth"):</strong>  $year - $month - $day </li>
+		#if($patient.getPhoneNumber())
+			<li><strong>$i18n.getString("phone_number"):</strong>  $patient.getPhoneNumber()</li>
+		#end			
+	</ul>
+</p>
+	
+<h2>$i18n.getString("enroll_in_program")</h2>
+<p>
+	<ul>
+		#foreach( $program in $enrollmentProgramList )
+			<li><a href="showProgramEnrollmentForm.action?patientId=$patient.Id&programId=$program.Id">$program.getName()</a></li>
+		#end
+	</ul>
+</p>
+
+<h2>$i18n.getString("relationships")</h2>
+<p>
+	<ul>
+		#foreach( $person in $relatedPeople )
+			<li><a href="">$!encoder.htmlEncode( ${person.getFullName()} )</a></li>
+		#end
+	</ul>
+</p>
+	
 <div id="footer">
-<h2>$i18n.getString( "navigate_to" )</h2>
-<ul>
-	<li> <a href="showFindBeneficiaryForm.action"> $i18n.getString("find_beneficiary")</a></li>
-	<li><a href="index.action">$i18n.getString("home")</a></li>
-</ul>
+	<h2>$i18n.getString( "navigate_to" )</h2>
+	<ul>
+		<li> <a href="showFindBeneficiaryForm.action"> $i18n.getString("find_beneficiary")</a></li>
+		<li><a href="index.action">$i18n.getString("home")</a></li>
+	</ul>
 </div>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/programStageForm.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/programStageForm.vm	2012-06-01 06:34:08 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/programStageForm.vm	2012-06-05 07:38:12 +0000
@@ -115,12 +115,13 @@
 <h2>$i18n.getString( "navigate_to" )</h2>
 <ul>
 	#if($orgUnitId == 0)
-		<li><a href="showPatientProgramStageList.action?patientId=$patientId&programInstanceId=$programInstanceId&programId=$programId&validated=false">$!encoder.htmlEncode( ${patient.getFullName()} )</a></li>
+		<li><a href="showPatientProgramStageList.action?patientId=$patientId&programInstanceId=$programInstanceId&programId=$programId&validated=false">$!encoder.htmlEncode( ${program.getName()} )</a></li>
 	#else
 		<li><a href="selectActivity.action?organisationUnitId=$orgUnitId&patientId=$patientId&current=$current"> $i18n.getString("activity_list")</a></li>
 	#end
 	
-	
+	<li><a href="showPatientProgramList.action?patientId=$patientId">$!encoder.htmlEncode( ${patient.getFullName()} )</a></li>
 	<li><a href="index.action">$i18n.getString("home")</a></li>
+	
 </ul>
 </div>

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/repeatableEventRegistrationForm.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/repeatableEventRegistrationForm.vm	2012-05-31 09:37:26 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/repeatableEventRegistrationForm.vm	2012-06-05 07:38:12 +0000
@@ -24,7 +24,7 @@
 <div id="footer">
 <h2>$i18n.getString( "navigate_to" )</h2>
 <ul>
-	<li> <a href="selectEnrollmentProgram.action?patientId=$patientId"> $i18n.getString("program_list")</a> </li>
+	<li> <a href="showPatientProgramList.action?patientId=$patient.getId()"> $i18n.getString("program_list")</a> </li>
 	<li><a href="index.action">$i18n.getString("home")</a></li>
 </ul>
 </div>