This article is part of the systems administration guide. You will require administration access to view the pages mentioned in this article.
- This document is linked with the User manual, Please don't delete it -
Message Types allow you to create different types of SMS for different situations. Templates can then be associated with a Message Type - it is a multi- step process:
- Step A: Create a Message Type
- Step B: Create Templates for the Message Type
- Step C: Setting the Default Template to use
- Step D: Enable the Message Type
For example, you may create:
- A SMS Message Type for surgery appointment reminders, called "Surgery Appointment Reminder - SMS"
- Associated with this Message Type, you may have two Templates:
- A: Surgery - Type A SMS Reminder - an SMS with fasting instructions for Surgery A, and prompts for a reply to be sent to confirm appointment
- B: Surgery - Type B SMS Reminder - an SMS with fasting instructions for Surgery B, and prompts for a reply to be sent to confirm appointment
The steps below will take you through creating a Message Type and associated templates.
Step A: Create a Message Type
To create a Message Type:
- Click Administration.
- Select Correspondence from the menu.
- Select Message Types.
- The Message Types screen will display.
- Select the New button at the top of the screen.
- Complete fields using the table below as a reference.
- Click Create Message Type.
Field | Description | Examples |
Category | Choose to either create a: · Patient SMS Message : This is a message type that does not relate to an appointment and is for the patient. Messages of these types can be triggered to send on some system event, or they can be sent via the Patient Correspondence > New SMS screen. · Appointment SMS Message: This is a message that relates to an appointment. This could be triggered to send at the creation of an appointment (or x minutes after creation), or as a reminder a set period before the appointment occurs. | Patient SMS Message Appointment SMS Message |
Code | A unique name for the Message Type | Patient SMS Messages: ·New patient SMS ·Patient has not returned admission pack Appointment SMS Messages: ·New Appointment - Surgery ·Appointment Reminder |
Description | A general description for the Message Type | New patient SMS: "New patient SMS message welcoming them to the organisation" |
Step B: Create Templates for the Message Type
Once the Message Type has been created, you need to create one or more SMS templates that can be sent out to patients.
- Template are sets of commonly used blocks of text that is used in a SMS message to a patient.
- Templates are version controlled - the latest version will always be used by default.
- Templates have to be Approved before they become live.
To add a Template:
- Click Administration.
- Select Correspondence from the menu.
- Select Message Types sub-menu item, the Message Types screen will display.
- For the Message Type you just created, select Templates button.
- Select New button.
- Complete fields using the table below as a reference.
- Select Create Correspondence Template button.
- This will return you to the main screen, select Approve button to activate the changes.
Field | Description | Example |
Code | Code for the template | see below |
Description | Description of the SMS template | see below |
Body | SMS Message text, which can include substitution variables for: ·patient first name, ·patient last name, ·appointment time, etc. | see below |
Script | Via a drag and drop builder, you can specify what should happen when the patient replies to a SMS message. | see below |
Example body and scripting:
A: Surgery - Type A SMS Reminder - an SMS with fasting instructions for Surgery A, and prompts for a reply to be sent to confirm appointment B: Surgery - Type B SMS Reminder - an SMS with fasting instructions for Surgery A, and prompts for a reply to be sent to confirm appointment
Code | Description | Body | Script |
SMS-REMINDER-SURG-A | SMS Appointment Reminder - Surgery A | Hi, this confirms your appointment on - Please Fast 12 hours before, reply Y to confirm or call 08 8203 0550 | If SMS message text matches ignoring case the text "y" or If SMS message text matches ignoring case the text "yes" Do set the appointment status to Confirmed By SMS (and) Mark the SMS message as read |
SMS-REMINDER-SURG-B | SMS Appointment Reminder - Surgery B | Hi, this confirms your appointment on {appointment.start_date}} - Please Fast 24 hours before, reply Y to confirm or call 08 8203 0550 | If SMS message text matches ignoring case the text "y" or If SMS message text matches ignoring case the text "yes" Do set the appointment status to Confirmed By SMS (and) Mark the SMS message as read |
Substitution variables can be used in the body of the message - see below for more details. More information on using the drag and drop script builder is below.
Step C: Setting the Default Template to use
After adding the Template, you must set the default template for the Message Type. If this is not done, then the SMS will not appear in the list of available SMS messages to send to a patient.
- Click Administration.
- Select Correspondence from the menu.
- Select Message Types.
- The Message Types screen will display.
- For the Message Type you just created, select Edit button.
- The Edit Message type screen will display.
- in the field Default Template, using the drop down, select the Template you just added from the list.
Step D: Enable the Message Type
Once you have set the default Template, you need to Enable the Message Type. This will make it appear for users to select as a Message Type.
- Click Administration.
- Select Correspondence from the menu.
- Select Message Types.
- The Message Types screen will display.
- For the Message Type you just created, select the Enable button.
- The Message Type is now enabled and ready for use.
Updating a Template
If you wish to update a SMS message that is being sent to patients:
- Click Administration.
- Select Correspondence from the menu.
- Click Message Types.
- For the Message Type you just created, click Templates.
- Click Edit.
- Make any changes.
- Click Update Correspondence Template.
- Click Approve - this will make it live - Without approving the new version of the message will not be used.
Substitution Variables
When setting up a template, you can use Substitution variables to insert fields from the patient record. Substitution variables are denoted by double curly brackets:
Dealing with Replies to SMS messages using Blockly
When setting up a template, you can specify if any action should be taken upon receiving a reply to a SMS message. To do this, you use the drag and drop script builder called "Blockly".
We don't cover writing the Blockly scripts in this guide (although some sample logic in the script box for the example above).
We suggest you complete the "Frozen tutorial" at http://studio.code.org/s/frozen/reset or the "Hour of code" session http://studio.code.org/s/hourofcode/reset
This takes roughly an hour but will give you the basics of creating Blockly scripts.