use of org.hisp.dhis.program.notification.event.ProgramEnrollmentCompletionNotificationEvent in project dhis2-core by dhis2.
the class DefaultProgramInstanceService method completeProgramInstanceStatus.
@Override
@Transactional
public void completeProgramInstanceStatus(ProgramInstance programInstance) {
// -----------------------------------------------------------------
// Update program-instance
// -----------------------------------------------------------------
programInstance.setStatus(ProgramStatus.COMPLETED);
updateProgramInstance(programInstance);
// ---------------------------------------------------------------------
// Send sms-message after program completion
// ---------------------------------------------------------------------
eventPublisher.publishEvent(new ProgramEnrollmentCompletionNotificationEvent(this, programInstance.getId()));
eventPublisher.publishEvent(new EnrollmentEvaluationEvent(this, programInstance.getId()));
}
Aggregations