← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10528: Remove the timestamp of date params into reminder messages sent.

 

------------------------------------------------------------
revno: 10528
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-04-12 15:56:05 +0700
message:
  Remove the timestamp of date params into reminder messages sent.
modified:
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramInstanceStore.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.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/program/hibernate/HibernateProgramInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramInstanceStore.java	2013-04-11 06:26:56 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramInstanceStore.java	2013-04-12 08:56:05 +0000
@@ -244,9 +244,9 @@
                 String patientName = rs.getString( "firstName" );
                 String organisationunitName = rs.getString( "orgunitName" );
                 String programName = rs.getString( "programName" );
-                String incidentDate = rs.getString( "dateofincident" );
+                String incidentDate = rs.getString( "dateofincident" ).split( " " )[0];// just get date, remove timestamp
                 String daysSinceIncidentDate = rs.getString( "days_since_incident_date" );
-                String erollmentDate = rs.getString( "enrollmentdate" );
+                String erollmentDate = rs.getString( "enrollmentdate" ).split( " " )[0];// just get date, remove timestamp
                 String daysSinceEnrollementDate = rs.getString( "days_since_erollment_date" );
 
                 message = message.replace( PatientReminder.TEMPLATE_MESSSAGE_PATIENT_NAME, patientName );

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2013-04-11 06:26:56 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2013-04-12 08:56:05 +0000
@@ -422,7 +422,7 @@
                 String programName = rs.getString( "programName" );
                 String programStageName = rs.getString( "programStageName" );
                 String daysSinceDueDate = rs.getString( "days_since_due_date" );
-                String dueDate = rs.getString( "duedate" );
+                String dueDate = rs.getString( "duedate" ).split( " " )[0];// just get date, remove timestamp
 
                 message = message.replace( PatientReminder.TEMPLATE_MESSSAGE_PATIENT_NAME, patientName );
                 message = message.replace( PatientReminder.TEMPLATE_MESSSAGE_PROGRAM_NAME, programName );