Difference between revisions of "Query the Database"

From EHS Help
Jump to: navigation, search
(First draft)
(First draft up to Entering Criteria)
Line 3: Line 3:
  
 
==Selecting the Query==
 
==Selecting the Query==
{ todo }
+
 
 +
The sidebar on the [[Dashboard]] page contains a list of queries & searches.  To initiate a query just press on the option you require.  The options differ only in the data tables they search. For instance, the '''IBID Query''' allows you to query the IBID set of data tables.
 +
 
 +
When you select the Query of your choice, you may need to wait for a few seconds initially whilst all the fields and their parameters are transferred from the server.
 +
 
 +
Queries have two elements:
 +
* The Filter : this is a set of conditions that determine which rows are returned from the database. E.g. ''Sex = Male''
 +
* Output Fields: this is a set of tickboxes that determine which fields are listed in the query output.
  
 
==Entering Criteria==
 
==Entering Criteria==
{ todo }
+
 
 +
The Filter is defined on a row-by-row basis & you can enter multiple conditions.
 +
 
 +
* To start use the '''press the button to add a new condition'''.
 +
* Click on the field name (in green) to open a list of fields in the query. 
 +
** You can select with the mouse, or by starting to type the field name as it's shown.
 +
** Fields are often prefixed with their section names, e.g. Patient.Given Name.
 +
* Click the operator (in red) to select the comparison type.
 +
** In character fields, ''Like'' can be used instead of ''Equals'' to partially match the value you enter. 
 +
*** E.g. ''Patient.Town like chester'' will match ''manchester'' and ''chester'', but ''Patient.Town equals chester'' will only match Chester.
 +
** In name fields, ''Like'' will perform a ''sounds like'' match.
 +
* Click on the value (in blue) to change it.  The type of editor you're presented with depends on the type of the field you're comparing. E.g. a date field will show a date editor, a drop-down field will show the same drop-down options.
 +
 
 +
 
 +
[[File:Ibid query filter definition sample.png]]
  
 
==Selecting Fields to Output==
 
==Selecting Fields to Output==

Revision as of 17:40, 15 May 2013

AquilaCRS icon.png

This topic is for AquilaCRS


Selecting the Query

The sidebar on the Dashboard page contains a list of queries & searches. To initiate a query just press on the option you require. The options differ only in the data tables they search. For instance, the IBID Query allows you to query the IBID set of data tables.

When you select the Query of your choice, you may need to wait for a few seconds initially whilst all the fields and their parameters are transferred from the server.

Queries have two elements:

  • The Filter : this is a set of conditions that determine which rows are returned from the database. E.g. Sex = Male
  • Output Fields: this is a set of tickboxes that determine which fields are listed in the query output.

Entering Criteria

The Filter is defined on a row-by-row basis & you can enter multiple conditions.

  • To start use the press the button to add a new condition.
  • Click on the field name (in green) to open a list of fields in the query.
    • You can select with the mouse, or by starting to type the field name as it's shown.
    • Fields are often prefixed with their section names, e.g. Patient.Given Name.
  • Click the operator (in red) to select the comparison type.
    • In character fields, Like can be used instead of Equals to partially match the value you enter.
      • E.g. Patient.Town like chester will match manchester and chester, but Patient.Town equals chester will only match Chester.
    • In name fields, Like will perform a sounds like match.
  • Click on the value (in blue) to change it. The type of editor you're presented with depends on the type of the field you're comparing. E.g. a date field will show a date editor, a drop-down field will show the same drop-down options.


Ibid query filter definition sample.png

Selecting Fields to Output

{ todo }

Query Results

See Query results for more information