Defining query conditions

When you create or edit a query, the Define Query page appears. On the Define Query page, you specify conditions and link them with operators. For information about operators, see Specifying query logic.

1.         Click the Queries tab.

The Queries page appears and lists your queries and queries published to you.

2.         Click Create Using Query Wizard.

The Select Configuration page appears.

3.         From the Configuration drop-down list, select a data configuration. You can click Browse to select from a descriptive list of data configurations.

4.         Click Next.

The Define Query page appears.

5.         Click Select Variables.

The Select Variables dialog box appears.

If you need more information about variables, click Show Variables. The Configuration Variables dialog box appears, showing a description of each variable.

6.         From the All Variables in all Tables list, select one or multiple variables on which to base conditions. For more information, see Selecting values from a list.

7.         Click OK.

The Define Query page appears.

8.         A field for each variable you selected appears on the Define Query page. If you point to the field name, a description of the field appears. The application assigns a number to each variable. When you specify query logic, you use that number to refer to the condition that is based on that variable.

9.         If you are creating or editing a query from the Queries tab or for an interactive report, you can specify values for each variable in the query. When running the query, you can change the specified values or enter values (if none were provided in the original query).

or

If you are creating or editing a query in the process of defining a database restriction, custom term, or case series, you must specify values for each variable or remove the variable.

The way in which you specify values depends on the type of variable. For more information, see Selecting query variables.

10.      Each condition that you specify must be referenced by the query logic. If you are not going to reference a condition, you must remove the condition from the query. To remove a condition, click [X] in the upper right corner of the box containing the variable. (After deleting a condition, you might need to respecify values for variables in the other conditions.)

Note: You can include the same variable in the query multiple times. For example, cases for which the subject's age is between 17 and 25 or above 65. You include the AGE variable and set it to 17-25; include the AGE variable again and set it to above 65; then connect the variables with the OR operator.

11.      After adding all variables that you need for specifying conditions, specify query logic by clicking Edit. For more information, see Specifying query logic.

12.      Click OK.

Note: If you add or delete another query variable after this step, the query logic is reset to a default.

13.      If your user preferences include Show case count by default on preview page, you can check Display Case Count in Query Preview. This option requires that you have specified values for all variables in the query. The next page, which is the Preview Query page, shows the count of cases. Computation of the case count can be time-consuming, so Oracle recommends that you display it only when necessary.

14.      To save the query to the library (the Queries page), check Add Query to Library. This option is available when you are defining a new query for a database restriction, custom term, or interactive report or creating a query-based case series. The query has the same name as the case series.

If you add the query to the library, it is separate from the database restriction, custom term, interactive report, or case series. Subsequent modifications of the query in the library have no effect on the database restriction, custom term, interactive report, or case series.

15.      Click Next.

The Preview Query page appears.