← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12056: remove first, middle, last name from Patient (wip)

 

------------------------------------------------------------
revno: 12056
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-09-12 09:33:02 +0200
message:
  remove first, middle, last name from Patient (wip)
modified:
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.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/AddRepresentativeAction.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/responseDataElements.vm
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/beneficiarySearchResult.vm
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/enrollmentProgramList.vm
  dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/beneficiaryDetail.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/program/hibernate/HibernateProgramStageInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2013-09-06 08:24:36 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2013-09-12 07:33:02 +0000
@@ -424,7 +424,7 @@
             for ( int i = 1; i <= cols; i++ )
             {
                 message = rs.getString( "templatemessage" );
-                String patientName = rs.getString( "firstName" );
+                String patientName = rs.getString( "name" );
                 String organisationunitName = rs.getString( "orgunitName" );
                 String programName = rs.getString( "programName" );
                 String programStageName = rs.getString( "programStageName" );
@@ -2389,7 +2389,7 @@
 
     private String sendMessageToPatientSql()
     {
-        return "select psi.programstageinstanceid, p.phonenumber, prm.templatemessage, p.firstname, p.middlename, p.lastname, org.name as orgunitName "
+        return "select psi.programstageinstanceid, p.phonenumber, prm.templatemessage, p.name, org.name as orgunitName "
             + ",pg.name as programName, ps.name as programStageName, psi.duedate,(DATE(now()) - DATE(psi.duedate) ) as days_since_due_date "
             + "from patient p INNER JOIN programinstance pi "
             + "     ON p.patientid=pi.patientid "
@@ -2415,7 +2415,7 @@
 
     private String sendMessageToHealthWorkerSql()
     {
-        return "SELECT psi.programstageinstanceid, uif.phonenumber, prm.templatemessage,p.firstname, p.middlename, p.lastname, org.name as orgunitName, "
+        return "SELECT psi.programstageinstanceid, uif.phonenumber, prm.templatemessage, p.name, org.name as orgunitName, "
             + "pg.name as programName, ps.name as programStageName, psi.duedate, "
             + "         (DATE(now()) - DATE(psi.duedate) ) as days_since_due_date "
             + " FROM patient p INNER JOIN programinstance pi "
@@ -2446,7 +2446,7 @@
 
     private String sendMessageToOrgunitRegisteredSql()
     {
-        return "select psi.programstageinstanceid, ou.phonenumber, prm.templatemessage, p.firstname, p.middlename, p.lastname, org.name as orgunitName, "
+        return "select psi.programstageinstanceid, ou.phonenumber, prm.templatemessage, p.name, org.name as orgunitName, "
             + "pg.name as programName, ps.name as programStageName, psi.duedate,"
             + "(DATE(now()) - DATE(psi.duedate) ) as days_since_due_date "
             + "            from patient p INNER JOIN programinstance pi "
@@ -2476,7 +2476,7 @@
 
     private String sendMessageToUsersSql()
     {
-        return "select psi.programstageinstanceid, uif.phonenumber,prm.templatemessage, p.firstname, p.middlename, p.lastname, org.name as orgunitName ,"
+        return "select psi.programstageinstanceid, uif.phonenumber,prm.templatemessage, p.name, org.name as orgunitName ,"
             + " pg.name as programName, ps.name as programStageName, psi.duedate, "
             + "(DATE(now()) - DATE(psi.duedate) ) as days_since_due_date "
             + "  from patient p INNER JOIN programinstance pi "
@@ -2508,7 +2508,7 @@
 
     private String sendMessageToUserGroupsSql()
     {
-        return "select psi.programstageinstanceid, uif.phonenumber,prm.templatemessage, p.firstname, p.middlename, p.lastname, org.name as orgunitName ,"
+        return "select psi.programstageinstanceid, uif.phonenumber,prm.templatemessage, p.name, org.name as orgunitName ,"
             + " pg.name as programName, ps.name as programStageName, psi.duedate, "
             + "(DATE(now()) - DATE(psi.duedate) ) as days_since_due_date "
             + "  from patient p INNER JOIN programinstance pi "

=== 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	2013-09-12 07:19:15 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/Patient.hbm.xml	2013-09-12 07:33:02 +0000
@@ -14,12 +14,6 @@
 
     <property name="name" column="name" length="230" />
 
-    <property name="firstName" column="firstname" length="50" />
-
-    <property name="middleName" column="middlename" length="50" />
-
-    <property name="lastName" column="lastname" length="50" />
-
     <property name="birthDate" column="birthdate" />
 
     <property name="deathDate" column="deathdate" />

=== 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	2013-09-12 07:19:15 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddPatientAction.java	2013-09-12 07:33:02 +0000
@@ -151,7 +151,7 @@
         Patient patient = new Patient();
 
         // ---------------------------------------------------------------------
-        // Set FirstName, MiddleName, LastName by FullName
+        // Set FullName
         // ---------------------------------------------------------------------
 
         patient.setName( fullName );

=== 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	2013-09-12 07:19:15 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddRelationshipPatientAction.java	2013-09-12 07:33:02 +0000
@@ -172,7 +172,7 @@
         patient = new Patient();
 
         // ---------------------------------------------------------------------
-        // Set FirstName, MiddleName, LastName by FullName
+        // Set FullName
         // ---------------------------------------------------------------------
 
         if ( fullName != null )

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddRepresentativeAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddRepresentativeAction.java	2013-09-12 07:19:15 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddRepresentativeAction.java	2013-09-12 07:33:02 +0000
@@ -107,7 +107,7 @@
         patient = new Patient();
 
         // ---------------------------------------------------------------------
-        // Set FirstName, MiddleName, LastName by FullName
+        // Set FullName
         // ---------------------------------------------------------------------
 
         fullName = fullName.trim();

=== 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	2013-09-12 07:19:15 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/UpdatePatientAction.java	2013-09-12 07:33:02 +0000
@@ -141,7 +141,7 @@
         verified = (verified == null) ? false : verified;
 
         // ---------------------------------------------------------------------
-        // Set FirstName, MiddleName, LastName by FullName
+        // Set FullName
         // ---------------------------------------------------------------------
 
         patient.setName( fullName );

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responseDataElements.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responseDataElements.vm	2013-08-29 09:34:09 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responseDataElements.vm	2013-09-12 07:33:02 +0000
@@ -3,6 +3,11 @@
   #if( $auth.hasAccess( "dhis-web-caseentry", "accessPatientAttributes" ) )
   
   {
+	"id": "fixedAttr_name",
+	"name": "$i18n.getString('name')",
+	"valueType": "string"
+  },
+  {
 	"id": "fixedAttr_firstName",
 	"name": "$i18n.getString('first_name')",
 	"valueType": "string"

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/beneficiarySearchResult.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/beneficiarySearchResult.vm	2012-05-24 14:51:18 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/beneficiarySearchResult.vm	2013-09-12 07:33:02 +0000
@@ -9,8 +9,7 @@
 <p>
 <ul>
 #foreach( $patient in $patientList )
-	#set($fullName = $patient.getFirstName() + " " + $patient.getMiddleName() + " " + $patient.getLastName())
-	<li><a href="selectEnrollmentProgram.action?patientId=$patient.Id">$!encoder.htmlEncode( ${fullName} )</a></li>
+	<li><a href="selectEnrollmentProgram.action?patientId=$patient.Id">$!encoder.htmlEncode( $patient.name )</a></li>
 #end
 </ul>
 </p>

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/enrollmentProgramList.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/enrollmentProgramList.vm	2012-07-15 07:10:03 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/enrollmentProgramList.vm	2013-09-12 07:33:02 +0000
@@ -1,4 +1,4 @@
-<h2>$i18n.getString( "enrolled_programs" ) for $patient.firstName $patient.middleName $patient.lastName</h2>
+<h2>$i18n.getString( "enrolled_programs" ) for $patient.name</h2>
 	#if( $validated)
 		<div class="header-box">
 			<h3 style="text-align: left;">$i18n.getString("successfully_saved")</h3>

=== modified file 'dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/beneficiaryDetail.vm'
--- dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/beneficiaryDetail.vm	2012-06-18 06:14:19 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/beneficiaryDetail.vm	2013-09-12 07:33:02 +0000
@@ -1,4 +1,4 @@
-<h2>$i18n.getString("details_for") $patient.firstName $patient.middleName $patient.lastName   </h2>
+<h2>$i18n.getString("details_for") $patient.name</h2>
 <p>
 
 <ul>