dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21414
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10131: minor fix
------------------------------------------------------------
revno: 10131
committer: Lai <lai.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-03-11 14:37:35 +0700
message:
minor fix
modified:
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/LWUITmodel/Patient.java
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.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-mobile/src/main/java/org/hisp/dhis/api/mobile/model/LWUITmodel/Patient.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/LWUITmodel/Patient.java 2013-03-08 10:17:23 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/LWUITmodel/Patient.java 2013-03-11 07:37:35 +0000
@@ -77,6 +77,8 @@
private Character dobType;
private List<Program> programs;
+
+ private List<Program> enrollmentPrograms;
private List<Relationship> relationships;
@@ -114,6 +116,16 @@
this.relationships = relationships;
}
+ public List<Program> getEnrollmentPrograms()
+ {
+ return enrollmentPrograms;
+ }
+
+ public void setEnrollmentPrograms( List<Program> enrollmentPrograms )
+ {
+ this.enrollmentPrograms = enrollmentPrograms;
+ }
+
public String getFullName()
{
boolean space = false;
@@ -292,9 +304,7 @@
dout.writeUTF( this.getMiddleName() );
dout.writeUTF( this.getLastName() );
dout.writeInt( this.getAge() );
- dout.writeUTF( this.getPhoneNumber() );
- dout.writeUTF( this.getGender() );
-
+
if ( gender != null )
{
dout.writeBoolean( true );
@@ -375,20 +385,27 @@
each.serialize( dout );
}
- // Write Enrolled Programs
-
+ // Write Program
dout.writeInt( programs.size() );
- for ( Program each : programs )
+ for ( Program each: programs )
{
each.serialize( dout );
}
-
+
// Write Relationships
dout.writeInt( relationships.size() );
for ( Relationship each : relationships )
{
each.serialize( dout );
}
+
+ // Write Enrolled Programs
+
+ dout.writeInt( enrollmentPrograms.size() );
+ for ( Program each : enrollmentPrograms )
+ {
+ each.serialize( dout );
+ }
bout.flush();
bout.writeTo( out );
=== 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-03-11 03:39:47 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2013-03-11 07:37:35 +0000
@@ -469,6 +469,7 @@
Period period = new Period( new DateTime( patient.getBirthDate() ), new DateTime() );
patientModel.setAge( period.getYears() );
+ patientModel.setPhoneNumber( patient.getPhoneNumber() );
this.setSetting( getSettings() );
@@ -602,7 +603,7 @@
enrollmentProgramListMobileList.add( enrollmentProgramMobile );
}
- patientModel.setPrograms( enrollmentProgramListMobileList );
+ patientModel.setEnrollmentPrograms( enrollmentProgramListMobileList );
return patientModel;
}