← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7902: Add search patients in other orgunit ( multi entry form ).

 

------------------------------------------------------------
revno: 7902
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-08-13 14:40:34 +0700
message:
  Add search patients in other orgunit ( multi entry form ).
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.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-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.java	2012-08-07 05:43:56 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.java	2012-08-13 07:40:34 +0000
@@ -106,7 +106,14 @@
     {
         this.listAll = listAll;
     }
-
+    
+    private Boolean searchBySelectedOrgunit;
+    
+    public void setSearchBySelectedOrgunit( Boolean searchBySelectedOrgunit )
+    {
+        this.searchBySelectedOrgunit = searchBySelectedOrgunit;
+    }
+    
     private List<String> searchTexts = new ArrayList<String>();
 
     public void setSearchTexts( List<String> searchTexts )
@@ -149,7 +156,7 @@
         return programInstanceMap;
     }
 
-    Collection<Patient> patients;
+    private Collection<Patient> patients;
 
     public Collection<Patient> getPatients()
     {
@@ -184,6 +191,8 @@
         // search patients
         else if ( searchTexts.size() > 0 )
         {
+            orgunit = (searchBySelectedOrgunit) ? orgunit : null;
+            
             total = patientService.countSearchPatients( searchTexts, orgunit );
             this.paging = createPaging( total );
             patients = patientService.searchPatients( searchTexts, orgunit, paging.getStartPos(),

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm	2012-08-07 05:43:56 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm	2012-08-13 07:40:34 +0000
@@ -11,7 +11,6 @@
 		jQuery("#searchObjectId [value=prg]").remove();
 		hideById('addPatientBtn');
 		disable('advancedSearchBtn');
-		hideById('searchBySelectedUnitTD');
 	});	
 </script>