← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6610: (patient) Added phone number property for Patient object.

 

------------------------------------------------------------
revno: 6610
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-04-17 11:39:03 +0700
message:
  (patient) Added phone number property for Patient object.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/Patient.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientService.java
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/Patient.hbm.xml
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddPatientAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddRelationshipPatientAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/UpdatePatientAction.java
  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/underage.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/patientForm.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatient.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatientDetails.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatients.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramListAction.java


--
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-api/src/main/java/org/hisp/dhis/patient/Patient.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/Patient.java	2011-12-14 09:51:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/Patient.java	2012-04-17 04:39:03 +0000
@@ -47,15 +47,21 @@
      * Determines if a de-serialized file is compatible with this class.
      */
     private static final long serialVersionUID = 884114994005945275L;
+
     public static final String MALE = "M";
+
     public static final String FEMALE = "F";
 
     public static final char DOB_TYPE_VERIFIED = 'V';
+
     public static final char DOB_TYPE_DECLARED = 'D';
+
     public static final char DOB_TYPE_APPROXIATED = 'A';
-    
+
     public static final char AGE_TYPE_YEAR = 'Y';
+
     public static final char AGE_TYPE_MONTH = 'M';
+
     public static final char AGE_TYPE_DAY = 'D';
 
     private Integer id;
@@ -72,6 +78,8 @@
 
     private String bloodGroup;
 
+    private String phoneNumber;
+
     private Date deathDate;
 
     private Date registrationDate;
@@ -129,13 +137,13 @@
     {
         final int prime = 31;
         int result = 1;
-        
-        result = prime * result + ( ( id == null) ? 0 : id.hashCode() );
-        result = prime * result + ( ( birthDate == null) ? 0 : birthDate.hashCode() );
-        result = prime * result + ( ( firstName == null) ? 0 : firstName.hashCode() );
-        result = prime * result + ( ( gender == null) ? 0 : gender.hashCode() );
-        result = prime * result + ( ( lastName == null) ? 0 : lastName.hashCode() );
-        result = prime * result + ( ( middleName == null) ? 0 : middleName.hashCode() );
+
+        result = prime * result + ((id == null) ? 0 : id.hashCode());
+        result = prime * result + ((birthDate == null) ? 0 : birthDate.hashCode());
+        result = prime * result + ((firstName == null) ? 0 : firstName.hashCode());
+        result = prime * result + ((gender == null) ? 0 : gender.hashCode());
+        result = prime * result + ((lastName == null) ? 0 : lastName.hashCode());
+        result = prime * result + ((middleName == null) ? 0 : middleName.hashCode());
 
         return result;
     }
@@ -147,19 +155,19 @@
         {
             return true;
         }
-        
+
         if ( obj == null )
         {
             return false;
         }
-        
+
         if ( getClass() != obj.getClass() )
         {
             return false;
         }
-        
+
         final Patient other = (Patient) obj;
