← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1595: Fixed some minor bugs for patient module.

 

------------------------------------------------------------
revno: 1595
committer: Viet <Viet@Viet-Nguyen>
branch nick: trunk
timestamp: Tue 2010-03-09 17:40:10 +0530
message:
  Fixed some minor bugs for patient module.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientService.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientIdentifierService.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/HibernatePatientIdentifierStore.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SearchPatientAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/jquery/thickbox/thickbox.css
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatient.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/paging.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/PatientIdentifierService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierService.java	2010-03-09 07:55:42 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierService.java	2010-03-09 12:10:10 +0000
@@ -74,4 +74,6 @@
     PatientIdentifier get( PatientIdentifierType type, String identifier );
     
     Patient getPatient( PatientIdentifierType idenType, String value);
+    
+    Collection<Patient> listPatientByOrganisationUnit( OrganisationUnit organisationUnit );
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierStore.java	2010-03-09 07:55:42 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierStore.java	2010-03-09 12:10:10 +0000
@@ -64,4 +64,6 @@
     Patient getPatient( PatientIdentifierType idenType, String value);
     
     int countListPatientByOrganisationUnit( OrganisationUnit orgUnit );
+    
+    Collection<Patient> listPatientByOrganisationUnit( OrganisationUnit organisationUnit );
 }

=== 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	2010-03-09 07:55:42 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientService.java	2010-03-09 12:10:10 +0000
@@ -80,4 +80,6 @@
      * @return
      */
     Collection<Patient> searchPatient( Integer identifierTypeId, Integer attributeId, String value );
+    
+    Collection<Patient> getPatientsByOrgUnit( OrganisationUnit organisationUnit );
 }

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientIdentifierService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientIdentifierService.java	2010-03-09 07:55:42 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientIdentifierService.java	2010-03-09 12:10:10 +0000
@@ -196,4 +196,9 @@
         return patientIdentifierStore.countListPatientByOrganisationUnit( orgUnit );
     }
 
+    public Collection<Patient> listPatientByOrganisationUnit( OrganisationUnit organisationUnit )
+    {
+        return patientIdentifierStore.listPatientByOrganisationUnit( organisationUnit );
+    }
+
 }

=== 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	2010-03-09 07:55:42 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientService.java	2010-03-09 12:10:10 +0000
@@ -264,4 +264,9 @@
     {
         return patientIdentifierService.countListPatientByOrganisationUnit( organisationUnit );
     }
+
+    public Collection<Patient> getPatientsByOrgUnit( OrganisationUnit organisationUnit )
+    {
+        return patientIdentifierService.listPatientByOrganisationUnit( organisationUnit );
+    }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientIdentifierStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientIdentifierStore.java	2010-03-09 07:55:42 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientIdentifierStore.java	2010-03-09 12:10:10 +0000
@@ -120,4 +120,11 @@
         .setProjection( Projections.countDistinct(  "patient" ) ).uniqueResult();
     }
 
+    @SuppressWarnings( "unchecked" )
+    public Collection<Patient> listPatientByOrganisationUnit( OrganisationUnit organisationUnit )
+    {
+        return (Collection<Patient>) getCriteria( Restrictions.eq( "organisationUnit", organisationUnit ) )
+        .setProjection( Projections.distinct( Projections.property( "patient" ) ) ).list();
+    }
+
 }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SearchPatientAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SearchPatientAction.java	2010-03-09 10:01:45 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SearchPatientAction.java	2010-03-09 12:10:10 +0000
@@ -166,8 +166,7 @@
             selectedStateManager.clearSearchingAttributeId();
             selectedStateManager.clearSearchTest();
 
-            //TODO fix!
-            //patients = patientService.getPatientsByOrgUnit( organisationUnit );
+            patients = patientService.getPatientsByOrgUnit( organisationUnit );
 
             searchText = "list_all_patients";
 
@@ -210,8 +209,7 @@
         
         if ( listAll )
         {
-            //TODO fix!
-            //patients = patientService.getPatientsByOrgUnit( organisationUnit );
+            patients = patientService.getPatientsByOrgUnit( organisationUnit );
 
             searchText = "list_all_patients";
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/jquery/thickbox/thickbox.css'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/jquery/thickbox/thickbox.css	2010-02-28 03:32:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/jquery/thickbox/thickbox.css	2010-03-09 12:10:10 +0000
@@ -1,7 +1,8 @@
 /* ----------------------------------------------------------------------------------------------------------------*/
 /* ---------->>> global settings needed for thickbox <<<-----------------------------------------------------------*/
 /* ----------------------------------------------------------------------------------------------------------------*/
-*{padding: 0; margin: 0;}
+*
+#TB_window , #TB_overlay{padding: 0; margin: 0;}
 
 /* ----------------------------------------------------------------------------------------------------------------*/
 /* ---------->>> thickbox specific link and font settings <<<------------------------------------------------------*/

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatient.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatient.vm	2010-03-09 07:55:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatient.vm	2010-03-09 12:10:10 +0000
@@ -140,9 +140,7 @@
   <tr>
   	<td colspan="6">
   		<div class="paging-container">
-			<div class="paging-center">
-				#parse( "/dhis-web-maintenance-patient/paging.vm" )
-			</div>
+			#parse( "/dhis-web-maintenance-patient/paging.vm" )
 		</div>
 	</td>
   	<td></td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/paging.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/paging.vm	2010-03-09 07:55:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/paging.vm	2010-03-09 12:10:10 +0000
@@ -1,4 +1,3 @@
-	#set( $paging_html = "1")
 	
 	#set ( $baseLink 		= $pagingUtil.baseLink )
 	#set ( $pageSize 		= $pagingUtil.pageSize )