Querying Data

Vault CDMS uses queries to track inquiries into entered data (for data Items and Event Dates) that is missing, out of range, or otherwise questionable. In both query listings and data listings, you can view queries, respond to any existing queries with a query message, and close any queries that don’t require any further action.

In Vault CDMS, queries can be system-generated, created manually, or generated via API. System queries are generated by EDC Rules and CDB Checks. Manual queries are generated through the EDC Review tab, the Coder tab, or any CDB Data Listing. For example, Vault creates a system query when an entered date is outside of a certain range. Manual queries are those created in data listings by a clinical research associate (CRA), a data manager, or a clinical coder. Note that queries can also be generated through external systems via the CDB Query API or EDC Query API.

Any query-related actions that you perform within CDB automatically appear within Vault EDC if the query is made on a Veeva EDC data Item. For example, if you create a query on a Veeva EDC Item, Event Date, or Event Method, within CDB, that query displays on the Item in EDC. Open EDC and third party source queries are not sent to Veeva EDC.

For third party queries, data providers can respond directly in CDB Workbench, or data managers can respond on their behalf. To deliver query listings to a third party data source, you can export the queries and manage collaboration with the third party data provider. When responding to a third party query in CDB, you can also record the response from the third party data provider to set the query’s status to Answered, and then once the data point is corrected, you can close the query.

Availability: Clinical DataBase (CDB) is only available to CDB license holders. Contact your Veeva Services representative for details.

Prerequisites

Users with the CDMS Lead Data Manager and CDMS Data Manager standard study roles can perform the actions described below automatically. If your organization uses custom Study Roles, your role must grant the permissions listed in the table below.

Users with the CDB Data Provider study role, or roles based on it, must have access assigned to listings by Source from Admin > Users.

Type Permission Label Controls
Standard Tab Workbench Tab

Ability to access and use the Data Workbench application, via the Workbench tab

Functional Permission
Functional Permission Open Query

Ability to create new (open) queries and comment on queries without moving them into the Answered status

Functional Permission Answer Query

Ability to answer queries, moving them into the Answered status. This permission doesn’t provide the ability to open queries.

Functional Permission Answer 3rd Party Queries

Ability to answer queries on third party data items in Workbench

Functional Permission View Selected CDB Query Listings

Ability to view selected query listings (selected in Workbench > Admin > Users) in CDB

Functional Permission View All CDB Query Listings

Ability to view all query listings

Functional Permission Close Query

Ability to close queries

Functional Permission View Casebook

Ability to view information about and from subject Casebooks (for reports, dashboards, and CDB)

Functional Permission API Access

Ability to access and use the Vault EDC API. (This permission is also required to use CDB.)

If your Study contains restricted data, you must have the Restricted Data Access permission to view it.

Learn more about Study Roles.


Viewing Queries in Workbench

To view queries in CDB Workbench, select a Study, and then navigate to the Queries page, either using the Study menu or the Navigation Drawer. This opens the Queries page on the Core tab.

Queries from the Navigation Drawer Queries from the Study menu

By default, Workbench includes this set of query listings for each Source in your study. For example, if your study has two sources, EDC and Labs, Workbench generates two sets of listings and labels them with the source name.

  • Closed Queries: Lists all Queries in the Closed status from this data source in your Study
  • Outstanding Queries: Lists all Queries in the Open or Answered statuses from this data source in your Study
  • Query Messages: Lists all Queries from this data source in your Study

Core query listings

While you can edit the CQL statement for a query listing, Workbench doesn’t allow you to save those changes in the current release. For this reason, no listings display in Queries > Public or Queries > Private.

Sorting the Query Listing

In both the Outstanding and Closed subtabs, you can sort the query listing.

To sort the query listing:

  1. Hover over the column header for the column you want to sort by.
  2. Click Sort (filter_list) to open the Sort menu.
  3. Select Ascending or Descending. Sort menu for the query listing

  4. Click OK.

If a column already has a sort order applied, Workbench shows the Sort icon ( for ascending or for descending). You can click these in the Column Header to change or remove the sort order.

To reset (remove) the sort order, open the Sort menu and click Reset.

Queries in the Cell Details Panel

You can also work with individual queries from listings in the Cell Details panel. To open the Cell Details panel, click the Cell you want to view in the listing’s datasheet. To close the panel, click Close () or click the Cell a second time.

You can drag the top edge of the Cell Details panel to resize it, or click Pop Out () to open it in a new window.

Click the cell to open a query in the Cell Details panel

Query Statuses

Queries in Vault CDMS have three (3) statuses: Open, Answered, and Closed. These statuses indicate which actions have been taken and what still needs to occur on a query.

Responding to a query from Workbench moves a query into the Open status.

Status Meaning
Open Open indicates that a query has not been addressed. This is the status assigned to all newly created queries.
Answered Answered indicates that a query has been addressed. For example, the site has responded with the reason that the queried value is out of range.
Closed Closed indicates that a query requires no further action or discussion. A CRA or data manager can reopen a closed query in Vault EDC if needed.

Syncing Query Statuses with EDC

Vault updates the Query Status of a query to match EDC whenever you click to view that query in Workbench’s Query Details panel. Vault also updates queries and imports any newly created queries from EDC during the Workbench Export job and subsequent import in Workbench, which typically runs each night.

If you have an open query in Workbench, and a Vault EDC user has answered the query since the last time you viewed that query in the Query Details panel (but before the next import run), Workbench updates the query’s status to Answered when you view that query’s details in Workbench.

