Setup, Design Query Templates for SMS, E-mail and/or Letters & Manage Queries Filters .
Mail Merge Setup page
Click the navigation menu > Debtors & Marketing > Mail Merge Setup page

Setup the Manual Queries Template
- Mail Merge Category: Select Queries from the drop list
- Highlight the relevant Query Type to assign/set up a template for Letter or SMS

Design Queries Letter / E-mail Template
- Click the Edit icon
to design the e-mail and/or Letter Template - Place your curser in the position you wish to insert the input Field
- Mail Merge tab > Click Add Field to insert Input Fields required from the list available (i.e. Location or Provider information, Patient demographics etc)
- Click to select field name (Ctrl key to select multiple rows)
- Repeat steps until you have added all input fields. (You are able to come back and add more if/when necessary at a later stage)
- Click OK

- Back in the Template:
- Write/edit the template as required
- File tab
- Save > Exit

Design Queries SMS Template
- Click the Edit icon to design the SMS template
- Mail Merge tab > Click Add Field to insert Input Fields required from the list available (i.e. Patient Info, Appointment Time/Dates etc)
- Click to select field name (Ctrl key to select multiple rows)
- Repeat steps until you have added all input fields. (You are able to come back and add more if/when necessary at a later stage)
- Click OK

- Back in the Template:
- Write/edit the template as required
- File tab
- Save > Exit

Setup & Manage User-Defined Queries
User Defined Queries can be created as a custom fit campaign/template.
- Examples for a User-Defined templates may be Promotional, End of Year Health Fund Reminder, Holiday Greetings to name a few.
- A User defined query has a limit of 400 characters
- For the purpose of this instruction we will use "End of Year Health Fund Reminder" Campaign
- Patients will only receive communication based on their Send To preferences setup in Patient page, if sending via e-mail and they do not have this selected, they will not receive it. It is advised to use multiple communication channels where possible
To setup Patient Communication instructions click here.There are 2 ways to create a User Defined Queries. Commencing steps from the Queries page or commencing steps from the Mail Merge Setup page.
- From the Queries page:
- Click the navigation menu > Debtors & Marketing > Queries page
- Queries toolbar > Create User-Defined Query
- Name: Enter the name of the query, e.g. EOY Health Fund Reminder

- Click CHANGE USING SIMPLE WIZARD
Column: Insurance Level
- Operator: Doesn't Equal
- Value: NULL
- Logical: And
- Column: Last Exam S+C
- Operator: Less Than
- Value: Enter the date, e.g the start of this year (DD/MM/YYYY)
- Click OK

- Then click Exit
- Next, go to the Mail Merge Setup page to setup the Letter/E-mail and/or SMS templates
- With the new User Defined Query highlighted, follow the same design instructions to setup Templates

- Or From the Mail Merge Setup page:
- Click the navigation menu > Debtors & Marketing > Mail Merge Setup page
- Select the User Define Queries Set
- Click Add TYPE
- Add the new type name
- Click OK

- With the new User Defined Query highlighted, follow the same design instructions to setup Templates

Edit a User-Defined Query Filter
Edit an existing User Defined Query instead of creating a new one.
The filter used when a previous User-Defined Query was created, will remain for all other batches created using the same query. For example: if the filter looked at all patients who visited the practice after 01/01/2024, it may need to be updated to 01/01/2025 the following year
Note: A User defined query has a limit of 400 characters
- Click the navigation menu > Debtors and Marketing > Queries page
- Type: Select the query from the list (e.g. EOY Health Fund Reminder)
- Queries toolbar > Modify User-Defined Query

