dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32668
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16653: web api - exposed followup property of ProgramInstance through Enrollment
------------------------------------------------------------
revno: 16653
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-09-08 13:29:51 +0200
message:
web api - exposed followup property of ProgramInstance through Enrollment
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/Enrollment.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 2014-08-21 06:21:10 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/AbstractEnrollmentService.java 2014-09-08 11:29:51 +0000
@@ -270,6 +270,7 @@
enrollment.setStatus( EnrollmentStatus.fromInt( programInstance.getStatus() ) );
enrollment.setDateOfEnrollment( programInstance.getEnrollmentDate() );
enrollment.setDateOfIncident( programInstance.getDateOfIncident() );
+ enrollment.setFollowup( programInstance.getFollowup() );
List<TrackedEntityComment> comments = programInstance.getComments();
@@ -345,6 +346,7 @@
}
updateAttributeValues( enrollment );
+ programInstance.setFollowup( enrollment.getFollowup() );
programInstanceService.updateProgramInstance( programInstance );
saveTrackedEntityComment( programInstance, enrollment );
@@ -404,6 +406,7 @@
programInstance.setEntityInstance( entityInstance );
programInstance.setDateOfIncident( enrollment.getDateOfIncident() );
programInstance.setEnrollmentDate( enrollment.getDateOfEnrollment() );
+ programInstance.setFollowup( enrollment.getFollowup() );
if ( programInstance.getStatus() != enrollment.getStatus().getValue() )
{
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/Enrollment.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/Enrollment.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/Enrollment.java 2014-09-08 11:29:51 +0000
@@ -64,6 +64,8 @@
private List<Attribute> attributes = new ArrayList<>();
private List<Note> notes = new ArrayList<>();
+
+ protected Boolean followup;
public Enrollment()
{
@@ -166,6 +168,19 @@
{
this.notes = notes;
}
+
+ @JsonProperty
+ @JsonView( { DetailedView.class, ExportView.class } )
+ @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ public Boolean getFollowup()
+ {
+ return followup;
+ }
+
+ public void setFollowup( Boolean followup )
+ {
+ this.followup = followup;
+ }
@Override
public boolean equals( Object o )