← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8035: Show PersonDisplayName in multi individual record, single event with/without registration, tracki...

 

------------------------------------------------------------
revno: 8035
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-09-11 16:46:38 +0700
message:
  Show PersonDisplayName in multi individual record, single event with/without registration, tracking program function.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SearchPatientAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/form.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/report.vm
  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/singleEventSelect.vm


--
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-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SearchPatientAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SearchPatientAction.java	2012-09-05 14:30:23 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SearchPatientAction.java	2012-09-11 09:46:38 +0000
@@ -160,7 +160,6 @@
 
             patients = new ArrayList<Patient>( patientService.getPatients( organisationUnit, paging.getStartPos(),
                 paging.getPageSize() ) );
-
         }
         // search patients
         else if ( searchTexts.size() > 0 )

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm	2012-09-06 02:31:30 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm	2012-09-11 09:46:38 +0000
@@ -30,18 +30,18 @@
 			#set( $programInstance = $programInstanceMap.get( $patient ) )
 				<tr #alternate( $mark )>
 					<td>
-						<input type='button' class='patient-object' value=
-							#if($program.patientIdentifierTypes)
-								#foreach( $identifierType in $program.patientIdentifierTypes )
-									#foreach( $pIdentifier in $patient.identifiers )
-										#if($identifierType.id==$pIdentifier.identifierType.id)
-											'$pIdentifier.identifier&#13;&#10;'
-										#end
-									#end
+						#set( $value="")
+						#foreach( $identifierType in $program.patientIdentifierTypes )
+							#foreach( $pIdentifier in $patient.identifiers )
+								#if($identifierType.id==$pIdentifier.identifierType.id)
+									#set($value=$value + "&#13;&#10;" + $pIdentifier.identifier)
 								#end
-							#else
-								'$patient.getFullName()'
 							#end
