dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #26036
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12915: fix bug for enrolling program [j2me]
------------------------------------------------------------
revno: 12915
committer: Lai <lai.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-11-11 09:20:40 +0700
message:
fix bug for enrolling program [j2me]
modified:
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.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/mobile/service/ActivityReportingServiceImpl.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2013-11-05 09:31:47 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2013-11-11 02:20:40 +0000
@@ -782,10 +782,15 @@
}
programStageInstanceService.addProgramStageInstance( programStageInstance );
-
+ programInstance.getProgramStageInstances().add( programStageInstance );
}
-
}
+ programInstanceService.updateProgramInstance( programInstance );
+ patient.getProgramInstances().add( programInstance );
+ patientService.updatePatient( patient );
+
+ patient = patientService.getPatient( patientId );
+
return getPatientModel( patient );
}
@@ -1864,7 +1869,7 @@
}
Patient patientNew = patientService.getPatient( this.patientId );
- this.setPatientMobile( getPatientModel( patientNew ) );
+ setPatientMobile( getPatientModel( patientNew ) );
return patientId;
=== 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-11-05 08:24:51 +0000
+++ dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileOrganisationUnitController.java 2013-11-11 02:20:40 +0000
@@ -77,10 +77,6 @@
private static final String DATASET_REPORT_UPLOADED = "dataset_report_uploaded";
- private static final String PATIENT_REGISTERED = "patient_registered";
-
- private static final String PATIENT_REGISTER_FAIL = "patient_registered_fail";
-
@Autowired
private ActivityReportingService activityReportingService;
@@ -531,7 +527,6 @@
String programId )
throws NotAllowedException
{
-
if ( activityReportingService.savePatient( patient, id, programId ) != null )
{
return activityReportingService.findLatestPatient();
@@ -540,7 +535,6 @@
{
return null;
}
-
}
@RequestMapping( method = RequestMethod.GET, value = "{clientVersion}/LWUIT/orgUnits/{id}/getVariesInfo" )