- CHANGE USING SIMPLE WIZARD
or - CHANGE USING EXTENDED WIZARD
Set the new filter (e.g. Change the year to current)
- Click OK
- Click EXIT
Understanding Filters
Simple Query Filters
Simple Queries allow for less complex filters to be used. The following filters can be used when creating a Simple Query either via the Simple Query Wizard, or when creating a User-Defined Query.
Simple Queries uses the following Operators:
Equals: Returns all records where the selected column equals the text entered
Greater Than: Returns all records where the selected column are higher than the text entered
Less Than: Returns all records where the selected column are less than the text entered
> Than or Equal: Returns all records where the selected column are higher than and including the text entered
< Than or Equal: Returns all records where the selected column are less than and including the text entered
Doesn't Equal: Returns all records where the selected column doesn't equal the text entered
Simple Queries also use the following Logical filters:
And: Returns all records where all arguments are met
Or: Returns all records where either arguments are met
Simple Query Examples
Last Visit: A patients' Last Visit is the last date treatment was entered in the Treatment page.
Last Exam, Scale and Clean: The last time one of the S/C items were entered in the Treatment page
Set Scale and Clean Items for Automated Recalls (link coming soon)
No E-mail Address: The Value 'NULL' is equivalent to a blank field. Therefore writing NULL means there is nothing entered in the E-mail field.
Females Over the Age of 18: The Gender and Age of a patient can be found in Patients > Patients page.
Interested in Cosmetic work:
Specific Insurance Fund
Enter the Insurance Fund Code (in parenthesis), not the full name of the Insurance Fund.
Extended Query Filters
Extended Queries allow for more complex filters to be used compared to Simple Queries. Here are some of the most common filters that you may copy and paste to Extended Queries where relevant.
Birthday Filters:
- Patients with a DOB this Month:
- MONTH (dob) = month (today())
- Patients with a DOB Today:
- MONTH (dob) = month (today()) AND DAY (dob) = day (today())
- Patients with a DOB Yesterday:
- datediff (day, (today()), YMD(Year(today()), month(dob), day(dob))) =-1
- Patients with a DOB the Day Before Yesterday:
- datediff (day, (today()), YMD(Year(today()), month(dob), day(dob))) =-2
- Patients with DOB within the next Week (including today):
- datediff (day, (today()), Ymd(Year(today()), month(dob), day(dob))) <= 6ANDdatediff(day, (today()), Ymd(Year(today()), month(dob), day(dob))) >=0
- Patients with DOB within the Next Calendar Week from Thursday (ie: Mon-Sun):
- datediff (day, (today()), Ymd(Year(today()), month(dob), day(dob))) <= 11ANDdatediff(day, (today()), Ymd(Year(today()), month(dob), day(dob))) >= 4
- Note: This would vary depending on the day of the week. For example from Tuesday:datediff (day, (today()), Ymd(Year(today()), month(dob), day(dob))) <= 13ANDdatediff(day, (today()), Ymd(Year(today()), month(dob), day(dob))) >= 6
- Patients whose DOB is in a particular month:
- month(dob) = 5(month number)This will return patients with a birthday in May.
- Note: Replace “5” with any month required.
- Patients who have a birthday in March and have visited the practice since 01/01/2025:
- month(dob) = 3ANDlast_visit >= Date('2025-01-01')
- Note: Replace “3” with any month required and insert start date as required.
- Patients whose DOB is between 20/08 and 27/08:
- month(dob) = 8 and day(dob) >=20ANDday(dob) <= 27
Reactivation Filters
- Patients who last visited this Month 24 months (2 years) ago:
- last_visit >= DATEADD (month, -24 , Now())ANDlast_visit <= DATEADD (month, -23 , Now())
- Patients who last visited this Month 12 months (1 year) ago:
- last_visit >= DATEADD (month, -12 , Now())ANDlast_visit <= DATEADD (month, -11 , Now())
- Patients aged 18-24 who last visited This Month 24 months (2 years) ago:
- last_visit >= DATEADD (month, -24 , Now())ANDlast_visit <= DATEADD (month, -23 , Now())ANDAge >= 18ANDAge <= 24
- Patients who last visited this Month 24 months (2 years) ago with a health fund:
- last_visit >= DATEADD (month, -24 , Now())ANDlast_visit <= DATEADD (month, -23 , Now())ANDinsurance_level = 'BUPA'
- Note: ‘BUPA’ can be replaced with any health fund. This relates to the insurance plan code.
- Patients who had item #011 performed this Month 24 months (2 years) ago:
- treatment_item_name = '011'ANDdate_treatment_item >= DATEADD (month, -24 , Now())ANDdate_treatment_item <= DATEADD (month, -23 , Now())
- Patients who had item #012 OR item #013 performed this Month 24 months (2 years) ago:
- date_treatment_item >= DATEADD (month, -24 , Now()) ANDdate_treatment_item <= DATEADD (month, -23 , Now()) ANDtreatment_item_name = '012' OR treatment_item_name = '013'
- Note: Any item number can be used instead of 012 and 013. Note the item numbers with the OR clause is listed last. This will return any patient that had either one of these items performed within the date range specified.
- Patients who had treatment performed on a Monday:
- DayName(date_treatment_item) = 'Monday'
- Note: Replace with any day as required.
- Patients who had item #011 performed on a Monday:
- DayName(date_treatment_item) = 'Monday'ANDtreatment_item_name = '011'
- Patients who have not been seen since 19 months ago:
- last_visit > DATEADD (month, -19 , Now())andlast_visit < DATEADD (month, -18 , Now())
You are now ready to Generate your Queries Batches