dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25438
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12626: Removed unused method from PatientStore
------------------------------------------------------------
revno: 12626
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-10-14 12:07:20 +0200
message:
Removed unused method from PatientStore
modified:
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-dxf2/src/main/java/org/hisp/dhis/dxf2/events/person/AbstractPersonService.java
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/person/PersonService.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
--
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/PatientService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientService.java 2013-10-14 09:59:01 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientService.java 2013-10-14 10:07:20 +0000
@@ -136,14 +136,6 @@
/**
*
- * @param program
- * @param gender
- * @return
- */
- Collection<Patient> getPatients( Program program, String gender );
-
- /**
- *
* @param organisationUnit
* @param program
* @return
=== 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 2013-10-14 09:59:01 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientStore.java 2013-10-14 10:07:20 +0000
@@ -94,6 +94,4 @@
Integer max );
Collection<Patient> getByProgram( Program program, Integer min, Integer max );
-
- Collection<Patient> getByProgram( Program program, String gender, Integer min, Integer max );
}
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/person/AbstractPersonService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/person/AbstractPersonService.java 2013-10-14 09:59:01 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/person/AbstractPersonService.java 2013-10-14 10:07:20 +0000
@@ -174,13 +174,6 @@
}
@Override
- public Persons getPersons( Program program, Gender gender )
- {
- List<Patient> patients = new ArrayList<Patient>( patientService.getPatients( program, gender.getValue() ) );
- return getPersons( patients );
- }
-
- @Override
public Persons getPersons( OrganisationUnit organisationUnit, Program program )
{
List<Patient> patients = new ArrayList<Patient>( patientService.getPatients( organisationUnit, program ) );
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/person/PersonService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/person/PersonService.java 2013-10-14 09:59:01 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/person/PersonService.java 2013-10-14 10:07:20 +0000
@@ -62,8 +62,6 @@
Persons getPersons( Program program );
- Persons getPersons( Program program, Gender gender );
-
Persons getPersons( OrganisationUnit organisationUnit, Program program );
Persons getPersons( OrganisationUnit organisationUnit, Gender gender );
=== 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 2013-10-14 09:59:01 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientService.java 2013-10-14 10:07:20 +0000
@@ -303,12 +303,6 @@
}
@Override
- public Collection<Patient> getPatients( Program program, String gender )
- {
- return patientStore.getByProgram( program, gender, 0, Integer.MAX_VALUE );
- }
-
- @Override
public Collection<Patient> getPatients( OrganisationUnit organisationUnit, Program program )
{
return patientStore.getByOrgUnitProgram( organisationUnit, program, 0, Integer.MAX_VALUE );
=== 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 2013-10-14 09:59:01 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java 2013-10-14 10:07:20 +0000
@@ -270,40 +270,6 @@
}
@Override
- //TODO this method must be changed - cannot retrieve one by one
- public Collection<Patient> getByProgram( Program program, String gender, Integer min, Integer max )
- {
- List<Patient> patients = new ArrayList<Patient>();
-
- String sql = "select p.patientid from patient p join programinstance pi on p.patientid=pi.patientid "
- + "where pi.programid=" + program.getId() + " and pi.status=" + ProgramInstance.STATUS_ACTIVE
- + " and p.gender='" + gender + "'";
-
- if ( min != null && max != null )
- {
- sql += statementBuilder.limitRecord( min, max );
- }
-
- try
- {
- patients = jdbcTemplate.query( sql, new RowMapper<Patient>()
- {
- public Patient mapRow( ResultSet rs, int rowNum )
- throws SQLException
- {
- return get( rs.getInt( 1 ) );
- }
- } );
- }
- catch ( Exception ex )
- {
- ex.printStackTrace();
- }
-
- return patients;
- }
-
- @Override
public int countGetPatientsByName( String fullName )
{
fullName = fullName.toLowerCase();