RapidPro Integration in OpenSRP-DGHS, BD Example
OpenSRP-DGHS vaccination app sends two types of messages to beneficiaries/clients (Woman, Child) using Rapidpro.
1. Reminder Messages: Schedule SMS is sent to the beneficiaries based on the Camp/Session date (and also based on vaccine eligibility date of the beneficiary), which is pre-defined from the camp definition web portal.
2. Announcement Messages: There is a bulk SMS sending option integrated in the OpenSRP-DGHS app end, so that the HA (health assistant) can send ‘Announcement Message’ to all the beneficiaries who has a Due vaccine date on that day by a single click.
Figure: High Level Diagram of OpenSRP-DGHS Integration with Rapidpro
Technical Descriptions:
Reminder Messages
A task scheduler job runs in OpenSRP server once in a day which invoke
class="org.opensrp.web.listener.CampListener" | |
Method Name | Descriptions |
method="campRemainderListener" | This listener method find out all upcoming active vaccination camp dates in system. Next it call method “sentMessageToClient” |
method="sentMessageToClient" | Find out all eligible beneficiaries, their type (child/woman) and mobile no who should come to take vaccine on these camp date/dates . Next call forward to method “sentMessage” which through rapid-pro service delivered SMS to end beneficiaries. |
class="org.opensrp.service.MessageService.java" | |
method="sentMessage" | Validate mobile number and this method sends messages through RapidPro to the specified contacts. The method has the following params:
Either of urns, contacts or groups is required since they contain the message recipient(s). This method makes a POST request against Rapidpro /api/v1/broadcasts.json end point and returns a JSON string with the sent message details e.g
|
Announcement message:
A button is available in OpenSRP vaccination app which health assistant (HA) pressed to send vaccination camp announcement messages to their beneficiaries.
This basically invoke a controller method in server.
class="org.opensrp.web.controller.CampController.java" | |
Method Name | Descriptions |
method="campAnnouncement" | This directs call to campAnnouncementListener(String HA) for current health assistant. |
class="org.opensrp.web.listener.CampListener" | |
Method Name | Descriptions |
method="campAnnouncementListener" | This method find all available vaccination camp dates which are active for that health worker. Next it call method “sentMessageToClient” |
method="sentMessageToClient" | Find out all eligible beneficiaries, their type (child/woman) and mobile no who should come to take vaccine on these camp date/dates . Next call forward to method “sentMessage” which through rapid-pro service delivered SMS to end beneficiaries. |
method="sentMessage" | See method description above. |
Related Source Links:
5. https://smartregister.atlassian.net/wiki/display/Documentation/Messaging
This site is no longer maintained. Please visit docs.opensrp.io for current documentation.