← Back to team overview

dhis-mobile-devs team mailing list archive

[Branch ~dhis-mobile-devs/dhis-mobile/lwuit-tracking] Rev 159: add more url for org unit, remove unused setters

 

------------------------------------------------------------
revno: 159
committer: Lai <lai.hispvietnam@xxxxxxxxx>
branch nick: lwuit-tracking
timestamp: Mon 2013-10-07 10:35:19 +0700
message:
  add more url for org unit, remove unused setters
modified:
  src/org/hisp/dhis/mobile/connection/ConnectionManager.java
  src/org/hisp/dhis/mobile/connection/task/FindPatientTask.java
  src/org/hisp/dhis/mobile/model/DataSet.java
  src/org/hisp/dhis/mobile/model/OrgUnit.java
  src/org/hisp/dhis/mobile/recordstore/PatientRecordStore.java
  src/org/hisp/dhis/mobile/view/LostToFollowUpView.java


--
lp:~dhis-mobile-devs/dhis-mobile/lwuit-tracking
https://code.launchpad.net/~dhis-mobile-devs/dhis-mobile/lwuit-tracking

Your team DHIS mobile developers is subscribed to branch lp:~dhis-mobile-devs/dhis-mobile/lwuit-tracking.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis-mobile-devs/dhis-mobile/lwuit-tracking/+edit-subscription
=== modified file 'src/org/hisp/dhis/mobile/connection/ConnectionManager.java'
--- src/org/hisp/dhis/mobile/connection/ConnectionManager.java	2013-10-03 08:31:21 +0000
+++ src/org/hisp/dhis/mobile/connection/ConnectionManager.java	2013-10-07 03:35:19 +0000
@@ -31,6 +31,7 @@
 import org.hisp.dhis.mobile.connection.task.DownloadAllResourceTask;
 import org.hisp.dhis.mobile.connection.task.EnrollProgramTask;
 import org.hisp.dhis.mobile.connection.task.FindLatestPersonTask;
+import org.hisp.dhis.mobile.connection.task.FindLostToFollowUpDetailTask;
 import org.hisp.dhis.mobile.connection.task.FindLostToFollowUpTask;
 import org.hisp.dhis.mobile.connection.task.FindPatientTask;
 import org.hisp.dhis.mobile.connection.task.FindAnonymousProgramTask;
@@ -234,6 +235,12 @@
         FindLostToFollowUpTask findLostToFollowUpTask = new FindLostToFollowUpTask( programId );
         runTask( findLostToFollowUpTask );
     }
+    
+    public static void findLostToFollowUpDetail( String programStageInstanceId )
+    {
+        FindLostToFollowUpDetailTask findLostToFollowUpDetailTask = new FindLostToFollowUpDetailTask( programStageInstanceId );
+        runTask( findLostToFollowUpDetailTask );
+    }
 
     public static void runTask( AbstractTask task )
     {

=== modified file 'src/org/hisp/dhis/mobile/connection/task/FindPatientTask.java'
--- src/org/hisp/dhis/mobile/connection/task/FindPatientTask.java	2013-10-03 08:31:21 +0000
+++ src/org/hisp/dhis/mobile/connection/task/FindPatientTask.java	2013-10-07 03:35:19 +0000
@@ -66,14 +66,14 @@
             {
                 patient.deSerialize( inputStream );
 
-                if ( patient.getId() > 0 )
-                {
+                /*if ( patient.getId() > 0 )
+                {*/
                     nameBasedMIDlet.getPersonDashboardView().setPatient( patient );
                     nameBasedMIDlet.getPersonDashboardView().showView();
-                }
+                /*}
                 else
                 {
-                }
+                }*/
             }
             inputStream = null;
             patient = null;

=== modified file 'src/org/hisp/dhis/mobile/model/DataSet.java'
--- src/org/hisp/dhis/mobile/model/DataSet.java	2012-07-12 02:34:52 +0000
+++ src/org/hisp/dhis/mobile/model/DataSet.java	2013-10-07 03:35:19 +0000
@@ -24,8 +24,6 @@
 import java.io.IOException;
 import java.util.Vector;
 
-import javax.microedition.lcdui.List;
-
 public class DataSet
     extends Model
     implements DataStreamSerializable

=== modified file 'src/org/hisp/dhis/mobile/model/OrgUnit.java'
--- src/org/hisp/dhis/mobile/model/OrgUnit.java	2013-10-01 08:27:26 +0000
+++ src/org/hisp/dhis/mobile/model/OrgUnit.java	2013-10-07 03:35:19 +0000
@@ -72,6 +72,8 @@
     private String findPatientInAdvancedUrl;
     
     private String findLostToFollowUpUrl;
+    
+    private String findLostToFollowUpDetailUrl;
 
     public static double serverVersion;
 
@@ -100,199 +102,104 @@
         return downloadAllUrl;
     }
 
