dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19205
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8279: Reverted r 8276 and 8277, mobile modifications affect other functionality
------------------------------------------------------------
revno: 8279
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-09-27 08:54:00 +0200
message:
Reverted r 8276 and 8277, mobile modifications affect other functionality
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/Patient.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientStore.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientService.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java
dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/smslib/GateWayFactory.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementBuilder.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/H2StatementBuilder.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/MySQLStatementBuilder.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/PostgreSQLStatementBuilder.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ValidateAddRelationshipPatientAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ValidatePatientAction.java
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/SearchBeneficiaryAction.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/GetBeneficiaryDetailAction.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/resources/org/hisp/dhis/light/i18n_module.properties
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/menu.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/findBeneficiaryForm.vm
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/registration/beneficiaryRegistrationForm.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-api/src/main/java/org/hisp/dhis/patient/Patient.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/Patient.java 2012-09-27 05:47:35 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/Patient.java 2012-09-27 06:54:00 +0000
@@ -50,35 +50,23 @@
private static final long serialVersionUID = 884114994005945275L;
public static final String MALE = "M";
-
public static final String FEMALE = "F";
public static final char DOB_TYPE_VERIFIED = 'V';
-
public static final char DOB_TYPE_DECLARED = 'D';
-
public static final char DOB_TYPE_APPROXIATED = 'A';
public static final char AGE_TYPE_YEAR = 'Y';
-
public static final char AGE_TYPE_MONTH = 'M';
-
public static final char AGE_TYPE_DAY = 'D';
-
+
public static String PREFIX_IDENTIFIER_TYPE = "iden";
-
- public static String PREFIX_FIXED_ATTRIBUTE = "fixedAttr";
-
+ public static String PREFIX_FIXED_ATTRIBUTE = "fixedAttr";
public static String PREFIX_PATIENT_ATTRIBUTE = "attr";
-
public static String PREFIX_PROGRAM = "prg";
-
public static String PREFIX_PROGRAM_EVENT_BY_STATUS = "stat";
-
public static String PREFIX_PROGRAM_STAGE = "prgst";
-
public static String FIXED_ATTR_BIRTH_DATE = "birthDate";
-
public static String FIXED_ATTR_AGE = "age";
private Integer id;
@@ -114,7 +102,7 @@
private boolean underAge;
private Character dobType;
-
+
private User healthWorker;
// -------------------------------------------------------------------------
@@ -161,7 +149,6 @@
result = prime * result + ((gender == null) ? 0 : gender.hashCode());
result = prime * result + ((lastName == null) ? 0 : lastName.hashCode());
result = prime * result + ((middleName == null) ? 0 : middleName.hashCode());
- result = prime * result + ((phoneNumber == null) ? 0 : phoneNumber.hashCode());
return result;
}
@@ -243,13 +230,6 @@
{
return false;
}
- if ( phoneNumber == null )
- {
- if ( other.phoneNumber != null )
- {
- return false;
- }
- }
return true;
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierService.java 2012-09-27 05:47:35 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierService.java 2012-09-27 06:54:00 +0000
@@ -64,7 +64,6 @@
Patient getPatient( PatientIdentifierType idenType, String value);
Collection<Patient> getPatientsByIdentifier( String identifier, int min, int max );
-
int countGetPatientsByIdentifier( String identifier );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientService.java 2012-09-27 05:47:35 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientService.java 2012-09-27 06:54:00 +0000
@@ -64,7 +64,7 @@
* @param gender
* @return Patient List
*/
- Collection<Patient> getPatients( String firstName, String middleName, String lastName, Date birthdate, String gender, String phoneNumber );
+ Collection<Patient> getPatients( String firstName, String middleName, String lastName, Date birthdate, String gender );
/**
* Search Patient base on gender
@@ -76,12 +76,10 @@
/**
* Search Patient base on birthDate
- * @param maxValue
*
* @param birthdate
* @return Patient List
*/
-
Collection<Patient> getPatientsByBirthDate( Date birthDate );
/**
@@ -107,7 +105,7 @@
* @param orgUnitId
* @return Patient List
*/
- Collection<Patient> getPatientsForMobile( String searchText, int orgUnitId);
+ Collection<Patient> getPatientsForMobile( String searchText, int orgUnitId );
/**
* Search Patient base on organization unit with result limited
@@ -115,7 +113,6 @@
* @param organisationUnit organisationUnit
* @return Patient List
*/
-
Collection<Patient> getPatients( OrganisationUnit organisationUnit, Integer min, Integer max );
/**
@@ -214,12 +211,4 @@
Collection<Integer> getProgramStageInstances( List<String> searchKeys, OrganisationUnit orgunit, Integer min, Integer max );
- Collection<Patient> getPatientsByPhone( String phoneNumber, Integer min, Integer max);
-
-
-
-
-
-
-
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientStore.java 2012-09-27 05:47:35 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientStore.java 2012-09-27 06:54:00 +0000
@@ -46,38 +46,32 @@
Collection<Patient> getByGender( String gender );
- Collection<Patient> getByPhoneNumber( String phoneNumber, Integer min, Integer max);
-
Collection<Patient> getByBirthDate( Date birthDate );
Collection<Patient> getByNames( String name, Integer min, Integer max );
-
- Collection<Patient> get( String firstName, String middleName, String lastName, Date birthdate, String gender, String phoneNumber);
-
+
+ Collection<Patient> get( String firstName, String middleName, String lastName, Date birthdate, String gender );
+
Collection<Patient> getByOrgUnit( OrganisationUnit organisationUnit, Integer min, Integer max );
-
- Collection<Patient> getByOrgUnitProgram( OrganisationUnit organisationUnit, Program program, Integer min,
- Integer max );
-
+
+ Collection<Patient> getByOrgUnitProgram( OrganisationUnit organisationUnit, Program program, Integer min, Integer max );
+
Collection<Patient> getRepresentatives( Patient patient );
-
- int countListPatientByOrgunit( OrganisationUnit organisationUnit );
-
+
+ int countListPatientByOrgunit(OrganisationUnit organisationUnit);
+
int countGetPatientsByName( String name );
-
+
int countGetPatientsByOrgUnitProgram( OrganisationUnit organisationUnit, Program program );
void removeErollmentPrograms( Program program );
-
+
Collection<Patient> search( List<String> searchKeys, OrganisationUnit orgunit, Integer min, Integer max );
-
+
int countSearch( List<String> searchKeys, OrganisationUnit orgunit );
-
- Collection<String> getPatientPhoneNumbers( List<String> searchKeys, OrganisationUnit orgunit, Integer min,
- Integer max );
+
+ Collection<String> getPatientPhoneNumbers( List<String> searchKeys, OrganisationUnit orgunit, Integer min, Integer max );
Collection<Integer> getProgramStageInstances( List<String> searchKeys, OrganisationUnit orgunit, Integer min,
Integer max );
-
-
}
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientService.java 2012-09-27 06:16:43 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientService.java 2012-09-27 06:54:00 +0000
@@ -115,7 +115,7 @@
@Override
public int createPatient( Patient patient, Integer representativeId, Integer relationshipTypeId,
- List<PatientAttributeValue> patientAttributeValues )
+ List<PatientAttributeValue> patientAttributeValues )
{
int patientid = savePatient( patient );
@@ -183,9 +183,9 @@
@Override
public Collection<Patient> getPatients( String firstName, String middleName, String lastName, Date birthdate,
- String gender, String phoneNumber )
+ String gender )
{
- return patientStore.get( firstName, middleName, lastName, birthdate, gender, phoneNumber);
+ return patientStore.get( firstName, middleName, lastName, birthdate, gender );
}
@Override
@@ -242,17 +242,13 @@
}
@Override
- public Collection<Patient> getPatientsForMobile( String searchText, int orgUnitId)
+ public Collection<Patient> getPatientsForMobile( String searchText, int orgUnitId )
{
Set<Patient> patients = new HashSet<Patient>();
patients.addAll( patientIdentifierService.getPatientsByIdentifier( searchText, 0, Integer.MAX_VALUE ) );
patients.addAll( getPatientsByNames( searchText, 0, Integer.MAX_VALUE ) );
- patients.addAll( getPatientsByPhone( searchText, 0, Integer.MAX_VALUE ) );
-
-
- // if an orgunit has been selected, filter out every patient that has a
- // different ou
+ // if an orgunit has been selected, filter out every patient that has a different ou
if ( orgUnitId != 0 )
{
Set<Patient> toRemoveList = new HashSet<Patient>();
@@ -279,7 +275,7 @@
@Override
public Collection<Patient> getPatients( OrganisationUnit organisationUnit, PatientAttribute patientAttribute,
- Integer min, Integer max )
+ Integer min, Integer max )
{
List<Patient> patientList = new ArrayList<Patient>( patientStore.getByOrgUnit( organisationUnit, min, max ) );
@@ -295,7 +291,7 @@
@Override
public Collection<Patient> getPatients( OrganisationUnit organisationUnit, String searchText, Integer min,
- Integer max )
+ Integer max )
{
Collection<Patient> patients = new ArrayList<Patient>();
@@ -406,8 +402,8 @@
@Override
public void updatePatient( Patient patient, Integer representativeId, Integer relationshipTypeId,
- List<PatientAttributeValue> valuesForSave, List<PatientAttributeValue> valuesForUpdate,
- Collection<PatientAttributeValue> valuesForDelete )
+ List<PatientAttributeValue> valuesForSave, List<PatientAttributeValue> valuesForUpdate,
+ Collection<PatientAttributeValue> valuesForDelete )
{
patientStore.update( patient );
@@ -500,8 +496,7 @@
}
return value;
- }
- catch ( Exception ex )
+ } catch ( Exception ex )
{
ex.printStackTrace();
}
@@ -519,8 +514,7 @@
patientStore.removeErollmentPrograms( program );
}
- public Collection<Patient> searchPatients( List<String> searchKeys, OrganisationUnit orgunit, Integer min,
- Integer max )
+ public Collection<Patient> searchPatients( List<String> searchKeys, OrganisationUnit orgunit, Integer min, Integer max )
{
return patientStore.search( searchKeys, orgunit, min, max );
}
@@ -529,23 +523,16 @@
{
return patientStore.countSearch( searchKeys, orgunit );
}
-
- public Collection<String> getPatientPhoneNumbers( List<String> searchKeys, OrganisationUnit orgunit, Integer min,
- Integer max )
+
+ public Collection<String> getPatientPhoneNumbers( List<String> searchKeys, OrganisationUnit orgunit, Integer min, Integer max )
{
return patientStore.getPatientPhoneNumbers( searchKeys, orgunit, min, max );
}
-
- public Collection<Integer> getProgramStageInstances( List<String> searchKeys, OrganisationUnit orgunit,
- Integer min, Integer max )
+
+ public Collection<Integer> getProgramStageInstances( List<String> searchKeys, OrganisationUnit orgunit, Integer min, Integer max )
{
return patientStore.getProgramStageInstances( searchKeys, orgunit, min, max );
}
+
-
- @Override
- public Collection<Patient> getPatientsByPhone( String phoneNumber, Integer min, Integer max)
- {
- return patientStore.getByPhoneNumber( phoneNumber, min, max );
- }
}
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java 2012-09-27 06:16:43 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java 2012-09-27 06:54:00 +0000
@@ -133,8 +133,7 @@
@SuppressWarnings( "unchecked" )
@Override
- public Collection<Patient> get( String firstName, String middleName, String lastName, Date birthdate,
- String gender, String phoneNumber )
+ public Collection<Patient> get( String firstName, String middleName, String lastName, Date birthdate, String gender )
{
Criteria crit = getCriteria();
Conjunction con = Restrictions.conjunction();
@@ -150,7 +149,6 @@
con.add( Restrictions.eq( "gender", gender ) );
con.add( Restrictions.eq( "birthDate", birthdate ) );
- con.add( Restrictions.eq( "phoneNumber", phoneNumber ) );
crit.add( con );
@@ -435,20 +433,16 @@
condition = "";
continue;
case ProgramStageInstance.FUTURE_VISIT_STATUS:
- patientWhere += condition
- + operatorStatus
- + "("
- + " psi.status is null and psi.executiondate is null and psi.duedate >= now() and p.organisationunitid="
- + keys[4] + ")";
+ patientWhere += condition + operatorStatus + "("
+ + " psi.status is null and psi.executiondate is null and psi.duedate >= now() and p.organisationunitid=" + keys[4]
+ + ")";
operatorStatus = " OR ";
condition = "";
continue;
case ProgramStageInstance.LATE_VISIT_STATUS:
- patientWhere += condition
- + operatorStatus
- + "("
- + " psi.status is null and psi.executiondate is null and psi.duedate < now() and p.organisationunitid="
- + keys[4] + ")";
+ patientWhere += condition + operatorStatus + "("
+ + " psi.status is null and psi.executiondate is null and psi.duedate < now() and p.organisationunitid=" + keys[4]
+ + ")";
operatorStatus = " OR ";
condition = "";
continue;
@@ -533,42 +527,8 @@
{
sql += statementBuilder.limitRecord( min, max );
}
-
+
return sql;
}
- @Override
- public Collection<Patient> getByPhoneNumber( String phoneNumber, Integer min, Integer max )
- {
-
- List<Patient> patients = new ArrayList<Patient>();
-
- String sql = "select patientid from patient " + "where lower( " + statementBuilder.getPatientsByPhone() + ") "
- + "like '%" + phoneNumber + "%'";
-
- if ( min != null && max != null )
- {
- sql += statementBuilder.limitRecord( min, max );
- }
- try
- {
- patients = jdbcTemplate.query( sql, new RowMapper<Patient>()
- {
-
- @Override
- public Patient mapRow( ResultSet rs, int rowNum )
- throws SQLException
- {
-
- return get( rs.getInt( 1 ) );
- }
-
- } );
- }
- catch ( Exception ex )
- {
- ex.printStackTrace();
- }
- return patients;
- }
}
=== modified file 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/smslib/GateWayFactory.java'
--- dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/smslib/GateWayFactory.java 2012-09-27 05:47:35 +0000
+++ dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/smslib/GateWayFactory.java 2012-09-27 06:54:00 +0000
@@ -40,14 +40,10 @@
import org.smslib.http.BulkSmsHTTPGateway.Regions;
import org.smslib.http.ClickatellHTTPGateway;
import org.smslib.modem.SerialModemGateway;
-
-//import org.smslib.smsserver.gateways.SMPPGateway;
-
import org.smslib.smpp.BindAttributes;
import org.smslib.smpp.BindAttributes.BindType;
import org.smslib.smpp.jsmpp.JSMPPGateway;
-
public class GateWayFactory
{
public AGateway create( SmsGatewayConfig config )
@@ -164,9 +160,4 @@
gateway.setInbound( false );
return gateway;
}
-
-// public AGateway createSMPPGateway( SMPPGateway c )
-// {
-// SMPPGateway gateway = new SMPPGateway( myGatewayId, myProps, myServer );
-// }
}
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementBuilder.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementBuilder.java 2012-09-27 05:47:35 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementBuilder.java 2012-09-27 06:54:00 +0000
@@ -163,7 +163,4 @@
String getAddDate( String dateField, int days );
String getPatientFullName();
- String getPatientsByPhone();
-
-
}
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/H2StatementBuilder.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/H2StatementBuilder.java 2012-09-27 05:47:35 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/H2StatementBuilder.java 2012-09-27 06:54:00 +0000
@@ -326,10 +326,4 @@
{
return "concat( firstname, \" \",middleName , \" \" , lastname)";
}
-
- @Override
- public String getPatientsByPhone()
- {
- return "phoneNumber";
- }
}
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/MySQLStatementBuilder.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/MySQLStatementBuilder.java 2012-09-27 05:47:35 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/MySQLStatementBuilder.java 2012-09-27 06:54:00 +0000
@@ -322,10 +322,4 @@
{
return "concat( firstname, \" \",middleName , \" \" , lastname)";
}
-
- @Override
- public String getPatientsByPhone()
- {
- return "phoneNumber";
- }
}
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/PostgreSQLStatementBuilder.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/PostgreSQLStatementBuilder.java 2012-09-27 05:47:35 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/PostgreSQLStatementBuilder.java 2012-09-27 06:54:00 +0000
@@ -321,8 +321,4 @@
{
return "firstname || ' ' || middleName || ' ' || lastname";
}
-
- public String getPatientsByPhone(){
- return "phoneNumber";
- }
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ValidateAddRelationshipPatientAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ValidateAddRelationshipPatientAction.java 2012-09-27 05:47:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ValidateAddRelationshipPatientAction.java 2012-09-27 06:54:00 +0000
@@ -86,8 +86,6 @@
private Integer age;
private String gender;
-
- private String phoneNumber;
private Integer id;
@@ -184,7 +182,7 @@
// Check duplication name, birthdate, gender
patients = patientService.getPatients( firstName, middleName, lastName, format.parseDate( birthDate ),
- gender, phoneNumber );
+ gender );
if ( patients != null && patients.size() > 0 )
{
@@ -362,13 +360,6 @@
{
this.gender = gender;
}
-
-
-
- public void setPhoneNumber( String phoneNumber )
- {
- this.phoneNumber = phoneNumber;
- }
public void setUnderAge( boolean underAge )
{
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ValidatePatientAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ValidatePatientAction.java 2012-09-27 05:47:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ValidatePatientAction.java 2012-09-27 06:54:00 +0000
@@ -91,8 +91,6 @@
private String gender;
- private String phoneNumber;
-
private Integer id;
private boolean checkedDuplicate;
@@ -138,14 +136,14 @@
{
Patient patient = new Patient();
patient.setBirthDateFromAge( age.intValue(), ageType );
-
- if ( patient.getIntegerValueOfAge() > 100 )
+
+ if( patient.getIntegerValueOfAge() > 100 )
{
message = i18n.getString( "age_of_patient_must_be_less_or_equals_to_100" );
return INPUT;
}
}
-
+
if ( dobType != null && (dobType == Patient.DOB_TYPE_VERIFIED || dobType == Patient.DOB_TYPE_DECLARED) )
{
birthDate = birthDate.trim();
@@ -191,8 +189,8 @@
if ( !checkedDuplicate )
{
patients = patientService.getPatients( firstName, middleName, lastName, format.parseDate( birthDate ),
- gender, phoneNumber );
-
+ gender );
+
if ( patients != null && patients.size() > 0 )
{
message = i18n.getString( "patient_duplicate" );
@@ -214,7 +212,7 @@
}
}
}
-
+
if ( flagDuplicate )
{
return PATIENT_DUPLICATE;
@@ -267,11 +265,11 @@
if ( !underAge || (underAge && !idType.isRelated()) )
{
value = request.getParameter( AddPatientAction.PREFIX_IDENTIFIER + idType.getId() );
-
+
if ( StringUtils.isNotBlank( value ) )
{
PatientIdentifier identifier = patientIdentifierService.get( idType, value );
-
+
if ( identifier != null
&& (id == null || identifier.getPatient().getId().intValue() != id.intValue()) )
{
@@ -327,11 +325,6 @@
this.format = format;
}
- public void setPhoneNumber( String phoneNumber )
- {
- this.phoneNumber = phoneNumber;
- }
-
public void setPatientService( PatientService patientService )
{
this.patientService = patientService;
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/SearchBeneficiaryAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/SearchBeneficiaryAction.java 2012-09-27 05:47:35 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/SearchBeneficiaryAction.java 2012-09-27 06:54:00 +0000
@@ -69,19 +69,6 @@
{
this.keyword = keyword;
}
- private String phoneNumber;
-
-
-
- public String getPhoneNumber()
- {
- return phoneNumber;
- }
-
- public void setPhoneNumber( String phoneNumber )
- {
- this.phoneNumber = phoneNumber;
- }
public List<Patient> patientList;
=== 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-09-27 05:47:35 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/SaveBeneficiaryAction.java 2012-09-27 06:54:00 +0000
@@ -534,4 +534,4 @@
}
return SUCCESS;
}
-}
\ No newline at end of file
+}
=== 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-09-27 06:16:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/FindBeneficiarytAction.java 2012-09-27 06:54:00 +0000
@@ -105,6 +105,8 @@
this.patientId = patientId;
}
+ // Use in search related patient
+
private Integer originalPatientId;
public void setOriginalPatientId( Integer originalPatientId )
@@ -129,30 +131,6 @@
this.relationshipTypeId = relationshipTypeId;
}
- private String phoneNumber;
-
- public String getPhoneNumber()
- {
- return phoneNumber;
- }
-
- public void setPhoneNumber( String phoneNumber )
- {
- this.phoneNumber = phoneNumber;
- }
-
- private String keyPhone;
-
- public String getKeyPhone()
- {
- return keyPhone;
- }
-
- public void setKeyPhone( String keyPhone )
- {
- this.keyPhone = keyPhone;
- }
-
@Override
public String execute()
throws Exception
@@ -174,10 +152,9 @@
{
Patient patient = patients.iterator().next();
patientId = patient.getId();
- phoneNumber = patient.getPhoneNumber();
return REDIRECT;
}
-
return SUCCESS;
}
+
}
=== 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-09-27 05:47:35 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetBeneficiaryDetailAction.java 2012-09-27 06:54:00 +0000
@@ -85,7 +85,7 @@
public String execute()
throws Exception
{
- this.patient = patientService.getPatient( patientId );
+ 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/GetPatientProgramListAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetPatientProgramListAction.java 2012-09-27 05:47:35 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetPatientProgramListAction.java 2012-09-27 06:54:00 +0000
@@ -156,19 +156,6 @@
{
this.patientId = patientId;
}
-
- private String phoneNumber;
-
-
- public String getPhoneNumber()
- {
- return phoneNumber;
- }
-
- public void setPhoneNumber( String phoneNumber )
- {
- this.phoneNumber = phoneNumber;
- }
private Set<ProgramInstance> programInstances = new HashSet<ProgramInstance>();
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties 2012-09-27 05:47:35 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties 2012-09-27 06:54:00 +0000
@@ -83,7 +83,7 @@
tracking=Tracking
find_beneficiary=Find Person
activity_plan=Activity Plan
-search_by_name_or_id=Search By Name or ID or Phone Number
+search_by_name_or_id=Search By Name or ID
select_orgunit=Select Organisation Unit
all_orgunit=All Organisation Unit
tracking_menu=Tracking Menu
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/menu.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/menu.vm 2012-09-27 05:47:35 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/menu.vm 2012-09-27 06:54:00 +0000
@@ -28,10 +28,8 @@
#set ($trackingAuthority = true)
#set ($aggregateAuthority = true)
#else
-
#if ( $each == 'M_dhis-web-maintenance-patient' )
#set ($trackingAuthority = true)
-
#end
#if ( $each == 'M_dhis-web-dataentry' )
=== 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-09-27 05:47:35 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryList.vm 2012-09-27 06:54:00 +0000
@@ -4,11 +4,8 @@
<ul>
#foreach( $patient in $patients )
<li><a href="showPatientProgramList.action?patientId=$patient.getId()">$!encoder.htmlEncode( ${patient.getFullName()} )</a></li>
-
#end
</ul>
-
-
</p>
<p><strong>Total found: $patients.size()</strong></p>
<div id="footer">
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/findBeneficiaryForm.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/findBeneficiaryForm.vm 2012-09-27 05:47:35 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/findBeneficiaryForm.vm 2012-09-27 06:54:00 +0000
@@ -16,7 +16,7 @@
#if( $validationMap.get( "keyword" ) )
<br /><span style="color: #990000;"> $i18n.getString($validationMap.get( "fullName" ))</span>
#end
- <input type="text" name="keyword" value="$!previousValues.get("fullName")" />
+ <input type="text" name="keyword" value="$!previousValues.get("fullName")" />
</p>
<p style="text-align: left;">
<label>$i18n.getString( "select_orgunit" )</label>
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/registration/beneficiaryRegistrationForm.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/registration/beneficiaryRegistrationForm.vm 2012-09-27 05:47:35 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/registration/beneficiaryRegistrationForm.vm 2012-09-27 06:54:00 +0000
@@ -53,7 +53,7 @@
>$i18n.getString( "transgender" )</option>
</select>
- <label>$i18n.getString( "age_or_dob" )</label>
+ <label>$i18n.getString( "date_of_birth" )</label>
<select name="dobType">
<option value="A"
#if($previousValues.get("dobType") == "A")