{"id":90,"date":"2016-07-19T12:49:30","date_gmt":"2016-07-19T16:49:30","guid":{"rendered":"https:\/\/sites.bu.edu\/bu-i2b2\/?page_id=90"},"modified":"2019-06-21T15:24:01","modified_gmt":"2019-06-21T19:24:01","slug":"i2b2-query-tool","status":"publish","type":"page","link":"https:\/\/sites.bu.edu\/bu-i2b2\/intro-to-i2b2\/i2b2-query-tool\/","title":{"rendered":"Query Tool"},"content":{"rendered":"<p>The web-based i2b2 Query Tool is the most commonly used module by researchers. The Query Tool allows users to very quickly count the number of people with selected clinical and demographic features.<\/p>\n<p><strong>Navigating the i2b2 Query &amp; Analysis Tool<\/strong><br \/>\nFollowing the validation of your login credentials, the i2b2 Query &amp; Analysis Tool screen is displayed and available for use. The basic i2b2 workbench screen provides six primary tabbed panes for identifying, building and running cohort discovery queries. These panes are indicated in the figure below.<\/p>\n<p><img loading=\"lazy\" src=\"\/bu-i2b2\/files\/2016\/07\/How-to-query-636x446.jpg\" alt=\"How to query\" width=\"636\" height=\"446\" class=\"alignnone size-medium wp-image-111\" srcset=\"https:\/\/sites.bu.edu\/bu-i2b2\/files\/2016\/07\/How-to-query-636x446.jpg 636w, https:\/\/sites.bu.edu\/bu-i2b2\/files\/2016\/07\/How-to-query.jpg 823w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/p>\n<p>1. <strong>Navigate Terms<\/strong> &#8211; This is where you will locate search concepts using a hierarchical folder structure.<br \/>\n2. <strong>Find Terms<\/strong> \u2010 In this pane, you can find search concepts using a representative word, phrase or specific<br \/>\ncode to describe the concept.<br \/>\n3. <strong>Workplace<\/strong> &#8211; This is where you will create personal folders for storing your queries.<br \/>\n4. <strong>Previous Queries<\/strong> \u2010 This pane shows a log of previous queries for the current user.<br \/>\n5. <strong>Query Tool<\/strong> \u2010 This is your main work area where you will define and refine the criteria for your query.<br \/>\n6. <strong>Query Status<\/strong> \u2010 You will be able to monitor progress and see results in this pane.<\/p>\n<hr \/>\n<p><strong>Counting Patient Populations<\/strong><\/p>\n<p>i2b2 Query Cell queries count the number of people meeting certain criteria. Each patient may \u00a0have multiple records in the database but each person is only counted once. Criteria listed within a group are considered to have an &#8220;or&#8221; relationship and between groups is considered to be an &#8220;and&#8221; relationship. For example, in the screen shot below the query is counting the number of people who had: 1) at least one visit to Family Medicine <strong>OR<\/strong> General Medicine <strong>OR<\/strong> Geriatrics; <strong>AND<\/strong> 2) a diagnosis of essential hypertension sometime in the past; <strong>AND<\/strong> 3) at least one blood pressure measurement in the past.<\/p>\n<p>Below is a simple example of a Query Tool Query to count the number of adult primary care patients between 2005 and 2011, who have ever had a diagnosis of essential hypertension, and who have had at least 1 blood pressure between 2005 and 2015.<\/p>\n<p><strong>Step 1: Add your concepts<\/strong><\/p>\n<p>The concepts (Essential Hypertension, General Medicine, Family Medicine, Geriatrics, Blood Pressure) were dragged into their groups from the Navigate Terms tab on the left.<\/p>\n<p><img loading=\"lazy\" src=\"\/bu-i2b2\/files\/2016\/08\/Query-Tool-1-636x370.jpg\" alt=\"Query Tool 1\" width=\"636\" height=\"370\" class=\"alignnone size-medium wp-image-149\" srcset=\"https:\/\/sites.bu.edu\/bu-i2b2\/files\/2016\/08\/Query-Tool-1-636x370.jpg 636w, https:\/\/sites.bu.edu\/bu-i2b2\/files\/2016\/08\/Query-Tool-1-1024x595.jpg 1024w, https:\/\/sites.bu.edu\/bu-i2b2\/files\/2016\/08\/Query-Tool-1.jpg 1297w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/>s<\/p>\n<p><strong>Step 2: Apply Constraints<\/strong><\/p>\n<p>To constrain to only patients with a visit to General Medicine, Family Medicine, Geriatrics and a Blood Pressure during 2005 to 2015, apply a &#8220;From:&#8221; and &#8220;To:&#8221; date to Group 1 and Group 2.<\/p>\n<p><img loading=\"lazy\" src=\"\/bu-i2b2\/files\/2016\/09\/dates-636x388.jpg\" alt=\"dates\" width=\"636\" height=\"388\" class=\"alignnone size-medium wp-image-313\" srcset=\"https:\/\/sites.bu.edu\/bu-i2b2\/files\/2016\/09\/dates-636x388.jpg 636w, https:\/\/sites.bu.edu\/bu-i2b2\/files\/2016\/09\/dates.jpg 970w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/p>\n<p><strong>Step 3: Select your Analysis Type<\/strong><\/p>\n<p>The most commonly used Analysis Types are:<br \/>\nNumber of Patients<br \/>\nGender Patient Breakdown<br \/>\nRace Patient Breakdown<br \/>\nAge Patient Breakdown<\/p>\n<p><img loading=\"lazy\" src=\"\/bu-i2b2\/files\/2016\/09\/query-dates1-636x565.jpg\" alt=\"query dates\" width=\"636\" height=\"565\" class=\"alignnone size-medium wp-image-315\" srcset=\"https:\/\/sites.bu.edu\/bu-i2b2\/files\/2016\/09\/query-dates1-636x565.jpg 636w, https:\/\/sites.bu.edu\/bu-i2b2\/files\/2016\/09\/query-dates1.jpg 901w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/p>\n<p>It is not recommended to use the Patient List and Encounter List options \u2013 These create lists of patients or patient encounters and stores them in the database. Since queries can have many thousands of patients, the use of these options creates lists of data that are not useful and will take up unnecessary space on the server.<\/p>\n<p><strong>Step 4: Run your query<\/strong><\/p>\n<p><img loading=\"lazy\" src=\"\/bu-i2b2\/files\/2016\/09\/YES2-636x431.jpg\" alt=\"YES\" width=\"636\" height=\"431\" class=\"alignnone size-medium wp-image-312\" srcset=\"https:\/\/sites.bu.edu\/bu-i2b2\/files\/2016\/09\/YES2-636x431.jpg 636w, https:\/\/sites.bu.edu\/bu-i2b2\/files\/2016\/09\/YES2.jpg 1019w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/p>\n<p>Click Run Query to run the query and the counts will be displayed in the bottom center.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The web-based i2b2 Query Tool is the most commonly used module by researchers. The Query Tool allows users to very quickly count the number of people with selected clinical and demographic features. Navigating the i2b2 Query &amp; Analysis Tool Following the validation of your login credentials, the i2b2 Query &amp; Analysis Tool screen is displayed [&hellip;]<\/p>\n","protected":false},"author":11962,"featured_media":0,"parent":255,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/sites.bu.edu\/bu-i2b2\/wp-json\/wp\/v2\/pages\/90"}],"collection":[{"href":"https:\/\/sites.bu.edu\/bu-i2b2\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sites.bu.edu\/bu-i2b2\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sites.bu.edu\/bu-i2b2\/wp-json\/wp\/v2\/users\/11962"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.bu.edu\/bu-i2b2\/wp-json\/wp\/v2\/comments?post=90"}],"version-history":[{"count":23,"href":"https:\/\/sites.bu.edu\/bu-i2b2\/wp-json\/wp\/v2\/pages\/90\/revisions"}],"predecessor-version":[{"id":549,"href":"https:\/\/sites.bu.edu\/bu-i2b2\/wp-json\/wp\/v2\/pages\/90\/revisions\/549"}],"up":[{"embeddable":true,"href":"https:\/\/sites.bu.edu\/bu-i2b2\/wp-json\/wp\/v2\/pages\/255"}],"wp:attachment":[{"href":"https:\/\/sites.bu.edu\/bu-i2b2\/wp-json\/wp\/v2\/media?parent=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}