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 CDB, you can view queries, open a query on an Item, respond to any existing queries with a comment, and close any queries that don’t require any further action.
In Vault EDC, there are two types of queries: system and manual queries. Vault generates system queries by running checks on user-entered data and creating a query when data doesn’t meet specifications defined during study design. For example, Vault creates a system query when an entered date is outside of a certain range. Manual queries are those created by a clinical research associate (CRA), a data manager, or a clinical coder. Any query-related actions that you perform within CDB also apply within Vault EDC. For example, if you create a query on an Item in CDB, that query displays on the Item in EDC.
You can also create manual queries on third party data, but those queries only exist within Vault CDB. To return queries to the third party data source, you can export your queries and manage the collaboration with the third party data provider. When responding to a third party query in CDB, you can 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 |
---|---|---|
Functional Permission | 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 CDBs) |
Functional Permission | API Access | Ability to access and use the Vault CDMS 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.
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
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:
- Hover over the column header for the column you want to sort by.
- Click Sort (filter_list) to open the Sort menu.
- 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.
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.
Opening a Query
You can open a new query from the Cell Details panel within a listing. Note that in the current release, you can only create queries on EDC Items. To create a query on an Event Date, return to the Review tab in EDC to do so.
To open a query:
- Navigate to the listing.
- Click the Cell for the Item on which you want to open a query.
- Click Create Query.
- Click Save.
You can open multiple queries in a single action from a listing.
- Navigate to the listing.
- Select the Checkboxes for the rows you want to query.
- Enter a Query Message.
- Click Submit.
Responding to a Query
You can respond to queries on execution 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. If there are now more than two (2) responses to the query, CDB lists the responses in chronological order, from oldest to newest.
If the query was in the Answered status, responding to it in Workbench returns it to the Open status.
From a Query Listing
To respond to a query:
Vault adds your comment to the query.
From the Cell Details Panel
To respond to a query:
- Navigate to the listing.
- Click the Cell for the Item containing the query.
- Enter a comment.
- Click Reply.
Vault adds your comment to the query.
Respond to Multiple Queries
You can respond to multiple queries with the same message in one action from a query listing.
- Navigate to a query listing.
- Select the Checkboxes for the rows containing queries that you want to respond to.
- Click Save.
Closing a Query
Once a system or manual query is resolved, and no further actions are required, you can close a query. Note that you can’t close a query when the related data Item or Event Date is locked. Closing a query moves it from the Outstanding queries list to the Closed queries list. 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.
Vault automatically closes system queries if a user updates the value to a value that passes the associated edit check.
From a Query Listing
To close a query:
From the Cell Details Panel
To close a query:
- Navigate to the listing.
- Click the Cell for the Item on which you want to close a query.
- Optional: Enter a comment.
- Click Close.
Close Multiple Queries
You can close multiple queries in a batch action from both query listings and data listings.
To close multiple queries from a query listing:
- Navigate to the listing.
- Select the Checkboxes for the rows containing queries you want to close.
- Click Save.
To close multiple queries from a data listing:
- Navigate to the listing.
- Select the Checkboxes for the rows containing queries you want to close.
- Click Close.
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:
- Navigate to the Queries page for your Study.
- Click the Title of the query listing you want to export.
- In the CSV generated successfully notification, click CSV generated to download the CSV file.
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
- Referred to as Origination System (
- Source ID: Unique identifier from the source of the query
- Referred to as Origination ID (
OriginID
) in CDB
- Referred to as Origination ID (
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.