The Query Tool is the main component through which users construct, refine, and submit i2b2 queries. Query construction is primarily based on drag-and-drop and selecting the appropriate options. This page details the various 'Query Tool' operations and options and how to use 'Query Tool' in conjunction with other components. The Table of Content offers links to quickly jump to relevant topics. In addition, a quick start video show the query process and to demonstrate the basic query-building features.
This video introduces the basic functionalities of the Query Tool through building a series of simple queries.
An i2b2 query is a request that contains users' search criteria for patients stored in an i2b2 database. A query can be sent to an i2b2 server, where it is evaluated and the results are returned to the users after some time. A query typically contains one or more ontology terms users are interested in. For example, users may select ontology terms to query for patients with certain medications, diagnoses, and demographic information. Users can apply constraints to the terms to be more specific about the criteria. When a query is submitted, it will will take some time for i2b2 to process. Query Status will keep track of how long the query takes to run, and show the results when the query completes. When a query completes, the query itself along with all its results are stored in Previous Queries. Some results such as patient sets can also be used in a new query.
Initially the Query Tool shows three Groups to the users, but only one (the first one) is active. Users are to add criteria via drag-and-drop to the Groups to construct their queries. A number of potential i2b2 objects can be added to the Groups. They include ontology terms, previous queries, results of previous queries, and items from the Workplace.
The Navigate/Find Terms component contains all available ontologies. Users can browse or use its search functionalities to find a certain terms. After identifying the terms users wish to query for, they can drag and drop them into the Groups.
The Previous Queries component lists all previously submitted queries. Users may drag and drop a previous query into a Group. When a new query contains a previous query is executed, i2b2 will run the previous query first. The previous query's results are then used in conjunction with the other terms in the new query to obtain the final results. In this sense, a previous query in a query can be thought of as a sub-query.
For each previous query in the Previous Queries component, its results such as individual patients or patient sets can also be dropped into the Groups.
Workplace is a place where users can put any i2b2 objects such as ontology terms, previous queries, patient sets, etc. they wish to save for later. Users can then drag these saved objects into the query Groups. In addition,
Order of Precedents
(e.g. "Find patients who have a systolic blood pressure reading greater than 130 mm Hg")