dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24681
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12143: compile fix
------------------------------------------------------------
revno: 12143
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-09-18 15:42:06 +0200
message:
compile fix
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/AbstractEnrollmentService.java
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/JacksonEnrollmentService.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-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/AbstractEnrollmentService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/AbstractEnrollmentService.java 2013-09-18 13:09:07 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/AbstractEnrollmentService.java 2013-09-18 13:42:06 +0000
@@ -113,6 +113,15 @@
}
@Override
+ public Enrollments getEnrollments( Patient patient )
+ {
+ List<ProgramInstance> programInstances = new ArrayList<ProgramInstance>(
+ programInstanceService.getProgramInstances( patient ) );
+
+ return getEnrollments( programInstances );
+ }
+
+ @Override
public Enrollments getEnrollments( Patient patient, EnrollmentStatus status )
{
List<ProgramInstance> programInstances = new ArrayList<ProgramInstance>(
@@ -223,7 +232,10 @@
}
catch ( I18nManagerException ex )
{
- return new ImportSummary( ImportStatus.ERROR, ex.getMessage() );
+ ImportSummary importSummary = new ImportSummary( ImportStatus.ERROR, ex.getMessage() );
+ importSummary.getImportCount().incrementIgnored();
+
+ return importSummary;
}
Patient patient = getPatient( enrollment.getPerson() );
@@ -234,8 +246,11 @@
if ( !enrollments.getEnrollments().isEmpty() )
{
- return new ImportSummary( ImportStatus.ERROR, "Person " + person.getPerson() + " already have an active enrollment in program "
+ ImportSummary importSummary = new ImportSummary( ImportStatus.ERROR, "Person " + person.getPerson() + " already have an active enrollment in program "
+ program.getUid() );
+ importSummary.getImportCount().incrementIgnored();
+
+ return importSummary;
}
ProgramInstance programInstance = programInstanceService.enrollPatient( patient, program, enrollment.getDateOfEnrollment(), enrollment.getDateOfIncident(),
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/JacksonEnrollmentService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/JacksonEnrollmentService.java 2013-09-18 12:19:37 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/JacksonEnrollmentService.java 2013-09-18 13:42:06 +0000
@@ -33,6 +33,7 @@
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
import org.hisp.dhis.dxf2.importsummary.ImportSummaries;
import org.hisp.dhis.dxf2.importsummary.ImportSummary;
+import org.hisp.dhis.patient.Patient;
import org.springframework.util.StreamUtils;
import java.io.IOException;