← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13617: Minor fix for registration patient list.

 

------------------------------------------------------------
revno: 13617
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-01-07 22:41:48 +0700
message:
  Minor fix for registration patient list.
modified:
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.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-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java	2014-01-07 15:02:45 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java	2014-01-07 15:41:48 +0000
@@ -290,14 +290,14 @@
         executeSql( "ALTER TABLE program DROP COLUMN useBirthDateAsIncidentDate" );
         executeSql( "ALTER TABLE program DROP COLUMN useBirthDateAsEnrollmentDate" );
 
-        executeSql( "INSERT INTO program_attributes (programid, patientattributeid, displayedInList ) "
-            + "SELECT programid, pp.patientattributeid, displayedInList FROM program_patientattributes pp "
+        executeSql( "INSERT INTO program_attributes (programid, patientattributeid, displayedInList, sort_order ) "
+            + "SELECT programid, pp.patientattributeid, displayedInList, pp.sort_order FROM program_patientattributes pp "
             + "INNER JOIN patientattribute pa ON pp.patientattributeid=pa.patientattributeid" );
         executeSql( "DROP TABLE program_patientattributes" );
         executeSql( "ALTER TABLE patientattribute DROP COLUMN displayedInList" );
 
-        executeSql( "INSERT INTO program_identifierTypes (programid, patientidentifiertypeid, displayedInList ) "
-            + "SELECT programid, pp.patientidentifiertypeid, personDisplayName FROM program_patientidentifiertypes pp "
+        executeSql( "INSERT INTO program_identifierTypes (programid, patientidentifiertypeid, displayedInList, sort_order ) "
+            + "SELECT programid, pp.patientidentifiertypeid, personDisplayName, pp.sort_order FROM program_patientidentifiertypes pp "
             + "INNER JOIN patientidentifiertype pi ON pp.patientidentifiertypeid=pi.patientidentifiertypeid" );
         executeSql( "DROP TABLE program_patientidentifiertypes" );
         executeSql( "ALTER TABLE patientidentifiertype DROP COLUMN personDisplayName" );

=== 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	2014-01-07 15:02:45 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm	2014-01-07 15:41:48 +0000
@@ -99,6 +99,7 @@
 				#end
 				
 				#foreach( $programAttribute in $program.programPatientAttributes )
+					#set($value="")
 					#if($programAttribute.displayedInList=='true')
 						<td style="cursor:pointer;" onclick="javascript:isDashboard=true;showPatientDashboardForm( '$patient.uid' )">
 							#foreach( $attributeValue in $patient.attributeValues)
@@ -106,6 +107,8 @@
 									#set($value=$attributeValue.value)
 									#if( $programAttribute.patientAttribute.valueType == 'bool')
 										#set($value=$i18n.getString($attributeValue.value))
+									#elseif( $programAttribute.patientAttribute.valueType == 'users')
+										#set($value=$mapUsers.get($attributeValue.value))
 									#end
 								#end
 							#end