Responding to a Query

You can respond to queries on EDC and third party data with a comment. Note that you can’t respond to queries when the related data Item or Event Date is locked. Your response then displays in the Query Details and Cell Details panel, as well as the Last Message column of the query listing. Query messages are displayed in chronological order, from oldest to newest.

Query Status: When a user with Open Query permission responds to a query, the query status updates to Open. If a user only has the Answer Query permission (i.e., not Open Query permission), the query status is set to Answered. In other words, responses from Data Managers always set the query status to Open, while only responses from Site users set the query status to Answered.

From a Query Listing

To respond to a query:

  1. Navigate to your Study in Queries > Core.
  2. Click a Query to view it in the Query Details panel. Query Details panel

  3. Enter your query response.
  4. Click Reply. Reply button

The system adds your query message to the query.

From the Cell Details Panel

To respond to a query:

  1. Navigate to the listing.
  2. Click the Cell for the Item containing the query.
  3. Enter a comment.
  4. Click Reply. Reply button

The system adds your query message to the query.

Respond to Multiple Queries

You can respond to multiple queries with the same message in one action from a query listing.

  1. Navigate to a query listing.
  2. Select the Checkboxes for the rows containing queries that you want to respond to.
  3. Optional: To select all rows on the current page, select the Select All checkbox.
    Select All checkbox
  4. Click Reply Query .
    Reply Query Button
  5. Enter a comment.
    Enter a comment
  6. Click Save.

Closing a Query

Once a system or manual query is resolved, you can close queries on EDC and third party data. Note that you can’t close a query when the related data Item or Event Date is locked.

The system can automatically close queries created by EDC Rules or CDB Checks based on a defined set of criteria.

From a Query Listing

To close a query:

  1. Navigate to your Study in Queries > Core.
  2. Click a Query to view it in the Query Details panel. Query Details panel

  3. Optional: Enter a comment.
  4. Click Close. Close button

From the Cell Details Panel

To close a query:

  1. Navigate to the listing.
  2. Click the Cell for the Item on which you want to close a query.
  3. Optional: Enter a comment.
  4. Click Close. Close button

Close Multiple Queries

You can close multiple queries in a batch action from query listings.

To close multiple queries from a query listing:

  1. Navigate to the listing.
  2. Select the Checkboxes for the rows containing queries you want to close.
  3. Optional: To select all rows on the current page, select the Select All checkbox.
    Select All checkbox
  4. Click Close Query .
    Close Query button
  5. Optional: Enter a comment.
    Enter a comment
  6. Click Save.

To close multiple queries from a data listing:

  1. Navigate to the listing.
  2. Select the Checkboxes for the rows containing queries you want to close.
  3. Optional: To select all rows on the current page, select the Select All checkbox.
    Select All checkbox
  4. Click Close Query . This opens the Close Query panel.
    Close Query button
  5. For Close Query on, select either the Event Date or the Item that you want to close queries on.
    Close Query on
  6. Optional: Enter a query message in Message Details.
  7. Click Close.

Outstanding Queries: The Outstanding queries listing shows all queries in the Open or Answered statuses. Closing a query moves it from the Outstanding queries listing to the Closed queries listing. Refresh the page to see this change. Closing a query also removes any query-related cell highlighting from listings referencing the Item or Event Date.

System Queries

Vault CDMS runs a check and creates a system query on any item value that is out of a defined range. That range is defined during study design.

The following system query types are defined automatically:

  • Required: When creating an Item Definition, a study designer can choose to mark a field as required. If this field is left empty when a form is submitted, Vault creates a system query (“This field is required.”).
  • Range: When creating an Item Definition, a study designer can define a range for a field value. If the entered value is outside of that range, Vault creates a system query (“Value is out of range.”). Note that this query type is only for numeric values, not dates.
  • Future Date: When creating an Item Definition, a study designer can disallow future dates. If a user enters a future date, Vault creates a system query (Future dates are not allowed.).
  • Future Date (Event Dates): When creating an Event Definition, a study designer can indicate that future dates aren’t allowed. Vault can then create a system query on any Event Date that is later than the current date when entered.
  • Out of Window (Event Dates): When creating an Event Definition, a study designer can create a window of allowed dates for an Event. If configured, Vault can create a system query any time an Event Date falls outside of this window.

Note that Vault CDMS does not create queries on disabled Items.

Study designers can define additional data validation rules in Studio. Based on those rules, Vault CDMS can create additional system-generated queries.

Exporting Queries

You can export all outstanding or closed queries in your study as a CSV file for documentation and external review. The CSV file contains the same columns as the query listing, and any sorting or filters you apply in the listing also apply to the exported list.

To export queries:

  1. Navigate to the Queries page for your Study.
  2. Click the Title of the query listing you want to export.
  3. From the Queries () menu, select Generate CSV. Generate CSV

  4. In the CSV generated successfully notification, click CSV generated to download the CSV file. Link to download generated CSV

External Queries

External vendors such as JReview®, can specify query source information when opening, answering, or performing other query actions. The query source information is ingested into CDB from EDC using the Query API. This data appears in CDB’s OriginSystem and OriginID fields:

  • Source System Name: The name of the system that added the query from outside of EDC
    • Referred to as Origination System (OriginSystem) in CDB
  • Source ID: Unique identifier from the source of the query
    • Referred to as Origination ID (OriginID) in CDB

The OriginSystem field is limited to 100 characters when set through the CDB Open Query API. Query source changes are visible in CDB Query Listings and @QRY properties in CQL.