← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8006: Person management improvements (Done)

 

------------------------------------------------------------
revno: 8006
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-09-06 09:31:30 +0700
message:
  Person management improvements (Done)
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.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/report.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/caseentry/GetDataRecordsAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.java	2012-08-21 06:18:26 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.java	2012-09-06 02:31:30 +0000
@@ -170,6 +170,13 @@
         return programStageInstanceIds;
     }
 
+    private Program program;
+
+    public Program getProgram()
+    {
+        return program;
+    }
+
     // -------------------------------------------------------------------------
     // Implementation Action
     // -------------------------------------------------------------------------
@@ -179,7 +186,7 @@
     {
         OrganisationUnit orgunit = selectedStateManager.getSelectedOrganisationUnit();
 
-        Program program = programService.getProgram( programId );
+        program = programService.getProgram( programId );
 
         // ---------------------------------------------------------------------
         // Program instances for the selected program
@@ -203,8 +210,9 @@
             total = patientService.countSearchPatients( searchTexts, orgunit );
             this.paging = createPaging( total );
             patients = patientService.searchPatients( searchTexts, orgunit, paging.getStartPos(), paging.getPageSize() );
-            
-            programStageInstanceIds = patientService.getProgramStageInstances( searchTexts, orgunit, paging.getStartPos(), paging.getPageSize() );
+
+            programStageInstanceIds = patientService.getProgramStageInstances( searchTexts, orgunit,
+                paging.getStartPos(), paging.getPageSize() );
         }
 
         Collection<ProgramStageInstance> programStageInstances = new ArrayList<ProgramStageInstance>();

=== 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-08-16 03:02:18 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm	2012-09-06 02:31:30 +0000
@@ -30,7 +30,19 @@
 			#set( $programInstance = $programInstanceMap.get( $patient ) )
 				<tr #alternate( $mark )>
 					<td>
-						<input type='button' class='patient-object' value='$patient.getFullName()' onclick='javascript:showPatientHistory( "$patient.id" );' title='$i18n.getString( "patient_details_and_history" )'>
+						<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
+								#end
+							#else
+								'$patient.getFullName()'
+							#end
+							onclick='javascript:showPatientHistory( "$patient.id" );' title='$i18n.getString( "patient_details_and_history" )'>
 					</td>
 					#if($!programStageInstanceMap.get($programInstance))
 						#set($programStageInstances = $programStageInstanceMap.get($programInstance) )

=== 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-08-13 05:15:26 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/report.vm	2012-09-06 02:31:30 +0000
@@ -8,7 +8,19 @@
 			#foreach( $programInstance in $programInstances )
                 <tr #alternate( $mark )>                
 					<td>
-						<input type='button' class='patient-object' value='$programInstance.patient.getFullName()' onclick='javascript:showPatientHistory( $programInstance.patient.id )' title='$i18n.getString( "patient_details_and_history" )'>
+						<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
+									#end
+								#end
+							#else
+								'$programInstance.patient.getFullName()' 
+							#end
+						onclick='javascript:showPatientHistory( $programInstance.patient.id )' title='$i18n.getString( "patient_details_and_history" )'>
 					</td>	
 					<td>
 						#set( $programStageInstances = $programInstance.programStageInstances )