Queries in D4W

Queries in D4W

Below is how to generate query batches for multiple different kinds of queries including user-defined queries. 

Generate a Batch using a User-Defined Query

InfoOnce a User-Defined Query Template has been created (see Create a User-Defined Query Template section), it will be available in the list of queries available in the Queries tab. 
  1. Go to Debtors and Marketing > Queries tab
  2. Type: Select the relevant query
  3. Batch Name: Enter the name of the batch
  4. Provider: Select a Provider or All Providers
  5. Exclude the following categories: Ensure all patient categories to be excluded are selected
  6. Excl. patients not seen in: Only enter a number to exclude patients not seen in as many months
  7. ... and mailed this letter within: Only enter a number to exclude patients who have received this exact query in as many months
  8. ... and have appts over next: Only enter a number to exclude patients who have upcoming appointments in as many days
  9. Items: Only enter item(s) if the batch should only include patients who have had these items performed in the Period entered (below)
  10. Period: If item(s) are present, this field relates to when the items were performed, if no items are entered, this field relates to the patients First Seen date
  11. Click Retrieve

  12. The filter associated with this User-Defined Query will appear, editing is possible, otherwise, click OK to proceed

  13. Highlight: All Rows, or manually select those to include
  14. Click Create Batch

  15. Print/Send
    1. Select Recall Letters
    2. Click SMS
      1. Click Select Ready
      2. Click Send

    3. Select all patients with nothing entered in the Printed column (unsent)
    4. Select Recall Letters
    5. Click E-mail
      1. When using MSWord, go to Add-ins tab > Click Send

    6. Select all patients with nothing entered in the Printed column (unsent)
    7. Select Recall Letters
    8. Click Print
      1. When using MSWord, go to Add-ins tab > Click Print

Generate a Batch using Simple Query Wizard

Queries can be generated to view and/or communicate with a list of patients that meet a filter. The below instructions will find all patients whose last visit was before a set date. 

Ensure the template(s) associated with Simple Query are updated to suit this campaign before sending.

  1. Go to Debtors and Marketing > Queries tab
  2. Type: Simple Query Wizard
  3. Batch Name: Enter the name of the batch
  4. Provider: Select a Provider or All Providers
  5. Exclude the following categories: Ensure all patient categories to be excluded are selected
  6. Excl. patients not seen in: Only enter a number to exclude patients not seen in as many months
  7. ... and mailed this letter within: Only enter a number to exclude patients who have received this exact query in as many months
  8. ... and have appts over next: Only enter a number to exclude patients who have upcoming appointments in as many days
  9. Click Retrieve

    1. Column: Select the field, e.g. Last Visit
    2. Operator: Select from the list, e.g. > Than or Equal To
    3. Value: Enter the value, e.g. 01/01/2017
    4. Logical: Choose And to define a finish date of the search, or more filters such as Age (optional)
    5. Treat NULL and Blank equivalently (recommended): This is ticked by default. If data is never entered in a field, it is considered a NULL field. If data was entered but deleted later, the field is considered Blank. Box ticked, the system will treat NULL fields and Blank fields equivalently. 
    6. Click OK

  10. Highlight: All Rows, or manually select those to include
  11. Click Create Batch

    1. Select Query Letters
    2. Click SMS
      1. Click Select Ready
      2. Click Send

    3. Select all patients with nothing entered in the Printed column (unsent)
    4. Select Query Letters
    5. Click E-mail
    6. Enter Email Subject

    7. When using MSWord, go to Add-ins tab > Click Send

    8. Select all patients with nothing entered in the Printed column (unsent)
    9. Select Query Letters
    10. Click Print
      1. When using MSWord, go to Add-ins tab > Click Print 

Generate a Batch using Extended Query Filter

Queries can be generated to view and/or communicate with a list of patients that meet a filter. The below instructions will find all patients whose Date of Birth is Today.

