dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19836
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8817: Sort patient-audit history by date in Dash board.
------------------------------------------------------------
revno: 8817
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-11-01 15:48:53 +0700
message:
Sort patient-audit history by date in Dash board.
modified:
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientAuditStore.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-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-18 07:29:10 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientAuditStore.java 2012-11-01 08:48:53 +0000
@@ -30,6 +30,7 @@
import java.util.Collection;
import java.util.Date;
+import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import org.hisp.dhis.hibernate.HibernateGenericStore;
import org.hisp.dhis.patient.Patient;
@@ -49,7 +50,7 @@
@Override
public Collection<PatientAudit> get( Patient patient )
{
- return getCriteria( Restrictions.eq( "patient", patient ) ).list();
+ return getCriteria( Restrictions.eq( "patient", patient ) ).addOrder( Order.desc( "date" ) ).list();
}
@Override