← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12453: add more url for mobile org unit links, fix bugs

 

------------------------------------------------------------
revno: 12453
committer: Lai <lai.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-10-07 09:49:58 +0700
message:
  add more url for mobile org unit links, fix bugs
modified:
  dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/ActivityReportingService.java
  dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/MobileOrgUnitLinks.java
  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/test/java/org/hisp/dhis/mobile/api/model/OrgUnitTest.java
  dhis-2/dhis-services/dhis-service-mobile/src/test/java/org/hisp/dhis/mobile/api/model/OrgUnitsTest.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java
  dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileClientController.java
  dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileOrganisationUnitController.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/ActivityReportingService.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/ActivityReportingService.java	2013-09-30 07:50:50 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/ActivityReportingService.java	2013-10-07 02:49:58 +0000
@@ -99,4 +99,7 @@
 
     public String findLostToFollowUp( int orgUnitId, String programId )
         throws NotAllowedException;
+    
+    public Patient findLostToFollowUpDetail( String programStageIntanceId )
+        throws NotAllowedException;
 }

=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/MobileOrgUnitLinks.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/MobileOrgUnitLinks.java	2013-09-30 07:50:50 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/MobileOrgUnitLinks.java	2013-10-07 02:49:58 +0000
@@ -86,6 +86,8 @@
     private String findPatientInAdvancedUrl;
     
     private String findLostToFollowUpUrl;
+    
+    private String findLostToFollowUpDetailUrl;
 
     @XmlAttribute
     public int getId()
@@ -319,6 +321,16 @@
         this.findLostToFollowUpUrl = findLostToFollowUpUrl;
     }
 
+    public String getFindLostToFollowUpDetailUrl()
+    {
+        return findLostToFollowUpDetailUrl;
+    }
+
+    public void setFindLostToFollowUpDetailUrl( String findLostToFollowUpDetailUrl )
+    {
+        this.findLostToFollowUpDetailUrl = findLostToFollowUpDetailUrl;
+    }
+
     public void serialize( DataOutputStream dataOutputStream )
 
         throws IOException
@@ -345,6 +357,7 @@
         dataOutputStream.writeUTF( this.findLatestPersonUrl );
         dataOutputStream.writeUTF( this.findPatientInAdvancedUrl );
         dataOutputStream.writeUTF( this.findLostToFollowUpUrl );
+        dataOutputStream.writeUTF( this.findLostToFollowUpDetailUrl );
     }
 
     public void deSerialize( DataInputStream dataInputStream )
@@ -372,6 +385,7 @@
         this.findLatestPersonUrl = dataInputStream.readUTF();
         this.findPatientInAdvancedUrl = dataInputStream.readUTF();
         this.findLostToFollowUpUrl = dataInputStream.readUTF();
+        this.findLostToFollowUpDetailUrl = dataInputStream.readUTF();
     }
 
     @Override
@@ -432,5 +446,6 @@
         dataOutputStream.writeUTF( this.findLatestPersonUrl );
         dataOutputStream.writeUTF( this.findPatientInAdvancedUrl );
         dataOutputStream.writeUTF( this.findLostToFollowUpUrl );
+        dataOutputStream.writeUTF( this.findLostToFollowUpDetailUrl );
     }
 }

=== 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-10-03 08:54:10 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java	2013-10-07 02:49:58 +0000
@@ -1355,6 +1355,7 @@
             {
                 Program program = programs.get( 0 );
 
+                //ERROR
                 return getMobileAnonymousProgram( program );
             }
             else
@@ -2026,4 +2027,13 @@
             return "";
         }
     }
+
+    @Override
+    public org.hisp.dhis.api.mobile.model.LWUITmodel.Patient findLostToFollowUpDetail( String programStageIntanceId )
+        throws NotAllowedException
+    {
+        org.hisp.dhis.api.mobile.model.LWUITmodel.Patient patientLWUIT = new org.hisp.dhis.api.mobile.model.LWUITmodel.Patient();
+        
+        return patientLWUIT;
+    }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/test/java/org/hisp/dhis/mobile/api/model/OrgUnitTest.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/test/java/org/hisp/dhis/mobile/api/model/OrgUnitTest.java	2013-09-30 07:50:50 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/test/java/org/hisp/dhis/mobile/api/model/OrgUnitTest.java	2013-10-07 02:49:58 +0000
@@ -70,6 +70,7 @@
         unit.setFindLatestPersonUrl( "findLatestPersonUrl" );
         unit.setFindPatientInAdvancedUrl( "findPatientInAdvanced" );
         unit.setFindLostToFollowUpUrl( "findLostToFollowUpUrl" );
