=== 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 programList = new ArrayList(); @@ -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 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(); - organisationUnit = organisationUnitService.getOrganisationUnit( Integer.parseInt( organisationUnitId ) ); + organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId ); ActivityPlan activityPlan; if ( current ) { @@ -143,7 +143,7 @@ List 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 beneficiaries; + private Set 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 getBeneficiaries() + public Set getBeneficiaries() { return this.beneficiaries; } @@ -135,9 +138,9 @@ public String execute() throws Exception { - beneficiaries = new ArrayList(); + beneficiaries = new HashSet(); - 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 compareMap = new HashMap(); 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 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 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 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 @@ - + ref="org.hisp.dhis.patientdatavalue.PatientDataValueService"/> + /mobile/selectBeneficiary.action?organisationUnitId=${orgUnitId}&current=${current}&validated=true - /mobile/showPatientProgramStageList.action?patientId=${beneficiaryId}&programInstanceId=${programInstanceId}&programId=${programId}&validated=true + /mobile/showPatientProgramStageList.action?patientId=${patientId}&programInstanceId=${programInstanceId}&programId=${programId}&validated=true /dhis-web-light/main.vm /dhis-web-light/namebased/programStageForm.vm @@ -147,7 +147,7 @@ /dhis-web-light/main.vm /dhis-web-light/namebased/beneficiaryDetail.vm - showPatientProgramList.action?patientId=${beneficiaryId} + showPatientProgramList.action?patientId=${patientId} - /mobile/selectEnrollmentProgram.action?beneficiaryId=${beneficiaryId}&validated=true + /mobile/selectEnrollmentProgram.action?patientId=${patientId}&validated=true /dhis-web-light/main.vm /dhis-web-light/enrollment/programEnrollmentForm.vm @@ -268,7 +268,7 @@ class="org.hisp.dhis.light.singleevent.action.GetSingleEventBeneficiaryAction"> /dhis-web-light/main.vm - /dhis-web-light/registration/selectSingleEventBeneficiary.vm + /dhis-web-light/singleevent/selectSingleEventBeneficiary.vm

=== 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 @@

=== 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 @@

=== 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 @@

$i18n.getString( "enroll" ) $patient.getFullName() to $program.getName()

- +

@@ -29,7 +29,7 @@

=== 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")
  • $!encoder.htmlEncode( ${patient.getFullName()} )
  • #else -
  • $i18n.getString("activity_list")
  • +
  • $i18n.getString("activity_list")
  • #end
  • $i18n.getString("home")
  • \ 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 @@ \ 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 @@

      @@ -19,7 +19,7 @@ \ 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 )
    • #if( $programStageInstance.isCompleted() == true ) - + $programStageInstance.getProgramStage().getName() #else - + $programStageInstance.getProgramStage().getName() #end
    • === 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 @@ - +
      @@ -99,7 +99,7 @@ === 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 @@ - +
      @@ -106,7 +106,13 @@ === 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 @@

        #foreach( $activity in $activities )
      • - + $util.getProgramStage($activity.getTask().getProgramId(), $activity.getTask().getProgramStageId()).getName()
      • === 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 @@

        === 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 @@ - +