Managing Query Templates

Veeva Coder lets you add query templates that provide prewritten queries that Coders can use when communicating with Sites about common issues. When querying a Site, Coder users can simply select a query template from a dropdown and then edit the query message as needed. You can control which Form Types each query template is available for, making it easier for Coders to find relevant queries quickly. Query templates make queries more consistent, streamlining the query-writing process to make Coder queries more efficient by reducing time spent manually writing queries.

When you create or import query templates in Coder Tools > Query Templates, they are automatically made available for all Studies in your vault. You can create up to 20 query templates for each Coding Form Type (Adverse Event (AE), Concomitant Medication (CM), Medical History (MH), Other).

Creating Query Templates

To create a query template:

  1. Navigate to Coder Tools > Query Templates.
  2. Click +New Query Template. The New Template page opens. New Query Template Button

  3. Enter a Name for the query template.
  4. Select which Form Type to make this query template available for. Form Types

  5. Enter the query Message.
  6. Click Save. The query template is created.

Importing Query Templates

You can import query templates in Coder Tools > Query Templates. Use the template below as your import file.

  Download the Query Template Import Template

To import query templates:

  1. Navigate to Coder Tools > Query Templates.
  2. Click Import Query Templates. The Import Query Templates page opens. Import Query Template Button

  3. Drag your query template import file to the Drag and drop file here area, or click the area to browse and upload the file.
  4. Click Import. The system sends you an email when the query templates are created.

Import Validation Errors

The table below lists possible import validation errors and their resolutions:

Error Explanation Steps to Resolve
The following column headers are missing in the import file: {Name,} {Message,} {Form Type} One or more columns are missing from the import file. Review the import file and ensure that all required columns are included.
Import file format should be comma separated (CSV). The selected file is not a CSV file. Ensure that the import file is in **CSV format**.
Error: {Name,} {Message,} {Form Type} are required. Data is missing from one of the listed columns. Review the import file and ensure that all data is complete.
Error: {Field Label} must be no greater than {maximum number} characters The character limit of the specified field exceeds the maximum. Review the import file and ensure that the field content is within the character limit.
Error: Values for Form Type can only be a combination of 'AE', 'CM', 'MH', or 'Other'. If multiple values are provided, they must be separated by a comma. Either the specified Form Type values are not separated by a comma, or a different value has been entered in this field. Review the import file and ensure that the Form Types are comma-separated. You can only use 'AE', 'CM', 'MH', or 'Other' as values for Form Types.
Error: The maximum of 20 Query Templates per Form Type would be exceeded for the following: {AE,} {CM,} {MH,} {Other}. You can only upload a maximum of **20 query templates per form type**. With this import, this maximum is exceeded for the specified form types. Review the existing and imported query templates to determine which 20 templates are needed for the specified form type, and remove the other templates.
Error: Name provided already exists or duplicate Name within the import file. Either the import file contains a query with a name that is the same as a previously created query template, or the import file contains duplicate query names. Review the import file for duplicate query names. If the import file does not contain duplicate query names, check whether there is a previously created query template in the system with the same name. Update the name of the affected query template.

Editing Query Templates

To edit query templates:

  1. Navigate to Coder Tools > Query Templates.
  2. Click the name of the query template you want to edit. The query template page opens.
  3. Click Edit.
  4. Make your changes.
  5. Click Save.

Deleting Query Templates

To delete a query template:

  1. Navigate to Coder Tools > Query Templates.
  2. Hover over the row of the query template you want to delete to display the Actions menu.
  3. From the Actions menu, click Delete. Delete Action

  4. In the Delete Template dialog, click Delete to delete the query. Delete Template Dialog

Exporting Query Templates

You can export query templates from your vault to upload them to another vault.

To export the query templates in your vault:

  1. Navigate to Coder Tools > Query Templates.
  2. On the upper right of the page, click the Actions menu icon ().
  3. From the Export section of the Actions menu, click the file format you want to export in. You can export your query templates in CSV or Excel format. Export Template Format

  4. The system generates an export package and sends you an email with a download link when it is ready.