=== 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-10-22 04:01:39 +0000 +++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/ActivityReportingService.java 2013-10-28 09:53:18 +0000 @@ -102,7 +102,8 @@ public String findLostToFollowUp( int orgUnitId, String programId ) throws NotAllowedException; - + public Notification handleLostToFollowUp( LostEvent lostEvent ) throws NotAllowedException; + } === 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-23 08:26:05 +0000 +++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2013-10-28 09:53:18 +0000 @@ -563,9 +563,8 @@ if ( isNumber( keyword ) == false ) { OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( orgUnitId ); - List patients = (List) patientService.getPatientByFullname( keyword, - organisationUnit ); - + List patients = (List) patientService.getPatientByFullname( keyword, organisationUnit ); + if ( patients.size() > 1 ) { String patientsInfo = new String(); @@ -1400,8 +1399,7 @@ OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( orgUnitId ); String fullName = enrollmentRelationship.getPersonBName(); - List patients = (List) patientService.getPatientByFullname( fullName, - organisationUnit ); + List patients = (List) patientService.getPatientByFullname( fullName, organisationUnit ); // remove the own searcher patients = removeIfDuplicated( patients, enrollmentRelationship.getPersonAId() ); @@ -1812,10 +1810,11 @@ public org.hisp.dhis.api.mobile.model.LWUITmodel.Patient findLatestPatient() throws NotAllowedException { - Patient patient = patientService.getPatient( this.patientId ); - - org.hisp.dhis.api.mobile.model.LWUITmodel.Patient patientMobile = getPatientModel( patient ); - return patientMobile; + // Patient patient = patientService.getPatient( this.patientId ); + // + // org.hisp.dhis.api.mobile.model.LWUITmodel.Patient patientMobile = + // getPatientModel( patient ); + return this.getPatientMobile(); } @Override @@ -1910,6 +1909,9 @@ return patientId; } + Patient patientNew = patientService.getPatient( this.patientId ); + this.setPatientMobile( getPatientModel( patientNew ) ); + return patientId; } @@ -2124,4 +2126,17 @@ return notification; } } + + private org.hisp.dhis.api.mobile.model.LWUITmodel.Patient patientMobile; + + public org.hisp.dhis.api.mobile.model.LWUITmodel.Patient getPatientMobile() + { + return patientMobile; + } + + public void setPatientMobile( org.hisp.dhis.api.mobile.model.LWUITmodel.Patient patientMobile ) + { + this.patientMobile = patientMobile; + } + }