-    public void setDownloadAllUrl( String downloadAllUrl )
-    {
-        this.downloadAllUrl = downloadAllUrl;
-    }
-
     public String getUploadFacilityReportUrl()
     {
         return uploadFacilityReportUrl;
     }
 
-    public void setUploadFacilityReportUrl( String uploadFacilityReportUrl )
-    {
-        this.uploadFacilityReportUrl = uploadFacilityReportUrl;
-    }
-
     public String getUploadActivityReportUrl()
     {
         return uploadActivityReportUrl;
     }
 
-    public void setUploadActivityReportUrl( String uploadActivityReportUrl )
-    {
-        this.uploadActivityReportUrl = uploadActivityReportUrl;
-    }
-
     public String getUpdateDataSetsUrl()
     {
         return updateDataSetsUrl;
     }
 
-    public void setUpdateDataSetsUrl( String updateDataSetsUrl )
-    {
-        this.updateDataSetsUrl = updateDataSetsUrl;
-    }
-
     public String getUpdateActivityPlanUrl()
     {
         return updateActivityPlanUrl;
     }
 
-    public void setUpdateActivityPlanUrl( String updateActivityPlanUrl )
-    {
-        this.updateActivityPlanUrl = updateActivityPlanUrl;
-    }
-
     public String getChangeDataSetLangUrl()
     {
         return changeDataSetLangUrl;
     }
 
-    public void setChangeDataSetLangUrl( String changeDataSetLangUrl )
-    {
-        this.changeDataSetLangUrl = changeDataSetLangUrl;
-    }
-
     public String getSearchUrl()
     {
         return searchUrl;
     }
 
-    public void setSearchUrl( String searchUrl )
-    {
-        this.searchUrl = searchUrl;
-    }
-
     public String getUpdateNewVersionUrl()
     {
         return updateNewVersionUrl;
     }
 
-    public void setUpdateNewVersionUrl( String updateNewVersionUrl )
-    {
-        this.updateNewVersionUrl = updateNewVersionUrl;
-    }
-
     public String getUpdateContactUrl()
     {
         return updateContactUrl;
     }
 
-    public void setUpdateContactUrl( String updateContactUrl )
-    {
-        this.updateContactUrl = updateContactUrl;
-    }
-
     public String getFindPatientUrl()
     {
         return findPatientUrl;
     }
 
-    public void setFindPatientUrl( String findPatientUrl )
-    {
-        this.findPatientUrl = findPatientUrl;
-    }
-
     public String getUploadProgramStageUrl()
     {
         return uploadProgramStageUrl;
     }
 
-    public void setUploadProgramStageUrl( String uploadProgramStageUrl )
-    {
-        this.uploadProgramStageUrl = uploadProgramStageUrl;
-    }
-
     public String getRegisterPersonUrl()
     {
         return registerPersonUrl;
     }
 
-    public void setRegisterPersonUrl( String registerPersonUrl )
-    {
-        this.registerPersonUrl = registerPersonUrl;
-    }
-
     public String getEnrollProgramUrl()
     {
         return enrollProgramUrl;
     }
 
-    public void setEnrollProgramUrl( String enrollProgramUrl )
-    {
-        this.enrollProgramUrl = enrollProgramUrl;
-    }
-
     public String getGetVariesInfoUrl()
     {
         return getVariesInfoUrl;
     }
 
-    public void setGetVariesInfoUrl( String getVariesInfoUrl )
-    {
-        this.getVariesInfoUrl = getVariesInfoUrl;
-    }
-
     public String getAddRelationshipUrl()
     {
         return addRelationshipUrl;
     }
 
-    public void setAddRelationshipUrl( String addRelationshipUrl )
-    {
-        this.addRelationshipUrl = addRelationshipUrl;
-    }
-
     public String getDownloadAnonymousProgramUrl()
     {
         return downloadAnonymousProgramUrl;
     }
 
