← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7037: [mobile] improve navigation between screens

 

------------------------------------------------------------
revno: 7037
committer: Long <thanhlongngo1988@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-05-24 21:51:18 +0700
message:
  [mobile] improve navigation between screens
modified:
  dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/Beneficiary.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/GetEnrollmentProgramListAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/GetProgramEnrollmentFormAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/SaveMobileProgramEnrollmentAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/RegisterBeneficiaryAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/SaveBeneficiaryAction.java
  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/GetActivityListAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetBeneficiaryDetailAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetBeneficiaryListAction.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/GetProgramStageListAction.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/namebaseddataentry/action/ShowActivityTypeAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/GetSingleEventAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/GetSingleEventBeneficiaryAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/GetSingleEventFormAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/SaveSingleEventAction.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/struts.xml
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/beneficiaryList.vm
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/beneficiarySearchResult.vm
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/enrollmentProgramList.vm
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/programEnrollmentForm.vm
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryDetail.vm
  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/beneficiaryProgramStageList.vm
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/completedProgramStageForm.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/selectActivity.vm
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/singleevent/selectSingleEventBeneficiary.vm
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/singleevent/singleEventForm.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-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/Beneficiary.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/Beneficiary.java	2011-11-04 11:27:33 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/Beneficiary.java	2012-05-24 14:51:18 +0000
@@ -339,5 +339,11 @@
         // FIXME: Get implementation from client
 
     }
-
+    
+    @Override
+    public boolean equals( Object otherObject )
+    {
+        Beneficiary otherBeneficiary = (Beneficiary) otherObject;
+        return this.getId() == otherBeneficiary.getId();
+    }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/GetEnrollmentProgramListAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/GetEnrollmentProgramListAction.java	2012-05-24 09:45:14 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/GetEnrollmentProgramListAction.java	2012-05-24 14:51:18 +0000
@@ -84,17 +84,18 @@
     // -------------------------------------------------------------------------
     // Input & Output
     // -------------------------------------------------------------------------
-
-    private String beneficiaryId;
-
-    public String getBeneficiaryId()
+    
+    private Integer patientId;
+    
+    public Integer getPatientId()
+
     {
-        return beneficiaryId;
+        return patientId;
     }
 
-    public void setBeneficiaryId( String beneficiaryId )
+    public void setPatientId( Integer patientId )
     {
-        this.beneficiaryId = beneficiaryId;
+        this.patientId = patientId;
     }
 
     private List<Program> programList = new ArrayList<Program>();
