dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #29877
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15167: https://blueprints.launchpad.net/dhis-mobile/+spec/enhance-tracker-client
------------------------------------------------------------
revno: 15167
committer: sherylyn.marie
branch nick: trunk
timestamp: Tue 2014-05-06 14:48:29 +0800
message:
https://blueprints.launchpad.net/dhis-mobile/+spec/enhance-tracker-client
#1 ALL TRACKED ENTITY SUPPORT
In Add Instance screen, implement "<tracked entity name> REGISTRATION" for the form title
modified:
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/LWUITmodel/Program.java
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.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/Program.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/LWUITmodel/Program.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/Program.java 2014-05-06 06:48:29 +0000
@@ -57,6 +57,8 @@
private String dateOfEnrollmentDescription = "Date of Enrollment";
private String dateOfIncidentDescription = "Date of Incident";
+
+ private String trackedEntityName = "Tracked Entity";
private List<ProgramStage> programStages = new ArrayList<ProgramStage>();
@@ -121,6 +123,16 @@
{
this.dateOfIncidentDescription = dateOfIncidentDescription;
}
+
+ public String getTrackedEntityName()
+ {
+ return trackedEntityName;
+ }
+
+ public void setTrackedEntityName( String trackedEntityName )
+ {
+ this.trackedEntityName = trackedEntityName;
+ }
public List<PatientAttribute> getProgramAttributes()
{
@@ -141,6 +153,7 @@
dout.writeInt( this.getType() );
dout.writeUTF( getDateOfEnrollmentDescription() );
dout.writeUTF( getDateOfIncidentDescription() );
+ dout.writeUTF( getTrackedEntityName() );
// Write program stage
dout.writeInt( programStages.size() );
@@ -169,6 +182,7 @@
this.setType( dataInputStream.readInt() );
this.setDateOfEnrollmentDescription( dataInputStream.readUTF() );
this.setDateOfIncidentDescription( dataInputStream.readUTF() );
+ this.setTrackedEntityName( dataInputStream.readUTF() );
// Read program stage
int programStageNumber = dataInputStream.readInt();
=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java 2014-04-15 07:23:09 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java 2014-05-06 06:48:29 +0000
@@ -190,6 +190,10 @@
pr.setVersion( program.getVersion() );
pr.setDateOfEnrollmentDescription( program.getDateOfEnrollmentDescription() );
pr.setDateOfIncidentDescription( program.getDateOfIncidentDescription() );
+ if( program.getTrackedEntity() != null && program.getTrackedEntity().getName() != null)
+ {
+ pr.setTrackedEntityName( program.getTrackedEntity().getName() );
+ }
List<org.hisp.dhis.api.mobile.model.LWUITmodel.ProgramStage> prStgs = new ArrayList<org.hisp.dhis.api.mobile.model.LWUITmodel.ProgramStage>();