Configure Sending SMS and WhatsApp message on Patient Registration
Purpose
In cases where the medical facility would want to notify the patients with their details upon successful registration, then it should trigger an SMS to the phone number added to the patient.
Currently Bahmni supports sending an SMS notification and a WhatsApp notification upon successful registration at the medical facility based on configurations.
Note : If the patient is not registered with phone number, then one can't send either SMS or WhatsApp message notification.
IMPORTANT |
---|
One needs to bring up the |
Configuration to enable sending SMS option for registration
One can enable sending SMS option upon successful registration of any patient in the medical facility. For this we have to update the global property values.
Go to OpenMRS → Admin → Advance Settings and set
sms.endpoint
global property value as/sms-service/notification/sms
. If the property is not available in the Advance Settings, create one and set the value.
Go to OpenMRS → Admin → Advance Settings and set
sms.enableRegistrationSMSAlert
global property value astrue
. By default, the value will befalse
and the SMS won't get triggered when registering a patient. If the property is not available in the Advance Settings, create one and set the value. Once this is enabled, the SMS will get triggered automatically.
One needs to have the privilege Send SMS
for sending any SMS. For this we have to assign the privilege to user’s role.
Go to OpenMRS → Manage Roles → Select Role which needs to have the privilege for sending SMS → assign the privilege
Send SMS
→ save the role. The SMS won’t be sent if the user who are triggering the SMS doesn’t have this privilege.
Configuration to enable WhatsApp option for registration
One can enable sending WhatsApp message option by adding the following configuration under config section in the registration/app.json file.
"enableWhatsAppButton": true |
If "enableWhatsAppButton"
is set as true
, one can see whatsApp icon like below in the registration page near the save
button. Upon clicking the icon and opening WhatsApp, the message will be typed in the chat window of respective contact number of the patient.
Configuration for Message Content
To configure the message content for both SMS and WhatsApp, please add the following configuration under config section in the registration/app.json file.
"registrationMessage": "REGISTRATION_MESSAGE" |
Here, "REGISTRATION_MESSAGE"
is a translation key of localisation. Below are key value pair that needs to be updated in configuration folder bahmni-config/openmrs/i18n/registration/locale_en.json. To know more about what and how to configure translations, please refer internationalization support.
"REGISTRATION_MESSAGE": "Thank you for registering at #clinicName. Please note your Patient Registration Details: #patientId, #name,#gender, #age years. For any queries call us on #helpDeskNumber. Clinic Timings: All weekdays, 10 am - 7 pm. Weekends closed." |
Note : The words start with '#' will be replaced with respective medical facility and patient details dynamically and #helpDeskNumber needs to be configured.
Configure Helpdesk Contact Info
One can configure helpdesk contact info of the medical facility to be sent along with the message. For this we have to update the global property value.
Go to OpenMRS → Admin → Advance Settings and set
clinic.helpDeskNumber
global property value to the medical facility's contact info (phone number/email). By default, the value will be"+919999999999". If the property is not available in the Advance Settings, create one and set the value.
The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)