dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24799
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12210: set COMPLETED status on completed programStageInstances
------------------------------------------------------------
revno: 12210
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-09-23 13:10:10 +0200
message:
set COMPLETED status on completed programStageInstances
modified:
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.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-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java 2013-09-18 06:54:48 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java 2013-09-23 11:10:10 +0000
@@ -651,6 +651,7 @@
PeriodType.clearTimeOfDay( today );
Date date = today.getTime();
+ programStageInstance.setStatus( ProgramStageInstance.COMPLETED_STATUS );
programStageInstance.setCompletedDate( date );
programStageInstance.setCompletedUser( currentUserService.getCurrentUsername() );
@@ -659,6 +660,7 @@
// ---------------------------------------------------------------------
List<OutboundSms> outboundSms = programStageInstance.getOutboundSms();
+
if ( outboundSms == null )
{
outboundSms = new ArrayList<OutboundSms>();
@@ -671,6 +673,7 @@
// ---------------------------------------------------------------------
List<MessageConversation> messageConversations = programStageInstance.getMessageConversations();
+
if ( messageConversations == null )
{
messageConversations = new ArrayList<MessageConversation>();
@@ -678,7 +681,7 @@
messageConversations.addAll( sendMessageConversations( programStageInstance,
PatientReminder.SEND_WHEN_TO_C0MPLETED_EVENT, format ) );
-
+
// ---------------------------------------------------------------------
// Update the event
// ---------------------------------------------------------------------