Patient Reminder SMS Template

This is the create/edit/view screen for SMS patient reminder templates.

These are used to generate SMS text for patient reminders. The template can be plain text, macros, or an XPath expression.

The screen is in two parts - the top contains the fields, the bottom allows the template to be tested.

The fields are as follows:

Name the name of the template
Description a description of the template. This should be used if necessary to clarify the purpose of the template.
Active uncheck this to deactivate the template.
Content Type

the template content type. One of Plain Text, Macro or Expression

Content

The content used to generate the SMS text. This should produce text no longer than 160 characters.

XPath expressions may use the following variables directly:

  • $customer - the customer
  • $patient - the patient
  • $location - the practice location
  • $practice - the practice
  • $nl - new line character

These variables are also available to XPath expressions used by macros, if the Content Type is Macro.

 

The bottom part of the screen contains:

Customer allows a customer to be selected, to test the template
Patient allows a patient to be selected, to test the template
Reminder Type allows a reminder type to be selected, to test the template
Message the generated message. The count shows the number of characters remaining.
Status this displays any error message, if the template fails to generate the SMS text

Note that for testing purposes, a customer, patient and reminder type must be selected.

Example XPath expressions

For single patient reminders:

concat($patient.name, ' is due for a vaccination at ',$location.name,'.', $nl, 
     'Please contact us on ',party:getTelephone($location),' to make an appointment')

The XPath expression above will generate an SMS message like:
     Fido is due for a vaccination at Main Clinic.
     Please contact us on 041312345 to make an appointment

For reminders grouped by patient:


concat($patient.name,' is due for a ',list:sortNamesOf(.,'reminderType',',',' & '),$nl, 
'Please contact us on ', party:getTelephone($location), ' to make an appointment')

To produce text like:
     Fido is due for a Grooming, Health check & Vaccination.
     Please contact us on 12345678 to make an appointment.

For reminders grouped by customer:


concat(list:sortNames(list:set('patient'),',',' and ',' is',' are'), 
    ' due for a visit to ',$location.name,'.',$nl,
    'Call ',party:getTelephone($location),' to make a booking')

To produce text like:
     Fido and Muffett are due for a visit to VetsRUs.
     Call 041312345 to make a booking.

For a single patient, it will produce text like:
     Fido is due for a visit to VetsRUs.
     Call 041312345 to make a booking.

You can include reminder types, although its not possible to indicate which reminders apply to which patients.


concat(list:sortNames(list:set('patient'),',',' & ',' is',' are'),
     ' due for a ',list:sortNames(list:set('reminderType'),', ',' & '),$nl,
     'Call ',party:getTelephone($location),' to make a booking')
Syndicate content