dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25469
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12646: PatientStore. Made search method accept identifier types in order to make it more reusable.
------------------------------------------------------------
revno: 12646
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-10-14 18:17:44 +0200
message:
PatientStore. Made search method accept identifier types in order to make it more reusable.
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-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-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SearchPatientAction.java
dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/outcoming/SearchPatientAction.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 11:13:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientService.java 2013-10-14 16:17:44 +0000
@@ -215,7 +215,8 @@
Object getObjectValue( String property, String value, I18nFormat format );
Collection<Patient> searchPatients( List<String> searchKeys, Collection<OrganisationUnit> orgunit,
- Boolean followup, Collection<PatientAttribute> patientAttributes, Integer statusEnrollment, Integer min, Integer max );
+ Boolean followup, Collection<PatientAttribute> patientAttributes, Collection<PatientIdentifierType> identifierTypes,
+ Integer statusEnrollment, Integer min, Integer max );
int countSearchPatients( List<String> searchKeys, Collection<OrganisationUnit> orgunit, Boolean followup, Integer statusEnrollment );
=== 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 15:58:06 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientStore.java 2013-10-14 16:17:44 +0000
@@ -77,7 +77,7 @@
Collection<Integer> getRegistrationOrgunitIds( Date startDate, Date endDate );
Collection<Patient> search( List<String> searchKeys, Collection<OrganisationUnit> orgunit, Boolean followup,
- Collection<PatientAttribute> patientAttributes, Integer statusEnrollment, Integer min, Integer max );
+ Collection<PatientAttribute> patientAttributes, Collection<PatientIdentifierType> identifierTypes, Integer statusEnrollment, Integer min, Integer max );
Grid getPatientEventReport( Grid grid, List<String> searchKeys, Collection<OrganisationUnit> orgunit, Boolean followup,
Collection<PatientAttribute> patientAttributes, Collection<PatientIdentifierType> identifierTypes, Integer statusEnrollment, Integer min,
=== 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 15:58:06 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientService.java 2013-10-14 16:17:44 +0000
@@ -529,10 +529,10 @@
}
public Collection<Patient> searchPatients( List<String> searchKeys, Collection<OrganisationUnit> orgunits,
- Boolean followup, Collection<PatientAttribute> patientAttributes, Integer statusEnrollment, Integer min,
- Integer max )
+ Boolean followup, Collection<PatientAttribute> patientAttributes, Collection<PatientIdentifierType> identifierTypes,
+ Integer statusEnrollment, Integer min, Integer max )
{
- return patientStore.search( searchKeys, orgunits, followup, patientAttributes, statusEnrollment, min, max );
+ return patientStore.search( searchKeys, orgunits, followup, patientAttributes, identifierTypes, statusEnrollment, min, max );
}
public int countSearchPatients( List<String> searchKeys, Collection<OrganisationUnit> orgunits, Boolean followup,
@@ -544,7 +544,7 @@
public Collection<String> getPatientPhoneNumbers( List<String> searchKeys, Collection<OrganisationUnit> orgunits,
Boolean followup, Integer statusEnrollment, Integer min, Integer max )
{
- Collection<Patient> patients = patientStore.search( searchKeys, orgunits, followup, null, statusEnrollment, min, max );
+ Collection<Patient> patients = patientStore.search( searchKeys, orgunits, followup, null, null, statusEnrollment, min, max );
Set<String> phoneNumbers = new HashSet<String>();
=== 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 15:58:06 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java 2013-10-14 16:17:44 +0000
@@ -256,9 +256,10 @@
@Override
//TODO this method must be changed - cannot retrieve one by one
public Collection<Patient> search( List<String> searchKeys, Collection<OrganisationUnit> orgunits,
- Boolean followup, Collection<PatientAttribute> patientAttributes, Integer statusEnrollment, Integer min, Integer max )
+ Boolean followup, Collection<PatientAttribute> patientAttributes, Collection<PatientIdentifierType> identifierTypes,
+ Integer statusEnrollment, Integer min, Integer max )
{
- String sql = searchPatientSql( false, searchKeys, orgunits, followup, patientAttributes, null,
+ String sql = searchPatientSql( false, searchKeys, orgunits, followup, patientAttributes, identifierTypes,
statusEnrollment, min, max );
Collection<Patient> patients = new HashSet<Patient>();
try
@@ -281,8 +282,8 @@
@Override
public List<Integer> getProgramStageInstances( List<String> searchKeys, Collection<OrganisationUnit> orgunits,
- Boolean followup, Collection<PatientAttribute> patientAttributes,
- Collection<PatientIdentifierType> identifierTypes, Integer statusEnrollment, Integer min, Integer max )
+ Boolean followup, Collection<PatientAttribute> patientAttributes, Collection<PatientIdentifierType> identifierTypes,
+ Integer statusEnrollment, Integer min, Integer max )
{
String sql = searchPatientSql( false, searchKeys, orgunits, followup, patientAttributes, identifierTypes,
statusEnrollment, min, max );
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SearchPatientAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SearchPatientAction.java 2013-10-11 06:50:09 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SearchPatientAction.java 2013-10-14 16:17:44 +0000
@@ -227,7 +227,7 @@
total = patientService.countSearchPatients( searchTexts, orgunits, null, statusEnrollment );
this.paging = createPaging( total );
- patients = patientService.searchPatients( searchTexts, orgunits, null, null, statusEnrollment,
+ patients = patientService.searchPatients( searchTexts, orgunits, null, null, null, statusEnrollment,
paging.getStartPos(), paging.getPageSize() );
if ( facilityLB != null && !facilityLB.isEmpty())
=== modified file 'dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/outcoming/SearchPatientAction.java'
--- dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/outcoming/SearchPatientAction.java 2013-10-08 17:16:47 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/outcoming/SearchPatientAction.java 2013-10-14 16:17:44 +0000
@@ -157,7 +157,7 @@
total = patientService.countSearchPatients( searchTexts, orgunits, null, ProgramInstance.STATUS_ACTIVE );
this.paging = createPaging( total );
- patients = patientService.searchPatients( searchTexts, orgunits, null, null, ProgramInstance.STATUS_ACTIVE, paging.getStartPos(), paging
+ patients = patientService.searchPatients( searchTexts, orgunits, null, null, null, ProgramInstance.STATUS_ACTIVE, paging.getStartPos(), paging
.getPageSize() );
if ( !searchBySelectedOrgunit )