# Admin — Channel Doctor Notification SMS The channelling module can dispatch an SMS for six specific doctor-related events, plus a daily summary message to referring doctors. This article lists each switch and template field, explains what controls fire what, and where to set them. The end-user view of the SMS history this configuration produces is at [Practitioner — Communication History](Practitioner-Communication-History). For the general SMS gateway (URL, credentials, parameter mapping) — written by the channelling team — see [SMS Configuration and Gateway Setup](SMS-Configuration-and-Gateway-Setup). This article complements that one by listing the precise field names that an HMIS admin uses for doctor-event triggers. ## What governs each SMS Every channel-doctor SMS has two parts in the configuration: 1. A **boolean switch** that enables or disables the trigger. 2. A **template string** that defines the message body. If the switch is off, the trigger never fires regardless of template. If the switch is on but the template is empty, the system sends a near-empty message. Always set both before going live. The settings live on the `UserPreference` entity (which is also used at scopes other than per-user in practice). They are administered through the application's *User Preferences* / *Department Preferences* / *Institution Preferences* screens, depending on your installation's scope model. ## The six channel-doctor switches | Trigger event | Switch field | When the event fires | |---|---|---| | Channel booking confirmed | `sendSmsOnChannelBooking` | A patient's channel booking is saved successfully. | | Channel booking cancellation | `sendSmsOnChannelBookingCancellation` | A booking is cancelled. | | Doctor arrival at the clinic | `sendSmsOnChannelDoctorArrival` | The "Doctor Arrived" action is run on a session. Also gated by the older `channelDoctorArivalMsgSend` flag in some installations. | | Booking completion | `sendSmsOnChannelBookingCompletion` | A patient's booking is marked completed at the end of the consultation. | | No-show booking | `sendSmsOnChannelBookingNoShow` | A booking is marked as no-show. | | Doctor payment confirmation | `sendSmsOnChannelBookingDocterPayment` | A payment bill for the doctor's channelling fees is settled. Note the spelling `Docter` is the actual field name. | ## The matching template strings Each switch has a corresponding template stored as a large text field. Use placeholders supported by your installation's SMS substitution code; common placeholders include the patient name, session date, token number, hospital name, doctor name, and amount. | Template field | Used by | |---|---| | `smsTemplateForChannelBooking` | Booking confirmation | | `smsTemplateForChannelBookingCancellation` | Booking cancellation | | `smsTemplateForChannelDoctorArrival` | Doctor arrival | | `smsTemplateForChannelBookingCompletion` | Booking completion | | `smsTemplateForChannelBookingNoShow` | No-show | | `smsTemplateForChannelBookingDoctorPayment` | Doctor payment confirmation | Set the template **once per scope** (institution / department) and confirm the substituted output in [Practitioner — Communication History](Practitioner-Communication-History) after the first real trigger. ## Daily summary for referring doctors A separate channel-side flow sends a daily activity SMS to doctors who referred patients during the day. | Field | Type | Purpose | |---|---|---| | `sentDailySmsSummeryForReferringDoctors` | Boolean | Enables the daily summary dispatch. | | `sentSmsWithInvestigationRequestApproval` | Boolean | Sends an SMS when an investigation request raised by a referring doctor is approved. | The summary text is composed at runtime from the doctor's daily activity (investigation counts, bookings, etc.), so there is no single template field. Each doctor's summary therefore looks slightly different. ## Channel doctor payment bill template | Field | Purpose | |---|---| | `channelingDoctorPaymentBillTemplate` | The body of the doctor-facing payment receipt SMS. This is the human-readable version of the same event covered by `sendSmsOnChannelBookingDocterPayment`. | If both `sendSmsOnChannelBookingDocterPayment` and the bill template are set, the system uses the template content when composing the SMS. If only one is set, behaviour depends on the trigger code path; review the SMS history after the first payment to confirm which content actually shipped. ## Other doctor-relevant template | Field | Purpose | |---|---| | `smsTemplateForOpdBillSetting` | Used for OPD bill notifications (typically sent to the patient or the doctor depending on configuration). Relevant when doctors should be CC'd on OPD activity. | ## Setup checklist 1. **Confirm the SMS gateway is alive.** Without a working gateway, none of the switches matter. See [SMS Configuration and Gateway Setup](SMS-Configuration-and-Gateway-Setup). 2. **Decide which triggers to enable.** Not every hospital wants all six — busy installations often disable Completion and No-Show to limit message volume. 3. **Write the templates.** Use neutral, professional wording. Limit to a single SMS segment (160 characters in GSM-7) where possible; longer messages are split and billed multiply. 4. **Toggle the switches on.** Save each scope (institution / department) you intend to use. 5. **Run a test event.** Make a real channel booking on a test consultant with a known mobile number. Confirm the SMS arrives. 6. **Verify the log entry** in `analytics/sms_list.xhtml` shows Success. ## What this configuration does **not** do - It does not configure the gateway connection itself. - It does not control patient-side SMS for non-channelling modules (clinic, OPD generic). - It does not subscribe doctors to a portal — these are SMS only. - It does not provide per-doctor opt-out. To suppress SMS to a particular doctor, remove their mobile number from the staff record. There is no per-recipient mute. ## Limitations - The field name `sendSmsOnChannelBookingDocterPayment` (spelt with `Docter`) is a long-standing typo preserved for database compatibility. Do not "fix" it — the controller code references the same misspelling, and renaming the column would break behaviour. - Templates are global / per-scope, not per-doctor or per-speciality. - The system does not record which template **version** produced a given log entry. If you edit a template halfway through the day, both old and new outputs appear in history; only the message text differs. - No throttling. If a doctor has fifty bookings on the same session and `ChannelDoctorArrival` fires for each patient, all fifty messages are queued. ## Related articles - [SMS Configuration and Gateway Setup](SMS-Configuration-and-Gateway-Setup) — gateway-side configuration. - [SMS Notifications in Channelling](SMS-Notifications-Channelling) — patient-side description. - [Practitioner — Communication History](Practitioner-Communication-History) — verifying the resulting SMS log. - [Practitioner — Register a Doctor](Practitioner-Register-Doctor) / [Practitioner — Register a Consultant](Practitioner-Register-Consultant) — where the doctor mobile number is captured. [Back to Admin — Practitioner Module Configuration Overview](Admin-Practitioner-Module-Configuration-Overview)