27.7. Manage program notifications

27.7.1. About program notifications

You can create program notifications for programs with registration and their program stages. The notifications are sent either via the internal DHIS2 messaging system, via e-mail or via text messages (SMS). You can use program notifications to, for example, send an automatic reminder to a tracked entity 10 days before a scheduled appointment.

You use the program’s tracked entity attributes and the variables to create a notification. The following attributes are available in the Parameters field:

Table 27.12. 

Notification type

Variable name

Variable code

Program

Program name

V{program_name}

Organisation unit name

V{org_unit_name}

Current date

V{current_date}

Program stage

Program name

V{program_name}

Program stage name

V{program_stage_name}

Organisation unit name

V{org_unit_name}

Due date (of the event)

V{due_date}

(Elapsed) days since due date

V{days_since_due_date}

Days until due date

V{days_until_due_date}

Current date

V{current_date}


27.7.2. Create a program notification

  1. Open the Program / Attributes app and click Program.

  2. Click the relevant program and select View program notifications.

    A list of existing program notifications for the selected program opens. If the program doesn't have any program notifications, the list is empty.

  3. Click Add new.

  4. Enter a Name.

  5. In the Trigger by field, select what should trigger the notification.

    Table 27.13. 

    Trigger

    Description

    Note

    Program enrollment

    The program notification is sent when the TEI enrols in the program.

    -

    Program completion

    The program notification is sent when the program of TEI is completed

    -

    Days scheduled (incident date)

    The program notification is sent XX number of days before or after the incident date

    You need to enter the number of days before or after the scheduled date that the notification will be send.

    Days scheduled (enrollment date)

    The program notification is sent XX number of days before or after the enrollment date

    You need to enter the number of days before or after the scheduled date that the notification will be send.


  6. In the Recipients field, select who should receive the program notification.

    Table 27.14. 

    Recipient type

    Description

    Note

    Tracked entity instance

    Receives program notifications via e-mail or text message.

    To receive a program notification, the recipient must have an e-mail address or a phone number attribute.

    Organisation unit contact

    Receives program notifications via e-mail or text message.

    To receive a program notification, the receiving organisation unit must have a registered contact person with e-mail address and phone number.

    Users at organisation unit:

    All users registered to the selected organisation unit receive program notifications via the internal DHIS2 messaging system.

    -

    User group

    All members of the selected user group receive the program notifications via the internal DHIS2 messaging system

    -


  7. Create the Subject template.

    Double-click the parameters in the Parameters field to add them to your subject.

    [Note]Note

    The subject is not included in text messages.

  8. Create the Message template.

    Double-click the parameter names in the Parameters field to add them to your message.

    Example 27.16. 

    Dear A{w75KJ2mc4zz}, You're now enrolled in V{program_name}.


  9. Click Save.

[Note]Note

You configure when the program notifications are sent in the Data Administration app > Scheduling > Program notifications scheduler.

  • Click Run now to send the program notifications immediately.

  • Select a time and click Start to schedule the program notifications to be send at a specific time.

27.7.3. Create a program stage notification

  1. Open the Program / Attributes app and click Program.

  2. Click the relevant program and select View program stages.

  3. Click the relevant program stage and select View program stage notifications.

    A list of existing program stage notifications for the selected program stage opens. If the program stage doesn't have any program stage notifications, the list is empty.

  4. Click Add new.

  5. Enter a Name.

  6. In the Trigger by field, select what should trigger the notification.

    Table 27.15. 

    Trigger

    Description

    Note

    Program stage completion

    The program stage notification is sent when the program stage is completed

    -

    Days scheduled (due date)

    The program stage notification is sent XX number of days before or after the due date

    You need to enter the number of days before or after the scheduled date that the notification will be send.


  7. In the Recipients field, select who should receive the program stage notification. You can select:

    Table 27.16. 

    Recipient type

    Description

    Note

    Tracked entity instance

    Receives program notifications via e-mail or text message.

    To receive a program stage notification, the recipient must have an e-mail address or a phone number attribute.

    Organisation unit contact

    Receives program notifications via e-mail or text message.

    To receive a program stage notification, the receiving organisation unit must have a registered contact person with e-mail address and phone number.

    The system selects the same organisation unit as where the event took place.

    Users at organisation unit:

    All users registered to the selected organisation unit receive program notifications via the internal DHIS2 messaging system.

    -

    User group

    All members of the selected user group receive the program notifications via the internal DHIS2 messaging system

    -


  8. Create the Subject template.

    Double-click the parameter names in the Parameters field to add them to your subject.

    [Note]Note

    The subject is not included in text messages.

  9. Create the Message template.

    Double-click the parameter names in the Parameters field to add them to your message.

    Example 27.17. 

    Dear A{w75KJ2mc4zz}, please come to your appointment the V{due_date}.


  10. Click Save.

[Note]Note

You configure when the program stage notifications are sent in the Data Administration app > Scheduling > Program notifications scheduler.

  • Click Run now to send the program notifications immediately.

  • Select a time and click Start to schedule the program notifications to be send at a specific time.