SMS Configuration and Gateway Setup - hmislk/hmis GitHub Wiki
SMS Configuration and Gateway Setup
This article covers the configuration of the SMS gateway and message templates used across the system — including channelling, clinic, and other modules that send patient notifications.
Navigation
SMS configuration is found in the system administration settings:
Menu → Administration → SMS Configuration (or equivalent path in your installation)
Contact your system administrator if this option is not visible in your menu.
SMS Gateway
HMIS supports integration with external SMS gateway providers. The gateway receives the message and phone number from HMIS and delivers the SMS to the patient's mobile network.
Supported Gateway Types
The system can connect to any SMS gateway that exposes an HTTP/HTTPS API (REST or GET-parameter based). Common gateway providers used with HMIS include local telecom-affiliated SMS APIs and third-party bulk SMS platforms.
Gateway Configuration Parameters
| Parameter | Description |
|---|---|
| Gateway URL | The API endpoint of the SMS gateway provider |
| Username / API Key | Authentication credentials for the gateway |
| Password / Secret | Password or API secret |
| Sender ID | The name or number displayed as the SMS sender (e.g., "HospitalName") |
| Message Encoding | Default: GSM7 (standard). Use Unicode for non-Latin character sets (Sinhala, Tamil, etc.) |
| Delivery Report URL | Callback URL for delivery status updates (if supported by the gateway) |
Enter these values in the gateway configuration screen and click Save / Test Connection to verify the setup.
Testing the Gateway
After saving, use the Send Test SMS feature to send a test message to a known phone number and verify delivery.
Message Templates
Templates define the content of automated SMS messages. Each template has:
| Field | Description |
|---|---|
| Event Type | The trigger event (e.g., Booking Confirmed, Reminder, Cancellation) |
| Template Text | The message body with placeholders |
| Active | Whether this template is currently in use |
| Language | Language of the message |
Placeholders
Use placeholders in the template text to insert patient-specific data:
| Placeholder | Replaced With |
|---|---|
{patientName} |
Patient's full name |
{doctorName} |
Consultant's name with title |
{speciality} |
Clinical speciality |
{sessionDate} |
Appointment date (formatted) |
{sessionTime} |
Appointment start time |
{tokenNo} |
Patient's token/serial number |
{hospitalName} |
Institution name |
{bookingRef} |
Booking reference or bill number |
Example template:
"Dear {patientName}, your appointment with {doctorName} ({speciality}) is on {sessionDate} at {sessionTime}. Token: {tokenNo}. {hospitalName}."
SMS Trigger Configuration
Enable or disable SMS for each event type:
| Event | Default | Configurable |
|---|---|---|
| Booking Confirmed | Enabled | Yes |
| Appointment Reminder | Configurable lead time | Yes |
| Session Cancelled | Enabled | Yes |
| Booking Cancelled | Enabled | Yes |
| Booking Rescheduled | Enabled | Yes |
| Doctor Holiday | Disabled | Yes |
Set the Reminder Lead Time (e.g., 24 hours, 48 hours) to control when reminder messages are dispatched.
SMS Reports
View the log of all sent messages and their delivery status:
Menu → Administration → SMS Reports (or the SMS reports section in your configuration)
SMS Report Data
| Column | Content |
|---|---|
| Date/Time Sent | When the message was dispatched |
| Patient | Recipient patient name |
| Phone | Destination number |
| Event Type | What triggered the message |
| Message | Full message content |
| Status | Pending / Delivered / Failed / Rejected |
| Gateway Response | Raw response from the gateway (for troubleshooting) |
Filtering SMS Reports
Filter by:
- Date range
- Event type (booking, reminder, cancellation, etc.)
- Delivery status (failed only, for troubleshooting)
- Patient name or phone number
Failed Messages
If a message shows Failed or Rejected:
- Check the patient's phone number is correct and in the right format (country code required if international)
- Verify gateway credentials and quota
- Check the gateway provider's own dashboard for outage or quota alerts
SMS Credits / Quota
Most gateway providers operate on a credit or subscription model. Monitor your remaining credits from the gateway provider's own portal. Configure an alert threshold so staff are notified before credits run out.
Multi-Language SMS
If your hospital serves patients in multiple languages, configure separate templates per language. The system selects the correct template based on the patient's registered language preference, if configured.