← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8571: Donnot save access-history in dashboard.

 

------------------------------------------------------------
revno: 8571
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-10-18 14:29:10 +0700
message:
  Donnot save access-history in dashboard.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAuditService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAuditStore.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientAuditService.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientAuditStore.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/PatientDashboardAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css


--
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/PatientAuditService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAuditService.java	2012-10-03 06:04:22 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAuditService.java	2012-10-18 07:29:10 +0000
@@ -49,6 +49,6 @@
 
     Collection<PatientAudit> getPatientAudits( Patient patient );
 
-    PatientAudit getPatientAudit( String visitor, Date date );
+    PatientAudit getPatientAudit( Patient patient, String visitor, Date date );
 
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAuditStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAuditStore.java	2012-10-03 06:04:22 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAuditStore.java	2012-10-18 07:29:10 +0000
@@ -41,5 +41,5 @@
 {
     Collection<PatientAudit> get( Patient patient );
 
-    PatientAudit get( String visitor, Date date );
+    PatientAudit get( Patient patient, String visitor, Date date );
 }

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientAuditService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientAuditService.java	2012-10-03 06:04:22 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientAuditService.java	2012-10-18 07:29:10 +0000
@@ -79,9 +79,9 @@
     }
 
     @Override
-    public PatientAudit getPatientAudit( String visitor, Date date )
+    public PatientAudit getPatientAudit( Patient patient, String visitor, Date date )
     {
-        return patientAuditStore.get( visitor, date );
+        return patientAuditStore.get( patient, visitor, date );
     }
 
 }

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientAuditStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientAuditStore.java	2012-10-03 06:04:22 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientAuditStore.java	2012-10-18 07:29:10 +0000
@@ -53,9 +53,9 @@
     }
 
     @Override
-    public PatientAudit get( String visitor, Date date )
+    public PatientAudit get( Patient patient, String visitor, Date date )
     {
-        return (PatientAudit) getCriteria( Restrictions.eq( "visitor", visitor ), Restrictions.eq( "date", date ) )
-            .uniqueResult();
+        return (PatientAudit) getCriteria( Restrictions.eq( "patient", patient ),
+            Restrictions.eq( "visitor", visitor ), Restrictions.eq( "date", date ) ).uniqueResult();
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/PatientDashboardAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/PatientDashboardAction.java	2012-10-09 03:53:11 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/PatientDashboardAction.java	2012-10-18 07:29:10 +0000
@@ -239,13 +239,13 @@
         // ---------------------------------------------------------------------
 
         patientAudits = patientAuditService.getPatientAudits( patient );
-
+        
         long millisInDay = 60 * 60 * 24 * 1000;
         long currentTime = new Date().getTime();
         long dateOnly = (currentTime / millisInDay) * millisInDay;
         Date date = new Date( dateOnly );
         String visitor = currentUserService.getCurrentUsername();
-        PatientAudit patientAudit = patientAuditService.getPatientAudit( visitor, date );
+        PatientAudit patientAudit = patientAuditService.getPatientAudit( patient, visitor, date );
         if ( patientAudit == null )
         {
             patientAudit = new PatientAudit( patient, date, visitor );

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm	2012-10-18 03:43:05 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm	2012-10-18 07:29:10 +0000
@@ -199,6 +199,7 @@
 			</table>
 		</div>
 	</div>
+
 </div>
 <br>
 <div id='programEnrollmentDiv' class='hidden'></div>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css	2012-10-18 03:43:05 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css	2012-10-18 07:29:10 +0000
@@ -444,7 +444,7 @@
 div.dashboard-history
 {
 	z-index:100; 
-	width:400px; 
+	width:300px; 
 	height:200px; 
 	position:absolute; 
 	left:650px;