-        
+
         if ( birthDate == null )
         {
             if ( other.birthDate != null )
@@ -171,7 +179,7 @@
         {
             return false;
         }
-        
+
         if ( firstName == null )
         {
             if ( other.firstName != null )
@@ -183,7 +191,7 @@
         {
             return false;
         }
-        
+
         if ( gender == null )
         {
             if ( other.gender != null )
@@ -193,7 +201,7 @@
         {
             return false;
         }
-        
+
         if ( lastName == null )
         {
             if ( other.lastName != null )
@@ -205,7 +213,7 @@
         {
             return false;
         }
-        
+
         if ( middleName == null )
         {
             if ( other.middleName != null )
@@ -217,7 +225,7 @@
         {
             return false;
         }
-        
+
         return true;
     }
 
@@ -441,7 +449,7 @@
         // Assumed relative to the 1st of January
         // todayCalendar.set( Calendar.DATE, 1 );
         // todayCalendar.set( Calendar.MONTH, Calendar.JANUARY );
-        
+
         if ( ageType == AGE_TYPE_YEAR )
         {
             todayCalendar.add( Calendar.YEAR, -1 * age );
@@ -499,28 +507,28 @@
             name = firstName;
             space = true;
         }
-        
+
         if ( middleName != null && middleName.length() != 0 )
         {
             if ( space )
             {
                 name += " ";
             }
-            
+
             name += middleName;
             space = true;
         }
-        
+
         if ( lastName != null && lastName.length() != 0 )
         {
             if ( space )
             {
                 name += " ";
             }
-            
+
             name += lastName;
         }
-        
+
         return name;
     }
 
@@ -534,6 +542,16 @@
         this.bloodGroup = bloodGroup;
     }
 
+    public String getPhoneNumber()
+    {
+        return phoneNumber;
+    }
+
+    public void setPhoneNumber( String phoneNumber )
+    {
+        this.phoneNumber = phoneNumber;
+    }
+
     public boolean isUnderAge()
     {
         return underAge;
@@ -563,12 +581,12 @@
     {
         switch ( dobType )
         {
-            case DOB_TYPE_VERIFIED:
-                return "Verified";
-            case DOB_TYPE_DECLARED:
-                return "Declared";
-            default:
-                return "Approxiated";
+        case DOB_TYPE_VERIFIED:
+            return "Verified";
+        case DOB_TYPE_DECLARED:
+            return "Declared";
+        default:
+            return "Approxiated";
         }
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientService.java	2011-12-21 04:23:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientService.java	2012-04-17 04:39:03 +0000
@@ -109,7 +109,7 @@
     Collection<Patient> getPatients( String searchText, int min, int max );
     
     /**
-     * Search Patient base on organisation unit  with result limited
+     * Search Patient base on organization unit with result limited
      * 
      * @param organisationUnit organisationUnit
      * @return Patient List
@@ -117,7 +117,7 @@
     Collection<Patient> getPatients( OrganisationUnit organisationUnit );
     
     /**
-     * Search Patient base on organisation unit with result limited
+     * Search Patient base on organization unit with result limited
      * 
      * @param organisationUnit organisationUnit
      * @param min
@@ -127,7 +127,7 @@
     Collection<Patient> getPatients( OrganisationUnit organisationUnit, int min, int max );
 
     /**
-     * Search Patient base on organisation unit and sort the result by PatientAttribute
+     * Search Patient base on organization unit and sort the result by PatientAttribute
      * 
      * @param organisationUnit organisationUnit
      * @param min

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/Patient.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/Patient.hbm.xml	2011-05-28 21:25:46 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/Patient.hbm.xml	2012-04-17 04:39:03 +0000
@@ -28,6 +28,8 @@
 
     <property name="gender" column="gender" length="5" not-null="true" />
 
+    <property name="phoneNumber" length="25" />
+
     <property name="underAge" column="underage" not-null="true" />
 
     <property name="dobType" column="dobType" />

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddPatientAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddPatientAction.java	2012-03-28 08:26:44 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddPatientAction.java	2012-04-17 04:39:03 +0000
@@ -101,7 +101,9 @@
     private String gender;
 
     private String bloodGroup;
-    
+
+    private String phoneNumber;
+
     private String registrationDate;
 
     private boolean underAge;
@@ -125,8 +127,8 @@
         OrganisationUnit organisationUnit = selectionManager.getSelectedOrganisationUnit();
 
         Patient patient = new Patient();
-        
-        verified = ( verified == null ) ? false : verified ;
+
+        verified = (verified == null) ? false : verified;
 
         // ---------------------------------------------------------------------
         // Set FirstName, MiddleName, LastName by FullName
@@ -167,16 +169,17 @@
         patient.setGender( gender );
         patient.setIsDead( false );
         patient.setBloodGroup( bloodGroup );
+        patient.setPhoneNumber( phoneNumber );
         patient.setUnderAge( underAge );
         patient.setOrganisationUnit( organisationUnit );
 
-        Character dobType = ( verified ) ? 'V' : 'D';
-        
-        if( !verified && age != null )
+        Character dobType = (verified) ? 'V' : 'D';
+
+        if ( !verified && age != null )
         {
             dobType = 'A';
         }
-        
+
         if ( dobType == Patient.DOB_TYPE_VERIFIED || dobType == Patient.DOB_TYPE_DECLARED )
         {
             birthDate = birthDate.trim();
@@ -386,6 +389,11 @@
         this.bloodGroup = bloodGroup;
     }
 
+    public void setPhoneNumber( String phoneNumber )
+    {
+        this.phoneNumber = phoneNumber;
+    }
+
     public void setPatientAttributeOptionService( PatientAttributeOptionService patientAttributeOptionService )
     {
         this.patientAttributeOptionService = patientAttributeOptionService;

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddRelationshipPatientAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddRelationshipPatientAction.java	2011-09-14 06:36:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddRelationshipPatientAction.java	2012-04-17 04:39:03 +0000
@@ -104,6 +104,8 @@
     private String gender;
 
     private String bloodGroup;
+    
+    private String phoneNumber;
 
     private String registrationDate;
 
@@ -173,6 +175,7 @@
         patient.setGender( gender );
         patient.setIsDead( false );
         patient.setBloodGroup( bloodGroup );
+        patient.setPhoneNumber( phoneNumber );
         patient.setUnderAge( underAge );
         patient.setOrganisationUnit( organisationUnit );
 
@@ -429,4 +432,9 @@
     {
         this.registrationDate = registrationDate;
     }
+
+    public void setPhoneNumber( String phoneNumber )
+    {
+        this.phoneNumber = phoneNumber;
+    }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/UpdatePatientAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/UpdatePatientAction.java	2012-03-28 08:26:44 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/UpdatePatientAction.java	2012-04-17 04:39:03 +0000
@@ -97,11 +97,13 @@
     private Integer age;
 
     private Boolean verified;
-    
+
     private String gender;
 
     private String bloodGroup;
-	
+
+    private String phoneNumber;
+
     private boolean underAge;
 
     private Integer representativeId;
@@ -124,8 +126,8 @@
         OrganisationUnit organisationUnit = selectionManager.getSelectedOrganisationUnit();
 
         patient = patientService.getPatient( id );
-        
-        verified = ( verified == null ) ? false : verified ;
+
+        verified = (verified == null) ? false : verified;
 
         // ---------------------------------------------------------------------
         // Set FirstName, MiddleName, LastName by FullName
@@ -164,19 +166,20 @@
         patient.setGender( gender );
         patient.setIsDead( isDead );
         patient.setBloodGroup( bloodGroup );
-		
+        patient.setPhoneNumber( phoneNumber );
+
         if ( deathDate != null )
         {
             deathDate = deathDate.trim();
             patient.setDeathDate( format.parseDate( deathDate ) );
         }
-		
+
         patient.setUnderAge( underAge );
         patient.setOrganisationUnit( organisationUnit );
 
-        Character dobType = ( verified ) ? 'V' : 'D';
-        
-        if( !verified && age != null )
+        Character dobType = (verified) ? 'V' : 'D';
+
+        if ( !verified && age != null )
         {
             dobType = 'A';
         }
@@ -395,12 +398,17 @@
     {
         this.gender = gender;
     }
-	
+
     public void setBloodGroup( String bloodGroup )
     {
         this.bloodGroup = bloodGroup;
     }
 
+    public void setPhoneNumber( String phoneNumber )
+    {
+        this.phoneNumber = phoneNumber;
+    }
+
     public Patient getPatient()
     {
         return patient;
@@ -435,5 +443,4 @@
     {
         this.verified = verified;
     }
-
 }

=== 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-03-29 04:15:07 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2012-04-17 04:39:03 +0000
@@ -225,6 +225,7 @@
 			sPatient += "<tr><td class='bold'>" + i18n_patient_date_of_birth + "</td><td>" + jQuery(patient).find('dateOfBirth').text() + "</td></tr>" ;
 			sPatient += "<tr><td class='bold'>" + i18n_patient_age + "</td><td>" + jQuery(patient).find('age').text() + "</td></tr>" ;
 			sPatient += "<tr><td class='bold'>" + i18n_patient_blood_group + "</td><td>" + jQuery(patient).find('bloodGroup').text() + "</td></tr>";
+			sPatient += "<tr><td class='bold'>" + i18n_patient_phone_number + "</td><td>" + jQuery(patient).find('phoneNumber').text() + "</td></tr>";
         	
 			var identifiers = jQuery(patient).find('identifier');
         	if( identifiers.length > 0 )

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/underage.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/underage.js	2012-03-05 07:32:05 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/underage.js	2012-04-17 04:39:03 +0000
@@ -106,6 +106,7 @@
 		sPatient += "<tr><td class='bold'>" + i18n_patient_date_of_birth + "</td><td>" + $( patient ).find('dateOfBirth').text() + "</td></tr>" ;
 		sPatient += "<tr><td class='bold'>" + i18n_patient_age + "</td><td>" + $( patient ).find('age').text() + "</td></tr>" ;
 		sPatient += "<tr><td class='bold'>" + i18n_patient_blood_group + "</td><td>" + $( patient ).find('bloodGroup').text() + "</td></tr>";
+		sPatient += "<tr><td class='bold'>" + i18n_patient_phone_number + "</td><td>" + $( patient ).find('phoneNumber').text() + "</td></tr>";
 		
 		var identifiers =  $( patient ).find('identifier');
 		$( identifiers ).each( function( i, identifier )

=== 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-03-27 09:40:11 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm	2012-04-17 04:39:03 +0000
@@ -25,15 +25,15 @@
   <tr>
     <td>    
       <table class="listTable">                   
-          <col width="40">
-          <col>
-          <col width="60">
-          <col width="90">
-          <col width="60">
+          <col width="40"/>
+          <col/>
+          <col width="60"/>
+          <col width="90"/>
+          <col width="60"/>
 		  #if($mapPatientOrgunit.size()!=0)
-		  <col>
+		  <col/>
 		  #end
-		  <col width="80">
+		  <col width="80"/>
           <tr>
 			<th>#</th>
             <th>$i18n.getString( "full_name" )</th>        

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm	2012-03-30 01:28:12 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm	2012-04-17 04:39:03 +0000
@@ -75,6 +75,14 @@
 		</select>
 	</td>		
 </tr>
+
+<tr>
+	<td class='text-column'><label for="phoneNumber">$i18n.getString( "phone_number" )</label></td>
+	<td class="input-column">
+		<input type="text" id="phoneNumber" name="phoneNumber" style='width:25px' />
+	</td>
+</tr>
+
 <tr><td colspan="2">&nbsp;</td></tr>	
 <tr>
 	<td></td>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatient.vm	2011-09-01 04:50:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatient.vm	2012-04-17 04:39:03 +0000
@@ -1,28 +1,29 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <patient>
   <id>$patient.id</id>  
-  <fullName>$encoder.xmlEncode( $patient.getFullName() )</fullName>
-  <gender>$encoder.xmlEncode( $i18n.getString($patient.gender ))</gender>
+  <fullName>$!encoder.xmlEncode( $patient.getFullName() )</fullName>
+  <gender>$!encoder.xmlEncode( $i18n.getString($patient.gender ))</gender>
   <dobType>#if($!patient.dobType)$!patient.dobType#else $i18n.getString('none') #end</dobType>
-  <dateOfBirth>$format.formatDate( $!patient.birthDate )</dateOfBirth>
-  <age>$encoder.xmlEncode( $patient.getAge() )</age>
+  <dateOfBirth>$!format.formatDate( $!patient.birthDate )</dateOfBirth>
+  <age>$!encoder.xmlEncode( $patient.getAge() )</age>
   <bloodGroup>#if($!patient.bloodGroup) $patient.bloodGroup #else $i18n.getString('none') #end</bloodGroup>
+  <phoneNumber>#if($!patient.phoneNumber) $patient.phoneNumber #else $i18n.getString('none') #end</phoneNumber>
   #foreach( $patientIdentifier in $patient.identifiers )
     <identifier>        
-        <identifierText>$encoder.xmlEncode( $patientIdentifier.identifier )</identifierText>
+        <identifierText>$!encoder.xmlEncode( $patientIdentifier.identifier )</identifierText>
      </identifier>
   #end
-  #foreach( $attribute in $patient.attributes )
+  #foreach( $attribute in $!patient.attributes )
     #set( $attributeValue = false )
     #set( $attributeValue = $patientAttributeValueMap.get( $attribute.id ) )             
     <attribute>
-        <name>$encoder.xmlEncode( $attribute.name )</name>
-        <value>$encoder.xmlEncode( $attributeValue )</value>
+        <name>$!encoder.xmlEncode( $attribute.name )</name>
+        <value>$!encoder.xmlEncode( $attributeValue )</value>
     </attribute> 
   #end  
-  #foreach( $program in $patient.programs )
+  #foreach( $program in $!patient.programs )
     <program>
-        <name>$encoder.xmlEncode( $program.name )</name>
+        <name>$!encoder.xmlEncode( $program.name )</name>
     </program> 
   #end         
 </patient>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatientDetails.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatientDetails.vm	2011-09-01 04:50:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatientDetails.vm	2012-04-17 04:39:03 +0000
@@ -1,27 +1,28 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <patient>
   <id>$patient.id</id>  
-  <fullName>$encoder.xmlEncode( $patient.getFullName() )</fullName>
-  <gender>$encoder.xmlEncode( $i18n.getString($patient.gender ))</gender>
-  <dateOfBirth>$format.formatDate( $patient.birthDate )</dateOfBirth>
-  <age>$encoder.xmlEncode( $patient.getAge() )</age>
-  <bloodGroup>$encoder.xmlEncode( $patient.getBloodGroup() )</bloodGroup>
-  #foreach( $patientIdentifier in $patient.identifiers )
+  <fullName>$!encoder.xmlEncode( $patient.getFullName() )</fullName>
+  <gender>$!encoder.xmlEncode( $i18n.getString($patient.gender ))</gender>
+  <dateOfBirth>$!format.formatDate( $patient.birthDate )</dateOfBirth>
+  <age>$!encoder.xmlEncode( $patient.getAge() )</age>
+  <bloodGroup>$!encoder.xmlEncode( $patient.getBloodGroup() )</bloodGroup>
+  <phoneNumber>$!encoder.xmlEncode( $patient.phoneNumber )</bloodGroup>
+  #foreach( $patientIdentifier in $!patient.identifiers )
     <identifier>        
-        <identifierText>$encoder.xmlEncode( $patientIdentifier.identifier )</identifierText>
+        <identifierText>$!encoder.xmlEncode( $!patientIdentifier.identifier )</identifierText>
      </identifier>
   #end
-  #foreach( $attribute in $patient.attributes )
+  #foreach( $attribute in $!patient.attributes )
     #set( $attributeValue = false )
     #set( $attributeValue = $patientAttributeValueMap.get( $attribute.id ) )             
     <attribute>
-        <name>$encoder.xmlEncode( $attribute.name )</name>
-        <value>$encoder.xmlEncode( $attributeValue )</value>
+        <name>$!encoder.xmlEncode( $attribute.name )</name>
+        <value>$!encoder.xmlEncode( $attributeValue )</value>
     </attribute> 
   #end  
-  #foreach( $program in $patient.programs )
+  #foreach( $program in $!patient.programs )
     <program>
-        <name>$encoder.xmlEncode( $program.name )</name>
+        <name>$!encoder.xmlEncode( $program.name )</name>
     </program> 
   #end         
 </patient>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatients.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatients.vm	2011-09-14 06:36:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatients.vm	2012-04-17 04:39:03 +0000
@@ -3,20 +3,21 @@
 #foreach( $patient  in $patients )
 <patient>
   <id>$patient.id</id>  
-  <fullName>$encoder.xmlEncode( $patient.getFullName() )</fullName>
-  <gender>$encoder.xmlEncode( $i18n.getString( $patient.gender ))</gender>
+  <fullName>$!encoder.xmlEncode( $patient.getFullName() )</fullName>
+  <gender>$!encoder.xmlEncode( $i18n.getString( $patient.gender ))</gender>
   <dateOfBirth>$format.formatDate( $patient.birthDate )</dateOfBirth>
-  <age>$encoder.xmlEncode( $patient.getAge() )</age>
-  <bloodGroup>#if( $patient.bloodGroup ) $encoder.xmlEncode( $patient.bloodGroup ) #else N/A #end</bloodGroup>
+  <age>$!encoder.xmlEncode( $patient.getAge() )</age>
+  <bloodGroup>#if( $patient.bloodGroup ) $!encoder.xmlEncode( $patient.bloodGroup ) #else N/A #end</bloodGroup>
+  <phoneNumber>#if( $patient.phoneNumber ) $!encoder.xmlEncode( $patient.phoneNumber ) #else N/A #end</bloodGroup>
   #foreach( $identifier in $patient.identifiers )
   	#if( $identifier.identifierType )
 	    <identifier>
 	    	<id>$identifier.identifierType.id</id>
-	        <name>$encoder.xmlEncode( $identifier.identifierType.name )</name>
-	        <value>$encoder.xmlEncode( $identifier.identifier )</value>
+	        <name>$!encoder.xmlEncode( $identifier.identifierType.name )</name>
+	        <value>$!encoder.xmlEncode( $identifier.identifier )</value>
 	    </identifier>
     #else
-    	<systemIdentifier>$encoder.xmlEncode( $identifier.identifier )</systemIdentifier>
+    	<systemIdentifier>$!encoder.xmlEncode( $identifier.identifier )</systemIdentifier>
     #end
   #end  
   
@@ -25,13 +26,13 @@
     #set( $key = $patient.id + "_" + $attribute.id )
     #set( $attributeValue = $patientAttributeValueMap.get( $key ) )             
     <attribute>
-        <name>$encoder.xmlEncode( $attribute.name )</name>
-        <value>$encoder.xmlEncode( $attributeValue )</value>
+        <name>$!encoder.xmlEncode( $attribute.name )</name>
+        <value>$!encoder.xmlEncode( $attributeValue )</value>
     </attribute> 
   #end  
   #foreach( $program in $patient.programs )
     <program>
-        <name>$encoder.xmlEncode( $program.name )</name>
+        <name>$!encoder.xmlEncode( $program.name )</name>
     </program> 
   #end         
 </patient>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm	2012-03-29 08:04:10 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm	2012-04-17 04:39:03 +0000
@@ -86,6 +86,7 @@
 	var i18n_patient_dob_type = '$encoder.jsEscape( $i18n.getString( "dob_type" ), "'")';
 	var i18n_patient_age = '$encoder.jsEscape( $i18n.getString( "age" ) , "'")';
 	var i18n_patient_blood_group = '$encoder.jsEscape( $i18n.getString( "blood_group" ) , "'")';
+	var i18n_patient_phone_number = '$encoder.jsEscape( $i18n.getString( "phone_number" ) , "'")';
 	var i18n_edit_this_patient = '$encoder.jsEscape( $i18n.getString( "edit_this_patient" ) , "'")';
 	var i18n_no_duplicate_found = '$encoder.jsEscape( $i18n.getString( "no_duplicate_found" ) , "'")';
 	var i18n_patient_system_id = '$encoder.jsEscape( $i18n.getString( "patient_system_id" ) , "'")';

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.vm	2012-04-16 04:06:31 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.vm	2012-04-17 04:39:03 +0000
@@ -140,6 +140,14 @@
 			</select>
 		</td>		
 	</tr>
+	
+	<tr>
+		<td class='text-column'><label for="phoneNumber">$i18n.getString( "phone_number" )</label></td>
+		<td class="input-column">
+			<input type="text" id="phoneNumber" name="phoneNumber" style='width:25px' value="$!patient.phoneNumber" />
+		</td>
+	</tr>
+	
 	<tr><td>&nbsp;</td></tr>	
 
 	<!-- UNDERAGE -->

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramListAction.java	2011-03-31 01:42:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramListAction.java	2012-04-17 04:39:03 +0000
@@ -111,9 +111,11 @@
     {
         programs = programService.getAllPrograms();
 
-        associations = programStageService.getAllProgramStages();
-
-        if ( id != null )
+        if ( id == null )
+        {
+            associations = programStageService.getAllProgramStages();
+        }
+        else
         {
             Program program = programService.getProgram( id );