![JAR search and dependency download from the Maven repository](/logo.png)
webclient.help.content.html Maven / Gradle / Ivy
Show all versions of i2b2-shrine Show documentation
i2b2 Help
i2b2 Web Client Help
i2b2 Find Terms View
The Find Terms view is designed to allow users to search for concepts. Users can search by the name or by a particular code. Once the appropriate concept is found it can be used in many of the i2b2 views and plug-ins, such as the Query Tool view.
Introduction
This section describes the layout and contents of this view.
Layout of the Find Terms View
The Find Terms view allows users to search for a concept, group of concepts, and their associated modifiers. There are basically two methods of searching available;(1) by name and (2) by code.
![FindTerms](images/ftLayout.png)
NOTE:
Regardless of how you search for the concept the layout of both tabs is the same.
Search by Options
This section has two tabs; one is to Search by Name and the other Search by Code. Depending on which tab is active will determine which search method is used to find the concept.
Search Criteria
There are three fields in this section; (1) Qualifier, (2) Text and (3) Category
Qualifier
The qualifier is used to tell the system whether or not you are looking for an exact match or just a partial match. There are four different options to choose from.
- Starting with
- Ending with
- Containing
- Exact
Text
The text box is where you will enter what you are searching for.
Category / Coding System
The category / coding system selection field allows you to narrow down the search to a particular table or set of codes.
Results Section
The results section displays the concepts that were found based on the search criteria.
Standard Coding Systems
The clinical vocabulary that resides in the Ontology Management Cell was partially built using terminology from several standard coding systems. These codes can be used to search for a particular term (see section on Search by Code). The following are some examples of standard coding systems.
ICD-9
- International Classification of Diseases, 9th Revision
- Primarily used for disease surveillance, immunization rates and environmental monitoring.
- Maintained by the National Center for Health Statistics (NCHS) and Centers for Medicare and Medicaid Services (CMS).
Example:
Code: 414.9
Description: Chronic Ischemic Heart Disease, unspecified
LOINC
- Logical Observation Identifiers Names and Codes
- Primarily used for Clinical Health Information (CHI) such as laboratory and clinical test results, history and physicals, discharge summaries, operative notes, tumor registry and nursing observations.
- Licensed and maintained by Regenstrief Institute.
Example:
Code: 13969-1
Description: CPK-MB
NDC
- National Drug Code
- Universal product identifier for drugs intended for human use. Drug products are identified and reported using the NDC.
- Maintained by the Food and Drug Administration (FDA).
Example:
Code: 12783-*178-87
Description: Briston-Myers Squibb, Pravachol, 20 mg tablets
UMLS
- Unified Medical Language System
- A comprehensive thesaurus and ontology of biomedical concepts.
- Maintained by the National Library of Medicine.
Example:
Code: C0001403
Description: Addison's Disease
Layout of the Find Modifiers Section of Find Terms View
An additional section called Find Modifiers is located at the bottom of the Find Terms view. This section is only visible once you find a term and select to find the modifiers from the pop-up menu (see section on Finding Modifiers).
![ftLayoutModifiers](images/ftLayoutModifier.png)
The functionality of finding modifiers is very similar to finding terms in that you can search by name or by code and you can define the search criteria to be used when performing the search.
Search Criteria
There are two fields in this section; (1) Qualifier, and (2) Text
Qualifier
The qualifier is used to tell the system whether or not you are looking for an exact match or just a partial match. There are four different options to choose from.
- Starting with
- Ending with
- Containing
- Exact
Text
The text box is where you will enter what you are searching for.
Search by Options
There are three methods of searching for a modifier; (1) Find Name, (2) Find Code and (3) Get All.
Find Name Button
The text entered will be used to search for the name of the modifier.
Example:
Severity: Mild
Find Code Button
The text entered will be used to search for the code of the modifier.
Example:
255604002 (this is the SNOMED code for Mild Severity)
Get All Button
The Get All button will return all the modifiers associated with a term regardless of what qualifier and text have been entered.
Results Section
The results section displays the concepts that were found based on the search criteria.
Navigation
Expand / Collapse a Folder
Depending on the search criteria, the results section may display groups of concepts which are contained in folders as well as individual concepts. The folders can be expanded to see the listing of concepts in that grouping by clicking on the plus sign (
) or negative sign (
) next to the folder icon.
NOTE:
The ability to expand and collapse folders also extends to the modifier result section which can contain modifiers.
Expand (Open) a Folder
- Click on the plus sign (
) next to the folder in the results section of Find Terms view or the Modifier folder in the Find Modifiers section.
- The folder will open and all the items in the folder will display.
Collapse (Close) a Folder
- Click on the negative sign (
) next to the folder in the results section of Find Terms view or the Modifier folder in the Find Modifiers section.
- The folder will close and all the items in the folder will no longer display.
Options
Users can define how many concepts to display and whether or not to show hidden terms and/or synonyms. The display options are set in the Find Terms Options dialog window, which can be accessed by clicking on the Show Options button (
).
![optionsWindow](images/ftOptions.png)
Maximum to Display
The Maximum number of children to display is used when retrieving the search results to be displayed in the results section of the Find Terms view. Once the maximum number is reached a message will appear informing you that the query has reached the maximum number of terms and suggests you try searching again with a more specific query. Running a search with a more specific query will narrow your results as the selection criteria will not be as broadly defined.
![maxExceed](images/ftMaxExceedMsg.png)
Show Hidden Terms
In the metadata table, an attribute is set to determine whether or not a term is active, inactive or hidden. If an item is marked as hidden it will not appear in the list of terms. Selecting Show Hidden Terms will display those items marked to be hidden. For easy identification, hidden terms will be red when displayed in the results list.
Show Synonymous Terms
Some terms may be flagged in the metadata table as a synonym of another term. Selecting Show Synonymous Terms will display both the original term and the synonym in the Find Terms view. For easy identification, synonymous terms will be blue when displayed in the results list.
Enable Patient Counts
The Enable patient counts option will display the total number of patients that have an observation fact entered for that item.
Use Short Tooltips
By default, the tooltip that displays when you hover over an item will contain the entire path name and the tooltip that is specific to that item. Enabling the Use short tooltips option will only display the tooltip information; the path will not be included.
Show Concept Codes in Tooltips
In addition to showing the tooltip, this option will also display the concept_cd associated to the item.
Disable Modifiers
The ability to search for modifiers will not be available if the Disable modifiers option is checked off.
Searching Terms
This section describes how to search for a term using one of
the two available methods; (1) Search by Name and (2) Search by Code.
Regardless of whether you are searching by name or by code, the first step in entering the search criteria is defining a qualifier. The first field is the “qualifier” and it is a drop-down list with four options:
- Starting with
The results returned will contain only those terms whose name or code begins with the text entered in the search box.
- Ending with
The results returned will contain only those terms whose name or code ends with the text entered in the search box.
- Containing
The results returned will be those terms whose name or code ends with the text entered in the search box.
NOTE:
This search will return the broadest range of results.
- Exact
The results returned will be those terms whose name or code matches exactly to the text entered in the search box.
NOTE:
This search will return the narrowest range of results.
Search by Name
The method of searching by the name is exactly what it sounds like; you can search for a concept by its name.
Search Using "Starting with"
- Click on the drop-down arrow located in the qualifier field.
![findStartWith1](images/ftByNameStartWith01.png)
- Select Starting with from the drop-down list.
![findStartWith2](images/ftByNameStartWith02.png)
- In the text box enter the text for the term you are searching on.
![findStartWith3](images/ftByNameStartWith03.png)
- To narrow your search to a particular category, click on the drop-down arrow in the category selection box. Otherwise, accept the default of Any Category.
![findStartWith4](images/ftByNameStartWith04.png)
- Click on the Find button.
- The results will be displayed in the results section.
![findStartWith5](images/ftByNameStartWith05.png)
Search Using "Ending with"
- Click on the drop-down arrow located in the qualifier field.
![findEndWith1](images/ftByNameEndWith01.png)
- Select Ending with from the drop-down list.
![findEndWith2](images/ftByNameEndWith02.png)
- In the text box enter the text for the term you are searching on.
![findEndWith3](images/ftByNameEndWith03.png)
- To narrow your search to a particular category, click on the drop-down arrow in the category selection box. Otherwise, accept the default of Any Category.
![findTermEnd4](images/ftByNameEndWith04.png)
- Click on the Find button.
- The results will be displayed in the results section.
![findEndWith5](images/ftByNameEndWith05.png)
Search Using "Containing"
- Click on the drop-down arrow located in the Qualifier field.
![findContains1](images/ftByNameContain01.png)
- Select Containing from the drop-down list.
![findContains2](images/ftByNameContain02.png)
- In the text box enter the text for the term you are searching on.
![findContains](images/ftByNameContain03.png)
- To narrow your search to a particular category, click on the drop-down arrow in the category selection box. Otherwise, accept the default of Any Category.
![findContains4](images/ftByNameContain04.png)
- Click on the Find button.
- The results will be displayed in the results section.
![findContain5](images/ftByNameContain05.png)
Search Using "Exact"
- Click on the drop-down arrow located in the qualifier field.
![findExact1](images/ftByNameExact01.png)
- Select Exact from the drop-down list.
![findExact2](images/ftByNameExact02.png)
- In the text box enter the text for the term you are searching on.
![findExact](images/ftByNameExact03.png)
- To narrow your search to a particular category, click on the drop-down arrow in the category selection box. Otherwise, accept the default of Any Category.
![findExact4](images/ftByNameExact04.png)
- Click on the Find button.
- The results will be displayed in the results section.
![findExact5](images/ftByNameExact05.png)
Search by Code
Some of the concepts have a standard code associated with them. This code can be used to search for a specific concept or a grouping of concepts.
NOTE:
The steps listed in this section walk you through a code search using LOINC codes. These same steps can be used when doing a search of any type of code. In step 4, replace LOINC with the coding system you want to search.
Search Using LOINC Code
- In the text box enter the code for the term you are searching on.
![findCode2](images/ftByCodeLoinc02.png)
- Click on the drop-down arrow located in the coding system selection field.
![findCode3](images/ftByCodeLoinc03.png)
- Select LOINC from the drop-down list.
![findCode4](images/ftByCodeLoinc04.png)
- Click on the Find button.
- The results will be displayed in the results section.
![findCode5](images/ftByCodeLoinc05.png)
Searching Modifiers
A modifier is associated with a single term or a group of terms. Therefore in order to search for a modifier you must first search for the term. Once the term is found you can begin the process of finding the modifier. Overall the process of finding modifiers is very similar to searching for a term; you can search by name or by code.
Regardless of whether you are searching by name or by code, the first step in entering the search criteria is defining a qualifier. The first field is the “qualifier” and it is a drop-down list with four options:
- Starting with
The results returned will contain only those modifiers whose name or code begins with the text entered in the search box.
- Ending with
The results returned will contain only those modifiers whose name or code ends with the text entered in the search box.
- Containing
The results returned will be those modifiers whose name or code ends with the text entered in the search box.
NOTE:
This search will return the broadest range of results.
- Exact
The results returned will contain only those modifiers whose name or code matches exactly to the text entered in the search box.
NOTE:
This search will return the narrowest range of results.
Find Modifiers by Name
The method of searching by the name is exactly what it sounds like; you can search for a modifier by its name.
NOTE:
As stated above you must first search for the term before you can find the associated modifiers.
Search Modifiers Using "Starting with"
- Search for your term by either name or code.
- Using the right mouse button, click on the name of the concept (
) or folder (
).
- A pop-up menu will open.
![ftMenu](images/ftMenu.png)
- Select Find Modifiers from the list.
![ftMenuFindModifiers](images/ftMenuFindModifiers.png)
- The Find Modifiers section will display at the bottom of the Find Terms view
![ftModView](images/ftModView.png)
- Click on the drop-down arrow located in the qualifier field.
![ftModQualifierField](images/ftModQualifierField.png)
- Select Starting with from the drop-down list.
![ftModStartWith01](images/ftModStartWith01.png)
- In the text box enter the text for the modifier you are searching on.
![ftModStartWith02](images/ftModStartWith02.png)
- Click on the Find Name button.
![FindNameButton](images/buttonFindName.png)
- The results will be displayed in the results section.
![ftModStartWith03](images/ftModStartWith03.png)
Search Modifiers Using "Ending with"
- Search for your term by either name or code.
- Using the right mouse button, click on the name of the concept (
) or folder (
).
- A pop-up menu will open.
![ftMenu](images/ftMenu.png)
- Select Find Modifiers from the list.
![ftMenuFindModifiers](images/ftMenuFindModifiers.png)
- The Find Modifiers section will display at the bottom of the Find Terms view
![ftModView](images/ftModView.png)
- Click on the drop-down arrow located in the qualifier field.
![ftModQualifierField](images/ftModQualifierField.png)
- Select Ending with from the drop-down list.
![ftModEndWith01](images/ftModEndWith01.png)
- In the text box enter the text for the modifier you are searching on.
![ftModEndWith02](images/ftModEndWith02.png)
- Click on the Find Name button.
![FindNameButton](images/buttonFindName.png)
- The results will be displayed in the results section.
![ftModEndWith02](images/ftModEndWith03.png)
Search Modifiers Using "Containing"
- Search for your term by either name or code.
- Using the right mouse button, click on the name of the concept (
) or folder (
).
- A pop-up menu will open.
![ftMenu](images/ftMenu.png)
- Select Find Modifiers from the list.
![ftMenuFindModifiers](images/ftMenuFindModifiers.png)
- The Find Modifiers section will display at the bottom of the Find Terms view
![ftModView](images/ftModView.png)
- Click on the drop-down arrow located in the qualifier field.
![ftModQualifierField](images/ftModQualifierField.png)
- Select Containing from the drop-down list.
![ftModContain01](images/ftModContain01.png)
- In the text box enter the text for the modifier you are searching on.
![ftModContain02](images/ftModContain02.png)
- Click on the Find Name button.
![FindNameButton](images/buttonFindName.png)
- The results will be displayed in the results section.
![ftModContain03](images/ftModContain03.png)
Search Modifiers Using "Exact"
- Search for your term by either name or code.
- Using the right mouse button, click on the name of the concept (
) or folder (
).
- A pop-up menu will open.
![ftMenu](images/ftMenu.png)
- Select Find Modifiers from the list.
![ftMenuFindModifiers](images/ftMenuFindModifiers.png)
- The Find Modifiers section will display at the bottom of the Find Terms view
![ftModView](images/ftModView.png)
- Click on the drop-down arrow located in the qualifier field.
![ftModQualifierField](images/ftModQualifierField.png)
- Select Exact from the drop-down list.
![ftModExact01](images/ftModExact01.png)
- In the text box enter the text for the modifier you are searching on.
![ftModExact02](images/ftModExact02.png)
- Click on the Find Name button.
![FindNameButton](images/buttonFindName.png)
- The results will be displayed in the results section.
![ftModExact02](images/ftModExact03.png)
Find Modifiers by Code
Some of the modifiers have a standard code associated with them. This code can be used to search for a specific modifier or a grouping of modifiers.
NOTE:
As stated above you must first search for the term before you can find the associated modifiers.
Search by Modifier Code
- Search for your term by either name or code.
- Using the right mouse button, click on the name of the concept (
) or folder (
).
- A pop-up menu will open.
![ftMenu](images/ftMenu.png)
- Select Find Modifiers from the list.
![ftMenuFindModifiers](images/ftMenuFindModifiers.png)
- The Find Modifiers section will display at the bottom of the Find Terms view
![ftModView](images/ftModView.png)
- In the text box enter the code for the modifier you are searching on.
![ftModByCode01](images/ftModByCode01.png)
- Click on the Find Code button.
![FindCodeButton](images/buttonFindCode.png)
- The results will be displayed in the results section.
![ftModByCode02](images/ftModByCode02.png)
Find All Modifiers
In the Find Modifiers section of the Find Terms view there is a Get All button. This button will return all the modifiers associated to a term.
NOTE:
As stated above you must first search for the term before you can find the associated modifiers.
Get All Modifiers
- Search for your term by either name or code.
- Using the right mouse button, click on the name of the concept (
) or folder (
).
- A pop-up menu will open.
![ftMenu](images/ftMenu.png)
- Select Find Modifiers from the list.
![ftMenuFindModifiers](images/ftMenuFindModifiers.png)
- The Find Modifiers section will display at the bottom of the Find Terms view
![ftModView](images/ftModView.png)
- Click on the Get All button.
![getAllButton](images/buttonGetAll.png)
- The results will be displayed in the results section.
![ftModGetAll](images/ftModGetAll.png)
Using Terms
This section describes how to use a concept or group of concepts.
Draggable Items
Individual as well as groups of concepts and modifiers can be dragged and dropped (copied) from the Find Terms View to other views in the i2b2 Web Client.
- Folder
A folder (
) and all its concepts (children) can be added to other views by dragging the folder name from Find Terms to one of the following views.
- Query Tool View; drop in the panel
- Workplace View; drop in a user or shared folder
- Modifier Folder
A modifier folder (
) and all its concepts (children) can be added to other views by dragging the folder name from Find Terms to one of the following views.
- Query Tool View; drop in the panel
- Workplace View; drop in a user or shared folder
- Concept
A concept (
) can be added to other views by dragging the name of the concept from Find Terms to one of the following views.
- Query Tool View; drop in the panel
- Workplace View; drop in a user or shared folder
- Modifier
A modifier (
) can be added to other views by dragging the name of the modifier from Find Terms to one of the following views.
- Query Tool View; drop in the panel
- Workplace View; drop in a user or shared folder
Add to Query Tool View
A folder, individual concept, or modifier can be added to the query tool view by simply dragging the item from Find Terms view and dropping it into one of the panels in the Query Tool view.
Add Folder to Query Tool View
- Highlight the folder (
) by clicking on the name of the folder.
- While holding the left mouse button down, drag the item over to the Query Tool view.
- Drop the item into the panel labeled Group 1.
![qtDragFolderMI](images/qtDragFolderMI.png)
- The folder will now display in the panel for Group 1.
![qtDropFolderMI](images/qtDropFolderMI.png)
Add Concept to Query Tool View
- Highlight the concept (
) by clicking on the name of the concept.
- While holding the left mouse button down, drag the item over to the Query Tool view.
- Drop the item into the panel labeled Group 1.
![qtDragConceptMI](images/qtDragConceptMI.png)
- The concept will now display in the panel for Group 1.
![qtDropConceptMI](images/qtDropConceptMI.png)
Add Modifier to Query Tool View
- Highlight the modifier (
) by clicking on the name of the modifier.
- While holding the left mouse button down, drag the item over to the Query Tool view.
- Drop the item into the panel labeled Group 1.
![qtDragModPrincDx](images/qtDragModPrincDx.png)
- The name of the concept associated to the modifier plus the modifier will now display in the panel for Group 1.
![qtDropModPrincDx](images/qtDropModPrincDx.png)
Add to Workplace View
Information in the workplace is related to the most common concepts and queries that an individual uses and in essence becomes their personal workplace.
![wpView](images/wpView.png)
Add Folder to Workplace View
- Highlight the folder (
) by clicking on the name of the folder.
- While holding the left mouse button down, drag the item over to the Workplace view.
- Drop the item into either your workplace folder or the shared folder.
![wpDragFolder](images/wpDragFolder.png)
- The folder will now display in the Workplace view with the same name.
![wpDropFolder](images/wpDropFolder.png)
Add Concept to Workplace View
- Highlight the concept (
) by clicking on the name of the concept.
- While holding the left mouse button down, drag the item over to the Workplace view.
- Drop the item into either your workplace folder or the shared folder.
![wpDragConcept](images/wpDragConcept.png)
- The concept will now display in the Workplace view with the same name.
![wpDropConcept](images/wpDropConcept.png)
Add Modifier to Workplace View
- Highlight the modifier (
) by clicking on the name of the modifier.
- While holding the left mouse button down, drag the item over to the Workplace view.
- Drop the item into either your workplace folder or the shared folder.
![wpDragModifier](images/wpDragModifier.png)
- The name of the concept associated to modifier and the modifier will now display in the Workplace view.
![wpDropModifier](images/wpDropModifier.png)
i2b2 Navigate Terms View
The Navigate Terms view is designed to display the i2b2 vocabulary concepts that are maintained in the Ontology Management Cell of the i2b2 Hive. These concepts are used in many of the i2b2 views and plug-ins, such as the Query Tool view.
Introduction
This section describes the layout and contents of this view.
Layout of the Navigate Terms View
The Navigate Terms view displays the terms listed in the metadata table(s). These terms are grouped (categorized) with other similar items. These groupings are displayed in a hierarchal tree that can be expanded to view all the concepts and modifiers in the associated category.
![ntView](images/ntView.png)
As stated above, the Navigate Terms view is hierarchical display of the concepts and modifiers in the metadata table(s). The modifiers will always appear with their associated concept.
There are several branches or components of the tree that display.
Table Name
The highest level is the name of the metadata table that stores the vocabulary. This level cannot be used when creating a query.
Containers
A container (
) has other folders, concepts and / or modifiers. It can be expanded and collapsed by clicking on the plus sign (
) or minus sign (
) next to it. It can not be dragged to other views.
Modifier Containers
A modifier container (
) has other modifier folders and / or modifiers. It can be expanded and collapsed by clicking on the plus sign (
) or minus sign (
) next to it. It can not be dragged to other views.
Folders
A folder (
) contains other folders, concepts and / or modifiers. It can be expanded and collapsed by clicking on the plus sign (
) or minus sign (
) next to it. It can also be dragged to other views.
Modifier Folders
A modifier folder (
) contains other modifier folders and / or modifiers. It can be expanded and collapsed by clicking on the plus sign (
) or minus sign (
) next to it. It can also be dragged to other views.
Concepts
The concept (
) is the lowest level of the hierarchy and cannot be expanded further.
Modifiers
The modifier (
) is the lowest level of the hierarchy and cannot be expanded further.
Navigation
Expand / Collapse a Folder
Users can expand or collapse a folder by clicking on the plus sign (
) or negative sign (
) next to the folder icon.
Expand (Open) a Folder
- Click on the plus sign (
) next to the folder in the Navigate Terms view.
- The folder will open and all the items in the folder will display.
Collapse (Close) a Folder
- Click on the negative sign (
) next to the folder in the Navigate Terms view.
- The folder will close and all the items in the folder will display.
Options
Users can define how many concepts to display and whether or not to show hidden terms and/or synonyms. The display options are set in the Navigate Terms Options dialog window, which can be accessed by clicking on the Show Options button (
).
![ntOptions](images/ntOptions.png)
Maximum to Display
The Maximum number of children to display is used when expanding a folder in the Navigate Terms view. Once the maximum number is reached a message will appear informing you that you have reached the maximum and continuing to retrieve all the concepts in the list may affect performance. You will have the option to continue or to cancel the action.
![ntMaxExceed](images/ntMaxExceedMsg.png)
Show Hidden Terms
In the metadata table, an attribute is set to determine whether or not a term is active, inactive or hidden. If an item is marked as hidden it will not appear in the list of terms. Selecting Show Hidden Terms will display those items marked to be hidden. For easy identification, hidden terms will be red when displayed in the results list.
Show Synonymous Terms
Some terms may be flagged in the metadata table as a synonym of another term. Selecting Show Synonymous Terms will display both the original term and the synonym in the Find Terms view. For easy identification, synonymous terms will be blue when displayed in the results list.
Enable Patient Counts
The Enable patient counts option will display the total number of patients that have an observation fact entered for that item.
Use Short Tooltips
By default, the tooltip that displays when you hover over an item will contain the entire path name and the tooltip that is specific to that item. Enabling the Use short tooltips option will only display the tooltip information; the path will not be included.
Show Concept Codes in Tooltips
In addition to showing the tooltip, this option will also display the concept_cd associated to the item.
Disable Modifiers
The ability to search for modifiers will not be available if the Disable modifiers option is checked off.
Using Terms
This section describes how to use a group of concepts, a single concept, and a modifier.
Draggable Items
Individual as well as groups of concepts can be dragged and dropped (copied) from the Navigate Terms view to other views in the i2b2 Web Client.
- Folder
A folder (
) and all its concepts (children) can be added to other views by dragging the folder name from Navigate Terms to one of the following views.
- Query Tool view; drop in the panel.
- Workplace view; drop in a user or shared folder
- Modifier Folder
A modifier folder (
) and all its concepts (children) can be added to other views by dragging the modifier folder name from Navigate Terms to one of the following views.
- Query Tool view; drop in the panel.
- Workplace view; drop in a user or shared folder
- Concept
A concept (
) can be added to other views by dragging the name of the concept from Navigate Terms to one of the following views.
- Query Tool view; drop in the panel.
- Workplace view; drop in a user or shared folder
- Modifier
A modifier (
) can be added to other views by dragging the name of the modifier from Navigate Terms to one of the following views.
- Query Tool view; drop in the panel.
- Workplace view; drop in a user or shared folder
Add to Query Tool View
A folder, individual concept, or modifier can be added to the query tool view by simply dragging the item from Navigate Terms view and dropping it into one of the panels in the Query Tool view.
Add Folder to Query Tool View
- Highlight the folder (
) by clicking on the name of the folder.
- While holding the left mouse button down, drag the item over to the Query Tool view.
- Drop the item into the panel labeled Group 1.
![qtDragFolderMI](images/qtDragFolderMI.png)
- The folder will now display in the panel for Group 1.
![qtDropFolderMI](images/qtDropFolderMI.png)
Add Concept to Query Tool View
- Highlight the concept (
) by clicking on the name of the concept.
- While holding the left mouse button down, drag the item over to the Query Tool view.
- Drop the item into the panel labeled Group 1.
![qtDragConceptMI](images/qtDragConceptMI.png)
- The concept will now display in the panel for Group 1.
![qtDropConceptMI](images/qtDropConceptMI.png)
Add Modifier to Query Tool View
- Highlight the modifier (
) by clicking on the name of the modifier.
- While holding the left mouse button down, drag the item over to the Query Tool view.
- Drop the item into the panel labeled Group 1.
![qtDragModPrincDx](images/qtDragModPrincDx.png)
- The name of the concept associated to the modifier plus the modifier will now display in the panel for Group 1.
![qtDropModPrincDx](images/qtDropModPrincDx.png)
Add to Workplace View
Information in the workplace is related to the most common concepts and queries that an individual uses and in essence becomes their personal workplace.
![wpView](images/wpView.png)
Add Folder to Workplace View
- Highlight the folder (
) by clicking on the name of the folder.
- While holding the left mouse button down, drag the item over to the Workplace view.
- Drop the item into either your workplace folder or the shared folder.
![wpDragFolder](images/wpDragFolder.png)
- The folder will now display in the Workplace view with the same name.
![wpDropFolder](images/wpDropFolder.png)
Add Concept to Workplace View
- Highlight the concept (
) by clicking on the name of the concept.
- While holding the left mouse button down, drag the item over to the Workplace view.
- Drop the item into either your workplace folder or the shared folder.
![wpDragConcept](images/wpDragConcept.png)
- The concept will now display in the Workplace view with the same name.
![wpDropConcept](images/wpDropConcept.png)
Add Modifier to Workplace View
- Highlight the modifier (
) by clicking on the name of the modifier.
- While holding the left mouse button down, drag the item over to the Workplace view.
- Drop the item into either your workplace folder or the shared folder.
![wpDragModifier](images/wpDragModifier.png)
- The name of the concept associated to modifier and the modifier will now display in the Workplace view.
![wpDropModifier](images/wpDropModifier.png)
i2b2 Previous Query View
The Previous Query view is designed to display the most recent queries run by a user. The results associated to the query are also available for viewing.
Introduction
This section describes the layout and contents of the Previous Query view.
NOTE:
There are two types of queries that can be run in the i2b2 Web Client;
-
A standard i2b2 query (
)
-
A Temporal query (
)
Both of these types of queries will appear in the Previous Query view and throughout this document they will both be referred to as a "Previous query".
For more detailed information on the distinction of these two types of queries please see the Query Tool help.
Layout of the Previous Query View
A previous query (
/
) is created when a query is run from the Query Tool.
The query is stored and displayed in the Previous Query view. These previous queries can be used to run new queries or to easily populate other views.
![pqView](images/pqView.png)
The query in the previous query view is comprised of multiple hierarchical levels that can be seen by expanding each level of the tree. These levels are outlined below.
Previous Query Name
The name of the previous query is the top level of the hierarchal tree and is comprised of these three components.
- Query Name - the name given at the time the query was created. The default name contains an abbreviated description and the time the query was run.
- Date - the date the query was created.
- User Id - the user who created (ran) the query.
![pqNameLayout](images/pqNameLayout.png)
Results Folder
The Results folder (
) contains the results of the query. To see the query results simply expand the folder by clicking on the plus sign (
) located next to the result name.
Results
The results associated with a previous query are determined by the query result type(s) that are selected when the query is run in the Query Tool view.
Patient Set
The Patient set (
) appears if Patient set or Timeline was checked at the time the query was run. The set contains all the patients who met the defined search criteria.
![pqPtSet](images/pqPtSet.png)
Encounter Set
The Encounter Set (
) appears if Encounter set was checked at the time the query was run. The set contains all the patients whose encounters met the defined search criteria.
![pqEncSet](images/pqEncSet.png)
Number of Patients
The Number of Patients (
) appears if Number of Patients was checked at the time the query was run. The results are a total count for those patients who met the defined criteria.
![pqPtCount](images/pqPtCount.png)
Gender Patient Breakdown
The Gender patient breakdown (
) appears if Gender patient breakdown was checked at the time the query was run. The results are a breakdown by gender for those patient who met the defined criteria.
![pqGender](images/pqGender.png)
Vital Status Patient Breakdown
The Vital Status patient breakdown (
) appears if Vital Status patient breakdown was checked at the time the query was run. The results are a breakdown by vital status for those patient who met the defined criteria.
![pqGender](images/pqGender.png)
Race Patient Breakdown
The Race patient breakdown (
) appears if Race patient breakdown was checked at the time the query was run. The results are a breakdown by race for those patient who met the defined criteria.
![pqGender](images/pqGender.png)
Age Patient Breakdown
The Age patient breakdown (
) appears if Age patient breakdown was checked at the time the query was run. The results are a breakdown by age for those patient who met the defined criteria.
![pqGender](images/pqGender.png)
Navigation
Rename a Previous Query
Users can rename a previous query from the list by selecting Rename from the popup menu.
- Using the right mouse button, click on the Previous Query to be renamed.
- A pop-up menu will open.
![pqMenu](images/pqMenu.png)
- Select Rename from the list.
![pqMenuRename](images/pqMenuRename.png)
- The rename query dialog box will open.
![pqRenameQuery](images/pqRenameQuery.png)
- Enter the new name of the previous query and click on the OK button.
- The previous query will now display in the view with the new name.
NOTE:
When dragging a previous query to another view the new name will appear when it is dropped.
Delete / Remove a Previous Query
Users can rename a previous query from the list by selecting Delete from the pop-up menu.
- Using the right mouse button, click on the Previous Query to be deleted.
- A pop-up menu will open.
![pqMenu](images/pqMenu.png)
- Select Delete from the list.
![pqMenuDelete](images/pqMenuDelete.png)
- A message box will open asking if you are sure you want to delete the query.
![pqDeleteQueryMsg](images/pqDeleteQueryMsg.png)
- Click on the OK button to delete the query
WARNING:
Once you click on Delete, the previous query will be removed from the view and there is no way to restore it. Therefore you need to make sure you want to remove it from the list.
Refresh the List
Users can refresh the list of previous queries from the list by selecting Refresh All from the pop-up menu.
- Using the right mouse button, click on any of the previous queries in the list.
- A pop-up menu will open.
![pqMenu](images/pqMenu.png)
- Select Refresh All from the list.
![pqMenuRename](images/pqMenuRename.png)
- The list of previous queries and their status will be refreshed.
Options
Users can define how many previous queries to display and the order in which they will appear in the list. The display options are set in the Options for Previous Queries window, which can be accessed by clicking on the Show Options button (
).
![pqOptions](images/pqOptions.png)
Maximum to Display
Queries to Display
The Maximum number of queries to display defines how many previous queries will be visible in the Previous Query view. Once the maximum number is reached the oldest query will no longer appear in the view.
TIP:
Recommendation: Use the Workplace view to save those previous queries that will be used often. In addition to being more convenient it will also prevent you from loosing a common query if the maximum number to display has been reached.
Sort Queries
Sort by Create Date
Selecting to sort By Create Date will sort the queries in the Previous Query view by the date and time the query was created. Once you select to sort by the creation date, you need to define whether or not it will be in ascending or descending order.
Ascending: displays the oldest query first.
Descending: displays the newest query first.
NOTE:
Renaming a query will not affect the sort order as the date and time is stored with the previous query.
Sort by Name
Selecting to sort By Query Name will sort the queries in the Previous Query view alphabetically by the name of the query. Once you select to sort by name, you need to define whether or not it will be in ascending or descending order.
Ascending: queries are displayed in alphabetical order with the beginning of the alphabet at the beginning of the list. (A to Z)
Descending: queries are displayed in alphabetical order with the beginning of the alphabet at the end of the list. (Z to A)
Using a Previous Query
This section describes how to use a previous query.
Draggable Items
Different parts of the previous query can be dragged and dropped (copied) from the Previous Query view to other views in the i2b2 Web Client.
- Previous Query
Associated with each previous query (
/
) are the items used to run the query, any constraints that were defined, and the results. A previous query can be added to other views by dragging the previous query name from Previous Query view to one of the following views.
- Query Tool view; drop in the panel or Query Name.
- Workplace view; drop in a user or shared folder
- Patient Set
A specific set of patients can be added to other views by dragging the Patient set (
) from Previous Query view to one of the following views.
- Query Tool view; drop in the panel.
- Workplace view; drop in a user or shared folder
- Encounter Set
A specific set of encounters (visit list) can be added to other views by dragging the Encounter Set (
) from Previous Query view to one of the following views.
- Query Tool view; drop in the panel.
- Workplace view; drop in a user or shared folder
Add to Query Tool View
The Query Tool view is designed to simplify the process of retrieving information from the database associated to the i2b2 Web Client.
![qtDragPqIschemicHrt](images/qtDragPqIschemicHrt.png)
Within the Previous Query view there are several items that can be used in the Query Tool view to run a query. The following sections explain how to add the previous query, patient set and encounter set to the Query Tool view.
Add Previous Query to Query Tool View
Within the Query Tool view, a previous query can be added to one of the following two locations.
Query Name field
The items and constraints from the original query will be used to create a new query. This information can be edited to make a new query or can be used as is to run the query again.
Panel (Group)
Used within a new query (query-in-query). The information associated with the previous query can not be edited. Add additional search criteria (items) to be used in the new query.
Add Previous Query to the Query Name (New Query)
- Highlight the previous query (
/
) by clicking on the name of the query.
- While holding the left mouse button down, drag the item to the Query Tool view.
- Drop the item into the Query Name field.
![dragPq](images/qtDragPqIschemicHrt.png)
- The item(s) associated with the previous query will display in the appropriate group(s), the name of the query will appear at Query Name, and any constraints that were defined when the original query was run will now default with the new query.
![dropPq](images/qtDropPqIschemicHrt.png)
NOTE:
When you run the query it will receive a new name. This is to distinguish the first previous query from the second.
Add Previous Query to the Query Name (Query-in-Query)
- Highlight the previous query (
/
) by clicking on the name of the query.
- While holding the left mouse button down, drag the item to the Query Tool view.
- Drop the item into the Query Name field.
![qtDragPqIschemicHrtPanel](images/qtDragPqIschemicHrtPanel.png)
- The previous query will now display in the panel for Group 1.
![qtDropPqIschemicHrtPanel](images/qtDropPqIschemicHrtPanel.png)
Add Patient Set to the Query Tool View
- Click on the plus sign (
) next to the name of the previous query that contains the patient set.
- Click on the plus sign (
) next to the results folder.
- Highlight the Patient set (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Query Tool view
- Drop the item into the panel labeled Group 1.
![qtDragPtSet](images/qtDragPtSet.png)
- The item will now display in the panel for Group 1.
![qtDropPtSet](images/qtDropPtSet.png)
Add Encounter Set to the Query Tool View
- Click on the plus sign (
) next to the name of the previous query that contains the encounter set.
- Click on the plus sign (
) next to the results folder.
- Highlight the Encounter set (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Query Tool view
- Drop the item into the panel labeled Group 1.
![qtDragEncSet](images/qtDragEncSet.png)
- The item will now display in the panel for Group 1.
![qtDropEncSet](images/qtDropEncSet.png)
Add to Workplace View
Information in the workplace is related to the most common concepts and queries that an individual uses and in essence becomes their personal workplace.
![wpView](images/wpView.png)
Add Previous Query to Workplace View
- Highlight the previous query (
/
) by clicking on the name of the query.
- While holding the left mouse button down, drag the previous query name to the Workplace view.
- Drop the previous query into either your workplace folder or the shared folder.
![dragPqToWp](images/wpDragPq.png)
- The previous query will now appear in the workplace with the same name.
![dropPqInWp](images/wpDropPq.png)
Add Patient Set to Workplace View
- Click on the plus sign (
) next to the name of the previous query that contains the patient set.
- Click on the plus sign (
) next to the results folder.
- Highlight the Patient set (
) by clicking on its name.
- While holding the left mouse button down, drag the Patient set to the Workplace view.
- Drop the Patient set into either your workplace folder or the shared folder.
![dragPtSetToWp](images/wpDragPtSet.png)
- The Patient set will now appear in the workplace.
![dropPtSetInWp](images/wpDropPtSet.png)
Add Encounter Set to Workplace View
- Click on the plus sign (
) next to the name of the previous query that contains the encounter set.
- Click on the plus sign (
) next to the results folder.
- Highlight the Encounter Set (
) by clicking on its name.
- While holding the left mouse button down, drag the Encounter set to the Workplace view.
- Drop the encounter set into either your workplace folder or the shared folder.
![dragEncSetToWp](images/wpDragEncSet.png)
- The encounter set will now appear in the workplace.
![dropEncSetInWp](images/wpDropEncSet.png)
i2b2 Query Tool View
The Query Tool view is designed to simplify the process of retrieving information from the database associated to the i2b2 Web Client.
Introduction
This section describes the layout and contents of this view.
Layout of the Query Tool View
The Query Tool view is used to define and run a "select query" that will retrieve information from the database associated to the i2b2 Web Client.
![qtView](images/qtView.png)
The Query Tool view can be broken down into several sections which are defined below.
Query Name
The name of a query will be assigned when it is run and will display in the Query Name field.
The only time a query name will appear prior to running the query is when you drag a previous query from either the Previous Query or Workplace views and drop it into the Query Name field.
![qtQueryName](images/qtQueryName.png)
Temporal Constraint
The Temporal Constraint is defined on the query level and depending on what is selected will set the default for the panel timing.
![qtConstTemporal](images/qtConstTemporal.png)
Panel
A panel is the section of the Query Tool view that contains information about a group of concepts. The panel can be broken down into the following sections.
![qtPanelLayout](images/qtPanelLayout.png)
Group Heading
The heading is a label to easily identify the collection of terms. Each heading will contain "Group" followed by a sequential number.
Example: Group 1, Group 2, Group 3, etc.
Selection Criteria
This area of the panel is used to define date selections and other constraints.
Panel Timing
The panel timing defines the constraint on the panel level and uses the patient's visits in determining eligibility.
Group List
This section contains the terms that will be used during the process of querying the database.
Information Box
The content in the information box will change depending on whether or not a term is listed in the panel / group.
- No term(s) listed
- The message will appear as "drop a term on here"
- The color of the box will be yellow
- Term(s) listed
- The message will appear as "one or more of these"
- The color of the box will be green
- An additional information box will appear between panels
NOTE:
Once you add an item to a panel, an additional information box will appear between the two panels containing the text "AND". This is to indicate that each panel will be joined with an AND operator when the SQL query is created.
Toolbar
The toolbar is the bottom section of the Query Tool view and contains several buttons that perform various actions.
![qtToolbarLayout](images/qtToolbarLayout.png)
Run Query / Cancel Query Button
On the toolbar for the Query Tool there is a single button for running and canceling a query. Depending on the circumstances defined below the label on this button and its associated action will change to one of the following: (1) Run Query or (2) Cancel Query.
Run Query Button
Clicking on the button labeled Run Query will run your query with the defined search criteria.
![qtToolbarRunQuery](images/qtToolbarRunQuery.png)
Cancel Query Button
Once you start running a query, the label will change to Cancel Query. Clicking on the button when it says Cancel Query will cancel the query and free up the Query Tool / Web client so that you can continue to do other things.
NOTE:
Clicking on Cancel Query in the Query Tool will only cancel the web client piece of the process. The server side will continue to run.
![qtToolbarCancelQuery](images/qtToolbarCancelQuery.png)
Clear Button
The Clear button will reset the view to the default; this includes deleting the concepts listed in the panel and removing any constraint that have been defined.
![qtToolbarClear](images/qtToolbarClearButton.png)
Print Query Button
The Print button will open a window with the query information in a printable format.
![qtToolbarPrint](images/qtToolbarPrintQuery.png)
Query Status View
The Query Status view is located below the Query Tool view and contains information regarding the status of a query that is either running or has just finished as well as the results of a previous query.
![queryStatusView](images/qtQueryStatusView.png)
While a query is running you will see the name of the query and how long it has been running.
![queryStatusRun](images/qtQueryStatusRunMI.png)
Once the query has finished, the number of patients meeting the search criteria will appear in this view. You will also see the length of time it took to retrieve the requested information. This is a display only view.
![queryStatusFinish](images/qtQueryStatusFinishMI.png)
NOTE:
The result types that appear will depend on what you have selected when running the query..
Options
Users can define how long to wait before a query will time out. This setting is defined in the Query Tool Options, which can be accessed by clicking on the Show Options button (
).
![qtOptions](images/qtOptions.png)
The default setting is 180 seconds, which means the web client will wait for a response from the server for 180 seconds. Once it reaches that time it will display a message saying the query has timed out and will continue to run in the background.
Creating a Query
This section describes the process of adding items to the query tool, "AND" / "OR" operators and setting constraints.
Draggable Items
In order to create your query, you will need to define what information will be retrieved from the databases. Selected items from other i2b2 Web Client views can be dragged and dropped (copied) into the Query Tool view.
- Concepts
Concepts (
) can be defined as terms, results, providers, etc. They can be added as a group (folder (
)) or individually by dragging the item(s) from Navigate Terms, Find Terms, and Workplace views.
- Modifiers
Modifiers (
) are associated with a concept or group of concepts. They can be added as a group ( modifier folder (
)) or individually by dragging the item(s) from Navigate Terms, Find Terms, and Workplace views.
- Previous Query
A new query can be created from one that has already been run by dragging the previous query (
) from Previous Query and Workplace views.
- Patient Set
A patient set (
) can be can be used in a query by dragging the patient set from Previous Query and Workplace views . When you run the query it will use the patient set to query against.
- Encounter Set
An encounter set (
) can be used in a query by dragging the patient set from Previous Query and Workplace views. When you run the query it will use the encounter set to query against.
Operators
There are two operators, known as SQL Logical Operators, which are necessary when running a query that has more than one item. These operators provide a way to specify exactly what you want to retrieve. The operators are the 'AND' and 'OR' operators.
IMPORTANT:
The query tool knows which operator to use based on the panels used when defining the query. It is important to verify you are setting up your query correctly as each operator will return different results.
AND Operator
The AND operator returns a record if both the first condition and the second conditions are true.
The query tool uses the AND operator when concepts are listed in different panels.
Example:
WHAT: Return only those patients who have Acute Myocardial Infarction AND Angina Pectoris.
HOW: In the query tool add the concept Acute Myocardial Infarction to Group 1 and then add the concept Angina Pectoris to Group 2.
RESULT: The population is limited by requiring the patients fulfill both requirements.
![qtOperatorAND](images/qtOperatorAnd.png)
OR Operator
The OR operator returns a record if either the first condition or the second conditions are true.
The query tool uses the OR operator when concepts are listed in different panels.
Example:
WHAT: Return only those patients who have Acute Myocardial Infarction OR Angina Pectoris.
HOW: In the query tool add both concepts Acute Myocardial Infarction and Angina Pectoris to Group 1.
RESULT: The population is broadened to include all patients who fit either one of those criteria.
![qtOperatorOR](images/qtOperatorOr.png)
Add Concepts
Concepts can be added to the Query Tool view by simply dragging the concept from one of the following views.
- Navigate Terms view
- Find Terms view
- Workplace view
How to add a concept from each of these views is explained in the next few sections.
Navigate Terms View
The Navigate Terms view contains a hierarchical display of all the items that can be used to search the database.
NOTE:
How the items are grouped and displayed is dependent on how the database is setup.
![ntView](images/ntView.png)
Add Concept From Navigate Terms View
- In the Navigate Terms view, expand the folder(s) that contains the concept or grouping of concepts you want to add.
- Highlight the concept (
) or folder (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Query Tool view
- Drop the item into the panel labeled Group 1.
![qtDragFolderCardioAgents](images/qtDragFolderCardioAgents.png)
- The item will now display in the panel for Group 1.
![qtDropFolderCardio](images/qtDropFolderCardioAgents.png)
Find Terms View
The Find Terms view provides a way to search for a particular concept.
![ftView](images/ftView.png)
NOTE:
For detailed information on how to search for terms, please see the i2b2 Find Terms help.
Add Concept From Find Terms View
- In the Find Terms view, search for the item(s) you want to add.
- Highlight the concept (
) or folder (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Query Tool view
- Drop the item into the panel labeled Group 1.
![qtDragFolderCardioAgents](images/qtDragFolderCardioAgents.png)
- The item will now display in the panel for Group 1.
![qtDropFolderCardio](images/qtDropFolderCardioAgents.png)
Workplace View
Information in the workplace is related to the most common concepts, modifiers, and queries that an individual uses and in essence becomes their personal workplace.
![wpView](images/wpView.png)
Add Concept From Workplace View
- In the Workplace view, expand the folder(s) that contains the concept or grouping of concepts you want to add.
- Highlight the concept (
) or folder (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Query Tool view
- Drop the item into the panel labeled Group 1.
![qtDragFolderCardioAgents](images/qtDragFolderCardioAgents.png)
- The item will now display in the panel for Group 1.
![qtDropFolderCardio](images/qtDropFolderCardioAgents.png)
Add Modifiers
Modifiers can be added to the Query Tool view by simply dragging the modifier from one of the following views.
- Navigate Terms view
- Find Terms view
- Workplace view
How to add a modifier from each of these views is explained in the next few sections.
Navigate Terms View
The Navigate Terms view contains a hierarchical display of all the items that can be used to search the database.
NOTE:
How the items are grouped and displayed is dependent on how the database is setup.
![ntView](images/ntView.png)
Add Modifier From Navigate Terms View
- In the Navigate Terms view, expand the folder(s) that contains the modifier or grouping of grouping of modifiers you want to add.
- Highlight the modifier (
) or modifier folder (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Query Tool view
- Drop the item into the panel labeled Group 1.
![qtDragFolderCardioAgents](images/qtDragModPrincDx.png)
- The name of the concept associated to the modifier plus the modifier will now display in the panel for Group 1.
![qtDropFolderCardio](images/qtDropModPrincDx.png)
Find Terms View
The Find Terms view provides a way to search for a particular concept and modifier.
![ftView](images/ftView.png)
NOTE:
For detailed information on how to search for terms and modifiers, please see the i2b2 Find Terms help.
Add Modifier From Find Terms View
- In the Find Terms view, search for the term(s) and modifier you want to add.
- Highlight the modifier (
) or modifier folder (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Query Tool view
- Drop the item into the panel labeled Group 1.
![qtDragModPrincDx](images/qtDragModPrincDx.png)
- The name of the concept associated to the modifier plus the modifier will now display in the panel for Group 1.
![qtDropFolderCardio](images/qtDropModPrincDx.png)
Workplace View
Information in the workplace is related to the most common concepts, modifiers, and queries that an individual uses and in essence becomes their personal workplace.
![wpView](images/wpView.png)
Add Modifier From Workplace View
- In the Workplace view, expand the folder(s) that contains the modifier or grouping of modifiers you want to add.
- Highlight the modifier (
) or modifier folder (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Query Tool view
- Drop the item into the panel labeled Group 1.
![qtDragModPrincDx](images/qtDragModPrincDx.png)
- The name of the concept associated to the modifier plus the modifier will now display in the panel for Group 1.
![qtDropModPrincDx](images/qtDropModPrincDx.png)
Add Previous Query
A previous query can be used to run a new query or as an item within a query (query-in-query). To add a previous query to the Query Tool view simply drag the query name from one of the following views.
- Previous Query view
- Workplace view
Within the Query Tool view, the previous query can be added to one of the following two locations.
Query Name field
The items and constraints from the original query will be used to create a new query. This information can be edited to make a new query or can be used as is to run the query again.
Panel (Group)
Used within a new query (query-in-query). The information associated with the previous query can not be edited. Add additional search criteria (items) to be used in the new query.
How to add a previous query from each of the views listed above is explained in the next few sections.
Previous Query View
The Previous Query view displays the queries that were run by the user.
![pqView](images/pqView.png)
Add Previous Query From Previous Query View (New Query)
- In the Previous Query view highlight the previous query (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Query Tool view
- Drop the previous query into the Query Name.
![qtDragPq](images/qtDragPqIschemicHrt.png)
- The item(s) associated with the previous query will display in the appropriate group(s), the name of the query will appear at Query Name, and any constraints that were defined when the original query was run will now default with the new query.
![qtDropPq](images/qtDropPqIschemicHrt.png)
NOTE:
When you run the query it will receive a new name. This is to distinguish the first previous query from the second.
Add Previous Query From Previous Query View (Query-in-Query)
- In the Previous Query view highlight the previous query (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Query Tool view
- Drop the previous query into the panel labeled Group 1.
![qtDragPqToPanel](images/qtDragPqIschemicHrtPanel.png)
- The previous query will now display in the panel for Group 1.
![qtDropPqPanel](images/qtDropPqIschemicHrtPanel.png)
Workplace View
Information in the workplace is related to the most common concepts, modifiers, and queries that an individual uses and in essence becomes their personal workplace.
![wpView](images/wpView.png)
Add Previous Query From Workplace View (New Query)
- In the Workplace view, expand the folder(s) that contains the previous query you want to add.
- Highlight the previous query (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Query Tool view
- Drop the previous query into the Query Name.
![qtDragPq](images/qtDragPqIschemicHrt.png)
- The item(s) associated with the previous query will display in the appropriate group(s), the name of the query will appear at Query Name, and any constraints that were defined when the original query was run will now default with the new query.
![qtDropPq](images/qtDropPqIschemicHrt.png)
NOTE:
When you run the query it will receive a new name. This is to distinguish the first previous query from the second.
Add Previous Query From Workplace View (Query-in-Query)
- In the Workplace view, expand the folder(s) that contains the previous query you want to add.
- Highlight the previous query (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Query Tool view
- Drop the previous query into the panel labeled Group 1.
![qtDragPqToPanel](images/qtDragPqIschemicHrtPanel.png)
- The previous query will now display in the panel for Group 1.
![qtDropPqPanel](images/qtDropPqIschemicHrtPanel.png)
NOTE:
When you run the query it will receive a new name. This is to distinguish the first previous query from the second.
Add Patient Set
A patient set can be added to the Query Tool view by simply dragging the list of patients from one of the following views.
- Previous Query view
- Workplace view
How to add a patient set from each of these views is explained in the next few sections.
Previous Query View
The Previous Query view displays the queries that were run by the user.
![pqView](images/pqView.png)
Add Patient Set From Previous Query View
- In the Previous Query view click on the plus sign (
) next to the name of the previous query that contains the patient set.
- Click on the plus sign (
) next to the results folder.
- Highlight the Patient set (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Query Tool view
- Drop the item into the panel labeled Group 1.
![qtDragPtSet](images/qtDragPtSet.png)
- The item will now display in the panel for Group 1.
![qtDropPtSet](images/qtDropPtSet.png)
Workplace View
Information in the workplace is related to the most common concepts, modifiers, and queries that an individual uses and in essence becomes their personal workplace.
![wpView](images/wpView.png)
Add Patient Set From Workplace View
- In the Workplace view, expand the folder(s) that contains the list of patients you want to add.
- Highlight the Patient set (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Query Tool view
- Drop the item into the panel labeled Group 1.
![qtDragPtSet](images/qtDragPtSet.png)
- The item will now display in the panel for Group 1.
![qtDropPtSet](images/qtDropPtSet.png)
Add Encounter Set
An encounter set can be added to the Query Tool view by simply dragging the encounter set from one of the following views.
- Previous Query view
- Workplace view
How to add an encounter set from each of these views is explained in the next few sections.
Previous Query View
The Previous Query view displays the queries that were run by the user.
![pqView](images/pqView.png)
Add Encounter Set From Previous Query View
- In the Previous Query view click on the plus sign (
) next to the name of the previous query that contains the patient set.
- Click on the plus sign (
) next to the results folder.
- Highlight the Encounter set (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Query Tool view
- Drop the item into the panel labeled Group 1.
![qtDragEncSet](images/qtDragEncSet.png)
- The item will now display in the panel for Group 1.
![qtDropEncSet](images/qtDropEncSet.png)
Workplace View
Information in the workplace is related to the most common concepts, modifiers, and queries that an individual uses and in essence becomes their personal workplace.
![wpView](images/wpView.png)
Add Encounter Set From Workplace View
- In the Workplace view, expand the folder(s) that contains the list of patients you want to add.
- Highlight the Encounter set (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Query Tool view
- Drop the item into the panel labeled Group 1.
![qtDragEncSet](images/qtDragEncSet.png)
- The item will now display in the panel for Group 1.
![qtDropEncSet](images/qtDropEncSet.png)
NOTE:
When you run the query it will receive a new name. This is to distinguish the first previous query from the second.
Add a Panel / Group
Three panels are typically displayed as part of the standard Query Tool view. Some complex queries may require the use of additional panels.
NOTE:
In order to add a panel, the previous panels must contain at least one concept.
- Click on the New Group button located on the toolbar at the bottom of the Query Tool view.
![qtToolbarNewGroup](images/qtToolbarNewGrpButton.png)
- A new panel will be added.
![qtPanelAdd](images/qtPanelAdd.png)
Navigate Multiple Panels
On the toolbar at the bottom of the view, there are additional navigational buttons that will become active when more than three panels are being used.
![buttonMoveToBegin](images/buttonMoveToBegin.png)
Begin button
will move the display to show the first panel
![buttonMoveToEnd](images/buttonMovetoEnd.png)
End button
will move the display to show the last panel in use
![buttonPrevious](images/buttonPrevious.png)
Previous button
will move the display back one panel
![buttonNext](images/buttonNext.png)
Next button
will move the display forward one panel
Delete / Remove
There are three options for removing a concept from the Query Tool view. Users can (1) reset all the groups, (2) clear all items in a panel, or (3) delete an individual item from the group.
Reset Groups
- Click on the Clear button located on the toolbar at the bottom of the Query Tool view.
![qtToolbarClear](images/qtToolbarClearButton.png)
- All the groups will be reset, the temporal constraint will return to the default setting, and the query name will be removed (if one exists).
WARNING:
Once you click on the clear button, all items in every group; and the constraints will be removed, therefore you need to make sure you want to delete ALL items.
Clear Items in a Panel / Group
- Click on the Delete button (
) located in the top right corner of the panel (next to the Group name).
- The group will be reset.
WARNING:
Once you click on the delete button, all items in every group; and the constraints will be removed, therefore you need to make sure you want to delete ALL items.
Delete Single Item
- Using the right mouse button, click on the name of the item to be removed.
- A list box will open.
- Select Delete from the list.
![deleteItem](images/qtDeleteItem.png)
- The concept will be removed from the list.
WARNING:
Once you click on the delete, any constraints specific to that item will be removed, therefore you need to make sure you want to delete that item.
Setting Constraints
Constraints are used to narrow down the search criteria to a particular time frame, number of occurrences or a specific value or range of values. In i2b2, there are several types of constraints that can be defined in the Query Tool view.
Constraint Type
Description
Temporal
Constraint is defined on the query level and utilizes the patient encounters and / or instance number when determining eligibility.
Panel Timing
Constraint is defined on the panel level and utilizes the patient encounters and / or instance number when determining eligibility.
Date
Constraint uses a date range when determining eligibility.
Occurrence
Constraint is by the number of occurrences an item is documented.
Exclusion
Constraint will not include patients with the concepts listed in the panel.
Value
Constraint is by the value associated to a concept or modifier. Not all items have values.
NOTE:
In the client, the value constraints are currently the only ones that directly correspond to a single concept. All others are defined on the query or panel level.
Temporal and Panel Timing Constraints
Both temporal and panel constraints are very similar in that both utilize the visit / encounter information along with the concepts defined to determine if a patient meets the search criteria.
The main difference between a temporal and a panel timing constraint is that temporal constraints are defined at the query level and panel timing constraints are defined at the panel level.
Temporal Constraint
As stated in the previous section the Temporal Constraint is defined at the query level.
![qtConstraintTemporal](images/qtConstTemporal.png)
Users can select one of three available options:
- Treat all groups independently
- The items (facts) can occur at any time in the patient's history.
- Selected items occur in the same financial encounter
- The items (facts) occur during the same visit (financial encounter).
- Items instance will be the same
- The items (facts) occur during the same visit (financial encounter) AND the same instance.
- Can only be selected if a modifier is listed in a panel.
NOTE:
In order to be considered the same instance, the facts have to have the same patient number, encounter number, concept, provider, start date, and instance number.
Treat All Groups Independently
- Panel timing constraint will default to Treat Independently
- Panel timing constraint can not be changed
- Items defined in the panels can occur at any time in the patients history
![qtConstPanelAnyVisit](images/qtConstPanelAnyVisit.png)
Example:
Patient has a medication with a dose greater than 500 mg and a medication that is taken once a day documented at any time in their history.
![qtTimingEx1](images/qtTimingEx01.png)
RESULTS: there are 47 patients who have had a medication with a dose of 500 mg and a frequency of once a day entered as a fact in the observation_fact table, where medication dose and frequency have the same patient_num.
![qtTimingExample2Results](images/qtTimingEx01Result.png)
Selected Groups Occur in the Same Financial Encounter
- Panel timing constraint will default to Occurs in Same Encounter
- The default panel timing constraint can be changed to Treat Independently
- Items defined in the panels occur during the same financial encounter (visit)
IMPORTANT:
The panel timing will override the temporal constraint setting.
![qtConstPanelSameVisit](images/qtConstPanelSameVisit.png)
Example:
Patient has a medication with a dose greater than 500 mg and a medication that is taken once a day documented during the same visit.
![qtTimingExample2](images/qtTimingEx02.png)
RESULTS: there are 41 patients who have had a medication with a dose of 500 mg and a frequency of once a day entered as a fact in the observation_fact table, where the medication dose and frequency have the same encounter_num.
![qtTimingExample2Result](images/qtTimingEx02Result.png)
Items Instance Will Be the Same
- Panel timing constraint will default to Items instance will be the same
- The default panel timing constraint can be changed to Treat Independently
- Items defined in the panels occur during the same financial encounter (visit) AND the same instance
IMPORTANT:
The panel timing will override the temporal constraint setting.
Example:
Patient has a medication with a dose greater than 500 mg and a medication that is taken once a day documented during the same instance.
![qtTimingExample3](images/qtTimingEx03.png)
RESULTS: there are 36 patients who have had a medication with a dose of 500 mg and a frequency of once a day entered as a fact in the observation_fact table, where the medication dose and frequency have the same encounter_num , concept_cd, provider_id, start_date, AND instance_num.
![qtTimingExample3Result](images/qtTimingEx03Result.png)
Panel Timing Constraint
As stated in the previous section the Panel Timing Constraint is defined at the panel level and can only be changed when the temporal constraint is defined as Selected groups occur in the same financial encounter or Items instance will be the same.
Users can select one of three available options:
- Treat all groups independently
- The items (facts) can occur at any time in the patient's history.
- Selected items occur in the same financial encounter
- The items (facts) occur during the same visit (financial encounter).
- Temporal constraint has to be set to Same financial encounter in order to be available for selection.
- Items instance will be the same
- The items (facts) occur during the same visit (financial encounter) AND the same instance.
- Temporal constraint has to be set to Items instance will be the same in order to be available for selection.
NOTE:
In order to be considered the same instance, the facts have to have the same patient number, encounter number, concept, provider, start date, and instance number.
Treat Independently
The items (facts) listed in the panel can occur at any time in the patient's history.
Occurs in the Same Encounter
The items (facts) listed in the panel occur during same visit (financial encounter).
![qtPanelSameVisit](images/qtConstPanelSameVisit.png)
In the example shown below, the items (facts) listed in the panel for Group 1 can occur at any time in the patient's history while the items in Group 2 and 3 have to occur during the same visit.
Example:
Patient has a diagnosis of Acute MI documented at any time in their history and they have a medication with a dose greater than 500 mg and a medication that is taken once a day documented during the same visit.
![qtTimingExample4](images/qtTimingEx04.png)
RESULTS: there are 4 patients who have had a medication with a dose greater than 500 mg and a frequency of once a day entered as a fact in the observation_fact table, where the medication dose and frequency have the same encounter_num AND the diagnosis of acute MI, the medication dose and frequency all have the same patient_num
![qtTimingExample4Result](images/qtTimingEx04Result.png)
Items Instance Will Be The Same
The items (facts) listed in the panel occur during same instance.
![qtPanelSameVisit](images/qtConstPanelSameVisit.png)
In the example shown below, the items (facts) listed in the panel for Group 1 can occur at any time in the patient's history while the items in Group 2 and 3 have to occur during the same instance.
Example:
Patient has a diagnosis of Acute MI documented at any time in their history and they have a medication with a dose greater than 500 mg and a medication that is taken once a day documented during the same instance.
![qtTimingExample5](images/qtTimingEx05.png)
RESULTS: there are 3 patients who have had a medication with a dose of 500 mg and a frequency of once a day entered as a fact in the observation_fact table, where the medication dose and frequency have the same encounter_num , concept_cd, provider_id, start_date, AND instance_num AND the diagnosis of acute MI, the medication dose and frequency all have the same patient_num
![qtTimingExample5Result](images/qtTimingEx05Result.png)
Date Constraint
Users can define a date range to be used when querying the database. This date range can be in any one of the following combinations.
The start date associated with the observation is what is used to determine if there is a positive hit.
Specified Date Range: From and To Dates Defined
Only data with activity within the defined date range will be used.
Example:
Concept: Acute Myocardial Infarction
From date: 01/01/2001
To date: 12/31/2005
In this example, if a patient has a diagnosis of Acute Myocardial Infarction (MI) entered on their record from 01/01/2001 to 12/31/2005 then their data will be included. If the patient does have an MI diagnosis but it was entered prior to 01/01/2001 or after 12/31/2005 then their information will not be included.
Setting the Date Constraint (FROM / TO Date Range)
- Click on the Dates button located in the selection criteria section of the panel.
![qtConstDateSelect](images/qtConstDateSelect.png)
- A new window will open.
![qtConstDateWindow](images/qtConstDateWindow.png)
- Click the check box next to the date in the From box.
- At this point there are two methods of entering your starting date.
- Manually type it in the text box.
- Click on the drop-down arrow (
) to open the calendar view and click on the desired date.
![qtConstDateCal1](images/qtConstDateCal1.png)
Once you click on the desired date the calendar window will close.
![qtConstDateFrom](images/qtConstDateFrom.png)
- Click the check box next to the date in the To box.
- Highlight the default date or click on the drop-down arrow and enter the date you want to use as your ending date.
![qtConstDateFromTo](images/qtConstDateFromTo.png)
- Click on the OK button.
- Dates will now be underlined to indicate a date constraint has been set.
![qtConstDateSet](images/qtConstDateSet.png)
Specific Start Date: Only the From Date is Defined
Data from the defined start date to the latest date available. No end date defined.
Example:
Concept: Acute Myocardial Infarction
From date: 01/01/2001
To date:
In this example, if a patient has a diagnosis of Acute Myocardial Infarction (MI) entered on their record any time on or after 01/01/2001 then their data will be included. If the diagnosis was entered prior to 01/01/2001 then it will not be included.
Setting the Date Constraint (FROM Date only)
- Click on the Dates button located in the selection criteria section of the panel.
![qtConstDateSelect](images/qtConstDateSelect.png)
- A new window will open.
![qtConstDateWindow](images/qtConstDateWindow.png)
- Click the check box next to the date in the From box.
- At this point there are two methods of entering your starting date.
- Manually type it in the text box.
- Click on the drop-down arrow (
) to open the calendar view and click on the desired date.
![qtConstDateCal1](images/qtConstDateCal1.png)
Once you click on the desired date the calendar window will close.
![qtConstDateFrom](images/qtConstDateFrom.png)
- Click on the OK button.
- Dates will now be underlined to indicate a date constraint has been set.
![qtConstDateSet](images/qtConstDateSet.png)
Specific End Date: Only the To Date is Defined
All data up until the defined end date. No start date defined.
Example:
Concept: Acute Myocardial Infarction
From date:
To date: 12/31/2005
In this example, if a patient has a diagnosis of Acute Myocardial Infarction (MI) entered on their record prior to and including 12/31/2005 then their data will be included. If the diagnosis was entered after 12/31/2005 then it will not be included.
Setting the Date Constraint (TO Date only)
- Click on the Dates button located in the selection criteria section of the panel.
![qtConstDateSelect](images/qtConstDateSelect.png)
- A new window will open.
![qtConstDateWindow](images/qtConstDateWindow.png)
- Click the check box next to the date in the To box.
- At this point there are two methods of entering your ending date.
- Manually type it in the text box.
- Click on the drop-down arrow (
) to open the calendar view and click on the desired date.
![qtConstDateCal2](images/qtConstDateCal2.png)
Once you click on the desired date the calendar window will close.
![qtConstDateTo](images/qtConstDateTo.png)
- Click on the OK button.
- Dates will now be underlined to indicate a date constraint has been set.
![qtConstDateSet](images/qtConstDateSet.png)
Occurrences Constraint
Users can define the number of times an item has to occur in order to be considered a positive "hit".
Setting the Occurrences Constraint
- Click on the Occurs > 0x button located in the selection criteria section of the panel.
![qtConstOccurSelect](images/qtConstOccurSelect.png)
- A new window will open.
![qtConstOccurWindow](images/qtConstOccurWindow.png)
- Click on the drop-down arrow to display a list of numbers.
- Select a number from the list.
![qtConstOccurSelection](images/qtConstOccurSelection.png)
- Click on the OK button.
- Occurs > 0x will now be underlined to indicate a constraint has been set and the 0 will be replaced with the selected number.
![qtConstOccurSet](images/qtConstOccurSet.png)
Exclude Constraint
The exclude constraint will not include patients with the item(s) listed in the panel.
- Click on the Exclude button located in the selection criteria section of the panel.
![qtConstExcludeSelect](images/qtConstExcludeSelect.png)
- The text in the information box will change to "none of these" and the background color will change to pink.
![qtConstExcludeSet](images/qtConstExcludeSet.png)
Value Constraint
Value constraints can be associated with concept and modifiers but not all of them will have values. For instance, the diagnosis of Acute Myocardial Infarction does not have a value but the tests used to make the diagnosis do have values (high, low, numeric, etc.).
For those items that do have values there are different types of values that may be associated with it.
NOTE:
The different types of constraints and how they work are the same regardless of whether or not it is associated with a concept or a modifier.
Flag Value
Flags are defined in the source system when the value is entered. The following are some examples that can be found in the i2b2 Demo database.
- High
- Low
- Abnormal
Setting the Value Constraint (Flag) for a Concept
NOTE:
The value constraint window will open automatically when you drop a concept into a panel in the Query Tool view. This will only happen if the concept is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
- Using the right mouse button, click on the item listed in the panel.
- A pop-up menu will open.
- Select Set Value from the list.
![qtConstValSelect](images/qtConstValSelect.png)
- A new window will open.
![qtConstValTropI1](images/qtConstValTropI1.png)
- Click on the radial dial next to By flag.
- A new field with a drop-down selection box will appear.
![qtConstValTropI2](images/qtConstValTropI2.png)
- Click on the drop-down arrow to change the flag or accept the default.
- Click on the OK button.
- The value constraint has been set.
![qtConstValTropI3](images/qtConstValTropI3.png)
Setting the Value Constraint (Flag) for a Modifier
NOTE:
The modifier value constraint window will open automatically when you drop a modifier into a panel in the Query Tool view. This will only happen if the modifier is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
- Using the right mouse button, click on the item listed in the panel.
- A pop-up menu will open.
- Select Set Value from the list.
![qtConstValSelectMod](images/qtConstValSelectMod.png)
- A new window will open.
- Click on the radial dial next to By flag.
- A new field with a drop-down selection box will appear.
- Click on the drop-down arrow to change the flag or accept the default.
- Click on the OK button.
- The value constraint has been set.
Text Value
The text value is defined in the source system when the value is entered. The following are some examples that can be found in the i2b2 Demo database.
- Test Not Performed
- Borderline
- Positive
Setting the Value Constraint (Text) for a Concept
NOTE:
The value constraint window will open automatically when you drop a concept into a panel in the Query Tool view. This will only happen if the concept is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
- Using the right mouse button, click on the item listed in the panel.
- A pop-up menu will open.
- Select Set Value from the list.
![qtConstValSelect](images/qtConstValSelect.png)
- A new window will open.
![qtConstValCkmb1](images/qtConstValCkmb1.png)
- Click on the radial dial next to By value.
- A new field listing the enumerated values will appear.
- Click on the name of the value you want to include.
![qtConstValCkmb2](images/qtConstValCkmb2.png)
TIP:
To select more than one you can hold down the <Ctrl> key while clicking on each name. On the Macintosh you can hold down the command key instead of the <Ctrl> key.
- Click on the OK button.
- The value constraint has been set.
![qtConstValCkmb3](images/qtConstValCkmb3.png)
Setting the Value Constraint (Text) for a Modifier
NOTE:
The modifier value constraint window will open automatically when you drop a modifier into a panel in the Query Tool view. This will only happen if the modifier is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
- Using the right mouse button, click on the item listed in the panel.
- A pop-up menu will open.
- Select Set Modifier Value from the list.
![qtConstValSelectMod](images/qtConstValSelectMod.png)
- A new window will open.
![qtConstValTrimoxFreq1](images/qtConstValTrimoxFreq1.png)
- Click on the radial dial next to By value.
- A new field listing the enumerated values will appear.
- Click on the name of the value you want to include.
![qtConstValTrimoxFreq2](images/qtConstValTrimoxFreq2.png)
TIP:
To select more than one you can hold down the <Ctrl> key while clicking on each name. On the Macintosh you can hold down the command key instead of the <Ctrl> key.
- Click on the OK button.
- The value constraint has been set.
![qtConstValTrimox3](images/qtConstValTrimoxFreq3.png)
Numeric Value
The numeric value is defined in the source system when the result is entered. The following are some example formats that can be found in the i2b2 Demo database.
- 200
- 1.3
Unlike flag and text values, numeric values use operators, such as greater than or less than when setting the constraints. The following is a listing of operators currently in use.
Operator
Description / Use
Less Than (<)
Any value less than the number entered.
Less Than or Equal To (<=)
Any value less than or equal to the number entered (inclusive).
Equal To (=)
An exact match to the number entered.
Between
Any value in the range of numbers entered.
Greater Than (>)
Any value greater than the number entered.
Greater Than or Equal To (>=)
Any value greater than or equal to the number entered (inclusive).
Setting the Value Constraint (Numeric) for a Concept
NOTE:
The value constraint window will open automatically when you drop a concept into a panel in the Query Tool view. This will only happen if the concept is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
- Using the right mouse button, click on the item listed in the panel.
- A pop-up menu will open.
- Select Set Value from the list.
![qtConstValSelect](images/qtConstValSelect.png)
- A new window will open.
![qtConstValCpk1](images/qtConstValCpk1.png)
- Click on the radial dial next to By value.
- Two new fields will appear; one with a drop down selection box and the other a text box.
![qtConstValCpk2](images/qtConstValCpk2.png)
- Click on the drop-down arrow to change the operator or accept the default.
![qtConstValOperator](images/qtConstValOperator.png)
- Enter a numerical value at the Please enter a value field.
![qtConstValEnter](images/qtConstValEnterVal.png)
- Click on the OK button.
- The value constraint has been set.
![qtConstValCpk3](images/qtConstValCpk3.png)
Setting the Value Constraint (Numeric) for a Modifier
NOTE:
The modifier value constraint window will open automatically when you drop a modifier into a panel in the Query Tool view. This will only happen if the modifier is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
- Using the right mouse button, click on the item listed in the panel.
- A pop-up menu will open.
- Select Set Modifier Value from the list.
![qtConstValSelectMod](images/qtConstValSelectMod.png)
- A new window will open.
![qtConstValTrimoxDose1](images/qtConstValTrimoxDose1.png)
- Click on the radial dial next to By value.
- Two new fields will appear; one with a drop down selection box and the other a text box.
![qtConstValTrimoxDose2](images/qtConstValTrimoxDose2.png)
- Click on the drop-down arrow to change the operator or accept the default.
![qtConstValOperator](images/qtConstValOperator.png)
- Enter a numerical value at the Please enter a value field.
![qtConstValEnter](images/qtConstValEnterVal.png)
- Click on the OK button.
- The value constraint has been set.
![qtConstValTrimoxDose3](images/qtConstValTrimoxDose3.png)
Using Units In Value Constraints
Units in regards to i2b2 are the standard units of measurement associated with a value. For instance, a medication may have "mg" listed as the unit for the dose, while a HGB lab test may have "gm/dL".
The units are defined in the source system and although it is recommended that all numerical facts are stored in normalized units it is recognized that this is not always feasible. Therefore, the Web Client has the ability to convert the units when running a query.
In order for this feature to work a parameter called CRC_ENABLE_UNITCD_CONVERSION must be defined for the project. If this is not defined you need to contact your system administrator.
Defining the Units When Running a Query
NOTE:
The modifier value constraint window will open automatically when you drop a modifier into a panel in the Query Tool view. This will only happen if the modifier is set up in the database with XML metadata. The first three steps can be used if you did not add a value constraint when you added the item or if you wish to edit an existing item.
- Using the right mouse button, click on the item listed in the panel.
- A pop-up menu will open.
- Select Set Modifier Value from the list.
![qtConstValSelectMod](images/qtConstValSelectMod.png)
- A new window will open.
![qtConstValUnits1](images/qtConstValUnits1.png)
- Click on the radial dial next to By value.
- Two new fields will appear; one with a drop down selection box and the other a text box.
![qtConstValUnits2](images/qtConstValUnits2.png)
- The Units will default to the normal units defined for the item.
- Click on the drop-down arrow to change the units.
![qtConstValUnitsList](images/qtConstValUnitsList.png)
- Click on the drop-down arrow to change the operator or accept the default.
![qtConstValOperator](images/qtConstValOperator.png)
- Enter a numerical value at the Please enter a value field.
![qtConstValEnter](images/qtConstValEnterVal.png)
- Click on the OK button.
- The value constraint has been set and the numerical value has been converted to the normal units.
![qtConstValUnits3](images/qtConstValUnits3.png)
In the above scenario, the normal units are "mg". When setting up the value constraint the units were changed to "gm" and the numerical value was set to 5. Upon saving the value constraint, the Web Client converted 5 gm to 5000 mg. When the query is run it will look at those facts that have both 5 gm and 5000 mg defined in the observation_fact table.
NOTE:
The unit conversion information is specific to the term and is defined in the i2b2 metadata table.
Running a Query
This section describes the process of running a query and the output.
Output Selection
When you run a query you need to select what type of result the server will return. There are several result types available, each of which will yield a different output.
Patient set
Provides a list of patients who met the search criteria.
Encounter set
Provides the total number of encounters that met the search criteria.
Number of patients
Provides the total number of patients who met the search criteria.
Gender patient breakdown
Provides a breakdown of the patients by their gender.
Vital Status patient breakdown
Provides a breakdown of the patients by their vital status.
Race patient breakdown
Provides a breakdown of the patients by their race.
Age patient breakdown
Provides a breakdown of the patients by their age.
Timeline
Not used in the Web Client. If selected it will work the same as patient set.
The result type(s) will appear when you click on the Run Query button and they can be selected in any combination.
![qtRunQueryWindow](images/qtRunQueryWindow.png)
Patient Set
This option will return a set of patients who meet the defined criteria and will display the appropriate information in the following views.
- Query Status View
- The patient set information will appear as soon as the query has finished running.
- It will also appear in this view when you drag a previous query to the Query Name field in the Query Tool view.
![qtQueryStatusPtSet](images/qtQueryStatusPtSet.png)
- Previous Query View
- Displays the query and the results returned.
![pqPtSet](images/pqPtSet.png)
Encounter Set
This option will return a set of encounters for those patients who meet the defined criteria and will display the appropriate information in the following views.
- Query Status View
- The encounter set information will appear as soon as the query has finished running.
- It will also appear in this view when you drag a previous query to the Query Name field in the Query Tool view.
![qtQueryStatusEncSet](images/qtQueryStatusEncSet.png)
- Previous Query View
- Displays the query and the results returned.
![pqEncSet](images/pqEncSet.png)
Number of Patients
This option will return a total count for those patients who meet the defined criteria and will display the appropriate information in the following views.
- Query Status View
- The patient count information will appear as soon as the query has finished running.
- It will also appear in this view when you drag a previous query to the Query Name field in the Query Tool view.
![qtQueryStatusPtCount](images/qtQueryStatusPtCount.png)
- Previous Query View
- Displays the query and the results returned.
![pqPtCount](images/pqPtCount.png)
Gender Patient Breakdown
This option will return a breakdown by gender for those patients who meet the defined criteria and will display the appropriate information in the following views.
- Query Status View
- The information for the gender patient breakdown will appear as soon as the query has finished running.
- It will also appear in this view when you drag a previous query to the Query Name field in the Query Tool view.
![qtQueryStatusGender](images/qtQueryStatusGender.png)
- Previous Query View
- Displays the query and the results returned.
![pqGender](images/pqGender.png)
Vital Status Patient Breakdown
This option will return a breakdown by vital status for those patients who meet the defined criteria and will display the appropriate information in the following views.
- Query Status View
- The information for the vital status patient breakdown will appear as soon as the query has finished running.
- It will also appear in this view when you drag a previous query to the Query Name field in the Query Tool view.
- Previous Query View
- Displays the query and the results returned.
![pqVitalStatus](images/pqVitalStatus.png)
Race Patient Breakdown
This option will return a breakdown by race for those patients who meet the defined criteria and will display the appropriate information in the following views.
- Query Status View
- The information for the race patient breakdown will appear as soon as the query has finished running.
- It will also appear in this view when you drag a previous query to the Query Name field in the Query Tool view.
![qtQueryStatusRace](images/qtQueryStatusRace.png)
- Previous Query View
- Displays the query and the results returned.
![pqRace](images/pqRace.png)
Age Patient Breakdown
This option will return a breakdown by age for those patients who meet the defined criteria and will display the appropriate information in the following views.
- Query Status View
- The information for the age patient breakdown will appear as soon as the query has finished running.
- It will also appear in this view when you drag a previous query to the Query Name field in the Query Tool view.
![qtQueryStatusAge](images/qtQueryStatusAge.png)
- Previous Query View
- Displays the query and the results returned.
![pqAge](images/pqAge.png)
Run Query
Once the query criterion has been defined, the final steps are to click on the Run Query button, select the result type(s), and click on the OK button to run the query.
- Once you have defined the search criteria click on the Run Query button located on the toolbar at the bottom of the Query Tool view.
![qtToolbarRunQuery](images/qtToolbarRunQuery.png)
- A new window will open.
![qtRunQueryWindow](images/qtRunQueryWindow.png)
- A name for the query will default at the query name field.
- Either change the name of the query or accept the default.
- In the query result type section, click on the checkboxes for those result types you want to include when the query is run.
- Click on the OK button.
- The Run Query window will close and the querying process will begin.
Once you begin the process of running the query the Query Status view will display "Running Query", the name of the query, and the time that has elapsed.
![qtQueryStatusRunMI](images/qtQueryStatusRunMI.png)
Cancel a Query
To cancel a query you simply click on the Cancel Query button.
NOTE:
Keep in mind "Cancel Query" and the associated action will only appear when the query is still in the process of running
- To cancel a query that is running, simply click on the Cancel Query button.
![qtToolbarCancelQuery](images/qtToolbarCancelQuery.png)
- Cancel will display in the Query Status view.
![qtQueryStatusCancel](images/qtQueryStatusCancel.png)
Saving a Query
This section describes the process of saving queries.
Previous Query
A previous query (
) is created automatically when a query is run from the Query Tool. The query is stored in the database and displayed in the Previous Query view.
NOTE:
Previous queries can also be seen in Workplace view if the user copied it to their workplace or shared folder in workplace view.
- Run a query.
- Go to the Previous Query view.
- The query you just ran will now appear in the list of previous queries.
![pqView](images/pqView.png)
NOTE:
If the previous query does not appear in the list automatically you can refresh the view to update the list. This is done by using the right mouse button and clicking anywhere in the Previous Query view.
Printing a Query
Users are able to print out the query information if they wish to have a hard copy of the search criteria defined for a query.
When printing a query you can either print the information for a current query or you can drag a previous query to the query tool view and print the information associated with that query.
The following steps outline the process of printing a query once you have the appropriate query in the Query Tool.
- Click on the Print Query button located on the toolbar at the bottom of the Query Tool view
![qtToolbarPrintQuery](images/qtToolbarPrintQuery.png)
- A new window will open displaying the information about the query.
![qtPrintWindow](images/qtPrintWindow.png)
- On the menu bar, click on File to display the menu options.
- Select Print from the menu.
i2b2 Workplace View
Information in the Workplace view is related to the most common concepts and queries that an individual uses and in essence becomes their personal workspace. The main objectives of this view are:
- Save and organize user specific items.
- Share information with other project users.
- Project managers can view the workplace for individual team members.
The items stored in the Workplace view can be used in many of the i2b2 views and plug-ins, such as the Query Tool view plug-in.
Introduction
This section describes the layout and contents of this view.
Layout of the Workplace View
As stated above the Workplace view is a place for users to store and organize those items they use on a regular basis. It is also a way to share these items with other users by placing them in the SHARED folder.
![wpView](images/wpView.png)
The Workplace view is hierarchical display of the items added by the user. There are three main branches or components of the tree that displays.
User Folder
The highest level is the individual user folder (
). This folder is automatically created with the user's name and it is used to store items added by the individual user. This level cannot be used when creating a query.
NOTE:
This also includes the shared folder.
Folders
A folder (
) in the workplace view contains other folders and / or items added by the user. It can be expanded and collapsed by clicking on the plus sign (
) or negative sign (
) next to it. A user defined folder can not be dragged to other i2b2 views. It can be moved around within the Workplace view.
Items
Items are the lowest level of the hierarchy. They can not be expanded further. Some examples of items are listed below.
- Concepts (
)
- Group of concepts (ontology folder) (
)
- Modifiers (
)
- Group of modifiers (modifier folder) (
)
- Patient set (
)
- Encounter set (
)
Navigation
Expand / Collapse a Folder
Users can expand or collapse a folder by clicking on the plus sign (
) or negative sign (
) next to the folder icon.
Expand (Open) a Folder
- Click on the plus sign (
) next to the folder in the Workplace view.
- The folder will open and all the items in the folder will display.
Collapse (Close) a Folder
- Click on the negative sign (
) next to the folder in the Workplace view.
- The folder will close and all the items in the folder will display.
Add a Workplace Folder
- Using the right mouse button, click on your user folder in the Workplace view.
- A pop-up menu will open.
![wpAddNewFolder](images/wpFolderAddNew.png)
- Select New Folder.
- A new window will open.
![wpAddNewFolderWindow](images/wpFolderAddNewWindow.png)
- In the text box enter the name you want to be displayed.
- Click on the OK button.
- The new folder will appear in the Workplace view.
![wpFolderAdded](images/wpFolderAdded.png)
Rename a Folder
Users can easily rename an existing folder.
- Using the right mouse button, click on the folder you want to rename.
- A pop-up menu will open.
![wpMenuFolder](images/wpMenuFolder.png)
- Select Rename from the list.
![wpFolderRenameSelect](images/wpFolderRenameSelect.png)
- A new window will open.
![wpFolderRenameWindow](images/wpFolderRenameWindow.png)
- In the text box change the current name to the new name.
- Click on the OK button.
- The folder will appear in the Workplace view with the new name.
![wpFolderRenamed](images/wpFolderRenamed.png)
Annotate a Folder
Users can change the default annotation for any of their folders in the Workplace view.
NOTE:
The annotation is what is displayed in the tool tip.
- Using the right mouse button, click on the folder you want to annotate.
- A pop-up menu will open.
![wpMenuFolder](images/wpMenuFolder.png)
- Select Annotate from the list.
![wpAnnotateSelect](images/wpFolderAnnotateSelect.png)
- A new window will open.
- In the text box enter the text you want to appear when the tooltip is displayed.
- Click on the OK button.
- Using the mouse, hover over the folder you just annotated.
- The text you entered will display as a tool tip.
Delete a Folder
Users can remove a folder from the Workplace view.
WARNING:
All items in the folder will be deleted when the folder is removed. It is recommended that you move those items you want to keep to another folder.
- Using the right mouse button, click on the folder you want to delete.
- A pop-up menu will open.
![wpMenuFolder](images/wpMenuFolder.png)
- Select Delete from the list.
![wpFolderDeleteSelect](images/wpFolderDeleteSelect.png)
- A message box will open.
![wpFolderDeleteWarning](images/wpFolderDeleteWarning.png)
- Click on the OK button.
- The folder and all of its contents will no longer appear in the Workplace view.
Rename Items
Users can easily rename an item in the Workplace view.
- Using the right mouse button, click on the item you want to rename.
- A pop-up menu will open.
![wpMenuItem](images/wpMenuItem.png)
- Select Rename from the list.
![wpItemRenameSelect](images/wpItemRenameSelect.png)
- A new window will open.
![wpItemRenameWindow](images/wpItemRenameWindow.png)
- In the text box change the current name to the new name.
- Click on the OK button.
- The item will appear in the Workplace view with the new name.
Annotate Items
Users can change the default annotation for any of the items in their Workplace folder.
NOTE:
The annotation is what is displayed in the tool tip.
- Using the right mouse button, click on the item you want to annotate.
- A pop-up menu will open.
![wpMenuItem](images/wpMenuItem.png)
- Select Annotate from the list.
![wpItemAnnotateSelect](images/wpItemAnnotateSelect.png)
- A new window will open.
![wpItemAnnotateWindow](images/wpItemAnnotateWindow.png)
- In the text box enter the text you want to appear when the tooltip is displayed.
- Click on the OK button.
- Using the mouse, hover over the item you just annotated.
- The text you entered will display as a tool tip.
Delete Items
Users can remove items from the Workplace view.
- Using the right mouse button, click on the item you want to delete.
- A pop-up menu will open.
![wpMenuItem](images/wpMenuItem.png)
- Select Delete from the list.
![wpItemDeleteSelect](images/wpItemDeleteSelect.png)
- A message box will open.
![wpItemDeleteMsg](images/wpItemDeleteMsg.png)
- Click on the OK button.
- The item will no longer appear in the Workplace view.
Adding Items to Workplace View
This section describes how to add items to the Workplace view.
Items Draggable to Workplace
Items can be dragged and dropped (copied) into the Workplace view from other views in the i2b2 Web Client.
- Folder
A folder (
) and all its concepts (children) can be added to Workplace by dragging the folder name from one of the following views.
- Find Terms view
- Navigate Terms view
- Modifier Folder
A modifier folder (
) and all its modifiers (children) can be added to Workplace by dragging the folder name from one of the following views.
- Find Terms view
- Navigate Terms view
- Concept
A concept (
) can be added to Workplace by dragging the name of the concept from one of the following views.
- Find Terms view.
- Navigate Terms view
- Modifier
A modifier (
) can be added to Workplace by dragging the name of the modifier from one of the following views.
- Find Terms view.
- Navigate Terms view
- Patient Set
A Patient set (
) can be added to Workplace by dragging the name of the patient set from the following view.
- Previous Query view.
- Encounter Set
An Encounter set (
) can be added to Workplace by dragging the name of the encounter set from the following view.
- Previous Query view.
- Previous Query
A previous query (
) can be added to Workplace by dragging the name of the previous query from the following view.
- Previous Query view.
Add Folders and Concept to Workplace View
Find Terms View
The Find Terms view provides a way to search for a particular concept.
![ftView](images/ftView.png)
NOTE:
For detailed information on how to search for terms, please see the i2b2 Find Terms help.
Add Folder / Concept From Find Terms View
- In the Find Terms view, search for the item(s) you want to add.
- Highlight the folder (
) or concept (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Workplace view.
- Drop the item into either your workplace folder or the shared folder.
![wpDragFolder](images/wpDragFolder.png)
- The item will now display in the Workplace view with the same name.
![wpDropFolder](images/wpDropFolder.png)
Navigate Terms View
The Navigate Terms view contains a hierarchical display of all the concepts and modifiers that can be used to search the database.
![ntView](images/ntView.png)
NOTE:
How the items are grouped and displayed is dependent on how the database is setup.
Add Folder / Concept From Navigate Terms View
- In the Navigate Terms view, expand the folder(s) that contains the concept or grouping of concepts you want to add.
- Highlight the folder (
) or concept (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Workplace view.
- Drop the item into either your workplace folder or the shared folder.
![wpDragConcept](images/wpDragConcept.png)
- The item will now display in the Workplace view with the same name.
![wpDropConcept](images/wpDropConcept.png)
Add Modifier Folders and Modifiers to Workplace View
Find Terms View
The Find Terms view provides a way to search for a particular concept.
![ftView](images/ftView.png)
NOTE:
For detailed information on how to search for terms and modifiers, please see the i2b2 Find Terms help.
Add Modifier Folder / Modifiers From Find Terms View
- In the Find Terms view, search for the item(s) you want to add.
- Highlight the modifier folder (
) or modifier (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Workplace view.
- Drop the item into either your workplace folder or the shared folder.
![wpDragModifier](images/wpDragModifier.png)
- The item will now display in the Workplace view with the same name.
![wpDropModifier](images/wpDropModifier.png)
Navigate Terms View
The Navigate Terms view contains a hierarchical display of all the concepts and modifiers that can be used to search the database.
![ntView](images/ntView.png)
NOTE:
How the items are grouped and displayed is dependent on how the database is setup.
Add Modifier Folder / Modifier From Navigate Terms View
- In the Navigate Terms view, expand the folder(s) that contains the modifiers or grouping of modifiers you want to add.
- Highlight the modifier folder (
) or modifier (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Workplace view.
- Drop the item into either your workplace folder or the shared folder.
![wpDragModifer](images/wpDragModifier.png)
- The item will now display in the Workplace view with the same name.
![wpDropModifier](images/wpDropModifier.png)
Add Previous Query, Patient Set and Encounter Set to Workplace View
Previous Query View
The Previous Query view displays the queries that were run by the user. Each previous query contains a set of results; within these results are the result options that were selected when the query was originally run. The result options include Patient set, Encounter set, Number of patients as well as various other patient breakdowns
![pqView](images/pqView.png)
Add Previous Query From Previous Query View
- Highlight the previous query (
) by clicking on the name of the query.
- While holding the left mouse button down, drag the item to the Workplace view.
- Drop the previous query into either your workplace folder or the shared folder.
![dragPqToWp](images/wpDragPq.png)
- The previous query will now appear in the workplace with the same name.
![dropPqInWp](images/wpDropPq.png)
Add Patient Set From Previous Query View
- Click on the plus sign (
) next to the name of the previous query that contains the patient set.
- Click on the plus sign (
) next to the results folder.
- Highlight the Patient set (
) by clicking on its name.
- While holding the left mouse button down, drag the Patient Set to the Workplace view.
- Drop the patient set into either your workplace folder or the shared folder.
![dragPtSetToWp](images/wpDragPtSet.png)
- The patient set will now appear in the workplace.
![dropPtSetInWp](images/wpDropPtSet.png)
Add Encounter Set From Previous Query View
- Click on the plus sign (
) next to the name of the previous query that contains the encounter set.
- Click on the plus sign (
) next to the results folder.
- Highlight the Encounter set (
) by clicking on its name.
- While holding the left mouse button down, drag the Encounter Set to the Workplace view.
- Drop the encounter set into either your workplace folder or the shared folder.
![dragEncSetToWp](images/wpDragEncSet.png)
- The encounter set will now appear in the workplace.
![dropEncSetInWp](images/wpDropEncSet.png)
Using Items in Workplace View
This section describes how to use items in the Workplace view.
Items Draggable from Workplace
Items can be dragged and dropped (copied) from the Workplace view to other views in the i2b2 Web client.
- Ontology Folder
An ontology folder (
) and all its concepts (children) can be added to other views by dragging the folder name from Workplace to one of the following views.
- Query Tool view; drop in the panel.
NOTE:
User folders can not be dragged from the Workplace view.
- Modifier Folder
A modifier folder (
) and all its modifiers (children) can be added to other views by dragging the modifier folder name from Workplace to one of the following views.
- Query Tool view; drop in the panel.
- Concept
A concept (
) can be added to other views by dragging the name of the concept from Workplace to one of the following views.
- Query Tool view; drop in the panel.
- Modifier
A modifier (
) can be added to other views by dragging the name of the modifier from Workplace to one of the following views.
- Query Tool view; drop in the panel.
- Previous Query
A previous query (
) can be added to other views by dragging the previous query name from Workplace to one of the following views.
- Query Tool view; drop in the panel or Query Name.
- Patient Set
A specific set of patients can be added to other views by dragging the Patient set (
) from Workplace to one of the following view.
- Query Tool view; drop in the panel.
- Encounter Set
A specific set of encounters (visit list) can be added to the other views by dragging the Encounter set (
) from Workplace to one of the following view.
- Query Tool view; drop in the panel.
Using Concepts and Folders
A folder or individual concept can be added to the query tool view by simply dragging the item from Workplace view and dropping it into one of the panels in the Query Tool view.
Add Folder to Query Tool View
- Highlight the folder (
) by clicking on the name of the folder.
- While holding the left mouse button down, drag the item over to the Query Tool view.
- Drop the item into the panel labeled Group 1.
![qtDragFolderMI](images/qtDragFolderMI.png)
- The folder will now display in the panel for Group 1.
![qtDropFolderMI](images/qtDropFolderMI.png)
Add Concept to Query Tool View
- Highlight the concept (
) by clicking on the name of the folder.
- While holding the left mouse button down, drag the item over to the Query Tool view.
- Drop the item into the panel labeled Group 1.
![qtDragConceptMI](images/qtDragConceptMI.png)
- The concept will now display in the panel for Group 1.
![qtDropConceptMI](images/qtDropConceptMI.png)
Using Modifiers and Modifier Folders
A modifier folder or individual modifier can be added to the query tool view by simply dragging the item from the Workplace view and dropping it into one of the panel in the Query Tool view.
Add Modifier to Query Tool View
- Highlight the modifier (
) by clicking on the name of the modifier.
- While holding the left mouse button down, drag the item over to the Query Tool view.
- Drop the item into the panel labeled Group 1.
![qtDragModPrincDx](images/qtDragModPrincDx.png)
- The name of the concept associated to the modifier plus the modifier will now display in the panel for Group 1.
![qtDropModPrincDx](images/qtDropModPrincDx.png)
Using Previous Query
A previous query can be used to run a new query or as an item within a query (query-in-query). To add a previous query to the Query Tool view simply drag the query name from the Workplace view.
Within the Query Tool view, the previous query can be added to one of the following two locations.
Query Name field
The items and constraints from the original query will be used to create a new query. This information can be edited to make a new query or can be used as is to run the query again.
Panel (Group)
Used within a new query (query-in-query). The information associated with the previous query can not be edited. Add additional search criteria (items) to be used in the new query.
NOTE:
The process of adding a previous query to the Query Tool view is the same for both standard i2b2 queries (
) and temporal queries (
).
Add Previous Query to Query Name (New Query)
- Highlight the previous query (
/
) by clicking on the name of the query.
- While holding the left mouse button down, drag the item to the Query Tool view.
- Drop the item into the Query Name field.
![dragPq](images/qtDragPqIschemicHrt.png)
- The item(s) associated with the previous query will display in the appropriate group(s), the name of the query will appear at Query Name, and any constraints that were defined when the original query was run will now default with the new query.
![dropPq](images/qtDropPqIschemicHrt.png)
NOTE:
When you run the query it will receive a new name. This is to distinguish the first previous query from the second.
Add Previous Query to Query Name (Query-in-Query)
- Highlight the previous query (
/
) by clicking on the name of the query.
- While holding the left mouse button down, drag the item to the Query Tool view.
- Drop the item into the panel labeled Group 1.
- The previous query will now display in the panel for Group 1.
![qtDropPqIschemicHrtPanel](images/qtDropPqIschemicHrtPanel.png)
Using Patient Set
A Patient set can be used as an item within a query. To add a patient set to the Query Tool view simply drag the name of the patient set from the Workplace view.
Add Patient Set From Workplace View
- In the Workplace view, expand the folder(s) that contains the list of patients you want to add.
- Highlight the Patient set (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Query Tool view
- Drop the item into the panel labeled Group 1.
![qtDragPtSet](images/qtDragPtSet.png)
- The item will now display in the panel for Group 1.
![qtDropPtSet](images/qtDropPtSet.png)
Using Encounter Set
An Encounter set can be used as an item within a query. To add an encounter set to the Query Tool view simply drag the name of the encounter set from the Workplace view.
Add Encounter Set From Workplace View
- In the Workplace view, expand the folder(s) that contains the list of patients you want to add.
- Highlight the Encounter set (
) by clicking on its name.
- While holding the left mouse button down, drag the item over to the Query Tool view
- Drop the item into the panel labeled Group 1.
![qtDragEncSet](images/qtDragEncSet.png)
- The item will now display in the panel for Group 1.
![qtDropEncSet](images/qtDropEncSet.png)