-    public void setDownloadAnonymousProgramUrl( String downloadAnonymousProgramUrl )
-    {
-        this.downloadAnonymousProgramUrl = downloadAnonymousProgramUrl;
-    }
-
     public String getFindProgramUrl()
     {
         return findProgramUrl;
     }
 
-    public void setFindProgramUrl( String findProgramUrl )
-    {
-        this.findProgramUrl = findProgramUrl;
-    }
-
     public String getFindLatestPersonUrl()
     {
         return findLatestPersonUrl;
     }
 
-    public void setFindLatestPersonUrl( String findLatestPersonUrl )
-    {
-        this.findLatestPersonUrl = findLatestPersonUrl;
-    }
-
     public String getFindPatientInAdvancedUrl()
     {
         return findPatientInAdvancedUrl;
     }
 
-    public void setFindPatientInAdvancedUrl( String findPatientInAdvancedUrl )
-    {
-        this.findPatientInAdvancedUrl = findPatientInAdvancedUrl;
-    }
-
     public String getFindLostToFollowUpUrl()
     {
         return findLostToFollowUpUrl;
     }
-
-    public void setFindLostToFollowUpUrl( String findLostToFollowUpUrl )
+   
+    public String getFindLostToFollowUpDetailUrl()
     {
-        this.findLostToFollowUpUrl = findLostToFollowUpUrl;
+        return findLostToFollowUpDetailUrl;
     }
 
     public void serialize( DataOutputStream dataOutputStream )
@@ -320,6 +227,7 @@
         dataOutputStream.writeUTF( this.findLatestPersonUrl );
         dataOutputStream.writeUTF( this.findPatientInAdvancedUrl );
         dataOutputStream.writeUTF( this.findLostToFollowUpUrl );
+        dataOutputStream.writeUTF( this.findLostToFollowUpDetailUrl );
     }
 
     public void deSerialize( DataInputStream dataInputStream )
@@ -347,11 +255,11 @@
         this.findLatestPersonUrl = dataInputStream.readUTF();
         this.findPatientInAdvancedUrl = dataInputStream.readUTF();
         this.findLostToFollowUpUrl = dataInputStream.readUTF();
+        this.findLostToFollowUpDetailUrl = dataInputStream.readUTF();
     }
 
     public boolean checkNewVersion( double serverVersion )
     {
-
         double clientVersion;
         boolean result = false;
         try

=== modified file 'src/org/hisp/dhis/mobile/recordstore/PatientRecordStore.java'
--- src/org/hisp/dhis/mobile/recordstore/PatientRecordStore.java	2013-10-03 08:57:03 +0000
+++ src/org/hisp/dhis/mobile/recordstore/PatientRecordStore.java	2013-10-07 03:35:19 +0000
@@ -142,7 +142,6 @@
                 Model model = new Model();
 
                 SerializationUtil.deSerialize( patient, recordEnumeration.nextRecord() );
-                //String t = PeriodUtil.dateToString( patient.getBirthDate(), y, m, d );
                 
                 model.setId( patient.getId() );
                 model.setName( patient.getName()+"/"+patient.getBirthDate() );

=== modified file 'src/org/hisp/dhis/mobile/view/LostToFollowUpView.java'
--- src/org/hisp/dhis/mobile/view/LostToFollowUpView.java	2013-10-03 08:31:21 +0000
+++ src/org/hisp/dhis/mobile/view/LostToFollowUpView.java	2013-10-07 03:35:19 +0000
@@ -28,6 +28,7 @@
 
 import java.util.Vector;
 
+import org.hisp.dhis.mobile.connection.ConnectionManager;
 import org.hisp.dhis.mobile.midlet.DHISMIDlet;
 import org.hisp.dhis.mobile.midlet.NameBasedMIDlet;
 import org.hisp.dhis.mobile.model.LinkButton;
@@ -80,10 +81,12 @@
             {
                 public void actionPerformed( ActionEvent ae )
                 {
-                    // to be continue
+                    ConnectionManager.setUrl( nameBasedMIDlet.getCurrentOrgUnit().getFindLostToFollowUpDetailUrl() );
+                    ConnectionManager.findLostToFollowUpDetail( programStageInstanceId );
                 }
             });
             mainForm.addComponent( personLink );
+            eventInfo = null;
         }
     }