dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18134
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7522: Revert R.7518
------------------------------------------------------------
revno: 7522
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-07-06 11:04:41 +0700
message:
Revert R.7518
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/Patient.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientattributevalue/hibernate/HibernatePatientAttributeValueStore.java
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/Patient.hbm.xml
--
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 2012-07-05 09:46:04 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/Patient.java 2012-07-06 04:04:41 +0000
@@ -71,9 +71,7 @@
private String middleName;
private String lastName;
-
- private String fullName;
-
+
private String gender;
private Date birthDate;
@@ -497,19 +495,8 @@
// Getter && Setter
// -------------------------------------------------------------------------
-
public String getFullName()
{
- return fullName;
- }
-
- public void setFullName( String fullName )
- {
- this.fullName = fullName;
- }
-
- /* public String getFullName()
- {
boolean space = false;
String name = "";
@@ -541,8 +528,8 @@
}
return name;
- } */
-
+ }
+
public String getPhoneNumber()
{
return phoneNumber;
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientattributevalue/hibernate/HibernatePatientAttributeValueStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientattributevalue/hibernate/HibernatePatientAttributeValueStore.java 2012-07-05 09:46:04 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientattributevalue/hibernate/HibernatePatientAttributeValueStore.java 2012-07-06 04:04:41 +0000
@@ -280,8 +280,9 @@
hql += " ( SELECT p" + index + " FROM Patient as p" + index + " JOIN p" + index
+ ".identifiers as identifier" + index + " " + "WHERE lower(identifier" + index
- + ".identifier)=lower('" + searchText + "') " + "OR (lower(p" + index + ".fullName) LIKE lower('%"
- + searchText + "%') " + " ) ";
+ + ".identifier)=lower('" + searchText + "') " + "OR (lower(p" + index + ".firstName) LIKE lower('%"
+ + firstName + "%') " + "AND lower(p" + index + ".middleName) = lower('" + middleName + "') "
+ + "AND lower(p" + index + ".lastName) LIKE lower('%" + lastName + "%')) ";
isSearchByAttribute = false;
}
=== 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 2012-07-05 09:46:04 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/Patient.hbm.xml 2012-07-06 04:04:41 +0000
@@ -52,8 +52,6 @@
<many-to-one name="organisationUnit" class="org.hisp.dhis.organisationunit.OrganisationUnit" column="organisationunitid"
foreign-key="fk_patient_organisationunitid" />
-
- <property name="fullName" formula="concat(firstName, ' ', middleName, ' ', lastName)"/>
</class>
</hibernate-mapping>