Page MenuHomec4science

qt.html
No OneTemporary

File Metadata

Created
Thu, Aug 22, 17:11
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<link href="i2b2Style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1><a name="qtView" id="qtView"></a>i2b2 Query Tool View</h1>
<p>The Query Tool view is designed to simplify the process of retrieving information from the database associated to the i2b2 Web Client.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2><a name="qtIntro" id="qtIntro"></a>Introduction</h2>
<p>This section describes the layout and contents of this view.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><a name="qtLayout" id="qtLayout"></a>Layout of the Query Tool View</h3>
<p>The <b>Query Tool view</b> is used to define and run a &quot;select query&quot; that will retrieve information from the database associated to the i2b2 Web Client.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtView.png" alt="qtView" width="524" height="353" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The Query Tool view can be broken down into several sections which are defined below.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtQueryName" id="qtQueryName"></a>Query Name</h4>
<p>The name of a query will be assigned when it is run and will display in the <b>Query Name</b> field.
</p>
<p>&nbsp;</p>
<p>The only time a query name will appear prior to running the query is when you drag a <b>previous query</b> from either the<b> Previous Query</b> or <b>Workplace views</b> and drop it into the Query Name field.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtQueryName.png" alt="qtQueryName" width="520" height="27" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtTempConstraint" id="qtTempConstraint"></a>Temporal Constraint</h4>
<p>The <b>Temporal Constraint</b> is defined on the query level and depending on what is selected will set the default for the panel timing.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstTemporal.png" alt="qtConstTemporal" width="432" height="24" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtPanel" id="qtPanel"></a>Panel</h4>
<p>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.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtPanelLayout.png" alt="qtPanelLayout" width="488" height="249" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtGrpHeading" id="qtGrpHeading"></a>Group Heading</h5>
<p>The heading is a label to easily identify the collection of terms. Each heading will contain &quot;Group&quot; followed by a sequential number.
</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;<i>Example:</i> Group 1, Group 2, Group 3, etc.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtSelectCriteria" id="qtSelectCriteria"></a>Selection Criteria</h5>
<p>This area of the panel is used to define date selections and other constraints.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtPanelTiming" id="qtPanelTiming"></a>Panel Timing</h5>
<p>The <b>panel timing</b> defines the constraint on the panel level and uses the patient's visits in determining eligibility.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtGrpList" id="qtGrpList"></a>Group List</h5>
<p>This section contains the terms that will be used during the process of querying the database.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtInfoBox" id="qtInfoBox"></a>Information Box</h5>
<p>The content in the information box will change depending on whether or not a term is listed in the panel / group.
</p>
<p>&nbsp;</p>
<ol>
<li>No term(s) listed</li>
<ul>
<li>The message will appear as "<b>drop a term on here</b>"</li>
<li>The color of the box will be yellow</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Term(s) listed</li>
<ul>
<li>The message will appear as "<b>one or more of these</b>"</li>
<li>The color of the box will be green</li>
<li>An additional information box will appear between panels</li>
</ul>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
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.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtToolbar" id="qtToolbar"></a>Toolbar</h4>
<p>The <b>toolbar</b> is the bottom section of the <i>Query Tool view</i> and contains several buttons that perform various actions.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtToolbarLayout.png" alt="qtToolbarLayout" width="532" height="147" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtRunCancelQuery" id="qtRunCancelQuery"></a>Run Query / Cancel Query Button</h5>
<p>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) <b>Run Query</b> or (2) <b>Cancel Query</b>.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h6><a name="qtRunQueryButton" id="qtRunQueryButton"></a>Run Query Button</h6>
<p>Clicking on the button labeled <b>Run Query</b> will run your query with the defined search criteria.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtToolbarRunQuery.png" alt="qtToolbarRunQuery" width="529" height="44" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h6><a name="qtCancelQueryButton" id="qtCancelQueryButton"></a>Cancel Query Button</h6>
<p>Once you start running a query, the label will change to <b>Cancel Query</b>. Clicking on the button when it says <b>Cancel Query</b> will cancel the query and free up the Query Tool / Web client so that you can continue to do other things.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
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.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtToolbarCancelQuery.png" alt="qtToolbarCancelQuery" width="530" height="44" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtClearButton" id="qtClearButton"></a>Clear Button</h5>
<p>The <b>Clear button</b> will reset the view to the default; this includes deleting the concepts listed in the panel and removing any constraint that have been defined.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtToolbarClearButton.png" alt="qtToolbarClear" width="524" height="40" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtPrintQueryButton" id="qtPrintQueryButton"></a>Print Query Button</h5>
<p>The <b>Print button</b> will open a window with the query information in a printable format.</p>
<p>&nbsp;</p>
<p><img src="images/qtToolbarPrintQuery.png" alt="qtToolbarPrint" width="524" height="41" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><a name="qtStatusView" id="qtStatusView"></a>Query Status View</h3>
<p>The <b>Query Status view</b> is located below the <i>Query Tool view</i> 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.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtQueryStatusView.png" alt="queryStatusView" width="524" height="141" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>While a query is running you will see the name of the query and how long it has been running.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtQueryStatusRunMI.png" alt="queryStatusRun" width="524" height="141" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>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.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtQueryStatusFinishMI.png" alt="queryStatusFinish" width="524" height="141" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
The result types that appear will depend on what you have selected when running the query..
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><a name="qtOptions" id="qtOptions"></a>Options</h3>
<p>Users can define how long to wait before a query will time out. This setting is defined in the <i>Query Tool Options</i>, which can be accessed by clicking on the <b>Show Options button</b> <span style="color:#CCCCCC">(<img src="images/options.png" alt="options" />)</span>.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtOptions.png" alt="qtOptions" width="402" height="136" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>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.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2><a name="qtCreateQuery" id="qtCreateQuery"></a>Creating a Query</h2>
<p>This section describes the process of adding items to the query tool, &quot;AND&quot; / &quot;OR&quot; operators and setting constraints.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><a name="qtDragItems" id="qtDragItems"></a>Draggable Items</h3>
<p>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 <b>Query Tool view</b>.
</p>
<p>&nbsp;</p>
<ol>
<li>Concepts</li>
<p><b>Concepts</b> <span style="color:#CCCCCC">(<img src="images/leaf.png" alt="leaf" />)</span> can be defined as terms, results, providers, etc. They can be added as a group (folder <span style="color:#CCCCCC">(<img src="images/folder.png" alt="folder" />)</span>) or individually by dragging the item(s) from <b>Navigate Terms</b>, <b>Find Terms</b>, and <b>Workplace views</b>.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Modifiers</li>
<p><b>Modifiers</b> <span style="color:#CCCCCC">(<img src="images/modifier.png" alt="leaf" />)</span> are associated with a concept or group of concepts. They can be added as a group ( modifier folder <span style="color:#CCCCCC">(<img src="images/modifierFolder.png" alt="folder" />)</span>) or individually by dragging the item(s) from <b>Navigate Terms</b>, <b>Find Terms</b>, and <b>Workplace views</b>.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Previous Query</li>
<p>A new query can be created from one that has already been run by dragging the <b>previous query </b><span style="color:#CCCCCC">(<img src="images/prevQuery.jpg" alt="prevQuery" />)</span> from <b>Previous Query</b> and <b>Workplace</b> views.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Patient Set</li>
<p>A <b>patient set</b> <span style="color:#CCCCCC">(<img src="images/ptSet.png" alt="leaf" />)</span> can be can be used in a query by dragging the patient set from <b>Previous Query</b> and <b>Workplace</b> views . When you run the query it will use the patient set to query against<b></b>.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Encounter Set</li>
<p> An <b>encounter set</b> <span style="color:#CCCCCC">(<img src="images/ptSet.png" alt="leaf" />)</span> can be used in a query by dragging the patient set from <b>Previous Query</b><b></b> and <b>Workplace views</b>. When you run the query it will use the encounter set to query against.
</p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><a name="qtOperators" id="qtOperators"></a>Operators</h3>
<p>There are two operators, known as <b>SQL Logical Operators</b>, 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 '<b>AND</b>' and '<b>OR</b>' operators.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=important>
<tr>
<td>
<p class=ImportantHeading>IMPORTANT: </p>
<p class=ImportantParagraph>
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.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtOperatorAnd" id="qtOperatorAnd"></a>AND Operator</h4>
<p>The <b>AND operator</b> returns a record if both the first condition <i>and</i> the second conditions are true.
</p>
<p>&nbsp;</p>
<p>The query tool uses the AND operator when concepts are listed in different panels.</p>
<p>&nbsp;</p>
<p><i>Example:</i></p>
<p>&nbsp;</p>
<p><b>WHAT:</b> Return only those patients who have Acute Myocardial Infarction <b>AND</b> Angina Pectoris.
</p>
<p>&nbsp;</p>
<p><b>HOW:</b> In the query tool add the concept Acute Myocardial Infarction to <i><b>Group 1</b></i> and then add the concept Angina Pectoris to <i><b>Group 2</b></i>.
</p>
<p>&nbsp;</p>
<p><b>RESULT:</b> The population is limited by requiring the patients fulfill both requirements.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtOperatorAnd.png" alt="qtOperatorAND" width="524" height="353" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtOperatorOr" id="qtOperatorOr"></a>OR Operator</h4>
<p>The <b>OR operator</b> returns a record if either the first condition <i>or</i> the second conditions are true.
</p>
<p>&nbsp;</p>
<p>The query tool uses the OR operator when concepts are listed in different panels.</p>
<p>&nbsp;</p>
<p><i>Example:</i></p>
<p>&nbsp;</p>
<p><b>WHAT:</b> Return only those patients who have Acute Myocardial Infarction <b>OR</b> Angina Pectoris.
</p>
<p>&nbsp;</p>
<p><b>HOW:</b> In the query tool add both concepts Acute Myocardial Infarction and Angina Pectoris to <i><b>Group 1</b></i>.
</p>
<p>&nbsp;</p>
<p><b>RESULT:</b> The population is broadened to include all patients who fit either one of those criteria.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtOperatorOr.png" alt="qtOperatorOR" width="524" height="353" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><a name="qtAddConcepts" id="qtAddConcepts"></a>Add Concepts</h3>
<p>Concepts can be added to the Query Tool view by simply dragging the concept from one of the following views.
</p>
<p>&nbsp;</p>
<ul>
<li>&nbsp;Navigate Terms view</li>
<li>&nbsp;Find Terms view</li>
<li>&nbsp;Workplace view</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>How to add a concept from each of these views is explained in the next few sections.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtAddFromNtConcept" id="qtAddFromNtConcept"></a>Navigate Terms View</h4>
<p>The <b>Navigate Terms view</b> contains a hierarchical display of all the items that can be used to search the database.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
How the items are grouped and displayed is dependent on how the database is setup.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/ntView.png" alt="ntView" width="301" height="172" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtAddConceptFromNt" id="qtAddConceptFromNt"></a>Add Concept From Navigate Terms View</h5>
<p>&nbsp;</p>
<ol>
<li>In the <b>Navigate Terms view</b>, expand the folder(s) that contains the concept or grouping of concepts you want to add.
</li>
<li>Highlight the <b>concept</b> <span style="color:#CCCCCC">(<img src="images/leaf.png" alt="leaf" />)</span> or <b>folder</b> <span style="color:#CCCCCC">(<img src="images/folder.png" alt="Folder" />)</span> by clicking on its name.
</li>
<li>While holding the <i>left mouse button</i> down, drag the item over to the <b>Query Tool view</b></li>
<li>Drop the item into the <b>panel</b> labeled <b>Group 1</b>.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDragFolderCardioAgents.png" alt="qtDragFolderCardioAgents" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>The item will now display in the panel for Group 1.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDropFolderCardioAgents.png" alt="qtDropFolderCardio" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtAddFromFtConcept" id="qtAddFromFtConcept"></a>Find Terms View</h4>
<p>The <b>Find Terms view</b> provides a way to search for a particular concept.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/ftView.png" alt="ftView" width="303" height="174" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
For detailed information on how to search for terms, please see the i2b2 Find Terms help.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtAddConceptFromFt" id="qtAddConceptFromFt"></a>Add Concept From Find Terms View</h5>
<p>&nbsp;</p>
<ol>
<li>In the <b>Find Terms view</b>, search for the item(s) you want to add.</li>
<li>Highlight the <b>concept</b> <span style="color:#CCCCCC">(<img src="images/leaf.png" alt="leaf" />)</span> or <b>folder</b> <span style="color:#CCCCCC">(<img src="images/folder.png" alt="Folder" />)</span> by clicking on its name.
</li>
<li>While holding the <i>left mouse button</i> down, drag the item over to the <b>Query Tool view</b></li>
<li>Drop the item into the <b>panel</b> labeled <b>Group 1</b>.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDragFolderCardioAgents.png" alt="qtDragFolderCardioAgents" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>The item will now display in the panel for Group 1.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDropFolderCardioAgents.png" alt="qtDropFolderCardio" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtAddFromWpConcept" id="qtAddFromWpConcept"></a>Workplace View</h4>
<p>Information in the <b>workplace</b> is related to the most common concepts, modifiers, and queries that an individual uses and in essence becomes their personal workplace.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/wpView.png" alt="wpView" width="296" height="164" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtAddConceptFromWp" id="qtAddConceptFromWp"></a>Add Concept From Workplace View</h5>
<p>&nbsp;</p>
<ol>
<li>In the <b>Workplace view</b>, expand the folder(s) that contains the concept or grouping of concepts you want to add.
</li>
<li>Highlight the <b>concept</b> <span style="color:#CCCCCC">(<img src="images/leaf.png" alt="leaf" />)</span> or <b>folder</b> <span style="color:#CCCCCC">(<img src="images/folder.png" alt="Folder" />)</span> by clicking on its name.
</li>
<li>While holding the <i>left mouse button</i> down, drag the item over to the <b>Query Tool view</b></li>
<li>Drop the item into the <b>panel</b> labeled <b>Group 1</b>.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDragFolderCardioAgents.png" alt="qtDragFolderCardioAgents" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>The item will now display in the panel for Group 1.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDropFolderCardioAgents.png" alt="qtDropFolderCardio" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><a name="qtAddModifiers" id="qtAddModifiers"></a>Add Modifiers</h3>
<p>Modifiers can be added to the Query Tool view by simply dragging the modifier from one of the following views.
</p>
<p>&nbsp;</p>
<ul>
<li>&nbsp;Navigate Terms view</li>
<li>&nbsp;Find Terms view</li>
<li>&nbsp;Workplace view</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>How to add a modifier from each of these views is explained in the next few sections.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtAddFromNtMod" id="qtAddFromNtMod"></a>Navigate Terms View</h4>
<p>The <b>Navigate Terms view</b> contains a hierarchical display of all the items that can be used to search the database.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
How the items are grouped and displayed is dependent on how the database is setup.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/ntView.png" alt="ntView" width="301" height="172" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtAddModFromNt" id="qtAddModFromNt"></a>Add Modifier From Navigate Terms View</h5>
<p>&nbsp;</p>
<ol>
<li>In the <b>Navigate Terms view</b>, expand the folder(s) that contains the modifier or grouping of grouping of modifiers you want to add.
</li>
<li>Highlight the <b>modifier</b> <span style="color:#CCCCCC">(<img src="images/modifier.png" alt="modifier" />)</span> or <b>modifier folder</b> <span style="color:#CCCCCC">(<img src="images/modifierFolder.png" alt="Folder" />)</span> by clicking on its name.
</li>
<li>While holding the <i>left mouse button</i> down, drag the item over to the <b>Query Tool view</b></li>
<li>Drop the item into the <b>panel</b> labeled <b>Group 1</b>.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDragModPrincDx.png" alt="qtDragFolderCardioAgents" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>The name of the concept associated to the modifier plus the modifier will now display in the panel for Group 1.
</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDropModPrincDx.png" alt="qtDropFolderCardio" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtAddFromFtMod" id="qtAddFromFtMod"></a>Find Terms View</h4>
<p>The <b>Find Terms view</b> provides a way to search for a particular concept and modifier.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/ftView.png" alt="ftView" width="303" height="174" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
For detailed information on how to search for terms and modifiers, please see the i2b2 Find Terms help.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtAddModFromFt" id="qtAddModFromFt"></a>Add Modifier From Find Terms View</h5>
<p>&nbsp;</p>
<ol>
<li>In the <b>Find Terms view</b>, search for the term(s) and modifier you want to add.</li>
<li>Highlight the <b>modifier</b> <span style="color:#CCCCCC">(<img src="images/modifier.png" alt="modifier" />)</span> or <b>modifier folder</b> <span style="color:#CCCCCC">(<img src="images/modifierFolder.png" alt="Folder" />)</span> by clicking on its name.
</li>
<li>While holding the <i>left mouse button</i> down, drag the item over to the <b>Query Tool view</b></li>
<li>Drop the item into the <b>panel</b> labeled <b>Group 1</b>.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDragModPrincDx.png" alt="qtDragModPrincDx" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>The name of the concept associated to the modifier plus the modifier will now display in the panel for Group 1.
</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDropModPrincDx.png" alt="qtDropFolderCardio" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtAddFromWpMod" id="qtAddFromWpMod"></a>Workplace View</h4>
<p>Information in the <b>workplace</b> is related to the most common concepts, modifiers, and queries that an individual uses and in essence becomes their personal workplace.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/wpView.png" alt="wpView" width="296" height="164" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtAddModFromWp" id="qtAddModFromWp"></a>Add Modifier From Workplace View</h5>
<p>&nbsp;</p>
<ol>
<li>In the <b>Workplace view</b>, expand the folder(s) that contains the modifier or grouping of modifiers you want to add.
</li>
<li>Highlight the <b>modifier</b> <span style="color:#CCCCCC">(<img src="images/modifier.png" alt="modifier" />)</span> or <b>modifier folder</b> <span style="color:#CCCCCC">(<img src="images/modifierFolder.png" alt="Folder" />)</span> by clicking on its name.
</li>
<li>While holding the <i>left mouse button</i> down, drag the item over to the <b>Query Tool view</b></li>
<li>Drop the item into the <b>panel</b> labeled <b>Group 1</b>.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDragModPrincDx.png" alt="qtDragModPrincDx" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>The name of the concept associated to the modifier plus the modifier will now display in the panel for Group 1.
</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDropModPrincDx.png" alt="qtDropModPrincDx" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><a name="qtAddPq" id="qtAddPq"></a>Add Previous Query</h3>
<p>A <b>previous query</b> 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 <i>Query Tool view</i> simply drag the query name from one of the following views.
</p>
<p>&nbsp;</p>
<ul>
<li>&nbsp;Previous Query view</li>
<li>&nbsp;Workplace view</li>
</ul>
<p>&nbsp;</p>
<p>Within the Query Tool view, the previous query can be added to one of the following two locations.</p>
<p>&nbsp;</p>
<table width="85%" border="1" cellspacing="1" cellpadding="1">
<tr>
<td><b>Query Name field</b></td>
<td>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.
</td>
</tr>
<tr>
<td><b>Panel (Group)</b></td>
<td>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.
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>How to add a previous query from each of the views listed above is explained in the next few sections.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtAddFromPqPq" id="qtAddFromPqPq"></a>Previous Query View</h4>
<p>The <b>Previous Query view</b> displays the queries that were run by the user.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/pqView.png" alt="pqView" width="296" height="141" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtAddPqFromPq" id="qtAddPqFromPq"></a>Add Previous Query From Previous Query View (New Query)</h5>
<ol>
<li>In the <b>Previous Query view</b> highlight the <b>previous query</b> <span style="color:#CCCCCC">(<img src="images/prevQuery.jpg" alt="prevQuery" />)</span> by clicking on its name.
</li>
<li>While holding the <i>left mouse button</i> down, drag the item over to the <b>Query Tool view</b></li>
<li>Drop the previous query into the<strong> </strong><b>Query Name</b>.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDragPqIschemicHrt.png" alt="qtDragPq" width="524" height="353" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>The item(s) associated with the previous query will display in the appropriate group(s), the name of the query will appear at <b>Query Name</b>, and any constraints that were defined when the original query was run will now default with the new query.
</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDropPqIschemicHrt.png" alt="qtDropPq" width="524" height="353" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
When you run the query it will receive a new name. This is to distinguish the first previous query from the second.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtAddPqFromPqPanel" id="qtAddPqFromPqPanel"></a>Add Previous Query From Previous Query View (Query-in-Query)</h5>
<ol>
<li>In the <b>Previous Query view</b> highlight the <b>previous query</b> <span style="color:#CCCCCC">(<img src="images/prevQuery.jpg" alt="prevQuery" />)</span> by clicking on its name.
</li>
<li>While holding the <i>left mouse button</i> down, drag the item over to the <b>Query Tool view</b></li>
<li>Drop the previous query into the<strong> </strong><b>panel</b> labeled <b>Group 1</b>.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDragPqIschemicHrtPanel.png" alt="qtDragPqToPanel" width="524" height="353" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>The previous query will now display in the panel for Group 1.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDropPqIschemicHrtPanel.png" alt="qtDropPqPanel" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtAddFromWpPq" id="qtAddFromWpPq"></a>Workplace View</h4>
<p>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.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/wpView.png" alt="wpView" width="296" height="164" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtAddPqFromWp" id="qtAddPqFromWp"></a>Add Previous Query From Workplace View (New Query)</h5>
<p>&nbsp;</p>
<ol>
<li>In the <b>Workplace view</b>, expand the folder(s) that contains the previous query you want to add.
</li>
<li>Highlight the <b>previous query</b> <span style="color:#CCCCCC">(<img src="images/prevQuery.jpg" alt="prevQuery" />)</span> by clicking on its name.
</li>
<li>While holding the <i>left mouse button</i> down, drag the item over to the <b>Query Tool view</b></li>
<li>Drop the previous query into the <b>Query Name</b>.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDragPqIschemicHrt.png" alt="qtDragPq" width="524" height="353" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>The item(s) associated with the previous query will display in the appropriate group(s), the name of the query will appear at <b>Query Name</b>, and any constraints that were defined when the original query was run will now default with the new query.
</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDropPqIschemicHrt.png" alt="qtDropPq" width="524" height="353" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
When you run the query it will receive a new name. This is to distinguish the first previous query from the second.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtAddPqFromPqPanel" id="qtAddPqFromPqPanel"></a>Add Previous Query From Workplace View (Query-in-Query)</h5>
<ol>
<li>In the <b>Workplace view</b>, expand the folder(s) that contains the previous query you want to add.
</li>
<li>Highlight the <b>previous query</b> <span style="color:#CCCCCC">(<img src="images/prevQuery.jpg" alt="prevQuery" />)</span> by clicking on its name.
</li>
<li>While holding the <i>left mouse button</i> down, drag the item over to the <b>Query Tool view</b></li>
<li>Drop the previous query into the<strong> </strong><b>panel</b> labeled <b>Group 1</b>.</li>
<p>&nbsp;</p>
<p><img src="images/qtDragPqIschemicHrtPanel.png" alt="qtDragPqToPanel" width="524" height="353" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>The previous query will now display in the panel for Group 1.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDropPqIschemicHrtPanel.png" alt="qtDropPqPanel" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
When you run the query it will receive a new name. This is to distinguish the first previous query from the second.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><a name="qtAddPtList" id="qtAddPtList"></a>Add Patient Set</h3>
<p>A <b>patient set</b> can be added to the <i>Query Tool view</i> by simply dragging the list of patients from one of the following views.
</p>
<p>&nbsp;</p>
<ul>
<li>&nbsp;Previous Query view</li>
<li>&nbsp;Workplace view</li>
</ul>
<p>&nbsp;</p>
<p>How to add a patient set from each of these views is explained in the next few sections.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtAddFromPqPtList" id="qtAddFromPqPtList"></a>Previous Query View</h4>
<p>The <b>Previous Query view</b> displays the queries that were run by the user.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/pqView.png" alt="pqView" width="296" height="141" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtAddPtListFromPq" id="qtAddPtListFromPq"></a>Add Patient Set From Previous Query View</h5>
<ol>
<li>In the <b>Previous Query view</b> click on the plus sign <span style="color:#CCCCCC">(<img src="images/plusSign.png" alt="plusSign" />)</span> next to the name of the previous query that contains the patient set.
</li>
<li>Click on the plus sign <span style="color:#CCCCCC">(<img src="images/plusSign.png" alt="plusSign" />)</span> next to the results folder.
</li>
<li>Highlight the <b>Patient set</b> <span style="color:#CCCCCC">(<img src="images/ptSet.png" alt="ptSet" />)</span> by clicking on its name.
</li>
<li>While holding the <i>left mouse button</i> down, drag the item over to the <b>Query Tool view</b></li>
<li>Drop the item into the<strong> </strong><b>panel</b> labeled <b>Group 1</b>.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDragPtSet.png" alt="qtDragPtSet" width="524" height="353" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>The item will now display in the panel for Group 1.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDropPtSet.png" alt="qtDropPtSet" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtAddFromWpPtList" id="qtAddFromWpPtList"></a>Workplace View</h4>
<p>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.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/wpView.png" alt="wpView" width="296" height="164" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtAddPtListFromPq" id="qtAddPtListFromPq"></a>Add Patient Set From Workplace View</h5>
<ol>
<li>In the <b>Workplace view</b>, expand the folder(s) that contains the list of patients you want to add.
</li>
<li>Highlight the <b>Patient set</b> <span style="color:#CCCCCC">(<img src="images/ptSet.png" alt="ptSet" />)</span> by clicking on its name.
</li>
<li>While holding the <i>left mouse button</i> down, drag the item over to the <b>Query Tool view</b></li>
<li>Drop the item into the<strong> </strong><b>panel</b> labeled <b>Group 1</b>.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDragPtSet.png" alt="qtDragPtSet" width="524" height="353" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>The item will now display in the panel for Group 1.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDropPtSet.png" alt="qtDropPtSet" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><a name="qtAddEnc" id="qtAddEnc"></a>Add Encounter Set</h3>
<p>An <b>encounter set</b> can be added to the <i>Query Tool view</i> by simply dragging the encounter set from one of the following views.
</p>
<p>&nbsp;</p>
<ul>
<li>&nbsp;Previous Query view</li>
<li>&nbsp;Workplace view</li>
</ul>
<p>&nbsp;</p>
<p>How to add an encounter set from each of these views is explained in the next few sections.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtAddFromPqEnc" id="qtAddFromPqEnc"></a>Previous Query View</h4>
<p>The <b>Previous Query view</b> displays the queries that were run by the user.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/pqView.png" alt="pqView" width="296" height="141" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtAddEncFromPq" id="qtAddEncFromPq"></a>Add Encounter Set From Previous Query View</h5>
<ol>
<li>In the <b>Previous Query view</b> click on the plus sign <span style="color:#CCCCCC">(<img src="images/plusSign.png" alt="plusSign" />)</span> next to the name of the previous query that contains the patient set.
</li>
<li>Click on the plus sign <span style="color:#CCCCCC">(<img src="images/plusSign.png" alt="plusSign" />)</span> next to the results folder.
</li>
<li>Highlight the <b>Encounter set</b> <span style="color:#CCCCCC">(<img src="images/ptSet.png" alt="ptSet" />)</span> by clicking on its name.
</li>
<li>While holding the <i>left mouse button</i> down, drag the item over to the <b>Query Tool view</b></li>
<li>Drop the item into the<strong> </strong><b>panel</b> labeled <b>Group 1</b>.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDragEncSet.png" alt="qtDragEncSet" width="524" height="353" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>The item will now display in the panel for Group 1.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDropEncSet.png" alt="qtDropEncSet" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtAddFromWpEnc" id="qtAddFromWpEnc"></a>Workplace View</h4>
<p>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.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/wpView.png" alt="wpView" width="296" height="164" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtAddEncFromPq" id="qtAddEncFromPq"></a>Add Encounter Set From Workplace View</h5>
<ol>
<li>In the <b>Workplace view</b>, expand the folder(s) that contains the list of patients you want to add.
</li>
<li>Highlight the <b>Encounter set</b> <span style="color:#CCCCCC">(<img src="images/ptSet.png" alt="ptSet" />)</span> by clicking on its name.
</li>
<li>While holding the <i>left mouse button</i> down, drag the item over to the <b>Query Tool view</b></li>
<li>Drop the item into the<strong> </strong><b>panel</b> labeled <b>Group 1</b>.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDragEncSet.png" alt="qtDragEncSet" width="524" height="353" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>The item will now display in the panel for Group 1.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDropEncSet.png" alt="qtDropEncSet" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
When you run the query it will receive a new name. This is to distinguish the first previous query from the second.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><a name="qtAddPanel" id="qtAddPanel"></a>Add a Panel / Group</h3>
<p>Three panels are typically displayed as part of the standard Query Tool view. Some complex queries may require the use of additional panels.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
In order to add a panel, the previous panels must contain at least one concept.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<ol>
<li>Click on the <b>New Group button</b> located on the toolbar at the bottom of the <i>Query Tool view</i>.
</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtToolbarNewGrpButton.png" alt="qtToolbarNewGroup" width="524" height="44" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>A new panel will be added.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtPanelAdd.png" alt="qtPanelAdd" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtNavigatePanels" id="qtNavigatePanels"></a>Navigate Multiple Panels</h4>
<p>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.
</p>
<p>&nbsp;</p>
<table width="85%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td width="3%"><img src="images/buttonMoveToBegin.png" alt="buttonMoveToBegin" width="22" height="18" /></td>
<td width="13%"><b>Begin button</b></td>
<td width="84%">will move the display to show the first panel</td>
</tr>
<tr>
<td><img src="images/buttonMovetoEnd.png" alt="buttonMoveToEnd" width="22" height="18" /></td>
<td><b>End button</b></td>
<td>will move the display to show the last panel in use</td>
</tr>
<tr>
<td><img src="images/buttonPrevious.png" alt="buttonPrevious" width="22" height="18" /></td>
<td><b>Previous button</b></td>
<td>will move the display back one panel</td>
</tr>
<tr>
<td><img src="images/buttonNext.png" alt="buttonNext" width="22" height="18" /></td>
<td><b>Next button</b></td>
<td>will move the display forward one panel</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><a name="qtDelete" id="qtDelete"></a>Delete / Remove</h3>
<p>There are three options for removing a concept from the <b>Query Tool view</b>. Users can (1) reset all the groups, (2) clear all items in a panel, or (3) delete an individual item from the group.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtResetGrps" id="qtResetGrps"></a>Reset Groups</h4>
<p>&nbsp;</p>
<ol>
<li>Click on the <b>Clear button</b> located on the toolbar at the bottom of the <i>Query Tool view</i>.
</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtToolbarClearButton.png" alt="qtToolbarClear" width="524" height="40" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>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).
</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=warning>
<tr>
<td>
<p class=WarningHeading>WARNING: </p>
<p class=WarningParagraph>
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.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtClearPanel" id="qtClearPanel"></a>Clear Items in a Panel / Group</h4>
<p>&nbsp;</p>
<ol>
<li>Click on the <b>Delete button <span style="color:#CCCCCC">(<img src="images/buttonDelete.png" alt="delete" />)</span> </b> located in the top right corner of the panel (next to the Group name)<i></i>.
</li>
<li>The group will be reset.</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=warning>
<tr>
<td>
<p class=WarningHeading>WARNING: </p>
<p class=WarningParagraph>
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.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtDeleteItem" id="qtDeleteItem"></a>Delete Single Item</h4>
<p>&nbsp;</p>
<ol>
<li>Using the <i>right mouse button</i>, click on the name of the item to be removed.</li>
<li>A list box will open.</li>
<li>Select <b>Delete</b> from the list.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtDeleteItem.png" alt="deleteItem" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>The concept will be removed from the list.</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=warning>
<tr>
<td>
<p class=WarningHeading>WARNING: </p>
<p class=WarningParagraph>
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.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><a name="qtConstraints" id="qtConstraints"></a>Setting Constraints</h3>
<p><b>Constraints</b> 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.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="85%" border="1" cellspacing="1" cellpadding="1">
<tr>
<th scope="col">Constraint Type</th>
<th scope="col">Description</th>
</tr>
<tr>
<td>Temporal</td>
<td>Constraint is defined on the query level and utilizes the patient encounters and / or instance number when determining eligibility.
</td>
</tr>
<tr>
<td>Panel Timing</td>
<td>Constraint is defined on the panel level and utilizes the patient encounters and / or instance number when determining eligibility.
</td>
</tr>
<tr>
<td>Date</td>
<td>Constraint uses a date range when determining eligibility.</td>
</tr>
<tr>
<td>Occurrence</td>
<td>Constraint is by the number of occurrences an item is documented.</td>
</tr>
<tr>
<td>Exclusion</td>
<td>Constraint will not include patients with the concepts listed in the panel.</td>
</tr>
<tr>
<td>Value</td>
<td>Constraint is by the value associated to a concept or modifier. Not all items have values.</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
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.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtTempPanelConstraints" id="qtTempPanelConstraints"></a>Temporal and Panel Timing Constraints</h4>
<p>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.
</p>
<p>&nbsp;</p>
<p>The main difference between a <b>temporal</b> and a <b>panel timing constraint</b> is that temporal constraints are defined at the <i>query level</i> and panel timing constraints are defined at the <i>panel level</i>.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtSetTempConstraint" id="qtSetTempConstraint"></a>Temporal Constraint</h5>
<p>As stated in the previous section the <b>Temporal Constraint</b> is defined at the <i>query level</i>.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstTemporal.png" alt="qtConstraintTemporal" width="432" height="24" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Users can select one of three available options:</p>
<p>&nbsp;</p>
<ol>
<li>Treat all groups independently</li>
<ul>
<li>The items (facts) can occur at <b>any time</b> in the patient's history.</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Selected items occur in the same financial encounter</li>
<ul>
<li>The items (facts) occur during the <b>same visit</b> (financial encounter).</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Items instance will be the same</li>
<ul>
<li>The items (facts) occur during the <b>same visit</b> (financial encounter) <i>AND</i> the <b>same instance</b>.
</li>
<li>Can only be selected if a modifier is listed in a panel.</li>
</ul>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
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.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h6><a name="qtTempConstraintAnyVisit" id="qtTempConstraintAnyVisit"></a>Treat All Groups Independently</h6>
<p>&nbsp;</p>
<ul>
<li><i>Panel timing constraint</i> will default to <b>Treat Independently</b></li>
<li><i>Panel timing constraint</i> can not be changed</li>
<li>Items defined in the panels can occur at <b>any time</b> in the patients history</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstPanelAnyVisit.png" alt="qtConstPanelAnyVisit" width="524" height="100" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><b>Example:</b></p>
<p>Patient has a medication with a dose greater than 500 mg <i><b>and</b></i> a medication that is taken once a day documented at <i><b>any time</b></i> in their history.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtTimingEx01.png" alt="qtTimingEx1" width="524" height="353" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><b>RESULTS:</b> 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 <i><u>same</u></i> <b>patient_num</b>.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtTimingEx01Result.png" alt="qtTimingExample2Results" width="524" height="141" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h6><a name="qtTempConstraintSameVisit" id="qtTempConstraintSameVisit"></a>Selected Groups Occur in the Same Financial Encounter</h6>
<p>&nbsp;</p>
<ul>
<li><i>Panel timing constraint</i> will default to <b>Occurs in Same Encounter</b></li>
<li>The default <i>panel timing constraint</i> can be changed to <b>Treat Independently</b></li>
<li>Items defined in the panels occur during the <b>same financial encounter</b> (visit)</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=important>
<tr>
<td>
<p class=ImportantHeading>IMPORTANT: </p>
<p class=ImportantParagraph>
The panel timing will override the temporal constraint setting.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstPanelSameVisit.png" alt="qtConstPanelSameVisit" width="524" height="93" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><b>Example:</b></p>
<p>Patient has a medication with a dose greater than 500 mg <i><b>and</b></i> a medication that is taken once a day documented during the <i><b>same visit</b></i>.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtTimingEx02.png" alt="qtTimingExample2" width="524" height="353" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><b>RESULTS:</b> 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 <i><u>same</u></i> <b>encounter_num</b>.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtTimingEx02Result.png" alt="qtTimingExample2Result" width="524" height="141" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h6><a name="qtTempConstraintSameInstance" id="qtTempConstraintSameInstance"></a>Items Instance Will Be the Same</h6>
<p>&nbsp;</p>
<ul>
<li><i>Panel timing constraint</i> will default to <b>Items instance will be the same</b></li>
<li>The default <i>panel timing constraint</i> can be changed to <b>Treat Independently</b></li>
<li>Items defined in the panels occur during the <b>same financial encounter</b> (visit) <b><i>AND</i></b> the <b>same instance</b>
</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=important>
<tr>
<td>
<p class=ImportantHeading>IMPORTANT: </p>
<p class=ImportantParagraph>
The panel timing will override the temporal constraint setting.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstPanelSameInstance.png" alt="qtConstPanelSameInstance" width="524" height="93" />
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><b>Example:</b></p>
<p>Patient has a medication with a dose greater than 500 mg <i><b>and</b></i> a medication that is taken once a day documented during the <i><b>same instance</b></i>.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtTimingEx03.png" alt="qtTimingExample3" width="524" height="353" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><b>RESULTS:</b> 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 <i><u>same</u></i> <b>encounter_num</b> , <b>concept_cd</b>, <b>provider_id</b>, <b>start_date</b>, <i>AND</i> <b>instance_num</b>.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtTimingEx03Result.png" alt="qtTimingExample3Result" width="524" height="141" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtSetPanelTimingConstraint" id="qtSetPanelTimingConstraint"></a>Panel Timing Constraint</h5>
<p>&nbsp;</p>
<p>As stated in the previous section the <b>Panel Timing Constraint</b> is defined at the <i>panel level</i> and can only be changed when the <i>temporal constraint</i> is defined as <b>Selected groups occur in the same financial encounter</b> or <b>Items instance will be the same</b>.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Users can select one of three available options:</p>
<p>&nbsp;</p>
<ol>
<li>Treat all groups independently</li>
<ul>
<li>The items (facts) can occur at <b>any time</b> in the patient's history.</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Selected items occur in the same financial encounter</li>
<ul>
<li>The items (facts) occur during the <b>same visit</b> (financial encounter).</li>
<li>Temporal constraint has to be set to Same financial encounter in order to be available for selection.
</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Items instance will be the same</li>
<ul>
<li>The items (facts) occur during the <b>same visit</b> (financial encounter) <i>AND</i> the <b>same instance</b>.
</li>
<li>Temporal constraint has to be set to Items instance will be the same in order to be available for selection.
</li>
</ul>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
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.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h6><a name="qtPanelTimingConstraintAnyVisit" id="qtPanelTimingConstraintAnyVisit"></a>Treat Independently</h6>
<p>&nbsp;</p>
<p>The items (facts) listed in the panel can occur at <i>any time</i> in the patient's history.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstPanelAnySameVisit.png" alt="qtConstPanelAnySameVisit" width="524" height="94" />
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h6><a name="qtPanelTimingConstraintSameVisit" id="qtPanelTimingConstraintSameVisit"></a>Occurs in the Same Encounter</h6>
<p>&nbsp;</p>
<p>The items (facts) listed in the panel occur during <i>same visit</i> (financial encounter).</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstPanelSameVisit.png" alt="qtPanelSameVisit" width="524" height="93" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>In the example shown below, the items (facts) listed in the panel for Group 1 can occur at <i>any time</i> in the patient's history while the items in Group 2 and 3 have to occur during the <i>same visit</i>.
</p>
<p>&nbsp;</p>
<p><b>Example:</b></p>
<p>Patient has a diagnosis of Acute MI documented at <b><i>any time</i></b> in their history and they have a medication with a dose greater than 500 mg <b><i>and</i></b> a medication that is taken once a day documented during the <b><i>same visit</i></b>.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtTimingEx04.png" alt="qtTimingExample4" width="524" height="353" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><b>RESULTS:</b> 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 <i><u>same</u></i> <b>encounter_num</b> <i>AND</i> the diagnosis of acute MI, the medication dose and frequency all have the <i><u>same</u></i> <b>patient_num</b>
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtTimingEx04Result.png" alt="qtTimingExample4Result" width="524" height="141" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h6><a name="qtPanelTimingConstraintSameInstance" id="qtPanelTimingConstraintSameInstance"></a>Items Instance Will Be The Same</h6>
<p>&nbsp;</p>
<p>The items (facts) listed in the panel occur during <i>same instance</i>.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstPanelSameVisit.png" alt="qtPanelSameVisit" width="524" height="93" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>In the example shown below, the items (facts) listed in the panel for Group 1 can occur at <i>any time</i> in the patient's history while the items in Group 2 and 3 have to occur during the <i>same instance</i>.
</p>
<p>&nbsp;</p>
<p><b>Example:</b></p>
<p>Patient has a diagnosis of Acute MI documented at <b><i>any time</i></b> in their history and they have a medication with a dose greater than 500 mg <b><i>and</i></b> a medication that is taken once a day documented during the <b><i>same instance</i></b>.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtTimingEx05.png" alt="qtTimingExample5" width="524" height="353" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><b>RESULTS:</b> 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 <i><u>same</u></i> <b>encounter_num</b> , <b>concept_cd</b>, <b>provider_id</b>, <b>start_date</b>, <i>AND</i> <b>instance_num</b> <i>AND</i> the diagnosis of acute MI, the medication dose and frequency all have the <i><u>same</u></i> <b>patient_num</b>
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtTimingEx05Result.png" alt="qtTimingExample5Result" width="524" height="141" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtSetDateConstraint" id="qtSetDateConstraint"></a>Date Constraint</h4>
<p>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.
</p>
<p>&nbsp;</p>
<p>The start date associated with the observation is what is used to determine if there is a positive hit.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtSpecifyFromToDates" id="qtSpecifyFromToDates"></a>Specified Date Range: From and To Dates Defined</h5>
<p>Only data with activity within the <b>defined</b> <i>date range</i> will be used.</p>
<p>&nbsp;</p>
<p><b><i>Example:</i></b></p>
<p>&nbsp;</p>
<p><i>Concept:</i> Acute Myocardial Infarction</p>
<p><i>From date:</i> 01/01/2001</p>
<p><i>To date:</i> 12/31/2005</p>
<p>&nbsp;</p>
<p>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.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h6><a name="qtDateConstraintSetFromTo" id="qtDateConstraintSetFromTo"></a>Setting the Date Constraint (FROM / TO Date Range)</h6>
<p>&nbsp;</p>
<ol>
<li>Click on the <b>Dates button</b> located in the selection criteria section of the panel.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstDateSelect.png" alt="qtConstDateSelect" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>A new window will open.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstDateWindow.png" alt="qtConstDateWindow" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click the <b>check box</b> next to the date in the <b>From box</b>.</li>
<li>At this point there are two methods of entering your <i>starting</i> date.</li>
<ol type="a">
<li>Manually type it in the text box.</li>
<li>Click on the <b>drop-down arrow</b> <span style="color:#CCCCCC">(<img src="images/dropDownArrow.png" alt="dropDownArrow" />)</span> to open the calendar view and click on the desired date.
</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstDateCal1.png" alt="qtConstDateCal1" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Once you click on the desired date the calendar window will close.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstDateFrom.png" alt="qtConstDateFrom" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click the <b>check box</b> next to the date in the <b>To box</b>.</li>
<li>Highlight the default date or click on the <b>drop-down arrow </b>and enter the date you want to use as your <i>ending</i> date.
</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstDateFromTo.png" alt="qtConstDateFromTo" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <b>OK button</b>.</li>
<li><b>Dates</b> will now be underlined to indicate a date constraint has been set.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstDateSet.png" alt="qtConstDateSet" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtSpecifyStartDate" id="qtSpecifyStartDate"></a>Specific Start Date: Only the From Date is Defined</h5>
<p>&nbsp;</p>
<p>Data from the <b>defined</b> <i>start date</i> to the <i>latest date available</i>. No end date defined.
</p>
<p>&nbsp;</p>
<p><b><i>Example:</i></b></p>
<p>&nbsp;</p>
<p><i>Concept:</i> Acute Myocardial Infarction</p>
<p><i>From date:</i> 01/01/2001</p>
<p><i>To date:</i></p>
<p>&nbsp;</p>
<p>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.
</p>
<p>&nbsp;</p>
<p></p>
<h6><a name="qtDateConstraintSetFrom" id="qtDateConstraintSetFrom"></a>Setting the Date Constraint (FROM Date only)</h6>
<p>&nbsp;</p>
<ol>
<li>Click on the <b>Dates button</b> located in the selection criteria section of the panel.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstDateSelect.png" alt="qtConstDateSelect" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>A new window will open.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstDateWindow.png" alt="qtConstDateWindow" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click the <b>check box</b> next to the date in the <b>From box</b>.</li>
<li>At this point there are two methods of entering your <i>starting</i> date.</li>
<ol type="a">
<li>Manually type it in the text box.</li>
<li>Click on the <b>drop-down arrow</b> <span style="color:#CCCCCC">(<img src="images/dropDownArrow.png" alt="dropDownArrow" />)</span> to open the calendar view and click on the desired date.
</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstDateCal1.png" alt="qtConstDateCal1" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Once you click on the desired date the calendar window will close.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstDateFrom.png" alt="qtConstDateFrom" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <b>OK button</b>.</li>
<li><b>Dates</b> will now be underlined to indicate a date constraint has been set.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstDateSet.png" alt="qtConstDateSet" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtSpecifyEndDate" id="qtSpecifyEndDate"></a>Specific End Date: Only the To Date is Defined</h5>
<p>&nbsp;</p>
<p>All data up until the <b>defined</b> <i>end date</i>. No start date defined.</p>
<p>&nbsp;</p>
<p><b><i>Example:</i></b></p>
<p>&nbsp;</p>
<p><i>Concept:</i> Acute Myocardial Infarction</p>
<p><i>From date:</i></p>
<p><i>To date:</i> 12/31/2005</p>
<p>&nbsp;</p>
<p>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.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h6><a name="qtDateConstraintSetTo" id="qtDateConstraintSetTo"></a>Setting the Date Constraint (TO Date only)</h6>
<p>&nbsp;</p>
<ol>
<li>Click on the <b>Dates button</b> located in the selection criteria section of the panel.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstDateSelect.png" alt="qtConstDateSelect" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>A new window will open.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstDateWindow.png" alt="qtConstDateWindow" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click the <b>check box</b> next to the date in the <b>To box</b>.</li>
<li>At this point there are two methods of entering your <i>ending</i> date.</li>
<ol type="a">
<li>Manually type it in the text box.</li>
<li>Click on the <b>drop-down arrow</b> <span style="color:#CCCCCC">(<img src="images/dropDownArrow.png" alt="dropDownArrow" />)</span> to open the calendar view and click on the desired date.
</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstDateCal2.png" alt="qtConstDateCal2" width="190" height="201" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Once you click on the desired date the calendar window will close.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstDateTo.png" alt="qtConstDateTo" width="402" height="218" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <b>OK button</b>.</li>
<li><b>Dates</b> will now be underlined to indicate a date constraint has been set.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstDateSet.png" alt="qtConstDateSet" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtOccurConstraint" id="qtOccurConstraint"></a>Occurrences Constraint</h4>
<p>Users can define the number of times an item has to occur in order to be considered a positive &quot;hit&quot;.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtOccurConstraintSet" id="qtOccurConstraintSet"></a>Setting the Occurrences Constraint</h5>
<p>&nbsp;</p>
<ol>
<li>Click on the <b>Occurs &gt; 0x button</b> located in the selection criteria section of the panel.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstOccurSelect.png" alt="qtConstOccurSelect" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>A new window will open.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstOccurWindow.png" alt="qtConstOccurWindow" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <b>drop-down arrow</b> to display a list of numbers.</li>
<li>Select a number from the list.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstOccurSelection.png" alt="qtConstOccurSelection" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <b>OK button</b>.</li>
<li><b>Occurs &gt; 0x</b> will now be underlined to indicate a constraint has been set and the 0 will be replaced with the selected number.
</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstOccurSet.png" alt="qtConstOccurSet" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtExcludeConstraint" id="qtExcludeConstraint"></a>Exclude Constraint</h4>
<p>&nbsp;</p>
<p>The exclude constraint will not include patients with the item(s) listed in the panel.</p>
<p>&nbsp;</p>
<ol>
<li>Click on the <b>Exclude button</b> located in the selection criteria section of the panel.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstExcludeSelect.png" alt="qtConstExcludeSelect" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>The text in the information box will change to &quot;<b>none of these</b>&quot; and the background color will change to pink.
</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstExcludeSet.png" alt="qtConstExcludeSet" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtValueConstraint" id="qtValueConstraint"></a>Value Constraint</h4>
<p>&nbsp;</p>
<p>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.).
</p>
<p>&nbsp;</p>
<p>For those items that do have values there are different types of values that may be associated with it.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
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.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtFlagValueConstraint" id="qtFlagValueConstraint"></a>Flag Value</h5>
<p>&nbsp;</p>
<p><b>Flags</b> 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.
</p>
<p>&nbsp;</p>
<ul>
<li>High</li>
<li>Low</li>
<li>Abnormal</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h6><a name="qtFlagValueConstraintSetConcept" id="qtFlagValueConstraintSetConcept"></a>Setting the Value Constraint (Flag) for a Concept</h6>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
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.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<ol>
<li>Using the <i>right mouse button</i>, click on the item listed in the panel.</li>
<li>A pop-up menu will open.</li>
<li>Select <b>Set Value</b> from the list.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValSelect.png" alt="qtConstValSelect" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>A new window will open.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValTropI1.png" alt="qtConstValTropI1" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <i>radial dial</i> next to <b>By flag</b>.</li>
<li>A new field with a drop-down selection box will appear.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValTropI2.png" alt="qtConstValTropI2" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <b>drop-down arrow</b> to change the flag or accept the default.</li>
<li>Click on the <b>OK button</b>.</li>
<li>The value constraint has been set.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValTropI3.png" alt="qtConstValTropI3" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h6><a name="qtFlagValueConstraintSetModifier" id="qtFlagValueConstraintSetModifier"></a>Setting the Value Constraint (Flag) for a Modifier</h6>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
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.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<ol>
<li>Using the <i>right mouse button</i>, click on the item listed in the panel.</li>
<li>A pop-up menu will open.</li>
<li>Select <b>Set Value</b> from the list.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValSelectMod.png" alt="qtConstValSelectMod" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>A new window will open.</li>
<li>Click on the <i>radial dial</i> next to <b>By flag</b>.</li>
<li>A new field with a drop-down selection box will appear.</li>
<li>Click on the <b>drop-down arrow</b> to change the flag or accept the default.</li>
<li>Click on the <b>OK button</b>.</li>
<li>The value constraint has been set.</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtTextValueConstraint" id="qtTextValueConstraint"></a>Text Value</h5>
<p>&nbsp;</p>
<p>The<b> text value</b> 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.
</p>
<p>&nbsp;</p>
<ul>
<li>Test Not Performed</li>
<li>Borderline</li>
<li>Positive</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h6><a name="qtTextValueConstraintSetConcept" id="qtTextValueConstraintSetConcept"></a>Setting the Value Constraint (Text) for a Concept</h6>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
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.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<ol>
<li>Using the <i>right mouse button</i>, click on the item listed in the panel.</li>
<li>A pop-up menu will open.</li>
<li>Select <b>Set Value</b> from the list.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValSelect.png" alt="qtConstValSelect" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>A new window will open.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValCkmb1.png" alt="qtConstValCkmb1" width="602" height="300" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <i>radial dial</i> next to <b>By value</b>.</li>
<li>A new field listing the enumerated values will appear.</li>
<li>Click on the name of the value you want to include.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValCkmb2.png" alt="qtConstValCkmb2" width="602" height="428" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=tip>
<tr>
<td>
<p class=TipHeading>TIP: </p>
<p class=TipParagraph>
To select more than one you can hold down the &lt;Ctrl&gt; key while clicking on each name. On the Macintosh you can hold down the command key instead of the &lt;Ctrl&gt; key.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <b>OK button</b>.</li>
<li>The value constraint has been set.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValCkmb3.png" alt="qtConstValCkmb3" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h6><a name="qtTextValueConstraintSetModifier" id="qtTextValueConstraintSetModifier"></a>Setting the Value Constraint (Text) for a Modifier</h6>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
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.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<ol>
<li>Using the <i>right mouse button</i>, click on the item listed in the panel.</li>
<li>A pop-up menu will open.</li>
<li>Select <b>Set Modifier Value</b> from the list.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValSelectMod.png" alt="qtConstValSelectMod" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>A new window will open.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValTrimoxFreq1.png" alt="qtConstValTrimoxFreq1" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <i>radial dial</i> next to <b>By value</b>.</li>
<li>A new field listing the enumerated values will appear.</li>
<li>Click on the name of the value you want to include.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValTrimoxFreq2.png" alt="qtConstValTrimoxFreq2" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=tip>
<tr>
<td>
<p class=TipHeading>TIP: </p>
<p class=TipParagraph>
To select more than one you can hold down the &lt;Ctrl&gt; key while clicking on each name. On the Macintosh you can hold down the command key instead of the &lt;Ctrl&gt; key.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <b>OK button</b>.</li>
<li>The value constraint has been set.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValTrimoxFreq3.png" alt="qtConstValTrimox3" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtNumValueConstraint" id="qtNumValueConstraint"></a>Numeric Value</h5>
<p>The <b>numeric value</b> 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.
</p>
<p>&nbsp;</p>
<ul>
<li>200</li>
<li>1.3</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>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.
</p>
<p>&nbsp;</p>
<table width="85%" border="1" cellspacing="1" cellpadding="1">
<tr>
<th scope="col">Operator</th>
<th scope="col">Description / Use</th>
</tr>
<tr>
<td>Less Than (&lt;)</td>
<td>Any value less than the number entered.</td>
</tr>
<tr>
<td>Less Than or Equal To (&lt;=)</td>
<td>Any value less than or equal to the number entered (inclusive).</td>
</tr>
<tr>
<td>Equal To (=)</td>
<td>An exact match to the number entered.</td>
</tr>
<tr>
<td>Between</td>
<td>Any value in the range of numbers entered.</td>
</tr>
<tr>
<td>Greater Than (&gt;)</td>
<td>Any value greater than the number entered.</td>
</tr>
<tr>
<td>Greater Than or Equal To (&gt;=)</td>
<td>Any value greater than or equal to the number entered (inclusive).</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h6><a name="qtNumValueConstraintSetConcept" id="qtNumValueConstraintSetConcept"></a>Setting the Value Constraint (Numeric) for a Concept</h6>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
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.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p></p>
<ol>
<li>Using the <i>right mouse button</i>, click on the item listed in the panel.</li>
<li>A pop-up menu will open.</li>
<li>Select <b>Set Value</b> from the list.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValSelect.png" alt="qtConstValSelect" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>A new window will open.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValCpk1.png" alt="qtConstValCpk1" width="602" height="300" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <i>radial dial</i> next to <b>By value</b>.</li>
<li>Two new fields will appear; one with a drop down selection box and the other a text box.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValCpk2.png" alt="qtConstValCpk2" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <b>drop-down arrow</b> to change the operator or accept the default.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValOperator.png" alt="qtConstValOperator" width="412" height="135" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Enter a numerical value at the <b>Please enter a value</b> field.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValEnterVal.png" alt="qtConstValEnter" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <b>OK button</b>.</li>
<li>The value constraint has been set.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValCpk3.png" alt="qtConstValCpk3" /></p>
</ol>
<p></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h6><a name="qtNumValueConstraintSetModifier" id="qtNumValueConstraintSetModifier"></a>Setting the Value Constraint (Numeric) for a Modifier</h6>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
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.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p></p>
<ol>
<li>Using the <i>right mouse button</i>, click on the item listed in the panel.</li>
<li>A pop-up menu will open.</li>
<li>Select <b>Set Modifier Value</b> from the list.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValSelectMod.png" alt="qtConstValSelectMod" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>A new window will open.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValTrimoxDose1.png" alt="qtConstValTrimoxDose1" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <i>radial dial</i> next to <b>By value</b>.</li>
<li>Two new fields will appear; one with a drop down selection box and the other a text box.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValTrimoxDose2.png" alt="qtConstValTrimoxDose2" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <b>drop-down arrow</b> to change the operator or accept the default.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValOperator.png" alt="qtConstValOperator" width="412" height="135" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Enter a numerical value at the <b>Please enter a value</b> field.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValEnterVal.png" alt="qtConstValEnter" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <b>OK button</b>.</li>
<li>The value constraint has been set.</li>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtConstValTrimoxDose3.png" alt="qtConstValTrimoxDose3" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h5><a name="qtNumValueConstraintUnits" id="qtNumValueConstraintUnits"></a>Using Units In Value Constraints</h5>
<p>Units in regards to i2b2 are the standard units of measurement associated with a value. For instance, a medication may have &quot;mg&quot; listed as the unit for the dose, while a HGB lab test may have &quot;gm/dL&quot;.
</p>
<p>&nbsp;</p>
<p>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.
</p>
<p>&nbsp;</p>
<p>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.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h6><a name="qtNumValueConstraintUnitsSet" id="qtNumValueConstraintUnitsSet"></a>Defining the Units When Running a Query</h6>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
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.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<ol>
<li>Using the <i>right mouse button</i>, click on the item listed in the panel.</li>
<li>A pop-up menu will open.</li>
<li>Select <b>Set Modifier Value</b> from the list.</li>
<p>&nbsp;</p>
<p><img src="images/qtConstValSelectMod.png" alt="qtConstValSelectMod" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>A new window will open.</li>
<p>&nbsp;</p>
<p><img src="images/qtConstValUnits1.png" alt="qtConstValUnits1" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <i>radial dial</i> next to <b>By value</b>.</li>
<li>Two new fields will appear; one with a drop down selection box and the other a text box.</li>
<p>&nbsp;</p>
<p><img src="images/qtConstValUnits2.png" alt="qtConstValUnits2" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>The <b>Units</b> will default to the normal units defined for the item.</li>
<li>Click on the <b>drop-down arrow</b> to change the units.</li>
<p>&nbsp;</p>
<p><img src="images/qtConstValUnitsList.png" alt="qtConstValUnitsList" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <b>drop-down arrow</b> to change the operator or accept the default.</li>
<p>&nbsp;</p>
<p><img src="images/qtConstValOperator.png" alt="qtConstValOperator" width="412" height="135" /></p>
<p>&nbsp;</p>
<p></p>
<li>Enter a numerical value at the <b>Please enter a value</b> field.</li>
<p>&nbsp;</p>
<p><img src="images/qtConstValEnterVal.png" alt="qtConstValEnter" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Click on the <b>OK button</b>.</li>
<li>The value constraint has been set and the numerical value has been converted to the normal units.</li>
<p>&nbsp;</p>
<p><img src="images/qtConstValUnits3.png" alt="qtConstValUnits3" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>In the above scenario, the normal units are &quot;mg&quot;. When setting up the value constraint the units were changed to &quot;gm&quot; 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.
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
The unit conversion information is specific to the term and is defined in the i2b2 metadata table.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2><a name="qtRunningQuery" id="qtRunningQuery"></a>Running a Query</h2>
<p>&nbsp;</p>
<p>This section describes the process of running a query and the output.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><a name="qtOutputSelection" id="qtOutputSelection"></a>Output Selection</h3>
<p>&nbsp;</p>
<p>When you run a query you need to select what type of result the server will return. There are several <b>result types</b> available, each of which will yield a different output.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="85%" border="1" cellspacing="1" cellpadding="1">
<tr>
<td><b>Patient set</b></td>
<td>Provides a list of patients who met the search criteria.</td>
</tr>
<tr>
<td><b>Encounter set</b></td>
<td>Provides the total number of encounters that met the search criteria.</td>
</tr>
<tr>
<td><b>Number of patients</b></td>
<td>Provides the total number of patients who met the search criteria.</td>
</tr>
<tr>
<td><b>Gender patient breakdown</b></td>
<td>Provides a breakdown of the patients by their gender.</td>
</tr>
<tr>
<td><b>Vital Status patient breakdown</b></td>
<td>Provides a breakdown of the patients by their vital status.</td>
</tr>
<tr>
<td><b>Race patient breakdown</b></td>
<td>Provides a breakdown of the patients by their race.</td>
</tr>
<tr>
<td><b>Age patient breakdown</b></td>
<td>Provides a breakdown of the patients by their age.</td>
</tr>
<tr>
<td><b>Timeline</b></td>
<td>Not used in the Web Client. If selected it will work the same as patient set.</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The result type(s) will appear when you click on the <b>Run Query button</b> and they can be selected in any combination.
</p>
<p>&nbsp;</p>
<p><img src="images/qtRunQueryWindow.png" alt="qtRunQueryWindow" width="402" height="310" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtResultTypePtSet" id="qtResultTypePtSet"></a>Patient Set</h4>
<p>&nbsp;</p>
<p>This option will return a set of patients who meet the defined criteria and will display the appropriate information in the following views.
</p>
<p>&nbsp;</p>
<ol>
<li><b>Query Status View</b></li>
<p>&nbsp;</p>
<ul>
<li>The patient set information will appear as soon as the query has finished running.</li>
<li>It will also appear in this view when you drag a previous query to the <i>Query Name field</i> in the <b>Query Tool view</b>.
</li>
</ul>
<p>&nbsp;</p>
<p><img src="images/qtQueryStatusPtSet.png" alt="qtQueryStatusPtSet" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li><b>Previous Query View</b></li>
<p>&nbsp;</p>
<ul>
<li>Displays the query and the results returned.</li>
</ul>
<p>&nbsp;</p>
<p><img src="images/pqPtSet.png" alt="pqPtSet" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtResultTypeEncSet" id="qtResultTypeEncSet"></a>Encounter Set</h4>
<p>&nbsp;</p>
<p>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.
</p>
<p>&nbsp;</p>
<ol>
<li><b>Query Status View</b></li>
<p>&nbsp;</p>
<ul>
<li>The encounter set information will appear as soon as the query has finished running.</li>
<li>It will also appear in this view when you drag a previous query to the <i>Query Name field</i> in the <b>Query Tool view</b>.
</li>
</ul>
<p>&nbsp;</p>
<p><img src="images/qtQueryStatusEncSet.png" alt="qtQueryStatusEncSet" width="524" height="141" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li><b>Previous Query View</b></li>
<p>&nbsp;</p>
<ul>
<li>Displays the query and the results returned.</li>
</ul>
<p>&nbsp;</p>
<p><img src="images/pqEncSet.png" alt="pqEncSet" width="425" height="140" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtResultTypePtCount" id="qtResultTypePtCount"></a>Number of Patients</h4>
<p>&nbsp;</p>
<p>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.
</p>
<p>&nbsp;</p>
<ol>
<li><b>Query Status View</b></li>
<p>&nbsp;</p>
<ul>
<li>The patient count information will appear as soon as the query has finished running.</li>
<li>It will also appear in this view when you drag a previous query to the <i>Query Name field</i> in the <b>Query Tool view</b>.
</li>
</ul>
<p>&nbsp;</p>
<p><img src="images/qtQueryStatusPtCount.png" alt="qtQueryStatusPtCount" width="524" height="141" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li><b>Previous Query View</b></li>
<p>&nbsp;</p>
<ul>
<li>Displays the query and the results returned.</li>
</ul>
<p>&nbsp;</p>
<p><img src="images/pqPtCount.png" alt="pqPtCount" width="425" height="141" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtResultTypeGender" id="qtResultTypeGender"></a>Gender Patient Breakdown</h4>
<p>&nbsp;</p>
<p>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.
</p>
<p>&nbsp;</p>
<ol>
<li><b>Query Status View</b></li>
<p>&nbsp;</p>
<ul>
<li>The information for the gender patient breakdown will appear as soon as the query has finished running.
</li>
<li>It will also appear in this view when you drag a previous query to the <i>Query Name field</i> in the <b>Query Tool view</b>.
</li>
</ul>
<p>&nbsp;</p>
<p><img src="images/qtQueryStatusGender.png" alt="qtQueryStatusGender" width="524" height="141" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li><b>Previous Query View</b></li>
<p>&nbsp;</p>
<ul>
<li>Displays the query and the results returned.</li>
</ul>
<p>&nbsp;</p>
<p><img src="images/pqGender.png" alt="pqGender" width="425" height="141" /></p>
</ol>
<p>&nbsp;</p>
<p></p>
<h4><a name="qtResultTypeVitalStatus" id="qtResultTypeVitalStatus"></a>Vital Status Patient Breakdown</h4>
<p>&nbsp;</p>
<p>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.
</p>
<p>&nbsp;</p>
<ol>
<li><b>Query Status View</b></li>
<p>&nbsp;</p>
<ul>
<li>The information for the vital status patient breakdown will appear as soon as the query has finished running.
</li>
<li>It will also appear in this view when you drag a previous query to the <i>Query Name field</i> in the <b>Query Tool view</b>.
</li>
</ul>
<p>&nbsp;</p>
<p><img src="images/qtQueryStatusVitalStatus.png" alt="qtQueryStatusVitalStatus" width="524" height="141" />
</p>
<p>&nbsp;</p>
<p></p>
<p>&nbsp;</p>
<li><b>Previous Query View</b></li>
<p>&nbsp;</p>
<ul>
<li>Displays the query and the results returned.</li>
</ul>
<p>&nbsp;</p>
<p><img src="images/pqVitalStatus.png" alt="pqVitalStatus" width="425" height="141" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtResultTypeRace" id="qtResultTypeRace"></a>Race Patient Breakdown</h4>
<p>&nbsp;</p>
<p>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.
</p>
<p>&nbsp;</p>
<ol>
<li><b>Query Status View</b></li>
<p>&nbsp;</p>
<ul>
<li>The information for the race patient breakdown will appear as soon as the query has finished running.
</li>
<li>It will also appear in this view when you drag a previous query to the <i>Query Name field</i> in the <b>Query Tool view</b>.
</li>
</ul>
<p>&nbsp;</p>
<p><img src="images/qtQueryStatusRace.png" alt="qtQueryStatusRace" width="524" height="141" /></p>
<p>&nbsp;</p>
<p></p>
<p>&nbsp;</p>
<li><b>Previous Query View</b></li>
<p>&nbsp;</p>
<ul>
<li>Displays the query and the results returned.</li>
</ul>
<p>&nbsp;</p>
<p><img src="images/pqRace.png" alt="pqRace" width="426" height="140" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4><a name="qtResultTypeAge" id="qtResultTypeAge"></a>Age Patient Breakdown</h4>
<p>&nbsp;</p>
<p>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.
</p>
<p>&nbsp;</p>
<ol>
<li><b>Query Status View</b></li>
<p>&nbsp;</p>
<ul>
<li>The information for the age patient breakdown will appear as soon as the query has finished running.
</li>
<li>It will also appear in this view when you drag a previous query to the <i>Query Name field</i> in the <b>Query Tool view</b>.
</li>
</ul>
<p>&nbsp;</p>
<p><img src="images/qtQueryStatusAge.png" alt="qtQueryStatusAge" width="524" height="141" /></p>
<p>&nbsp;</p>
<p></p>
<p>&nbsp;</p>
<li><b>Previous Query View</b></li>
<p>&nbsp;</p>
<ul>
<li>Displays the query and the results returned.</li>
</ul>
<p>&nbsp;</p>
<p><img src="images/pqAge.png" alt="pqAge" width="425" height="140" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><a name="qtRunQuery" id="qtRunQuery"></a>Run Query</h3>
<p>&nbsp;</p>
<p>Once the query criterion has been defined, the final steps are to click on the <b>Run Query button</b>, select the result type(s), and click on the <b>OK button</b> to run the query.
</p>
<p>&nbsp;</p>
<ol>
<li>Once you have defined the search criteria click on the <b>Run Query button</b> located on the toolbar at the bottom of the <i>Query Tool view</i>.
</li>
<p>&nbsp;</p>
<p><img src="images/qtToolbarRunQuery.png" alt="qtToolbarRunQuery" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>A new window will open.</li>
<p>&nbsp;</p>
<p><img src="images/qtRunQueryWindow.png" alt="qtRunQueryWindow" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>A name for the query will default at the query name field.</li>
<li>Either change the name of the query or accept the default.</li>
<li>In the query result type section, click on the <b>checkboxes</b> for those <b>result types</b> you want to include when the query is run.
</li>
<li>Click on the <b>OK button</b>.</li>
<li>The Run Query window will close and the querying process will begin.</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Once you begin the process of running the query the <i>Query Status view</i> will display &quot;<b>Running Query</b>&quot;, the name of the query, and the time that has elapsed.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="images/qtQueryStatusRunMI.png" alt="qtQueryStatusRunMI" width="524" height="141" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2><a name="qtCancelQuery" id="qtCancelQuery"></a>Cancel a Query</h2>
<p>&nbsp;</p>
<p>To cancel a query you simply click on the<b> Cancel Query button</b>.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
Keep in mind &quot;Cancel Query&quot; and the associated action will only appear when the query is still in the process of running
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<ol>
<li>To cancel a query that is running, simply click on the <b>Cancel Query button</b>.</li>
<p>&nbsp;</p>
<p><img src="images/qtToolbarCancelQuery.png" alt="qtToolbarCancelQuery" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>Cancel will display in the <b>Query Status view</b>.</li>
<p>&nbsp;</p>
<p><img src="images/qtQueryStatusCancel.png" alt="qtQueryStatusCancel" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2><a name="qtSaveQuery" id="qtSaveQuery"></a>Saving a Query</h2>
<p>&nbsp;</p>
<p>This section describes the process of saving queries.</p>
<p>&nbsp;</p>
<h3><a name="qtSavePq" id="qtSavePq"></a>Previous Query</h3>
<p>&nbsp;</p>
<p>A <b>previous query</b> <span style="color:#CCCCCC">(<img src="images/prevQuery.jpg" alt="previousQuery" />)</span> is created automatically when a query is run from the <i>Query Tool</i>. The query is stored in the database and displayed in the <i>Previous Query view</i>.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
Previous queries can also be seen in Workplace view if the user copied it to their workplace or shared folder in workplace view.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<ol>
<li>Run a query.</li>
<li>Go to the <b>Previous Query view</b>.</li>
<li>The query you just ran will now appear in the list of previous queries.</li>
<p>&nbsp;</p>
<p><img src="images/pqView.png" alt="pqView" /></p>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table id=note>
<tr>
<td>
<p class=NoteHeading>NOTE: </p>
<p class=NoteParagraph>
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.
</p>
</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2><a name="qtPrintQuery" id="qtPrintQuery"></a>Printing a Query</h2>
<p>&nbsp;</p>
<p>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.
</p>
<p>&nbsp;</p>
<p>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.
</p>
<p>&nbsp;</p>
<p>The following steps outline the process of printing a query once you have the appropriate query in the Query Tool.
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<ol>
<li>Click on the <b>Print Query button</b> located on the toolbar at the bottom of the <i>Query Tool view</i>
</li>
<p>&nbsp;</p>
<p><img src="images/qtToolbarPrintQuery.png" alt="qtToolbarPrintQuery" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>A new window will open displaying the information about the query.</li>
<p>&nbsp;</p>
<p><img src="images/qtPrintWindow.png" alt="qtPrintWindow" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<li>On the menu bar, click on <b>File</b> to display the menu options.</li>
<li>Select <b>Print</b> from the menu.</li>
</ol>
</body>
</html>

Event Timeline