← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9955: Improve visit schedule UI (DONE).

 

------------------------------------------------------------
revno: 9955
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-03-04 17:00:47 +0700
message:
  Improve visit schedule UI (DONE).
modified:
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanRecords.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js


--
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/DefaultProgramStageInstanceService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java	2013-03-04 09:38:55 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java	2013-03-04 10:00:47 +0000
@@ -375,6 +375,10 @@
 
         // Header
         grid.addHeader( new GridHeader( i18n.getString( "full_name" ), false, false ) );
+        grid.addHeader( new GridHeader( i18n.getString( "gender" ), false, false ) );
+        grid.addHeader( new GridHeader( i18n.getString( "date_of_birth" ), false, false ) );
+        grid.addHeader( new GridHeader( i18n.getString( "age" ), false, false ) );
+        grid.addHeader( new GridHeader( i18n.getString( "phone_number" ), false, false ) );
         grid.addHeader( new GridHeader( i18n.getString( "date_scheduled" ), false, false ) );
 
         String programStage = "";
@@ -386,10 +390,19 @@
                 grid.addRow();
                 grid.addValue( eventName );
                 grid.addValue( "" );
+                grid.addValue( "" );
+                grid.addValue( "" );
+                grid.addValue( "" );
+                grid.addValue( "" );
                 programStage = eventName;
             }
             grid.addRow();
-            grid.addValue( stageInstance.getProgramInstance().getPatient().getFullName() );
+            Patient patient = stageInstance.getProgramInstance().getPatient();
+            grid.addValue( patient.getFullName() );
+            grid.addValue( patient.getGender() );
+            grid.addValue( DateUtils.getMediumDateString( patient.getBirthDate() ) );
+            grid.addValue( patient.getAge() );
+            grid.addValue( patient.getPhoneNumber() );
             grid.addValue( DateUtils.getMediumDateString( stageInstance.getDueDate() ) );
         }
 

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanRecords.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanRecords.vm	2013-03-04 09:38:55 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanRecords.vm	2013-03-04 10:00:47 +0000
@@ -17,11 +17,16 @@
 		#set( $programStage = '' )
 		#foreach( $programStageInstance in $programStageInstances )
 			#set( $eventName = $programStageInstance.programStage.displayName )
+			#set( $patient = $programStageInstance.programInstance.patient)
 			#if( $eventName != $programStage)
 				<tr><td colspan='3' class='bold'>$i18n.getString('for') $eventName</td></tr>
 				<tr>
 					<th>#</th>
 					<th>$i18n.getString('full_name')</th>
+					<th>$i18n.getString( "gender" )</th>
+					<th>$i18n.getString( "date_of_birth" )</th> 
+					<th>$i18n.getString( "age" )</th>
+					<th>$i18n.getString( "phone_number" )</th>
 					<th>$i18n.getString('date_scheduled')</th>
 				#set( $mark = false ) 
 				#set( $nr = 0 ) 
@@ -32,7 +37,15 @@
 					#set( $nr = $nr + 1 )
 					$nr
 				</td>
-				<td>$programStageInstance.programInstance.patient.getFullName()</td>
+				<td>$patient.getFullName()</td>
+				<td>$i18n.getString($!patient.gender)</td>
+				
+				<td>$format.formatDate( $!patient.birthDate)</td>
+				
+				<td>$!patient.getAge()</td>
+				
+				<td>$!patient.phoneNumber</td>
+				
 				<td><a href="javascript:loadDataEntry( $programStageInstance.id );">
 					#if($!programStageInstance.executionDate)
 						$format.formatDate($!programStageInstance.executionDate)

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js	2013-03-04 09:38:55 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js	2013-03-04 10:00:47 +0000
@@ -77,10 +77,12 @@
 	var params  = "programId=" + getFieldValue('programIdAddPatient');
 	params += "&startDate=" + getFieldValue('startDueDate');
 	params += "&endDue=" + getFieldValue('endDueDate');
+	params += "&type=xls";
+	var statusEvent = getFieldValue('statusEvent').split('_');
 	for( var i in statusEvent){
 		params += "&statusList=" + statusEvent[i];
 	}
-	var url = "exportActitityList.action?" + params;
+	var url = "getActivityPlanRecords.action?" + params;
 	window.location.href = url;
 }