← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7949: Don't add comments into SMS reminder function.

 

------------------------------------------------------------
revno: 7949
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-08-21 20:51:07 +0700
message:
  Don't add comments into SMS reminder function.
modified:
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsReminderList.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsReminderSelect.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-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java	2012-08-21 06:18:26 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java	2012-08-21 13:51:07 +0000
@@ -425,7 +425,10 @@
                 default:
                     break;
                 }
+                
+                patientWhere += " and pgi.completed=false ";
                 patientOperator = " and ";
+
             }
         }
 

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml	2012-08-17 06:42:32 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml	2012-08-21 13:51:07 +0000
@@ -31,7 +31,7 @@
       <many-to-many class="org.hisp.dhis.sms.outbound.OutboundSms" column="outboundsmsid" />
     </list>
      
-    <set name="comments" order-by="createdDate desc" >
+    <set name="comments" order-by="createdDate desc" cascade="all">
       <key column="programstageinstanceid" />
       <one-to-many class="org.hisp.dhis.patient.comment.Comment" />
     </set>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2012-08-21 06:18:26 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2012-08-21 13:51:07 +0000
@@ -419,4 +419,5 @@
 due_date_from_to = Due date (from-to)
 no_phone_number = No phone number
 no_comment = No comment
-please_select_program_stage = Please select program stage
\ No newline at end of file
+please_select_program_stage = Please select program stage
+comment_added = Comment added
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm	2012-08-20 03:18:20 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm	2012-08-21 13:51:07 +0000
@@ -98,6 +98,6 @@
 	var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
 	var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
 	var searchTextBox = '<input type="text" id="searchText" name="searchText" onkeyup="searchPatientsOnKeyUp( event );">';
-	datePickerValid( 'startDueDate', true );
-	datePickerValid( 'endDueDate', true );
+	datePicker( 'startDueDate', true );
+	datePicker( 'endDueDate', true );
 </script>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsReminderList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsReminderList.vm	2012-08-20 08:50:44 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsReminderList.vm	2012-08-21 13:51:07 +0000
@@ -10,27 +10,19 @@
 <h4>$i18n.getString( "sms_message_management" )</h4>
 <input type='hidden' id='currentUsername' name='currentUsername' value='$currentUsername'>
 <table class="mainPageTable">
-	<tr>
-		<td>
-			<table> 
-				<tr>            
-					<td class="bold">$i18n.getString( "full_name" ):</td>
-					<td>$encoder.htmlEncode( $programStageInstance.programInstance.patient.getFullName() )<td>
-				</tr>
-				<tr>
-					<td class="bold">$i18n.getString( "gender" ):</td>
-					<td>$programStageInstance.programInstance.patient.gender</td>
-				</tr>
-				<tr>
-					<td class="bold">$i18n.getString( "date_of_birth" ):</td>
-					<td>$format.formatDate( $programStageInstance.programInstance.patient.birthDate ) $programStageInstance.programInstance.patient.getAge()<td>
-				</tr>
-			</table>
-		</td>
-		<td valign='top' style="width:90px;" class="bold">$i18n.getString('comments'):</td>
-		<td valign='bottom' style="width:360px;">
-			<div class="contentProviderTable">
-				<table id='commentTB' width='100%'>
+	<tr>            
+		<td class="bold">$i18n.getString( "full_name" ):</td>
+		<td>$encoder.htmlEncode( $programStageInstance.programInstance.patient.getFullName() )( $programStageInstance.programInstance.patient.gender )<td>
+	</tr>
+	<tr>
+		<td class="bold">$i18n.getString( "date_of_birth" ):</td>
+		<td>$format.formatDate( $programStageInstance.programInstance.patient.birthDate ) $programStageInstance.programInstance.patient.getAge()<td>
+	</tr>
+	<tr>
+		<td class="bold" valign='top'>$i18n.getString('comments'):</td>
+		<td colspan='2'>
+			<div class="comment-table" style='max-height:150px;'>
+				<table id='commentTB'>
 					#if( $comments.size() > 0 )
 						#foreach( $comment in $comments )
 							<tr id="comment_$comment.id">
@@ -38,16 +30,15 @@
 							</tr>
 						#end
 					#else
-						<tr><td>($i18n.getString("no_comment"))</td></tr>
+						<tr><td>$i18n.getString("no_comment")</td></tr>
 					#end
 				</table>
 			</div>
 		</td>
 	</tr>
 	<tr>
-		<td></td>
-		<td align='right' class="bold">$i18n.getString('post_comment'):</td>
-		<td align='right'>
+		<td class="bold">$i18n.getString('post_comment'):</td>
+		<td>
 			<input type='textbox' id='commentText' name='commentText' style="width:320px;" onkeypress="keypress(event,'$programStageInstance.id')">
 			<input type='button' value="+" class='tiny-button' onclick="addComment('$programStageInstance.id')">
 		</td>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsReminderSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsReminderSelect.vm	2012-08-18 13:17:10 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsReminderSelect.vm	2012-08-21 13:51:07 +0000
@@ -51,4 +51,5 @@
 	var i18n_color_quick_help = '$encoder.jsEscape( $i18n.getString( "color_quick_help" ) , "'")';
 	var i18n_patient_details_and_history = '$encoder.jsEscape( $i18n.getString( "patient_details_and_history" ) , "'")';
 	var i18n_please_select_program_stage = '[' + '$encoder.jsEscape( $i18n.getString( "please_select_program_stage" ) , "'")' + ']';
+	var i18n_comment_added = '$encoder.jsEscape( $i18n.getString( "comment_added" ) , "'")';
 </script>

=== 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-08-20 08:50:44 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css	2012-08-21 13:51:07 +0000
@@ -344,6 +344,20 @@
 	z-index:1001;
 }
 
+.comment-table
+{
+  width:320px;
+  overflow-y: auto;
+  overflow-x:hidden;
+}
+
+.comment-table td
+{
+  padding-top:3px;
+  padding-bottom:3px;
+  border-bottom:1px solid #cad5e5;
+}
+
 /* --------------------------------------------------------------
 // program-stage-instances
 // -------------------------------------------------------------- */