← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12152: Fixed error when to build

 

------------------------------------------------------------
revno: 12152
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-09-19 12:40:02 +0700
message:
  Fixed error when to build
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/person/AbstractPersonService.java
  dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/SaveBeneficiaryAction.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-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/person/AbstractPersonService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/person/AbstractPersonService.java	2013-09-18 09:59:56 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/person/AbstractPersonService.java	2013-09-19 05:40:02 +0000
@@ -219,18 +219,7 @@
             Identifier identifier = new Identifier( identifierType, patientIdentifier.getIdentifier() );
             person.getIdentifiers().add( identifier );
         }
-
-        for ( PatientAttribute patientAttribute : patient.getAttributes() )
-        {
-            PatientAttributeValue patientAttributeValue = patientAttributeValueService.getPatientAttributeValue( patient, patientAttribute );
-
-            Attribute attribute = new Attribute();
-            attribute.setType( patientAttribute.getUid() );
-            attribute.setValue( patientAttributeValue.getValue() );
-
-            person.getAttributes().add( attribute );
-        }
-
+        
         return person;
     }
 
@@ -516,8 +505,6 @@
                 patientAttributeValue.setPatientAttribute( patientAttribute );
 
                 patientAttributeValueService.savePatientAttributeValue( patientAttributeValue );
-
-                patient.getAttributes().add( patientAttribute );
             }
         }
     }
@@ -629,7 +616,6 @@
     private void removeAttributeValues( Patient patient )
     {
         patientAttributeValueService.deletePatientAttributeValue( patient );
-        patient.setAttributes( new HashSet<PatientAttribute>() );
         patientService.updatePatient( patient );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java	2013-09-18 09:04:09 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java	2013-09-19 05:40:02 +0000
@@ -1833,7 +1833,6 @@
         }
 
         patientWeb.setIdentifiers( patientIdentifierSet );
-        patientWeb.setAttributes( patientAttributeSet );
 
         patientId = patientService.createPatient( patientWeb, null, null, patientAttributeValues );
 

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/SaveBeneficiaryAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/SaveBeneficiaryAction.java	2013-09-12 07:19:15 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/SaveBeneficiaryAction.java	2013-09-19 05:40:02 +0000
@@ -524,7 +524,6 @@
         }
 
         patient.setIdentifiers( patientIdentifierSet );
-        patient.setAttributes( patientAttributeSet );
         patientId = patientService.createPatient( patient, null, null, patientAttributeValues );
         validated = true;