+						#end
+						#if($value=="")
+							#set($value=$patient.getFullName())
+						#end
+						<input type='button' class='patient-object' value="$value"
 							onclick='javascript:showPatientHistory( "$patient.id" );' title='$i18n.getString( "patient_details_and_history" )'>
 					</td>
 					#if($!programStageInstanceMap.get($programInstance))

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/form.js	2012-08-16 16:31:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/form.js	2012-09-11 09:46:38 +0000
@@ -86,7 +86,12 @@
 function listAllPatient()
 {
 	showLoader();
-	jQuery('#contentDiv').load( 'listAllPatients.action',{},
+	jQuery('#contentDiv').load( 'listAllPatients.action',{
+			listAll:false,
+			programIds:	getFieldValue("programIdAddPatient"),
+			searchTexts: "prg_" + getFieldValue("programIdAddPatient"),
+			searchBySelectedOrgunit:true
+		},
 		function()
 		{
 			hideById('dataRecordingSelectDiv');

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2012-09-07 07:57:47 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2012-09-11 09:46:38 +0000
@@ -656,8 +656,7 @@
 	jQuery('#loaderDiv').show();
 	contentDiv = 'listPatientDiv';
 	jQuery('#listPatientDiv').load('searchRegistrationPatient.action',{
-			listAll:true,
-			sortPatientAttributeId: getFieldValue('sortPatientAttributeId')
+			listAll:true
 		},
 		function(){
 			statusSearching = 0;

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm	2012-08-16 16:31:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm	2012-09-11 09:46:38 +0000
@@ -26,7 +26,12 @@
     <td>    
       <table class="listTable">                   
           <col width="40"/>
-          <col/>
+          #foreach( $identifierType in $identifierTypes)
+			<col/>
+		  #end
+		  #if( $identifierTypes.size()==0 )
+			<col/>       
+		  #end
           <col width="60"/>
           <col width="90"/>
           <col width="60"/>
@@ -36,7 +41,14 @@
 		  <col width="80"/>
           <tr>
 			<th>#</th>
-            <th>$i18n.getString( "full_name" )</th>        
+            #foreach( $identifierType in $identifierTypes)
+				<th>
+					$identifierType.name
+				</th>
+			#end
+			#if( $identifierTypes.size()==0 )
+				<th>$i18n.getString( "full_name" )</th>          
+			#end       
             <th>$i18n.getString( "gender" )</th>
             <th>$i18n.getString( "date_of_birth" )</th>
             <th>$i18n.getString( "age" )</th>   
@@ -55,9 +67,21 @@
 					#set( $nr = ( ( $paging.getCurrentPage() - 1  ) * $paging.pageSize ) + $velocityCount )
 					$nr
                 </td>
-				<td>			
-					$encoder.htmlEncode( $patient.getFullName() )
-				</td>			
+				#set($value="")
+				#foreach( $identifierType in $identifierTypes)
+					#foreach( $identifier in $patient.identifiers)
+						#if($identifier.identifierType.id==$identifierType.id)
+							#set($value=$identifier.identifier)
+						#end
+					#end
+				#end
+				#if($value=="")
+					#set($value=$patient.getFullName())
+				#end
+				<td onclick="javascript:showPatientDashboardForm( '$patient.id' )">
+					$value
+				</td>
+					
 				<td>			
 					$i18n.getString( $patient.gender )
 				</td>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm	2012-09-05 14:30:23 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm	2012-09-11 09:46:38 +0000
@@ -96,20 +96,20 @@
 					#end
 				#end
 					
+				#set($value="")
 				#foreach( $identifierType in $identifierTypes)
 					#foreach( $identifier in $patient.identifiers)
 						#if($identifier.identifierType.id==$identifierType.id)
-							<td onclick="javascript:showPatientDashboardForm( '$patient.id' )">
-								$identifier.identifier
-							</td>
+							#set($value=$identifier.identifier)
 						#end
 					#end
 				#end
-				#if( $identifierTypes.size()==0 )
-					<td onclick="javascript:showPatientDashboardForm( '$patient.id' )">
-						$!patient.getFullName()
-					</td>
+				#if($value=="")
+					#set($value=$patient.getFullName())
 				#end
+				<td onclick="javascript:showPatientDashboardForm( '$patient.id' )">
+					$value
+				</td>
 				
 				
 				<td>$i18n.getString($!patient.gender)</td>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.vm	2012-09-07 07:57:47 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.vm	2012-09-11 09:46:38 +0000
@@ -31,7 +31,18 @@
 			#set( $programInstance = $programInstanceMap.get( $patient ) )
 				<tr #alternate( $mark )>
 					<td>
-						<input type='button' class='patient-object' value='$patient.getFullName()' onclick='javascript:showPatientProgramTracking( "$programInstance.id" );' title='$i18n.getString( "patient_dashboard" )'>
+						#set( $value="")
+						#foreach( $identifierType in $programInstance.program.patientIdentifierTypes )
+							#foreach( $pIdentifier in $patient.identifiers )
+								#if($identifierType.id==$pIdentifier.identifierType.id)
+									#set($value=$value + "&#13;&#10;" + $pIdentifier.identifier)
+								#end
+							#end
+						#end
+						#if($value=="")
+							#set($value=$patient.getFullName())
+						#end
+						<input type='button' class='patient-object' value='$value' onclick='javascript:showPatientProgramTracking( "$programInstance.id" );' title='$i18n.getString( "patient_dashboard" )'>
 					</td>
 					<td class='bold' style='cursor:pointer;font-size:25px' onclick="eventFlowToggle($programInstance.id)">
 						<a>&raquo;</a>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/report.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/report.vm	2012-09-06 03:50:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/report.vm	2012-09-11 09:46:38 +0000
@@ -23,19 +23,22 @@
 			#foreach( $programInstance in $programInstances )
                 <tr #alternate( $mark )>                
 					<td>
-						<input type='button' class='patient-object' value=
-							#if($program.patientIdentifierTypes)
-								#foreach( $identifierType in $program.patientIdentifierTypes )
-									#foreach( $pIdentifier in $programInstance.patient.identifiers )
-										#if($identifierType.id==$pIdentifier.identifierType.id)
-											'$pIdentifier.identifier&#13;&#10;'
-										#end
+						#set( $value="")
+						#if($program.patientIdentifierTypes)
+							#foreach( $identifierType in $program.patientIdentifierTypes )
+								#foreach( $pIdentifier in $programInstance.patient.identifiers )
+									#if($identifierType.id==$pIdentifier.identifierType.id)
+										#set( $value= $value + '&#13;&#10;' + $pIdentifier.identifier )
 									#end
 								#end
-							#else
-								'$programInstance.patient.getFullName()' 
 							#end
-						onclick='javascript:showPatientHistory( $programInstance.patient.id )' title='$i18n.getString( "patient_details_and_history" )'>
+						#end
+						#if($value=="")
+							#set( $value=$programInstance.patient.getFullName())
+						#end
+							
+						<input type='button' class='patient-object' value="$value"
+							onclick='javascript:showPatientHistory( $programInstance.patient.id )' title='$i18n.getString( "patient_details_and_history" )'>
 					</td>	
 					<td>
 						#set( $programStageInstances = $programInstance.programStageInstances )

=== 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-09-07 08:08:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm	2012-09-11 09:46:38 +0000
@@ -1,6 +1,7 @@
 <input type='hidden' id='searchByProgramStage' name='searchByProgramStage' value="false">
 <input type='hidden' id='orgunitId' name='orgunitId' value='$organisationUnit.id' >
 <input type="hidden" id='hideLink' name='hideLink' value='false'>
+<input type='hidden' id='isSearchByProgram' name='isSearchByProgram' value='false' >
 
 <table style="margin-bottom:8px">    
 	<tr>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm	2012-08-17 13:51:24 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm	2012-09-11 09:46:38 +0000
@@ -8,6 +8,7 @@
 			}
 		});
 		disable('advancedSearchBtn');
+		setFieldValue('isSearchByProgram', true);
 		$("#searchObjectId option[value='prg']").remove();
 	});
 </script>