Ensure the template(s) associated with Extended Query Wizard are updated to suit this campaign before sending.

  1. Go to Debtors and Marketing > Queries tab
  2. Type: Extended Query Wizard
  3. Batch Name: Enter the name of the batch
  4. Provider: Select a Provider or All Providers
  5. Exclude the following categories: Ensure all patient categories to be excluded are selected
  6. Excl. patients not seen in: Only enter a number to exclude patients not seen in as many months
  7. ... and mailed this letter within: Only enter a number to exclude patients who have received this exact query in as many months
  8. ... and have appts over next: Only enter a number to exclude patients who have upcoming appointments in as many days
  9. Click Retrieve

    1. Either paste a filter, click here for common filters, or use the Functions, Columns, Operators and Values to build one
    2. Click OK

  10. Highlight: All Rows, or manually select those to include
  11. Click Create Batch
  12. Print/Send
    1. Select Recall Letters   
    2. Click SMS
      1. Click Select Ready
      2. Click Send

    3. Select all patients with nothing entered in the Printed column (unsent)
    4. Select Recall Letters
    5. Click E-mail
      1. When using MSWord, go to Add-ins tab > Click Send

    6. Select all patients with nothing entered in the Printed column (unsent)
    7. Select Recall Letters
    8. Click Print
      1. When using MSWord, go to Add-ins tab > Click Print 

Generate a Treatment Plan Incomplete Query

The Treatment Plan Incomplete Query generates a list of patients who have an active (or inactive) Treatment Plan which has outstanding items on it over a period. 

Ensure the template(s) associated with Treatment Plan Incomplete are updated to suit this campaign before sending.

  1. Go to Debtors and Marketing > Queries tab
  2. Type: Treatment Plan Incomplete
  3. Batch Name: Enter the name of the batch, e.g. November 2019
  4. Plan Status: Select from either active or inactive
  5. Provider: Select a Provider or All Providers
  6. Exclude the following categories: Ensure all patient categories to be excluded are selected
  7. Excl. patients not seen in: Only enter a number to exclude patients not seen in as many months
  8. ... and mailed this letter within: Only enter a number to exclude patients who have received this exact query in as many months
  9. ... and have appts over next: Only enter a number to exclude patients who have upcoming appointments in as many days
  10. Period: The period refers to the date the Treatment Plan was created
  11. Items: Enter item to only show patients with those specific items outstanding
  12. Click Retrieve

  13. Highlight: All Rows, or manually select those to include
  14. Click Create Batch

  15. Print/Send
    1. Select Recall Letters
    2. Click SMS
      1. Click Select Ready
      2. Click Send
    3. Select all patients with nothing entered in the Printed column (unsent)
    4. Select Recall Letters
    5. Click E-mail
      1. When using MSWord, go to Add-ins tab > Click Send

    6. Select all patients with nothing entered in the Printed column (unsent)
    7. Select Recall Letters
    8. Click Print
      1. When using MSWord, go to Add-ins tab > Click Print   

Generate a Query by Date and Procedures

The Query by Date and Procedures generates a list of patients who have had specific treatment in a period of time. 

Ensure the template(s) associated with Query by Date and Procedures are updated to suit this campaign before sending.

  1. Go to Debtors and Marketing > Queries tab
  2. Type: Query by Date and Procedures
  3. Batch Name: Enter the name of the batch, e.g. Crowns in 2019
  4. Provider: Select a Provider or All Providers
  5. Exclude the following categories: Ensure all patient categories to be excluded are selected
  6. Excl. patients not seen in: Only enter a number to exclude patients not seen in as many months
  7. ... and mailed this letter within: Only enter a number to exclude patients who have received this exact query in as many months
  8. ... and have appts over next: Only enter a number to exclude patients who have upcoming appointments in as many days
  9. Period: The period refers to the date the treatment was completed (entered in Treatment tab)
  10. Items: Enter item(s) to base the query on, e.g. 611-634
  11. Click Retrieve

  12. Highlight: All Rows, or manually select those to include
  13. Click Create Batch

  14. Print/Send
    1. Select Recall Letters
    2. Click SMS
      1. Click Select Ready
      2. Click Send

    3. Select all patients with nothing entered in the Printed column (unsent)
    4. Select Recall Letters
    5. Click E-mail
      1. When using MSWord, go to Add-ins tab > Click Send

    6. Select all patients with nothing entered in the Printed column (unsent)
    7. Select Recall Letters
    8. Click Print
      1. When using MSWord, go to Add-ins tab > Click Print  

Send Holiday/Christmas Greetings to Patients

Towards the end of each year, an SMS/E-mail/Letter can be sent to patients wishing them a safe and happy holiday period. The following instructions are for those not using D4W Marketing.
Click here for instructions on how to do this via D4W Marketing (link coming soon). 

Patients will only receive communication based on their Send To preferences, 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.

See Set Patient Preferred Contact Method for Recalls / Queries / Marketing section.

Create a Holiday Greeting Query Template

