← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8357: Small changes for Set represeatative form in management form; update underAge property when setti...

 

------------------------------------------------------------
revno: 8357
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-10-03 15:00:10 +0700
message:
  Small changes for Set represeatative form in management form; update underAge property when setting/remove a representative of person.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/RemoveRepresentativeAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SaveRepresentativeAction.java
  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/detailsPartner.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/RemoveRepresentativeAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/RemoveRepresentativeAction.java	2011-09-14 06:36:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/RemoveRepresentativeAction.java	2012-10-03 08:00:10 +0000
@@ -68,8 +68,8 @@
         throws Exception
     {
         Patient patient = patientService.getPatient( patientId );
-
         patient.setRepresentative( null );
+        patient.setUnderAge( false );
 
         patientService.updatePatient( patient );
 

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SaveRepresentativeAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SaveRepresentativeAction.java	2011-09-14 06:36:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SaveRepresentativeAction.java	2012-10-03 08:00:10 +0000
@@ -99,8 +99,8 @@
         Patient representative = patientService.getPatient( representativeId );
 
         patient = patientService.getPatient( patientId );
-
         patient.setRepresentative( representative );
+        patient.setUnderAge( true );
 
         if ( copyAttribute )
         {

=== 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-10-03 07:06:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2012-10-03 08:00:10 +0000
@@ -87,7 +87,6 @@
 please_specify_an_orgunit=Please specify an organisation unit
 please_select_to_date_greater_or_equals_to_from_date=Please select to-date later or equal to from-date
 violate_validation=Violating validation
-common_info=Common information
 dob_type=DOB type
 intro_multiple_individual_records=Enter data for multiple program stages and persons for a program. The entry screen gives an overview of the stage status.
 in=In

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/detailsPartner.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/detailsPartner.vm	2012-06-15 07:11:51 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/detailsPartner.vm	2012-10-03 08:00:10 +0000
@@ -1,32 +1,29 @@
 <table>
 	<tr>
-		<td><label class="bold">$i18n.getString( "common_info" )</label></td>
-	</tr>
-	
-	<tr>
-		<td>
-			<label class="bold">$i18n.getString( "full_name" ) : </label>
-				$partner.getFullName()
-		</td>
-	</tr>
-	
-	<tr>
-		<td>
-			<label class="bold">$i18n.getString( "gender" ) : </label>
-				$i18n.getString($partner.gender)
-		</td>
-	</tr>
-	<tr>
-		<td>
-			<label class="bold">$i18n.getString( "date_of_birth" ) : </label></span>
-				$format.formatDate( $partner.birthDate )
-		</td>
-	</tr>
-	<tr>
-		<td>
-			<label class="bold">$i18n.getString( "age" ) : </label>
-				$partner.getAge()
-		</td>
+		<td colspan='2'><label class="bold">$i18n.getString( "demographics" )</label></td>
+	</tr>
+	
+	<tr>
+		<td>$i18n.getString( "full_name" )</td>
+		<td>: $partner.getFullName()</td>
+	</tr>
+	
+	<tr>
+		<td>$i18n.getString( "gender" )</td>
+		<td>: $i18n.getString($partner.gender)</td>
+	</tr>
+	<tr>
+		<td>$i18n.getString( "date_of_birth" )</td>
+		<td>: $format.formatDate( $partner.birthDate )</td>
+	</tr>
+	<tr>
+		<td>$i18n.getString( "age" )</td>
+		<td>: $partner.getAge()</td>
+	</tr>
+	
+	<tr>
+		<td>$i18n.getString( "phone_number" )</td>
+		<td>: $!patient.phoneNumber</td>
 	</tr>
 	
 	<tr><td>&nbsp;</td></tr>
@@ -36,38 +33,38 @@
 	#foreach( $patientIdentifier in $partner.identifiers )
 	<tr>
 		<td>
-			<label class="bold">
 				#if($!patientIdentifier.identifierType)  $!patientIdentifier.identifierType.name
 				#else $i18n.getString( "patient_system_id") #end 
-			</label>
-			 : $patientIdentifier.identifier
 		</td>
+		<td>: $patientIdentifier.identifier</td>
 	</tr>
 	#end
 	
-	<tr><td>&nbsp;</td></tr>
-	<tr>
-		<td><label class="bold">$i18n.getString( "attributes" )</label></td>
-	</tr>
-	#foreach( $attribute in $partner.attributes )
-		#if( $patientAttributeValueMap.get( $attribute.id ) != " " )
+	#if($partner.attributes.size() > 0 )
+		<tr><td>&nbsp;</td></tr>
 		<tr>
-			<td><label class="bold">$attribute.name : </label>
-				$patientAttributeValueMap.get( $attribute.id )
-			</td>
+			<td><label class="bold">$i18n.getString( "attributes" )</label></td>
 		</tr>
+		#foreach( $attribute in $partner.attributes )
+			#if( $patientAttributeValueMap.get( $attribute.id ) != " " )
+			<tr>
+				<td>$attribute.name</td>
+				<td>: $patientAttributeValueMap.get( $attribute.id )</td>
+			</tr>
+			#end
 		#end
 	#end
 	
 	<tr><td>&nbsp;</td></tr>
 	<tr>
 		<td><label class="bold">$i18n.getString( "enrolled_in_program" )</label></td>
-	</tr>
-	#foreach( $program in $partner.programs )
-	<tr>
-		<td>$program.name</td>
-	</tr>
-	#end
+		<td>: 
+		#foreach( $program in $partner.programs )
+			$program.name
+		#end
+		</td>
+	</tr>
+	
 	
 	<tr><td></td></tr>
 	<tr>