dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #29976
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15202: https://blueprints.launchpad.net/dhis-mobile/+spec/enhance-tracker-client
------------------------------------------------------------
revno: 15202
committer: sherylyn.marie
branch nick: dhis2
timestamp: Fri 2014-05-09 17:08:45 +0800
message:
https://blueprints.launchpad.net/dhis-mobile/+spec/enhance-tracker-client
#1 ALL TRACKED ENTITY SUPPORT
History Screen
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 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/LWUITmodel/Patient.java 2014-05-09 09:08:45 +0000
@@ -49,6 +49,8 @@
private int id;
private String organisationUnitName;
+
+ private String trackedEntityName;
private List<PatientAttribute> attributes = new ArrayList<PatientAttribute>();
@@ -113,6 +115,16 @@
this.organisationUnitName = organisationUnitName;
}
+ public String getTrackedEntityName()
+ {
+ return trackedEntityName;
+ }
+
+ public void setTrackedEntityName( String trackedEntityName )
+ {
+ this.trackedEntityName = trackedEntityName;
+ }
+
public List<ProgramInstance> getEnrollmentPrograms()
{
return enrollmentPrograms;
@@ -146,6 +158,7 @@
dout.writeInt( this.getId() );
dout.writeUTF( this.getOrganisationUnitName() );
+ dout.writeUTF( this.getTrackedEntityName() );
// Write Patient Attribute
dout.writeInt( attributes.size() );
@@ -185,6 +198,7 @@
{
this.setId( din.readInt() );
this.setOrganisationUnitName( din.readUTF() );
+ this.setTrackedEntityName( din.readUTF() );
// Read Attribute
int attsNumb = din.readInt();
=== 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 2014-05-08 04:49:26 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2014-05-09 09:08:45 +0000
@@ -414,13 +414,6 @@
for ( TrackedEntityInstance patient : patients )
{
- System.out.println( "----------------------------------------------------------------------------" );
- System.out.println( "Display Name: " + patient.getDisplayName() );
- System.out.println( "Name: " + patient.getName() );
- System.out.println( "Tracked Entity Display Name: " + patient.getTrackedEntity().getDisplayName() );
- System.out.println( "Tracked Entity Name: " + patient.getTrackedEntity().getName() );
- System.out.println( "----------------------------------------------------------------------------" );
-
resultSet += patient.getId() + "/";
String attText = "";
for ( TrackedEntityAttribute displayAttribute : displayAttributes )
@@ -765,6 +758,11 @@
{
patientModel.setOrganisationUnitName( patient.getOrganisationUnit().getName() );
}
+
+ if ( patient.getTrackedEntity() != null )
+ {
+ patientModel.setTrackedEntityName( patient.getTrackedEntity().getName() );
+ }
this.setSetting( getSettings() );