As Holiday Greetings are sent every year, its best to create a User-Defined Query which will save the settings for the next time its to be used. To update an existing User-Defined Query filter see below section. 

  1. Go to Debtors and Marketing > Queries tab
  2. Queries menu > Create User-Defined Query
    1. Name: Enter the name of the query, e.g. Holiday Greeting
    2. Click Change Using Simple Query Wizard

      1. Column: Last Visit 
      2. Operator: > Than or Equal To
    3. Value: Enter the first date to include patients from, e.g. 01/01/2019
    4. Click OK

    5. Click Exit

Create Letter, E-mail and/or SMS Holiday Greeting Templates

Create the Letter, E-mail and/or SMS template(s) to be sent to patients.

Create the Batch

The below example will generate a batch of all patients treated this year and will send via SMS, e-mail and Print. 

  1. Go to Debtors and Marketing > Queries tab
  2. Type: Select the query created for Holiday Greetings
  3. Batch Name: Enter the name of the batch, e.g. 2019 Greetings
  4. Provider: Select a Provider or All Providers
  5. Exclude the following categories: Ensure all patient categories to be excluded are selected
  6. Excl. patients not seen in: Leave blank
  7. ... and mailed this letter within: Leave blank
  8. ... and have appts over next: It's not recommended to exclude upcoming appointed patients
  9. Period: This refers to the patients First Seen Date, enter the furthest date to include all patients, e.g. 01/01/1990
  10. Click Retrieve

  11. Highlight: All Rows, or manually select those to include
  12. Click Create Batch

  13. Print/Send
    1. Select Recall Letters
    2. Click SMS
      1. Click Select Ready
      2. Click Send

    3. Select all patients with nothing entered in the Printed column (unsent)
    4. Select Recall Letters
    5. Click E-mail
    6. When using MSWord, go to Add-ins tab > Click Send

    7. Select all patients with nothing entered in the Printed column (unsent)
    8. Select Recall Letters
    9. Click Print
      1. When using MSWord, go to Add-ins tab > Click Print   

User-Defined Query - Capture first year expenditures for patients

User-Defined Queries allow for multiple templates and filters to be created specifically for a topic.

This is in place of working off the one template for Simple or Extended Queries, which require the user to overwrite previous templates in Mail Merge.

Create Query

  1. Go to Debtors and Marketing > Queries tab
  2. Queries menu > Create User-Defined Query
    1. Name: Enter the name of the query.
    2. Select the filter to be used

    3. Change using Simple Wizard 
      1. Enter the New Filter Criteria.
      2. Click OK

    4. Click Exit

  3. Next, setup the Letter/E-mail/SMS Template(s) for this query
  4. Generate a Batch using the User-Defined Query (see above section)
  5. Right-click on patients Card No. > Go To > Receipts

Receipt History 

Once the above query has been run, check the receipt history for each patient in the list.

  1. Go to Patient Records > Receipts tab 
  2. Reports menu > Receipts History 
    1. Date: Select the period to base this report on
    2. Header of: Select the Provider whose page header you would like to use
    3. Show inactive providers as well: Tick to include inactive Providers

Edit a User-Defined Query Filter

The filter used when creating a User-Defined Query will remain for all other batches created using the query. For example, if the filter looked at all patients who visited the practice after 01/01/2019, it may need to be updated to 01/01/2020 the following year. 
  1. Go to Debtors and Marketing > Queries tab
  2. Type: Select the query from the list
  3. Queries menu > Modify User-Defined Query
    1. Select the filter to use to edit
      1. Change using Simple Wizard

      2. Change using Extended Wizard

    2. Set the new filter and click OK
    • Related Articles

    • Queries Automation in Dental4Web

      Use Queries Automation in Dental4Web to create batches and automatically send any type of user defined communication, such as birthday messages, promotions and / or seasonal event notifications to name a few. Find out more about Query batches here ...
    • Queries Batches in D4Web

      Queries can be generated to view and/or communicate with a list of patients that meet a filter. Some examples of possible Query batches types may include: Promotional/Marketing, Treatment related, Notifications. Correspondence related to the Query ...
    • Setup & Manage Queries in D4W

      Listed below are instructions for simple and extended query filters, setup manual query templates, how to create a user-defined query and to set duty of care to overwrite unsubscribe feature. Common Simple Query Filters Simple Queries allow for less ...
    • Setup & Manage Manual Queries in D4Web

      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 ...
    • Setup & Manage Automated Queries in D4W

      Listed below are instructions on how to setup automated birthday messages and how to temporarily stop or resume sending queries via Automation. Set Up Automated Birthday Messages via Queries The below instructions are on how to set up automated ...