+        unit.setFindLostToFollowUpDetailUrl( "findLostToFollowUpDetailUrl" );
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         DataOutputStream dos = new DataOutputStream( baos );

=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/test/java/org/hisp/dhis/mobile/api/model/OrgUnitsTest.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/test/java/org/hisp/dhis/mobile/api/model/OrgUnitsTest.java	2013-09-30 07:50:50 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/test/java/org/hisp/dhis/mobile/api/model/OrgUnitsTest.java	2013-10-07 02:49:58 +0000
@@ -95,6 +95,7 @@
         unit.setFindLatestPersonUrl( "findLatestPersonUrl" );
         unit.setFindPatientInAdvancedUrl( "findPatientInAdvancedUrl" );
         unit.setFindLostToFollowUpUrl( "findLostToFollowUpUrl" );
+        unit.setFindLostToFollowUpDetailUrl( "findLostToFollowUpDetailUrl" );
         return unit;
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java	2013-10-05 05:15:03 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java	2013-10-07 02:49:58 +0000
@@ -428,6 +428,7 @@
     {
         String sql = searchPatientSql( false, searchKeys, orgunits, followup, patientAttributes, identifierTypes,
             statusEnrollment, min, max );
+
         List<Integer> programStageInstanceIds = new ArrayList<Integer>();
         try
         {
@@ -699,7 +700,7 @@
                     case ProgramStageInstance.LATE_VISIT_STATUS:
                         patientWhere += condition + operatorStatus + "( psi.executiondate is null and  psi.duedate>='"
                             + keys[2] + "' and psi.duedate<='" + keys[3]
-                            + "' and psi.status is null  and (DATE(now()) - DATE(psi.duedate) > 0) ";
+                            + "' and psi.status is not null  and (DATE(now()) - DATE(psi.duedate) > 0) ";
                         // get events by orgunit children
                         if ( keys[4].equals( "-1" ) )
                         {
@@ -833,7 +834,7 @@
         {
             sql += statementBuilder.limitRecord( min, max );
         }
-        
+
         return sql;
     }
 

=== modified file 'dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileClientController.java'
--- dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileClientController.java	2013-09-30 07:50:50 +0000
+++ dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileClientController.java	2013-10-07 02:49:58 +0000
@@ -158,6 +158,7 @@
         orgUnit.setFindLatestPersonUrl( getUrl( request, unit.getId(), "findLatestPerson" ) );
         orgUnit.setFindPatientInAdvancedUrl( getUrl( request, unit.getId(), "findPatientInAdvanced" ) );
         orgUnit.setFindLostToFollowUpUrl( getUrl( request, unit.getId(), "findLostToFollowUp" ) );
+        orgUnit.setFindLostToFollowUpDetailUrl( getUrl( request, unit.getId(), "findLostToFollowUpDetail" ) );
 
         // generate URL for download new version
         String full = UrlUtils.buildFullRequestUrl( request );

=== modified file 'dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileOrganisationUnitController.java'
--- dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileOrganisationUnitController.java	2013-10-03 04:59:39 +0000
+++ dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileOrganisationUnitController.java	2013-10-07 02:49:58 +0000
@@ -401,6 +401,14 @@
     {
         return activityReportingService.findLostToFollowUp( id, programId );
     }
+    
+    @RequestMapping( method = RequestMethod.GET, value = "{clientVersion}/LWUIT/orgUnits/{id}/findLostToFollowUpDetail" )
+    @ResponseBody
+    public Patient findLostToFollowUpDetail( @PathVariable int id, @RequestHeader( "programStageInstanceId" ) String programStageInstanceId )
+        throws NotAllowedException
+    {
+        return null;
+    }
 
     // Supportive methods