@@ -149,9 +150,10 @@
     public String execute()
         throws Exception
     {
-        patient = patientService.getPatient( Integer.parseInt( beneficiaryId ) );
-
-        for ( Program program : programService.getPrograms( patient.getOrganisationUnit() ) )
+
+        patient = patientService.getPatient(  patientId  );
+        for ( Program program :  programService.getPrograms( patient.getOrganisationUnit() ) )
+
         {
             if ( !program.isSingleEvent() )
             {

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/GetProgramEnrollmentFormAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/GetProgramEnrollmentFormAction.java	2012-04-20 02:32:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/GetProgramEnrollmentFormAction.java	2012-05-24 14:51:18 +0000
@@ -59,28 +59,28 @@
     // Input & Output
     // -------------------------------------------------------------------------
 
-    private String programId;
+    private Integer programId;
 
-    public String getProgramId()
+    public Integer getProgramId()
     {
         return programId;
     }
 
-    public void setProgramId( String programId )
+    public void setProgramId( Integer programId )
     {
         this.programId = programId;
     }
-    
-    private String beneficiaryId;
-    
-    public String getBeneficiaryId()
+
+    private Integer patientId;
+
+    public Integer getPatientId()
     {
-        return beneficiaryId;
+        return patientId;
     }
 
-    public void setBeneficiaryId( String beneficiaryId )
+    public void setPatientId( Integer patientId )
     {
-        this.beneficiaryId = beneficiaryId;
+        this.patientId = patientId;
     }
 
     private Patient patient;
@@ -111,8 +111,8 @@
     public String execute()
         throws Exception
     {
-        patient = patientService.getPatient( Integer.parseInt( beneficiaryId ) );
-        program = programService.getProgram( Integer.parseInt( programId ) );
+        patient = patientService.getPatient( patientId );
+        program = programService.getProgram( programId );
         return SUCCESS;
     }
 

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/SaveMobileProgramEnrollmentAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/SaveMobileProgramEnrollmentAction.java	2012-04-20 02:32:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/SaveMobileProgramEnrollmentAction.java	2012-05-24 14:51:18 +0000
@@ -72,26 +72,26 @@
     // Input/Output
     // -------------------------------------------------------------------------
 
-    private String beneficiaryId;
-
-    public String getBeneficiaryId()
-    {
-        return beneficiaryId;
-    }
-
-    public void setBeneficiaryId( String beneficiaryId )
-    {
-        this.beneficiaryId = beneficiaryId;
-    }
-
-    private String programId;
-
-    public void setProgramId( String programId )
+    private Integer patientId;
+
+    public Integer getPatientId()
+    {
+        return patientId;
+    }
+
+    public void setPatientId( Integer patientId )
+    {
+        this.patientId = patientId;
+    }
+
+    private Integer programId;
+
+    public void setProgramId( Integer programId )
     {
         this.programId = programId;
     }
 
-    public String getProgramId()
+    public Integer getProgramId()
     {
         return programId;
     }
@@ -174,7 +174,7 @@
         {
             validationMap.put( "enrollmentDate", "is_invalid_date" );
         }
-        
+
         if ( !FormUtils.isDate( incidentDate ) )
         {
             validationMap.put( "incidentDate", "is_invalid_date" );
@@ -187,12 +187,12 @@
             validated = false;
             return ERROR;
         }
-        
-        System.out.println("service: " + patientService);
-        
-        patient = patientService.getPatient( Integer.parseInt( beneficiaryId ) );
-        
-        program = programService.getProgram( Integer.parseInt( programId ) );
+
+        System.out.println( "service: " + patientService );
+
+        patient = patientService.getPatient( patientId );
+
+        program = programService.getProgram(  programId );
 
         Collection<ProgramInstance> programInstances = programInstanceService.getProgramInstances( patient, program,
             false );

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/RegisterBeneficiaryAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/RegisterBeneficiaryAction.java	2012-04-10 06:49:47 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/RegisterBeneficiaryAction.java	2012-05-24 14:51:18 +0000
@@ -32,15 +32,15 @@
 public class RegisterBeneficiaryAction implements Action
 {
     
-    private String orgUnitId;
+    private Integer orgUnitId;
     
-    public String getOrgUnitId()
+    public Integer getOrgUnitId()
     {
         return orgUnitId;
     }
 
 
-    public void setOrgUnitId( String orgUnitId )
+    public void setOrgUnitId( Integer orgUnitId )
     {
         this.orgUnitId = orgUnitId;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/SaveBeneficiaryAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/SaveBeneficiaryAction.java	2012-04-20 02:32:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/SaveBeneficiaryAction.java	2012-05-24 14:51:18 +0000
@@ -75,14 +75,14 @@
     // Input & Output
     // -------------------------------------------------------------------------
 
-    private String orgUnitId;
+    private Integer orgUnitId;
 
-    public String getOrgUnitId()
+    public Integer getOrgUnitId()
     {
         return orgUnitId;
     }
 
-    public void setOrgUnitId( String orgUnitId )
+    public void setOrgUnitId( Integer orgUnitId )
     {
         this.orgUnitId = orgUnitId;
     }
@@ -177,7 +177,7 @@
     {
         Patient patient = new Patient();
 
-        patient.setOrganisationUnit( organisationUnitService.getOrganisationUnit( Integer.parseInt( orgUnitId ) ) );
+        patient.setOrganisationUnit( organisationUnitService.getOrganisationUnit( orgUnitId ) );
 
         if ( this.patientFullName.trim().equals( "" ) )
         {

=== 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-15 07:40:06 +0000
+++ 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
@@ -78,14 +78,14 @@
         this.keyword = keyword;
     }
 
-    private int organisationUnitId;
+    private Integer organisationUnitId;
 
-    public int getOrganisationUnitId()
+    public Integer getOrganisationUnitId()
     {
         return organisationUnitId;
     }
 
-    public void setOrganisationUnitId( int organisationUnitId )
+    public void setOrganisationUnitId( Integer organisationUnitId )
     {
         this.organisationUnitId = organisationUnitId;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetActivityListAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetActivityListAction.java	2012-04-10 06:49:47 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetActivityListAction.java	2012-05-24 14:51:18 +0000
@@ -75,16 +75,16 @@
     // Input & Output
     // -------------------------------------------------------------------------
 
-    private String beneficiaryId;
+    private Integer patientId;
 
-    public void setBeneficiaryId( String beneficiaryId )
+    public Integer getPatientId()
     {
-        this.beneficiaryId = beneficiaryId;
+        return patientId;
     }
 
-    public String getBeneficiaryId()
+    public void setPatientId( Integer patientId )
     {
-        return this.beneficiaryId;
+        this.patientId = patientId;
     }
 
     private boolean current;
@@ -101,14 +101,14 @@
 
     private OrganisationUnit organisationUnit;
 
-    public String getOrganisationUnitId()
+    public Integer getOrganisationUnitId()
     {
         return this.organisationUnitId;
     }
 
-    private String organisationUnitId;
+    private Integer organisationUnitId;
 
-    public void setOrganisationUnitId( String organisationUnitId )
+    public void setOrganisationUnitId( Integer organisationUnitId )
     {
         this.organisationUnitId = organisationUnitId;
     }
@@ -130,7 +130,7 @@
         throws Exception
     {
         activities = new ArrayList<Activity>();
-        organisationUnit = organisationUnitService.getOrganisationUnit( Integer.parseInt( organisationUnitId ) );
+        organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
         ActivityPlan activityPlan;
         if ( current )
         {
@@ -143,7 +143,7 @@
         List<Activity> allActivities = activityPlan.getActivitiesList();
         for ( Activity activity : allActivities )
         {
-            if ( activity.getBeneficiary().getId() == Integer.parseInt( beneficiaryId ) )
+            if ( activity.getBeneficiary().getId() == patientId )
             {
                 activities.add( activity );
             }

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetBeneficiaryDetailAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetBeneficiaryDetailAction.java	2012-04-10 06:49:47 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetBeneficiaryDetailAction.java	2012-05-24 14:51:18 +0000
@@ -29,28 +29,28 @@
     // Input & Output
     // -------------------------------------------------------------------------
 
-    private String organisationUnitId;
+    private Integer organisationUnitId;
 
-    public String getOrganisationUnitId()
+    public Integer getOrganisationUnitId()
     {
         return organisationUnitId;
     }
 
-    public void setOrganisationUnitId( String organisationUnitId )
+    public void setOrganisationUnitId( Integer organisationUnitId )
     {
         this.organisationUnitId = organisationUnitId;
     }
 
-    private String beneficiaryId;
+    private Integer patientId;
 
-    public void setBeneficiaryId( String beneficiaryId )
+    public Integer getPatientId()
     {
-        this.beneficiaryId = beneficiaryId;
+        return patientId;
     }
 
-    public String getBeneficiaryId()
+    public void setPatientId( Integer patientId )
     {
-        return this.beneficiaryId;
+        this.patientId = patientId;
     }
 
     private Patient patient;
@@ -85,7 +85,7 @@
     public String execute()
         throws Exception
     {
-        this.patient = patientService.getPatient( Integer.parseInt( beneficiaryId ) );
+        this.patient = patientService.getPatient( patientId  );
         return SUCCESS;
     }
 

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetBeneficiaryListAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetBeneficiaryListAction.java	2012-04-10 06:49:47 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetBeneficiaryListAction.java	2012-05-24 14:51:18 +0000
@@ -27,8 +27,11 @@
 
 package org.hisp.dhis.light.namebaseddataentry.action;
 
-import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
+import java.util.Set;
 import org.hisp.dhis.api.mobile.ActivityReportingService;
 import org.hisp.dhis.api.mobile.model.Activity;
 import org.hisp.dhis.api.mobile.model.ActivityPlan;
@@ -87,7 +90,7 @@
         this.validated = validated;
     }
 
-    private List<Beneficiary> beneficiaries;
+    private Set<Beneficiary> beneficiaries;
 
     private OrganisationUnit organisationUnit;
 
@@ -96,14 +99,14 @@
         return this.organisationUnit;
     }
 
-    private String organisationUnitId;
+    private Integer organisationUnitId;
 
-    public void setOrganisationUnitId( String organisationUnitId )
+    public void setOrganisationUnitId( Integer organisationUnitId )
     {
         this.organisationUnitId = organisationUnitId;
     }
 
-    public String getOrganisationUnitId( String organisationUnitId )
+    public Integer getOrganisationUnitId( Integer organisationUnitId )
     {
         return this.organisationUnitId;
     }
@@ -122,7 +125,7 @@
         return this.activities;
     }
 
-    public List<Beneficiary> getBeneficiaries()
+    public Set<Beneficiary> getBeneficiaries()
     {
         return this.beneficiaries;
     }
@@ -135,9 +138,9 @@
     public String execute()
         throws Exception
     {
-        beneficiaries = new ArrayList<Beneficiary>();
+        beneficiaries = new HashSet<Beneficiary>();
 
-        organisationUnit = organisationUnitService.getOrganisationUnit( Integer.parseInt( organisationUnitId ) );
+        organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
 
         if ( current )
         {
@@ -145,7 +148,7 @@
         }
         else
         {
-            activityPlan = activityReportingService.getAllActivityPlan(organisationUnit, "");
+            activityPlan = activityReportingService.getAllActivityPlan( organisationUnit, "" );
         }
 
         if ( activityPlan == null )
@@ -155,12 +158,16 @@
 
         if ( activities == null )
             return SUCCESS;
-
+        
+        Map<Integer, String> compareMap = new HashMap<Integer, String>();
         for ( Activity activity : activities )
         {
-            beneficiaries.add( activity.getBeneficiary() );
+            if (compareMap.get( activity.getBeneficiary().getId() ) == null) {
+                beneficiaries.add( activity.getBeneficiary() );
+                compareMap.put( activity.getBeneficiary().getId(), "" );
+            }
+            
         }
-
         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-24 09:45:14 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetPatientProgramListAction.java	2012-05-24 14:51:18 +0000
@@ -71,14 +71,14 @@
     // Input & Output
     // -------------------------------------------------------------------------
 
-    private int patientId;
+    private Integer patientId;
 
-    public int getPatientId()
+    public Integer getPatientId()
     {
         return patientId;
     }
 
-    public void setPatientId( int patientId )
+    public void setPatientId( Integer patientId )
     {
         this.patientId = patientId;
     }

=== 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 09:45:14 +0000
+++ 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
@@ -39,7 +39,8 @@
 import org.hisp.dhis.api.mobile.model.ProgramStage;
 import org.hisp.dhis.light.utils.NamebasedUtils;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
+import org.hisp.dhis.patient.Patient;
+import org.hisp.dhis.patient.PatientService;
 import org.hisp.dhis.patientdatavalue.PatientDataValue;
 import org.hisp.dhis.patientdatavalue.PatientDataValueService;
 import org.hisp.dhis.program.ProgramStageInstanceService;
@@ -54,13 +55,6 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private OrganisationUnitService organisationUnitService;
-
-    public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
-    {
-        this.organisationUnitService = organisationUnitService;
-    }
-
     private NamebasedUtils util;
 
     public void setUtil( NamebasedUtils util )
@@ -96,45 +90,58 @@
     {
         this.patientDataValueService = patientDataValueService;
     }
+    
+    private PatientService patientService;
+    
+    public PatientService getPatientService()
+    {
+        return patientService;
+    }
+
+    public void setPatientService( PatientService patientService )
+    {
+        this.patientService = patientService;
+    }
+    
 
     // -------------------------------------------------------------------------
     // Input & Output
     // -------------------------------------------------------------------------
 
-    private int programInstanceId;
+    private Integer programInstanceId;
 
-    public int getProgramInstanceId()
+    public Integer getProgramInstanceId()
     {
         return programInstanceId;
     }
 
-    public void setProgramInstanceId( int programInstanceId )
+    public void setProgramInstanceId( Integer programInstanceId )
     {
         this.programInstanceId = programInstanceId;
     }
 
-    private int programStageInstanceId;
+    private Integer programStageInstanceId;
 
-    public int getProgramStageInstanceId()
+    public Integer getProgramStageInstanceId()
     {
         return programStageInstanceId;
     }
 
-    public void setProgramStageInstanceId( int programStageInstanceId )
+    public void setProgramStageInstanceId( Integer programStageInstanceId )
     {
         this.programStageInstanceId = programStageInstanceId;
     }
 
-    private String beneficiaryId;
+    private Integer patientId;
 
-    public void setBeneficiaryId( String beneficiaryId )
+    public Integer getPatientId()
     {
-        this.beneficiaryId = beneficiaryId;
+        return patientId;
     }
 
-    public String getBeneficiaryId()
+    public void setPatientId( Integer patientId )
     {
-        return this.beneficiaryId;
+        this.patientId = patientId;
     }
 
     private OrganisationUnit organisationUnit;
@@ -163,38 +170,38 @@
         return this.programStage;
     }
 
-    private String programId;
+    private Integer programId;
 
-    public void setProgramId( String programId )
+    public void setProgramId( Integer programId )
     {
         this.programId = programId;
     }
 
-    public String getProgramId()
+    public Integer getProgramId()
     {
         return programId;
     }
 
-    private String programStageId;
+    private Integer programStageId;
 
-    public void setProgramStageId( String programStageId )
+    public void setProgramStageId( Integer programStageId )
     {
         this.programStageId = programStageId;
     }
 
-    public String getProgramStageId()
+    public Integer getProgramStageId()
     {
         return programStageId;
     }
 
-    private String orgUnitId;
+    private Integer orgUnitId;
 
-    public void setOrgUnitId( String orgUnitId )
+    public void setOrgUnitId( Integer orgUnitId )
     {
         this.orgUnitId = orgUnitId;
     }
 
-    public String getOrgUnitId()
+    public Integer getOrgUnitId()
     {
         return this.orgUnitId;
     }
@@ -228,6 +235,18 @@
     {
         return prevDataValues;
     }
+    
+    private Patient patient;
+    
+    public Patient getPatient()
+    {
+        return patient;
+    }
+
+    public void setPatient( Patient patient )
+    {
+        this.patient = patient;
+    }
 
     // -------------------------------------------------------------------------
     // Action Implementation
@@ -248,7 +267,8 @@
         throws Exception
     {
         prevDataValues.clear();
-        programStage = util.getProgramStage( Integer.parseInt( programId ), Integer.parseInt( programStageId ) );
+        programStage = util.getProgramStage( programId, programStageId );
+        patient = patientService.getPatient( patientId );
         dataElements = programStage.getDataElements();
         Collection<PatientDataValue> patientDataValues = patientDataValueService
             .getPatientDataValues( programStageInstanceService.getProgramStageInstance( programStageInstanceId ) );

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetProgramStageListAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetProgramStageListAction.java	2012-05-15 07:40:06 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetProgramStageListAction.java	2012-05-24 14:51:18 +0000
@@ -95,14 +95,14 @@
         this.programInstanceId = programInstanceId;
     }
     
-    private int patientId;
+    private Integer patientId;
     
-    public int getPatientId()
+    public Integer getPatientId()
     {
         return patientId;
     }
 
-    public void setPatientId( int patientId )
+    public void setPatientId( Integer patientId )
     {
         this.patientId = patientId;
     }

=== 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-05-24 09:45:14 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/SaveProgramStageFormAction.java	2012-05-24 14:51:18 +0000
@@ -132,62 +132,62 @@
 
     private OrganisationUnit organisationUnit;
 
-    private String programStageInstanceId;
+    private Integer programStageInstanceId;
 
-    public String getProgramStageInstanceId()
+    public Integer getProgramStageInstanceId()
     {
         return programStageInstanceId;
     }
 
-    public void setProgramStageInstanceId( String programStageInstanceId )
+    public void setProgramStageInstanceId( Integer programStageInstanceId )
     {
         this.programStageInstanceId = programStageInstanceId;
     }
 
-    private String programInstanceId;
-
-    public String getProgramInstanceId()
-    {
-        return programInstanceId;
-    }
-
-    public void setProgramInstanceId( String programInstanceId )
-    {
-        this.programInstanceId = programInstanceId;
-    }
-
-    private String beneficiaryId;
-
-    public void setBeneficiaryId( String beneficiaryId )
-    {
-        this.beneficiaryId = beneficiaryId;
-    }
-
-    public String getBeneficiaryId()
-    {
-        return beneficiaryId;
-    }
-
-    private String programId;
-
-    public void setProgramId( String programId )
+//    private Integer programInstanceId;
+//
+//    public Integer getProgramInstanceId()
+//    {
+//        return programInstanceId;
+//    }
+//
+//    public void setProgramInstanceId( Integer programInstanceId )
+//    {
+//        this.programInstanceId = programInstanceId;
+//    }
+
+    private Integer patientId;
+
+    public Integer getPatientId()
+    {
+        return patientId;
+    }
+
+    public void setPatientId( Integer patientId )
+    {
+        this.patientId = patientId;
+    }
+
+    private Integer programId;
+
+    public void setProgramId( Integer programId )
     {
         this.programId = programId;
     }
 
-    public String getProgramId()
+    public Integer getProgramId()
     {
         return programId;
     }
 
-    private String programStageId;
+    private Integer programStageId;
 
-    public void setProgramStageId( String programStageId )
+    public void setProgramStageId( Integer programStageId )
     {
         this.programStageId = programStageId;
     }
 
-    public String getProgramStageId()
+    public Integer getProgramStageId()
     {
         return programStageId;
     }
@@ -243,10 +243,10 @@
         }
         else
         {
-            organisationUnit = patientService.getPatient( Integer.parseInt( beneficiaryId ) ).getOrganisationUnit();
+            organisationUnit = patientService.getPatient( patientId ).getOrganisationUnit();
         }
 
-        programStage = util.getProgramStage( Integer.parseInt( programId ), Integer.parseInt( programStageId ) );
+        programStage = util.getProgramStage( programId, programStageId );
 
         dataElements = programStage.getDataElements();
         int defaultCategoryOptionId = dataElementCategoryService.getDefaultDataElementCategoryOptionCombo().getId();
@@ -263,7 +263,7 @@
         {
             if ( key.startsWith( "DE" ) )
             {
-                Integer dataElementId = Integer.parseInt( key.substring( 2, key.length()) );
+                Integer dataElementId = Integer.parseInt( key.substring( 2, key.length() ) );
                 // Integer categoryOptComboId = Integer.parseInt( splitKey[1] );
                 String value = parameterMap.get( key );
 
@@ -301,7 +301,7 @@
 
         ActivityValue activityValue = new ActivityValue();
         activityValue.setDataValues( dataValues );
-        activityValue.setProgramInstanceId( Integer.parseInt( programStageInstanceId ) );
+        activityValue.setProgramInstanceId( programStageInstanceId );
 
         try
         {

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/ShowActivityTypeAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/ShowActivityTypeAction.java	2012-05-24 09:45:14 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/ShowActivityTypeAction.java	2012-05-24 14:51:18 +0000
@@ -9,26 +9,26 @@
     // Input & Output
     // -------------------------------------------------------------------------
 
-    private String orgUnitId;
+    private Integer orgUnitId;
 
-    public void setOrgUnitId( String orgUnitId )
+    public void setOrgUnitId( Integer orgUnitId )
     {
         this.orgUnitId = orgUnitId;
     }
 
-    public String getOrgUnitId( String orgUnitId )
+    public Integer getOrgUnitId( Integer orgUnitId )
     {
         return this.orgUnitId;
     }
     
-    private String organisationUnitId;
+    private Integer organisationUnitId;
 
-    public String getOrganisationUnitId()
+    public Integer getOrganisationUnitId()
     {
         return organisationUnitId;
     }
 
-    public void setOrganisationUnitId( String organisationUnitId )
+    public void setOrganisationUnitId( Integer organisationUnitId )
     {
         this.organisationUnitId = organisationUnitId;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/GetSingleEventAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/GetSingleEventAction.java	2012-05-24 09:45:14 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/GetSingleEventAction.java	2012-05-24 14:51:18 +0000
@@ -43,7 +43,7 @@
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
-    
+
     private ProgramService programService;
 
     public ProgramService getProgramService()
@@ -67,7 +67,7 @@
     {
         this.organisationUnitService = organisationUnitService;
     }
-    
+
     // -------------------------------------------------------------------------
     // Input & Output
     // -------------------------------------------------------------------------
@@ -84,14 +84,14 @@
         this.singleEventList = singleEventList;
     }
 
-    private String organisationUnitId;
+    private Integer organisationUnitId;
 
-    public String getOrganisationUnitId()
+    public Integer getOrganisationUnitId()
     {
         return organisationUnitId;
     }
 
-    public void setOrganisationUnitId( String organisationUnitId )
+    public void setOrganisationUnitId( Integer organisationUnitId )
     {
         this.organisationUnitId = organisationUnitId;
     }
@@ -100,7 +100,7 @@
     public String execute()
         throws Exception
     {
-        OrganisationUnit orgUnit = organisationUnitService.getOrganisationUnit( Integer.parseInt( organisationUnitId ) );
+        OrganisationUnit orgUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
         Collection<Program> allProgram = programService.getPrograms( orgUnit );
 
         for ( Program program : allProgram )

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/GetSingleEventBeneficiaryAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/GetSingleEventBeneficiaryAction.java	2012-05-03 09:53:40 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/GetSingleEventBeneficiaryAction.java	2012-05-24 14:51:18 +0000
@@ -111,32 +111,32 @@
         this.singleEventBeneficiaryList = singleEventBeneficiaryList;
     }
 
-    private String organisationUnitId;
+    private Integer organisationUnitId;
 
-    public String getOrganisationUnitId()
+    public Integer getOrganisationUnitId()
     {
         return organisationUnitId;
     }
 
-    public void setOrganisationUnitId( String organisationUnitId )
+    public void setOrganisationUnitId( Integer organisationUnitId )
     {
         this.organisationUnitId = organisationUnitId;
     }
 
-    private String programId;
+    private Integer programId;
 
-    public String getProgramId()
+    public Integer getProgramId()
     {
         return programId;
     }
 
-    public void setProgramId( String programId )
+    public void setProgramId( Integer programId )
     {
         this.programId = programId;
     }
-    
+
     private boolean validated;
-    
+
     public boolean isValidated()
     {
         return validated;
@@ -151,8 +151,8 @@
     public String execute()
         throws Exception
     {
-        OrganisationUnit orgUnit = organisationUnitService.getOrganisationUnit( Integer.parseInt( organisationUnitId ) );
-        Program program = programService.getProgram( Integer.parseInt( programId ) ); 
+        OrganisationUnit orgUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
+        Program program = programService.getProgram( programId );
         Collection<Patient> allPatient = patientService.getPatients( orgUnit );
         for ( Patient patient : allPatient )
         {

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/GetSingleEventFormAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/GetSingleEventFormAction.java	2012-05-03 09:53:40 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/GetSingleEventFormAction.java	2012-05-24 14:51:18 +0000
@@ -86,16 +86,16 @@
         return this.eventName;
     }
 
-    private Integer beneficiaryId;
+    private Integer patientId;
 
-    public Integer getBeneficiaryId()
+    public Integer getPatientId()
     {
-        return beneficiaryId;
+        return patientId;
     }
 
-    public void setBeneficiaryId( Integer beneficiaryId )
+    public void setPatientId( Integer patientId )
     {
-        this.beneficiaryId = beneficiaryId;
+        this.patientId = patientId;
     }
 
     private Integer instId;

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/SaveSingleEventAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/SaveSingleEventAction.java	2012-05-03 09:53:40 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/SaveSingleEventAction.java	2012-05-24 14:51:18 +0000
@@ -136,16 +136,16 @@
         this.programId = programId;
     }
 
-    private Integer beneficiaryId;
+    private Integer patientId;
 
-    public Integer getBeneficiaryId()
+    public Integer getPatientId()
     {
-        return beneficiaryId;
+        return patientId;
     }
 
-    public void setBeneficiaryId( Integer beneficiaryId )
+    public void setPatientId( Integer patientId )
     {
-        this.beneficiaryId = beneficiaryId;
+        this.patientId = patientId;
     }
 
     private Patient patient;
@@ -244,7 +244,7 @@
         Program program = programService.getProgram( programId );
         eventName = program.getName();
 
-        Patient patient = patientService.getPatient( beneficiaryId );
+        Patient patient = patientService.getPatient( patientId );
         ProgramStage programStage = program.getProgramStages().iterator().next();
         OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
 

=== 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-16 09:33:38 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml	2012-05-24 14:51:18 +0000
@@ -172,13 +172,13 @@
 	<bean
 		id="org.hisp.dhis.light.namebaseddataentry.action.GetProgramStageFormAction"
 		class="org.hisp.dhis.light.namebaseddataentry.action.GetProgramStageFormAction">
-		<property name="organisationUnitService"
-			ref="org.hisp.dhis.organisationunit.OrganisationUnitService"/>
 		<property name="util" ref="org.hisp.dhis.light.utils.NamebasedUtils"/>
 		<property name="programStageInstanceService"
 			ref="org.hisp.dhis.program.ProgramStageInstanceService"/>
 		<property name="patientDataValueService"
-			ref="org.hisp.dhis.patientdatavalue.PatientDataValueService"/>
+			ref="org.hisp.dhis.patientdatavalue.PatientDataValueService"/>
+		<property name="patientService"
+			ref="org.hisp.dhis.patient.PatientService"/>
 	</bean>
 	
 	<bean id="org.hisp.dhis.light.utils.NamebasedUtils"

=== 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-23 13:55:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml	2012-05-24 14:51:18 +0000
@@ -130,7 +130,7 @@
 			<result name="success" type="redirect">
 				/mobile/selectBeneficiary.action?organisationUnitId=${orgUnitId}&amp;current=${current}&amp;validated=true</result>
 			<result name="success_find" type="redirect">
-				/mobile/showPatientProgramStageList.action?patientId=${beneficiaryId}&amp;programInstanceId=${programInstanceId}&amp;programId=${programId}&amp;validated=true</result>
+				/mobile/showPatientProgramStageList.action?patientId=${patientId}&amp;programInstanceId=${programInstanceId}&amp;programId=${programId}&amp;validated=true</result>
 			<result name="error" type="velocity">/dhis-web-light/main.vm</result>
 			<param name="page">/dhis-web-light/namebased/programStageForm.vm</param>
 		</action>
@@ -147,7 +147,7 @@
 			<result name="success" type="velocity">
 				/dhis-web-light/main.vm</result>
 			<param name="page">/dhis-web-light/namebased/beneficiaryDetail.vm</param>
-			<param name="previouspage">showPatientProgramList.action?patientId=${beneficiaryId}</param>
+			<param name="previouspage">showPatientProgramList.action?patientId=${patientId}</param>
 		</action>
 		
 		<action name="showFindBeneficiaryForm"
@@ -250,7 +250,7 @@
 		<action name="saveMobileProgramEnrollment"
 			class="org.hisp.dhis.light.beneficiaryenrollment.action.SaveMobileProgramEnrollmentAction">
 			<result name="success" type="redirect">
-				/mobile/selectEnrollmentProgram.action?beneficiaryId=${beneficiaryId}&amp;validated=true</result>
+				/mobile/selectEnrollmentProgram.action?patientId=${patientId}&amp;validated=true</result>
 			<result name="error" type="velocity">/dhis-web-light/main.vm</result>
 			<param name="page">/dhis-web-light/enrollment/programEnrollmentForm.vm</param>
 		</action>
@@ -268,7 +268,7 @@
 			class="org.hisp.dhis.light.singleevent.action.GetSingleEventBeneficiaryAction">
 			<result name="success" type="velocity">
 				/dhis-web-light/main.vm</result>
-			<param name="page">/dhis-web-light/registration/selectSingleEventBeneficiary.vm</param>
+			<param name="page">/dhis-web-light/singleevent/selectSingleEventBeneficiary.vm</param>
 		</action>
 		
 		<action name="showSingleEventForm"

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/beneficiaryList.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/beneficiaryList.vm	2012-04-13 08:56:48 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/beneficiaryList.vm	2012-05-24 14:51:18 +0000
@@ -9,7 +9,7 @@
 <p>
 <ul>
 #foreach( $beneficiary in $beneficiaries )
-	<li><a href="selectActivity.action?organisationUnitId=$organisationUnit.id&beneficiaryId=$beneficiary.id&current=$current">$!encoder.htmlEncode( ${beneficiary.getFullName()} )</a></li>
+	<li><a href="selectActivity.action?organisationUnitId=$organisationUnit.id&patientId=$beneficiary.id&current=$current">$!encoder.htmlEncode( ${beneficiary.getFullName()} )</a></li>
 #end
 </ul>
 </p>

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/beneficiarySearchResult.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/beneficiarySearchResult.vm	2012-05-23 13:55:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/beneficiarySearchResult.vm	2012-05-24 14:51:18 +0000
@@ -10,7 +10,7 @@
 <ul>
 #foreach( $patient in $patientList )
 	#set($fullName = $patient.getFirstName() + " " + $patient.getMiddleName() + " " + $patient.getLastName())
-	<li><a href="selectEnrollmentProgram.action?beneficiaryId=$patient.Id">$!encoder.htmlEncode( ${fullName} )</a></li>
+	<li><a href="selectEnrollmentProgram.action?patientId=$patient.Id">$!encoder.htmlEncode( ${fullName} )</a></li>
 #end
 </ul>
 </p>

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/enrollmentProgramList.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/enrollmentProgramList.vm	2012-05-23 13:55:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/enrollmentProgramList.vm	2012-05-24 14:51:18 +0000
@@ -18,7 +18,7 @@
 <p>
 <ul>
 #foreach( $program in $programList )
-	<li><a href="showProgramEnrollmentForm.action?beneficiaryId=$patient.Id&programId=$program.Id">$program.getName()</a></li>
+	<li><a href="showProgramEnrollmentForm.action?patientId=$patient.Id&programId=$program.Id">$program.getName()</a></li>
 #end
 </ul>
 </p>

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/programEnrollmentForm.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/programEnrollmentForm.vm	2012-05-23 13:55:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/programEnrollmentForm.vm	2012-05-24 14:51:18 +0000
@@ -1,7 +1,7 @@
 <h2>$i18n.getString( "enroll" ) $patient.getFullName() to $program.getName()</h2>
 <form action="saveMobileProgramEnrollment.action" method="POST">
 <div class="header-box" align="center">
-<input type="hidden" name="beneficiaryId" value="$beneficiaryId"/>	
+<input type="hidden" name="patientId" value="$patientId"/>	
 <input type="hidden" name="programId" value="$programId"/>	
 	<p style="text-align: left;">
 		<label>$i18n.getString( "enrollment_date" ) [yyyy-MM-dd] </label>
@@ -29,7 +29,7 @@
 <div id="footer">
 <h2>$i18n.getString( "navigate_to" )</h2>
 <ul>
-	<li> <a href="selectEnrollmentProgram.action?beneficiaryId=$beneficiaryId"> $i18n.getString("program_list")</a> </li>
+	<li> <a href="selectEnrollmentProgram.action?patientId=$patientId"> $i18n.getString("program_list")</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/beneficiaryDetail.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryDetail.vm	2012-05-23 13:55:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryDetail.vm	2012-05-24 14:51:18 +0000
@@ -18,7 +18,7 @@
 	#if($organisationUnitId == "0")
 		<li><a href="showPatientProgramList.action?patientId=$patient.id">$!encoder.htmlEncode( ${patient.getFullName()} )</a></li>
 	#else
-		<li><a href="selectActivity.action?organisationUnitId=$organisationUnitId&beneficiaryId=$patient.id&current=$current"> $i18n.getString("activity_list")</a></li>
+		<li><a href="selectActivity.action?organisationUnitId=$organisationUnitId&patientId=$patient.id&current=$current"> $i18n.getString("activity_list")</a></li>
 	#end
 	<li><a href="index.action">$i18n.getString("home")</a></li>
 </ul>
\ No newline at end of file

=== 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-15 07:40:06 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryList.vm	2012-05-24 14:51:18 +0000
@@ -17,7 +17,7 @@
 <div id="footer">
 <h2>$i18n.getString( "navigate_to" )</h2>
 <ul>
-	<li> <a href="trackingMenu.action"> $i18n.getString("tracking_menu")</a></li>
+	<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/beneficiaryProgramList.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm	2012-05-23 13:55:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm	2012-05-24 14:51:18 +0000
@@ -2,7 +2,7 @@
 <p>
 	<ul>
 		<li>
-			<a href="showBeneficiaryDetail.action?beneficiaryId=$patient.getId()&current=true&organisationUnitId=0"> $i18n.getString( "details" ) </a>
+			<a href="showBeneficiaryDetail.action?patientId=$patient.getId()&current=true&organisationUnitId=0"> $i18n.getString( "details" ) </a>
 		</li> 
 	</ul>
 <ul>
@@ -19,7 +19,7 @@
 <div id="footer">
 <h2>$i18n.getString( "navigate_to" )</h2>
 <ul>
-	<li><a href="trackingMenu.action">$i18n.getString("tracking")</a></li>
+	<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/beneficiaryProgramStageList.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramStageList.vm	2012-05-15 07:40:06 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramStageList.vm	2012-05-24 14:51:18 +0000
@@ -13,10 +13,10 @@
 #foreach( $programStageInstance in $programStageInstances )
 	<li>
 		 #if( $programStageInstance.isCompleted() == true )
-		 	<a href="showCompletedProgramStageForm.action?programId=$programId&programStageId=$programStageInstance.getProgramStage().getId()&programStageInstanceId=$programStageInstance.getId()&beneficiaryId=$patient.getId()&programInstanceId=$programStageInstance.getProgramInstance().getId()&orgUnitId=0">
+		 	<a href="showCompletedProgramStageForm.action?programId=$programId&programStageId=$programStageInstance.getProgramStage().getId()&programStageInstanceId=$programStageInstance.getId()&patientId=$patient.getId()&programInstanceId=$programStageInstance.getProgramInstance().getId()&orgUnitId=0">
 			$programStageInstance.getProgramStage().getName()<img src="../dhis-web-light/images/checkmark.jpg" /></a>
 		 #else 
-		 	<a href="showProgramStageForm.action?programId=$programId&programStageId=$programStageInstance.getProgramStage().getId()&programStageInstanceId=$programStageInstance.getId()&beneficiaryId=$patient.getId()&programInstanceId=$programStageInstance.getProgramInstance().getId()&orgUnitId=0">
+		 	<a href="showProgramStageForm.action?programId=$programId&programStageId=$programStageInstance.getProgramStage().getId()&programStageInstanceId=$programStageInstance.getId()&patientId=$patient.getId()&programInstanceId=$programStageInstance.getProgramInstance().getId()&orgUnitId=0">
 		 	$programStageInstance.getProgramStage().getName()</a>
 		 #end
 	</li>

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/completedProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/completedProgramStageForm.vm	2012-05-16 09:33:38 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/completedProgramStageForm.vm	2012-05-24 14:51:18 +0000
@@ -17,7 +17,7 @@
 <input type="hidden" value=$programStageId name="programStageId"/>
 <input type="hidden" value=$orgUnitId name="orgUnitId"/>
 <input type="hidden" value=$programId name="programId" />
-<input type="hidden" value=$beneficiaryId name="beneficiaryId" />
+<input type="hidden" value=$patientId name="patientId" />
 <input type="hidden" id="current" name="current" value=$current />
 
 <div class="header-box" align="center">
@@ -99,7 +99,7 @@
 <div id="footer">
 <h2>$i18n.getString( "navigate_to" )</h2>
 <ul>
-	<li><li><a href="trackingMenu.action"> $i18n.getString("tracking_menu")</a> </li></li>
+	<li><a href="showPatientProgramStageList.action?patientId=$patientId&programInstanceId=$programInstanceId&programId=$programId&validated=false">$!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/programStageForm.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/programStageForm.vm	2012-05-23 13:55:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/programStageForm.vm	2012-05-24 14:51:18 +0000
@@ -18,7 +18,7 @@
 <input type="hidden" value=$programStageId name="programStageId"/>
 <input type="hidden" value=$orgUnitId name="orgUnitId"/>
 <input type="hidden" value=$programId name="programId" />
-<input type="hidden" value=$beneficiaryId name="beneficiaryId" />
+<input type="hidden" value=$patientId name="patientId" />
 <input type="hidden" id="current" name="current" value=$current />
 
 <div class="header-box" align="center">
@@ -106,7 +106,13 @@
 <div id="footer">
 <h2>$i18n.getString( "navigate_to" )</h2>
 <ul>
-	<li><a href="trackingMenu.action"> $i18n.getString("tracking_menu")</a></li>
+	#if($orgUnitId == 0)
+		<li><a href="showPatientProgramStageList.action?patientId=$patientId&programInstanceId=$programInstanceId&programId=$programId&validated=false">$!encoder.htmlEncode( ${patient.getFullName()} )</a></li>
+	#else
+		<li><a href="selectActivity.action?organisationUnitId=$orgUnitId&patientId=$patientId&current=$current"> $i18n.getString("activity_list")</a></li>
+	#end
+	
+	
 	<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/selectActivity.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/selectActivity.vm	2012-05-23 13:55:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/selectActivity.vm	2012-05-24 14:51:18 +0000
@@ -2,13 +2,13 @@
 <p>
 	<ul>
 		<li>
-			<a href="showBeneficiaryDetail.action?organisationUnitId=$organisationUnitId&beneficiaryId=$beneficiaryId&current=$current"> $i18n.getString( "details" ) </a>
+			<a href="showBeneficiaryDetail.action?organisationUnitId=$organisationUnitId&patientId=$patientId&current=$current"> $i18n.getString( "details" ) </a>
 		</li> 
 	</ul>
 <ul>
 #foreach( $activity in $activities )
 	<li>
-		<a href="showProgramStageForm.action?orgUnitId=$organisationUnitId&programStageId=$activity.getTask().getProgramStageId()&programId=$activity.getTask().getProgramId()&programStageInstanceId=$activity.task.id&current=$current&beneficiaryId=$beneficiaryId">
+		<a href="showProgramStageForm.action?orgUnitId=$organisationUnitId&programStageId=$activity.getTask().getProgramStageId()&programId=$activity.getTask().getProgramId()&programStageInstanceId=$activity.task.id&current=$current&patientId=$patientId">
 			 $util.getProgramStage($activity.getTask().getProgramId(), $activity.getTask().getProgramStageId()).getName()
 		</a> 
 	</li>

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/singleevent/selectSingleEventBeneficiary.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/singleevent/selectSingleEventBeneficiary.vm	2012-05-23 13:55:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/singleevent/selectSingleEventBeneficiary.vm	2012-05-24 14:51:18 +0000
@@ -9,7 +9,7 @@
 <p>
 <ul>
 #foreach( $patient in $singleEventBeneficiaryList )
-	<li><a href="showSingleEventForm.action?organisationUnitId=$organisationUnitId&beneficiaryId=$patient.id&programId=$programId">$!encoder.htmlEncode( ${patient.getFullName()} )</a></li>
+	<li><a href="showSingleEventForm.action?organisationUnitId=$organisationUnitId&patientId=$patient.id&programId=$programId">$!encoder.htmlEncode( ${patient.getFullName()} )</a></li>
 #end
 </ul>
 </p>

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/singleevent/singleEventForm.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/singleevent/singleEventForm.vm	2012-05-23 13:55:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/singleevent/singleEventForm.vm	2012-05-24 14:51:18 +0000
@@ -32,7 +32,7 @@
 		
 		<input type="hidden" name="organisationUnitId" value="$organisationUnitId" />
 		<input type="hidden" name="programId" value="$programId" />
-		<input type="hidden" name="beneficiaryId" value="$beneficiaryId" />
+		<input type="hidden" name="patientId" value="$patientId" />
 
 		<input type="submit" value=$i18n.getString("Submit") />
 	    </p>