{"id":689,"date":"2021-08-11T10:23:53","date_gmt":"2021-08-11T14:23:53","guid":{"rendered":"https:\/\/labs.icahn.mssm.edu\/msdw\/?page_id=689"},"modified":"2025-05-16T12:41:04","modified_gmt":"2025-05-16T16:41:04","slug":"leaf-tutorial","status":"publish","type":"page","link":"https:\/\/labs.icahn.mssm.edu\/msdw\/leaf-tutorial\/","title":{"rendered":"Leaf Tutorial"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;3.22&#8243;][et_pb_row _builder_version=&#8221;3.25&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;3.25&#8243; custom_padding=&#8221;|||&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_text admin_label=&#8221;Breadcrumb&#8221; _builder_version=&#8221;4.9.0&#8243; _module_preset=&#8221;default&#8221;]<\/p>\n<p><a href=\"https:\/\/labs.icahn.mssm.edu\/minervalab\/scientific-computing-and-data\">Scientific Computing and Data<\/a>\u00a0\/\u00a0<a href=\"https:\/\/labs.icahn.mssm.edu\/msdw\">Mount Sinai Data Warehouse<\/a> \/ <a href=\"https:\/\/labs.icahn.mssm.edu\/msdw\/tutorials\/\">Tutorials<\/a> \/ Leaf Tutorial<\/p>\n<p>[\/et_pb_text][et_pb_text admin_label=&#8221;Tutorial&#8221; _builder_version=&#8221;4.9.0&#8243; header_text_color=&#8221;#221f72&#8243; header_3_text_color=&#8221;#00aeef&#8221; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; hover_enabled=&#8221;0&#8243; sticky_enabled=&#8221;0&#8243;]<\/p>\n<h1>Leaf Tutorial<\/h1>\n<p>&nbsp;<\/p>\n<p>You can use <a href=\"https:\/\/leaf.mssm.edu\/\">Leaf<\/a> to query de-identified data in the Mount Sinai Data Warehouse (MSDW) 2.0. Leaf is \u201ca lightweight drag-and-drop web application that enables direct querying of arbitrary clinical databases\u201d (<a href=\"https:\/\/academic.oup.com\/jamia\/article\/27\/1\/109\/5583724\">Dobbins,\u00a02019<\/a>).<\/p>\n<blockquote>\n<h3>Table of Contents<\/h3>\n<p><a href=\"#q1\">User Access<\/a><br \/><a href=\"#q2\">Access Error<\/a><br \/><a href=\"#q3\">Log In to Leaf<\/a><br \/><a href=\"#q4\">Secure Access<\/a><br \/><a href=\"#q5\">Select Usage Information<\/a><br \/><a href=\"#q6\">Leaf Overview<\/a><br \/><a href=\"#q7\">Constructing Queries<\/a><br \/><a href=\"#q8\">Specify Query Parameters<\/a><br \/><a href=\"#q9\">Search for Concepts<\/a><br \/><a href=\"#q10\">Remove Concepts<\/a><br \/><a href=\"#q11\">Clinical Domain Details: Query Parameters<\/a><br \/><a href=\"#q12\">Viewing Search Results<\/a><br \/><a href=\"#q13\">Exporting Data<\/a><br \/><a href=\"#q14\">Saving Search Results<\/a><br \/><a href=\"#q15\">Additional Resources<\/a><\/p>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<h3><a id=\"q1\"><\/a>User Access<\/h3>\n<p>All Mount Sinai users can access Leaf using School or Hospital login credentials:<\/p>\n<ol>\n<li>Navigate to <a href=\"https:\/\/leaf.mssm.edu\/\">https:\/\/leaf.mssm.edu\/<\/a><\/li>\n<li>Log in with Mount Sinai credentials (School or Hospital)<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"q2\"><\/a>Access Error<\/h3>\n<p>All Leaf users must register for user accounts. Attempts to sign in without enabled accounts will be blocked from entry (see Figure 1).<\/p>\n<div style=\"width: 528px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_01.jpg\" alt=\"Figure 1: Login error for users with unverified accounts\" width=\"518\" height=\"554\" \/><p class=\"wp-caption-text\">Figure 1: Login error for users that are not registered Leaf users<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"q3\"><\/a>Log in to Leaf<\/h3>\n<p>To access Leaf and begin querying MSDW,\u00a0log\u00a0in to\u00a0<a href=\"https:\/\/de-identified.leaf.msdw.mountsinai.org\/\">Leaf<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"q4\"><\/a>Secure Access<\/h3>\n<p>Access Leaf through the Mount Sinai network. Access from campus directly\u00a0or through a VPN tunnel using valid Mount Sinai credentials.<\/p>\n<p><em>Note: if you have not used Leaf previously or your Mount Sinai login session to Leaf has timed out, you will be prompted to log in through a Microsoft<\/em><em> service that Mount Sinai uses to manage user credentials (see Figure 2).<\/em><\/p>\n<div style=\"width: 513px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_02.jpg\" alt=\"Figure 2: Leaf Sign-in (if Mount Sinai session has timed out)\" width=\"503\" height=\"469\" \/><p class=\"wp-caption-text\">Figure 2: Leaf Sign-in (if Mount Sinai session has timed out)<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"q5\"><\/a>Select Usage Information<\/h3>\n<p>Leaf&#8217;s landing page asks for preliminary information:<\/p>\n<ul>\n<li>Indicate your reason for using Leaf by selecting <strong>Quality Improvement (QI) <\/strong>or <strong>Research<\/strong><\/li>\n<li>If you have an Approved QI Documentation or an Approved Institutional Review Board (IRB), consider utilizing <a href=\"https:\/\/atlas.msdw.mountsinai.org\/#\/home\">ATLAS<\/a> to access Protected Health Information (PHI). Leaf currently provides only de-identified data.<\/li>\n<li><em>Note: you <\/em><em>will only be able to access De-Identified Health Information within Leaf (see Figure 3).<\/em><\/li>\n<\/ul>\n<div style=\"width: 847px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_03.jpg\" alt=\"Figure 3: Selection path to access De-Identified Patient Data for Research without an IRB\" width=\"837\" height=\"464\" \/><p class=\"wp-caption-text\">Figure 3: Selection path to access De-Identified Patient Data for Research without an IRB<\/p><\/div>\n<ul>\n<li>On the second page, read the\u00a0Program for Protection of Human Subjects\u00a0access disclosure statement and select \u201c<strong>I Agree<\/strong>\u201d to consent to the terms of use.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"q6\"><\/a>Leaf Overview<\/h3>\n<p>Leaf enables you to quickly select patients who satisfy criteria from multiple medical and other domains. There are several key areas of the Leaf user interface:<\/p>\n<div id=\"attachment_1353\" style=\"width: 1034px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1353\" class=\"alignnone wp-image-2070 size-large\" src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2022\/05\/image009-1024x475.png\" alt=\"\" width=\"1024\" height=\"475\" srcset=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2022\/05\/image009-980x454.png 980w, https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2022\/05\/image009-480x222.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><p id=\"caption-attachment-1353\" class=\"wp-caption-text\">Figure 4: Leaf landing page<\/p><\/div>\n<ol>\n<li><strong>Concepts<\/strong>: A concept is a property that patients have which can be used in Leaf queries. Example: the condition &#8220;Has Diabetes&#8221; and the vital sign &#8220;BMI under a value you specify.&#8221; Select concepts from the expandable menu or find concepts in the search bar above the concept menu. A key idea in Leaf is that each concept selects the subset of patients who satisfy the concept.<\/li>\n<li><strong>Query Boxes<\/strong>: Drag and drop concepts into query boxes, which enables you to graphically combine the sets of patients obtained by concepts into a Boolean logic query.<\/li>\n<li><strong>Start\/Run Search<\/strong>: After selecting search parameters, this initiates the query. After running a query, this green button becomes \u201cSave Query,\u201d which you can use to save your query. The patients in the query can be reused from under the My Saved Cohorts concept (see &#8220;Concepts&#8221;).<\/li>\n<li><strong>Query Status<\/strong>: See the status of your query while it runs; the number of patients selected by the query is displayed here after it completes.<\/li>\n<li><strong>User Menu<\/strong>: This drop-down menu displays your role or lets you review your saved queries.<\/li>\n<li><strong>Leaf Functions<\/strong>: \u201cFind Patients\u201d returns to the landing page to run new queries. After a query selects some patients, &#8220;Visualize&#8221; displays quick-reference demographic graphs about them, and &#8220;Patient List&#8221; displays a table of the patients with selected columns of patient properties. The table can be exported into a file that can be imported into a spreadsheet. Review the details of the data in the Patient List tab within the left-hand navigation.<\/li>\n<\/ol>\n<p>Need Help? In the left-hand navigation column (#6 in the landing page), scroll to the bottom of the page and select the \u201cNeed Help\u201d button to review assistance options, including directions to submit a ticket.<\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"q7\"><\/a>Constructing Queries<\/h3>\n<p>Leaf\u00a0initially\u00a0opens to the left-hand menu tab to \u201cFind Patients\u201d\u00a0where\u00a0you can run your search query.<\/p>\n<ul>\n<li>Review\u00a0the Clinical Domains available for\u00a0query:\n<ul>\n<li><strong>Conditions (<strong>ICD-10-CM or In<\/strong>ternational Classification of Diseases, Tenth Revision, Clinical Modification)<\/strong> provide coded and descriptive diagnoses<\/li>\n<li><b>Procedures (CPT4) <\/b>outlines procedure, service and event codes<\/li>\n<li><strong>Demographics <\/strong>outline patient characteristics, further broken down into:\u00a0<em>Age<\/em>,\u00a0<em>Ethnicity<\/em>,\u00a0<em>Gender<\/em>,\u00a0<em>Race<\/em>, and\u00a0<em>Vital Status<\/em><\/li>\n<li><strong>Encounters <\/strong>specify patient visit criteria<\/li>\n<li><strong>Vitals <\/strong>provides baseline patient health\u00a0criteria<\/li>\n<li><strong>Lab Results (LOINC)\u00a0<\/strong>provides clinical, laboratory, and survey measurements<\/li>\n<li><strong>Medications (ATC)<\/strong> specifies medications prescribed and administered<\/li>\n<li><strong>Patient Cohorts<\/strong> specifies sets of patients.<br \/>The acronyms in parentheses indicate the standardized medical vocabulary used to encode each clinical domain.<\/li>\n<li>Each Concept indicates the number of patient records within the category, denoted by a faded headshot icon to the right of the concept:<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p style=\"padding-left: 80px\"><img decoding=\"async\" src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_Demographics.jpg\" \/><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li>Use the<strong> Search <\/strong>bar to find specific concepts to add to the query<\/li>\n<\/ul>\n<\/li>\n<li>The menu for each Clinical Domain expands by selecting the arrow to the left of the Domain&#8217;s name.<\/li>\n<li>Identify a\u00a0concept, click and hold the concept with your mouse, and drag the concept into a query box (see Figure 5)<\/li>\n<li>As you build your queries, the domains can be used in any order (for example, a search for \u201cGender: Male\u201d in box 1 and \u201cEncounter: In-patient\u201d in box 2 will produce the same set of patients as \u201cIn-patient\u201d in box 1 and \u201cMale\u201d in box 2).<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"q8\"><\/a>Specify Query Parameters<\/h3>\n<p>Concepts with numerical values&#8211;such as Lab Results, Vitals, and Age&#8211;can all be refined by numerical parameters. To set them, select the arrow to the right of each filter. For example, search for living adults by adding <strong>Demographics: Age\u00a0<\/strong>to the top box (filtering for Greater Than or Equal to 18) and\u00a0<strong>Vital Status: Living\u00a0<\/strong>to the bottom half of the same box under \u201cIn the Same Encounter\u201d (see Figure 5)<\/p>\n<div id=\"attachment_2307\" style=\"width: 1025px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2307\" class=\"wp-image-2307 size-full\" src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2022\/06\/Leaf-query-demo-02.gif\" alt=\"\" width=\"1015\" height=\"878\" \/><p id=\"caption-attachment-2307\" class=\"wp-caption-text\">Figure 5: Adding Living Adults (age 64 or younger) parameters to the query, then removing an aspect<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>Identify up to two additional Concepts to drag and drop into the adjacent query boxes.\u00a0Query box filters can adjust to custom date range,\u00a0frequency, or inclusion\/exclusion\u00a0by selecting the arrow to the right of each filter.<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"q9\"><\/a>Search for Concepts<\/h3>\n<p>Above the Concepts tree is a search bar in which you can enter keywords to quickly find concepts which contain your terms (see Figure 6)<\/p>\n<div style=\"width: 651px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/09\/image017_2.png\" alt=\"\" width=\"641\" height=\"356\" \/><p class=\"wp-caption-text\">Figure 6: Searching for specific Concepts<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"q10\"><\/a>Remove Concepts<\/h3>\n<p>Remove any concept from the query boxes by clicking on it and dragging it out of the query box to anywhere else on the page. This will remove the concept from your search or enable you to replace it with a different one.<\/p>\n<p>After\u00a0your\u00a0search criteria is established, click the green button to\u00a0\u201c<strong>Run\u00a0Query<\/strong>\u201d\u00a0and review results.\u00a0<em>Note: Leaf results larger than 200,000 patients will not display Visualization or Patient List data.<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"q11\"><\/a>Clinical Domain Details: Query Parameters<\/h3>\n<p><strong>Age:<\/strong> Patient age always refers to the patient\u2019s age at the time a query runs. This means the same patients may not consistently appear in age-related searches that you run on different days, and that age may not correlate to the date of patient\u2019s vitals. For example, a record for a patient born on January 1, 2000 will not appear in searches of Age: &gt; 18 when queried on January 1, 2017, but will appear in the same search when queried after January 1, 2019.<\/p>\n<p><strong>Age, Race, Gender, and Ethnicity<\/strong>: these are considered immutable patient characteristics. Immutable patient characteristics are denoted by an orange human icon (see Figure 6). These characteristics cannot be combined with Encounter concepts in one query box. Doing so produces a search error (see Figure 7).<\/p>\n<div style=\"width: 697px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_07.jpg\" alt=\"Figure 7: Query Error (Combined immutable characteristics with encounter concept in the same query box)\" width=\"687\" height=\"405\" \/><p class=\"wp-caption-text\">Figure 7: Query Error (Combined immutable characteristics with encounter concept in the same query box)<\/p><\/div>\n<p>&nbsp;<\/p>\n<p><strong>Encounter:<\/strong> An Encounter, Visit, or ICD-10-CM Condition represents patient data obtained on a specific date. Such data is denoted by a blue clock icon (refer to Figure 8). This data can include <strong>Conditions<\/strong> (diagnoses), <strong>Procedures <\/strong>(CPT Concept), <strong>Encounters<\/strong>, <strong>Labs<\/strong>, and <strong>Vitals<\/strong>.<\/p>\n<p><strong>Encounter <\/strong>concepts cannot be combined with Immutable Characteristics in a panel. Immutable characteristics are defined by present date, whereas Encounter concepts are defined by date recorded<\/p>\n<div style=\"width: 244px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/09\/image021_2.png\" alt=\"\" width=\"234\" height=\"99\" \/><p class=\"wp-caption-text\">Figure 8: immutable characteristics with orange human icons<\/p><\/div>\n<p><strong>ICD-10-CM Conditions: <\/strong>Conditions are structured in a tree format. Pulling one condition into a query will also pull all subsequent nodes in that tree structure. For example, searching for \u201cMigraine (ICD10CM:G43.001-G43.D1)\u201d will query for the \u201cMigraine\u201d condition <em>and <\/em>for all lower nodes in the tree as depicted in the red box in Figure 9. However, searching for a terminal node in a tree, for example \u201cMigraine with aura, not intractable, with status migrainosis\u201d (as depicted in orange), the search will query for only that condition.<\/p>\n<div style=\"width: 679px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1357 size-full\" src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/10\/image009_2.png\" alt=\"Figure 9: Node hierarchy in a condition tree\" width=\"669\" height=\"659\" srcset=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/10\/image009_2.png 669w, https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/10\/image009_2-480x473.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 669px, 100vw\" \/><p class=\"wp-caption-text\">Figure 9: Node hierarchy in a condition tree<\/p><\/div>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>Current Procedural Terminology Concept: <\/strong>Services, procedures, and events are structured in a tree format (similar to Conditions). These elements can also be located by typing a specific Procedure Term in the search box.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Vitals: <\/strong>Vital concepts rely on units of measurement, specifically:<\/p>\n<ul>\n<li><strong>Height<\/strong> is always measured in inches (US)<\/li>\n<li><strong>Body mass index (BMI)<\/strong> is always measured in kilograms per square meter<\/li>\n<li><strong>Body temperature\u00a0<\/strong>is always measured in degrees Fahrenheit<\/li>\n<li><strong>Body weight\u00a0<\/strong>is always measured in ounces<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Search Logic:<\/strong> Leaf query boxes are connected by logical \u201cand\u201d operations where all concepts must be satisfied. For example, a search can find patients who are at least age 55, female, and white (see Figure 10) meeting all these criteria.<\/p>\n<p>Within a query box, multiple alternatives can be connected by logical \u201cor\u201d operations. For example, a search can find patients who are male and are either Black\/African American or Hispanic\/Latino (see Figure 11).<\/p>\n<p><div style=\"width: 958px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/09\/image018_2.png\" alt=\"\" width=\"948\" height=\"331\" \/><p class=\"wp-caption-text\">Figure 10: Age, Gender, Race Query<\/p><\/div><div style=\"width: 653px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/09\/imagge018_3.png\" alt=\"\" width=\"643\" height=\"346\" \/><p class=\"wp-caption-text\">Figure 11: Gender, Ethnicity either\/or Query<\/p><\/div><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Search Logic And Not:<\/strong> Extending search logic, adjusting query language to \u201cAnd Not\u201d to eliminate variables from the query will turn the \u201cAnd Not\u201d query box red (see Figure 12).<\/p>\n<div style=\"width: 695px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_12.jpg\" alt=\"Figure 12: And Not Logic\" width=\"685\" height=\"351\" \/><p class=\"wp-caption-text\">Figure 12: And Not Logic<\/p><\/div>\n<p><em>Note: a red query box specifies \u201cAnd Not\u201d logic, not a query error.<\/em><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Search Logic In Same Encounter:<\/strong> Combine concepts in the same panel to query for encounters, conditions, or vitals measured at the same time (in the same encounter). Observe the difference between examples 1 and 2 below:<\/p>\n<ul>\n<li>In example 1 (Figure 13) the query of patients who had a migraine (ICD-10-CM Condition) and had an emergency room visit (Encounter) at any time produces 572 patient records. This query shows individuals who, at any time, had a migraine condition and an emergency room visit encounter at (likely) separate times.<\/li>\n<li>However, in example 2 (Figure 14) the query of patients who were diagnosed with a migraine during their visit to the emergency room produces 17 patient records. This query shows individuals who met both criteria at the same time. <em>Note: it is not possible to combine encounter concepts with immutable patient characteristics in the same box (see Figure 7 for error)<\/em>.<\/li>\n<\/ul>\n<p><div style=\"width: 610px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_13.jpg\" alt=\"Figure 13: Query of Migraine and Emergency Room Visit \u00a0\" width=\"600\" height=\"454\" \/><p class=\"wp-caption-text\">Figure 13: Query of Migraine and Emergency Room Visit<\/p><\/div><div style=\"width: 627px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_14.jpg\" alt=\"Figure 14: Query of Migraine and ER Visit in Same Encounter\" width=\"617\" height=\"635\" \/><p class=\"wp-caption-text\">Figure 14: Query of Migraine and ER Visit in Same Encounter<\/p><\/div><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Date Logic: <\/strong>Query boxes can specify encounter date to include custom date ranges, including today, in the last 7 days or 30 days, or within a custom date range.<\/p>\n<p><strong>Dates <\/strong>can adjust. Use drop-down menus in the blue header of any box to specify the relative date of another encounter (such as \u201cIn the Same Encounter\u201d and \u201cWithin +\/-\u201c or \u201cIn the following\u2026\u201d time period) to customize a time frame for the query.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3><a>Viewing Search Results<\/a><\/h3>\n<p>Leaf provides a quick data overview with customizable options for review. From the left-hand navigation:<\/p>\n<ul>\n<li>The \u201c<strong>Find Patients<\/strong>\u201d tab (magnifying glass icon)\u00a0provides your search\u00a0criteria<\/li>\n<li>The \u201c<strong>Visualize<\/strong>\u201d\u00a0tab\u00a0(bar graph icon)\u00a0presents\u00a0bar graphs and tables of general demographic\u00a0data<\/li>\n<li>The\u00a0\u201c<strong>Patient List<\/strong>\u201d\u00a0tab\u00a0(human icon)\u00a0details the\u00a0queried\u00a0dataset<\/li>\n<\/ul>\n<p>Select a tab to view the information.<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"q13\"><\/a>Viewing Results<\/h3>\n<p>Select the menu for \u201cBasic Demographics\u201d to add or remove fields from the dataset (see Figure 15)<\/p>\n<div style=\"width: 310px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1360 alignnone size-medium\" src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/10\/image015_2-300x194.png\" alt=\"\" width=\"300\" height=\"194\" \/><p class=\"wp-caption-text\">Figure 15: Selecting columns for data set<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>Reorder columns by clicking and dragging column position on the dataset.<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"q14\"><\/a>Exporting Data<\/h3>\n<p>After establishing dataset\u00a0criteria, click the green button to \u201c<strong>Export\u00a0Data<\/strong>\u201d<\/p>\n<ul>\n<li>Data will automatically export to a CSV\u00a0spreadsheet<\/li>\n<li>Confirm \u201c<strong>Export<\/strong>\u201d to download the\u00a0file<\/li>\n<li>The file will download\u00a0locally\u00a0(often into your computer\u2019s Downloads folder) and can be opened after\u00a0download<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"q15\"><\/a>Saving Search Results<\/h3>\n<p>Datasets can be saved as a local file, and search queries can be saved within Leaf.<\/p>\n<ul>\n<li>After exporting data to a CSV spreadsheet, downloading the file will save the data to your local\u00a0machine<\/li>\n<li>To save your search query, return to Leaf and use the left-hand navigation to return to \u201c<strong>Find\u00a0Patients<\/strong>\u201d<\/li>\n<li>Select the green button to \u201c<strong>Save\u00a0Query<\/strong>\u201d<\/li>\n<li>Input a designated Query Name and Category and click \u201c<strong>Save<\/strong>\u201d<\/li>\n<li><em>Note:\u00a0<\/em>Selecting \u201cNew Query\u201d on the top menu will automatically prompt you to save your query<\/li>\n<li>Load saved queries by navigating to the top right-hand corner, selecting your username, and selecting \u201c<strong>Saved Queries<\/strong>\u201d from the drop-down menu (see Figure 16)<\/li>\n<li>Click the blue \u201cOpen\u201d link next to the Saved Query title to load the query parameters<\/li>\n<li>Click the red \u201cx\u201d link next to \u201cOpen\u201d to delete the query (see Figure 16)<\/li>\n<\/ul>\n<div style=\"width: 862px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" style=\"font-weight: bold\" src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_16_2.jpg\" alt=\"Figure 16: Saved Queries, Open and Delete\" width=\"852\" height=\"543\" \/><p class=\"wp-caption-text\">Figure 16: Saved Queries, Open and Delete<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"q15\"><\/a>Additional Resources<\/h3>\n<p>See other resources for Leaf:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=ZuKKC7B8mHI\">\u201cLeaf Clinical Data Explorer\u201d<\/a>(Youtube, 11:04)<\/li>\n<li>Dobbins, Nicholas, et. al.\u00a0\u201cLeaf: an open-source, model-agnostic, data-driven web application for cohort discovery and translational biomedical research.\u201d\u00a0<em>Journal of the American Medical Informatics Association<\/em>, Volume 27, Issue 1, January 2020, Pages 109\u2013118,\u00a0<a href=\"https:\/\/doi.org\/10.1093\/jamia\/ocz165\">https:\/\/doi.org\/10.1093\/jamia\/ocz165<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Scientific Computing and Data\u00a0\/\u00a0Mount Sinai Data Warehouse \/ Tutorials \/ Leaf TutorialLeaf Tutorial &nbsp; You can use Leaf to query de-identified data in the Mount Sinai Data Warehouse (MSDW) 2.0. Leaf is \u201ca lightweight drag-and-drop web application that enables direct querying of arbitrary clinical databases\u201d (Dobbins,\u00a02019). Table of Contents User AccessAccess ErrorLog In to LeafSecure [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"<p>You can use <a href=\"https:\/\/leaf.mssm.edu\/\">Leaf<\/a> to query the data in\u00a0the\u00a0Mount Sinai Data Warehouse (MSDW) 2.0.\u00a0Leaf is \u201ca lightweight drag-and-drop web application that enables direct querying of arbitrary clinical databases\u201d\u00a0(<a href=\"https:\/\/academic.oup.com\/jamia\/article\/27\/1\/109\/5583724\">Dobbins,\u00a02019<\/a>).<\/p><p>\u00a0<\/p><h2><strong>SET UP USER ACCESS<\/strong><\/h2><p>First-time Leaf users must request\u00a0access.<\/p><ol><li>Navigate to the <a href=\"https:\/\/scicomp.mssm.edu\/jira\/servicedesk\/customer\/portal\/14\">Service Desk<\/a><\/li><li>Click \u201cQuery Tool Access Request Form\u201d<\/li><li>Complete the form, noting Platform is \"Leaf\" and Data Source is \"MSDW 2.0 De-identified\"<ul><li>Only de-identified data is available in Leaf. For PHI or Datamart access, consider utilizing<a href=\"https:\/\/atlas.msdw.mountsinai.org\/#\/home\"> the Atlas platform<\/a> with your Mount Sinai School credentials.<\/li><\/ul><\/li><\/ol><p>\u00a0<\/p><p>Once you receive an email confirmation that your account is set up:<\/p><ol><li>Navigate to <a href=\"https:\/\/leaf.mssm.edu\/\">https:\/\/leaf.mssm.edu\/<\/a><\/li><li>Log in with Mount Sinai credentials (School or Hospital)<\/li><\/ol><p>\u00a0<\/p><h2><strong>ACCESS ERROR<\/strong><\/h2><p>All Leaf users must be granted administrative access. Attempts to sign in without having administrative permission will be blocked from entry (see Figure 1).<\/p>[caption id=\"\" align=\"alignnone\" width=\"518\"]<img src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_01.jpg\" alt=\"Figure 1: Login error for users with unverified accounts\" width=\"518\" height=\"554\" \/> Figure 1: Login error for users with unverified accounts[\/caption]<p>\u00a0<\/p><h1><strong>LOG IN TO LEAF<\/strong><\/h1><p>To access Leaf and begin querying MSDW,\u00a0log\u00a0in to\u00a0<a href=\"https:\/\/de-identified.leaf.msdw.mountsinai.org\/\">Leaf<\/a><\/p><p>\u00a0<\/p><h2><strong>SECURE ACCESS\u00a0\u00a0<\/strong><\/h2><p>Access Leaf through the Mount Sinai network. Access from campus directly\u00a0or through a VPN tunnel using valid Mount Sinai credentials.<\/p><p><em>Note:\u00a0if you\u00a0have not used Leaf previously or your\u00a0Mount Sinai login session\u00a0to Leaf\u00a0has timed out,\u00a0you\u00a0will\u00a0be\u00a0prompted\u00a0to log in\u00a0through Microsoft<\/em><em> (see Figure 2).<\/em><\/p>[caption id=\"\" align=\"alignnone\" width=\"503\"]<img src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_02.jpg\" alt=\"Figure 2: Leaf Sign-in (if Mount Sinai session has timed out)\" width=\"503\" height=\"469\" \/> Figure 2: Leaf Sign-in (if Mount Sinai session has timed out)[\/caption]<p>\u00a0<\/p><h2><strong>SELECT\u00a0USAGE\u00a0INFORMATION<\/strong><\/h2><p>Leaf's landing page asks for preliminary information:<\/p><ul><li>Indicate your query intent by selecting \u00a0<strong>Quality Improvement <\/strong>or <strong>Research<\/strong><\/li><li>If you have an Approved QI Documentation or an Approved IRB, consider utilizing <a href=\"https:\/\/atlas.msdw.mountsinai.org\/#\/home\">Atlas<\/a> to access PHI. There is currently only de-identified data available through Leaf.<\/li><li><em>Note: you <\/em><em>will only be able to access De-Identified Health Information within leaf (see Figure 3).<\/em><\/li><\/ul>[caption id=\"\" align=\"alignnone\" width=\"837\"]<img src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_03.jpg\" alt=\"Figure 3: Selection path to access De-Identified Patient Data for Research without an IRB\" width=\"837\" height=\"464\" \/> Figure 3: Selection path to access De-Identified Patient Data for Research without an IRB[\/caption]<ul><li>On the second page, read the\u00a0Program for Protection of Human Subjects\u00a0access disclosure statement and select \u201c<strong>I Agree<\/strong>\u201dto consent to the terms of use.<\/li><\/ul><p>\u00a0<\/p><p>\u00a0<\/p><h1><strong>LEAF OVERVIEW<\/strong><\/h1><p>Leaf enables you to quickly search for de-identified patient records\u00a0and data\u00a0using dynamic search criteria.\u00a0There are several key areas in Leaf:<\/p>[caption id=\"\" align=\"alignnone\" width=\"1393\"]<img src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/09\/image011.png\" alt=\"Figure 4: Leaf Overview\" width=\"1393\" height=\"410\" \/> Figure 4: Leaf Overview[\/caption]<ol><li><strong>Concepts<\/strong>: Select concepts from the expandable menu, or search for concepts in the search barabove the concept menu<\/li><li><strong>Query Boxes<\/strong>: Drag and drop concepts into query boxes, which enables you to graphically combine concepts into a Boolean logic query<\/li><li><strong>Initiate\/Run Query<\/strong>: After selecting search parameters, this initiates\u00a0the\u00a0query. After running a query, this green button becomes \u201cSave Query\u201d to save your search parameters<\/li><li><strong>Query Status<\/strong>:\u00a0See the status of your query in real time; the number of patients in the search displays here once the query is\u00a0complete<\/li><li><strong>User Menu<\/strong>: This drop-down menu displays your role, help you log out, or review saved searches in\u00a0Leaf<\/li><li><strong>Leaf Functions<\/strong>: \u201cFind Patients\u201d returns to the landing page to run new queries; \u201cVisualize\u201d displays quick-reference demographic graphs, and \u201cPatient List\u201d displays columns of data after a query has been run. Review the details of the data in the Patient List tab within the left-hand navigation<\/li><\/ol><p>Need Help? In the left-hand navigation column (#6 in the landing page), scroll to the bottom of the page and select the \u201cNeed Help\u201d button to review assistance options, including directions to submit a ticket.<\/p><p>\u00a0<\/p><p>\u00a0<\/p><h1><strong>CONSTRUCTING QUERIES<\/strong><\/h1><p>Leaf\u00a0initially\u00a0opens to the left-hand menu tab to \u201cFind Patients\u201d\u00a0where\u00a0you can run your search query.<\/p><ul><li>Review\u00a0the Clinical Domains available for\u00a0query:<ul><li><strong>Demographics <\/strong>outline patient characteristics, further broken down into:\u00a0<em>Age<\/em>,\u00a0<em>Ethnicity<\/em>,\u00a0<em>Gender<\/em>,\u00a0<em>Race<\/em>, and\u00a0<em>Vital Status<\/em><\/li><li><strong>Encounters <\/strong>specifies patient visit\u00a0criteria<\/li><li><strong>ICD-10-CM Conditions<\/strong> provides coded and descriptive diagnoses<\/li><li><strong>Vitals <\/strong>provides baseline patient health\u00a0criteria<\/li><li>Each Concept indicates\u00a0the number of patient records within the category, denoted by a faded human icon to the right of the concept:<\/li><\/ul><\/li><\/ul><p style=\"padding-left: 80px;\"><img src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_Demographics.jpg\" \/><\/p><ul><li style=\"list-style-type: none;\"><ul><li>Use the<strong> Search <\/strong>bar to find specific concepts to add to the query<\/li><li>Other domains in development will open soon: CPT4 Procedures, LOINC Labs, and RxNorm Drugs<\/li><\/ul><\/li><li>Individual Concept menus expand by selecting the arrow to the left of each Concept\u00a0category<\/li><li>Identify a\u00a0concept, click and hold the concept with your mouse, and drag the concept into a query box (see Figure 5)<\/li><li>As you build your queries, the domains can be used in any order (for example, a search for \u201cGender: Male\u201d in box 1 and \u201cEncounter: In-patient\u201d in box 2 will produce the same data set if \u201cIn-patient\u201d were in box 1 and \u201cMale\u201d in box 2)<\/li><\/ul><p>\u00a0<\/p><h2><strong>SPECIFY QUERY PARAMETERS<\/strong><\/h2><p>Some concepts can be refined by numerical parameters. To set them, select the arrow to the right of each filter. For example, search for living adults by adding\u00a0<strong>Demographics: Age\u00a0<\/strong>to the top box (filtering for Greater Than or Equal to 18) and\u00a0<strong>Vital Status: Living\u00a0<\/strong>to the bottom half of the same box under \u201cIn the Same Encounter\u201d (see Figure 5)<\/p>[caption id=\"\" align=\"alignnone\" width=\"1140\"]<img src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/09\/image016_2.gif\" alt=\"\" width=\"1140\" height=\"675\" \/> Figure 5: Adding Living Adults parameters to the query, then removing an aspect[\/caption]<p>Identify up to two additional Concepts to drag and drop into the adjacent query boxes.\u00a0Query box filters can adjust to custom date range,\u00a0frequency, or inclusion\/exclusion\u00a0by selecting the arrow to the right of each filter.<\/p><p><strong>\u00a0<\/strong><\/p><h2><strong>SEARCH FOR CONCEPTS<\/strong><\/h2><p>Above the Concepts tree is a search bar. Enter keywords in concepts you want to quickly find concepts\u00a0which contain your terms (see Figure 6)<\/p>[caption id=\"\" align=\"alignnone\" width=\"641\"]<img src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/09\/image017_2.png\" alt=\"\" width=\"641\" height=\"356\" \/> Figure 6: Searching for specific Concepts[\/caption]<p>\u00a0<\/p><h2><strong>REMOVE CONCEPTS<\/strong><\/h2><p>Remove\u00a0any\u00a0concept\u00a0from the query boxes by\u00a0clicking on it and\u00a0dragging\u00a0it out of\u00a0the\u00a0query box\u00a0to anywhere else on the page.\u00a0This will\u00a0remove the concept from your\u00a0search or\u00a0enable you to replace it with a different concept.<\/p><p>After\u00a0your\u00a0search criteria is established, click the green button to\u00a0\u201c<strong>Run\u00a0Query<\/strong>\u201d\u00a0and review results.\u00a0<em>Note: Leaf results larger than 200,000 patients will not display Visualization or Patient List data.<\/em><\/p><p>\u00a0<\/p><h2><strong>CLINICAL DOMAIN DETAILS: QUERY PARAMETERS<\/strong><\/h2><p><strong>Age:<\/strong> Patient age always refers to the patient\u2019s age at the time a query runs. This means the same patients may not consistently appear in age-related searches that you run on different days, and that age may not correlate to the date of patient\u2019s vitals. For example, a record for a patient born on January 1, 2000 will not appear in searches of Age: > 18 when queried on January 1, 2017, but will appear in the same search when queried after January 1, 2019.<\/p><p><strong>Age, Race, Gender, and Ethnicity<\/strong>: these are considered immutable patient characteristics. Immutable patient characteristics are denoted by an orange human icon (see Figure 6). These characteristics cannot be combined with Encounter concepts in one query box. Doing so produces a search error (see Figure 7).<\/p>[caption id=\"\" align=\"alignnone\" width=\"687\"]<img src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_07.jpg\" alt=\"Figure 7: Query Error (Combined immutable characteristics with encounter concept in the same query box)\" width=\"687\" height=\"405\" \/> Figure 7: Query Error (Combined immutable characteristics with encounter concept in the same query box)[\/caption]<p>\u00a0<\/p><p><strong>Encounter:<\/strong> An Encounter, Visit, or ICD-10-CM Condition represents patient data obtained on a specific date. Such data is denoted by a blue clock icon (refer to Figure 8). This data can include <strong>Conditions<\/strong> (diagnoses), <strong>Encounters<\/strong>, <strong>Labs<\/strong>, and <strong>Vitals<\/strong>.<\/p><p><strong>Encounter <\/strong>concepts cannot be combined with Immutable Characteristics in a panel. Immutable characteristics are defined by present date, whereas Encounter concepts are defined by date recorded<\/p>[caption id=\"\" align=\"alignnone\" width=\"234\"]<img src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/09\/image021_2.png\" alt=\"\" width=\"234\" height=\"99\" \/> Figure 8: immutable characteristics with orange human icons[\/caption]<p><strong>ICD-10-CM Conditions: <\/strong>Conditions are structured in a tree format. Pulling one condition into a query will also pull all subsequent nodes in that tree structure. For example, searching for \u201cMigraine (ICD10CM:G43.001-G43.D1)\u201d will query for the \u201cMigraine\u201d condition <em>and <\/em>for all lower nodes in the tree as depicted in the red box in Figure 9. However, searching for a terminal node in a tree, for example \u201cMigraine with aura, not intractable, with status migrainosis\u201d (as depicted in orange), the search will query for only that condition.<\/p>[caption id=\"\" align=\"alignnone\" width=\"566\"]<img src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_09.jpg\" alt=\"Figure 9: Node hierarchy in a condition tree\" width=\"566\" height=\"480\" \/> Figure 9: Node hierarchy in a condition tree[\/caption]<p><strong>\u00a0<\/strong><\/p><p><strong>Search Logic:<\/strong> Leaf query boxes are connected by logical \u201cand\u201d operations where all concepts must be satisfied. For example, a search can find patients who are at least age 55, female, and white (see Figure 10) meeting all these criteria.<\/p><p>Within a query box, multiple alternatives can be connected by logical \u201cor\u201d operations. For example, a search can find patients who are male and are either Black\/African American or Hispanic\/Latino (see Figure 11).<\/p>[caption id=\"\" align=\"alignnone\" width=\"948\"]<img src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/09\/image018_2.png\" alt=\"\" width=\"948\" height=\"331\" \/> Figure 10: Age, Gender, Race Query[\/caption][caption id=\"\" align=\"alignnone\" width=\"643\"]<img src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/09\/imagge018_3.png\" alt=\"\" width=\"643\" height=\"346\" \/> Figure 11: Gender, Ethnicity either\/or Query[\/caption]<p>\u00a0<\/p><p><strong>Search Logic And Not:<\/strong> Extending search logic, adjusting query language to \u201cAnd Not\u201d to eliminate variables from the query will turn the \u201cAnd Not\u201d query box red (see Figure 12).<\/p>[caption id=\"\" align=\"alignnone\" width=\"685\"]<img src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_12.jpg\" alt=\"Figure 12: And Not Logic\" width=\"685\" height=\"351\" \/> Figure 12: And Not Logic[\/caption]<p><em>Note: a red query box specifies \u201cAnd Not\u201d logic, not a query error.<\/em><\/p><p>\u00a0<\/p><p><strong>Search Logic In Same Encounter:<\/strong> Combine concepts in the same panel to query for encounters, conditions, or vitals measured at the same time (in the same encounter). Observe the difference between examples 1 and 2 below:<\/p><ul><li>In example 1 (Figure 13) the query of patients who had a migraine (ICD-10-CM Condition) and had an emergency room visit (Encounter) at any time produces 572 patient records. This query shows individuals who, at any time, had a migraine condition and an emergency room visit encounter at (likely) separate times.<\/li><li>However, in example 2 (Figure 14) the query of patients who were diagnosed with a migraine during their visit to the emergency room produces 17 patient records. This query shows individuals who met both criteria at the same time. <em>Note: it is not possible to combine encounter concepts with immutable patient characteristics in the same box (see Figure 7 for error)<\/em>.<\/li><\/ul>[caption id=\"\" align=\"alignnone\" width=\"600\"]<img src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_13.jpg\" alt=\"Figure 13: Query of Migraine and Emergency Room Visit \u00a0\" width=\"600\" height=\"454\" \/> Figure 13: Query of Migraine and Emergency Room Visit[\/caption][caption id=\"\" align=\"alignnone\" width=\"617\"]<img src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_14.jpg\" alt=\"Figure 14: Query of Migraine and ER Visit in Same Encounter\" width=\"617\" height=\"635\" \/> Figure 14: Query of Migraine and ER Visit in Same Encounter[\/caption]<p>\u00a0<\/p><p><strong>Date Logic: <\/strong>Query boxes can specify encounter date to include custom date ranges, including today, in the last 7 days or 30 days, or within a custom date range.<\/p><p><strong>Dates <\/strong>can adjust. Use drop-down menus in the blue header of any box to specify the relative date of another encounter (such as \u201cIn the Same Encounter\u201d and \u201cWithin +\/-\u201c or \u201cIn the following\u2026\u201d time period) to customize a time frame for the query.<\/p><p>\u00a0<\/p><h1><strong>VIEWING SEARCH RESULTS<\/strong><\/h1><p>Leaf provides quick overview of the data with customizable options for review.\u00a0From the left-hand navigation:<\/p><ul><li>The \u201c<strong>Find Patients<\/strong>\u201d tab (magnifying glass icon)\u00a0provides your search\u00a0criteria<\/li><li>The \u201c<strong>Visualize<\/strong>\u201d\u00a0tab\u00a0(bar graph icon)\u00a0presents\u00a0bar graphs and tables of general demographic\u00a0data<\/li><li>The\u00a0\u201c<strong>Patient List<\/strong>\u201d\u00a0tab\u00a0(human icon)\u00a0details the\u00a0queried\u00a0dataset<\/li><\/ul><p>Select a tab to view the information.<\/p><p><strong>\u00a0<\/strong><\/p><h2><strong>VIEWING RESULTS<\/strong><\/h2><p>Select the menu for \u201cBasic Demographics\u201d to add or remove fields from the dataset (see Figure 15)<\/p>[caption id=\"\" align=\"alignnone\" width=\"904\"]<img src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_15.jpg\" alt=\"Figure 15: Selecting columns for data set\" width=\"904\" height=\"558\" \/> Figure 15: Selecting columns for data set[\/caption]<p>\u00a0<\/p><p>Reorder columns by clicking and dragging column position on the dataset.<\/p><p><strong>\u00a0<\/strong><\/p><h2><strong>EXPORTING DATA<\/strong><\/h2><p>After establishing dataset\u00a0criteria, click the green button to \u201c<strong>Export\u00a0Data<\/strong>\u201d<\/p><ul><li>Data will automatically export to a CSV\u00a0spreadsheet<\/li><li>Confirm \u201c<strong>Export<\/strong>\u201d to download the\u00a0file<\/li><li>The file will download\u00a0locally\u00a0(often into your computer\u2019s Downloads folder) and can be opened after\u00a0download<\/li><\/ul><p>\u00a0<\/p><h1><strong>SAVING SEARCH RESULTS<\/strong><\/h1><p>Datasets can be saved as a local file, and search queries can be saved within Leaf.<\/p><ul><li>After exporting data to a CSV spreadsheet, downloading the file will save the data to your local\u00a0machine<\/li><li>To save your search query, return to Leaf and use the left-hand navigation to return to \u201c<strong>Find\u00a0Patients<\/strong>\u201d<\/li><li>Select the green button to \u201c<strong>Save\u00a0Query<\/strong>\u201d<\/li><li>Input a designated Query Name and Category and click \u201c<strong>Save<\/strong>\u201d<\/li><li><em>Note:\u00a0<\/em>Selecting \u201cNew Query\u201d on the top menu will automatically prompt you to save your query<\/li><li>Load saved queries by navigating to the top right-hand corner, selecting your username, and selecting \u201c<strong>Saved Queries<\/strong>\u201d from the drop-down menu (see Figure 16)<\/li><li>Click the blue \u201cOpen\u201d link next to the Saved Query title to load the query parameters<\/li><li>Click the red \u201cx\u201d link next to \u201cOpen\u201d to delete the query (see Figure 16)<\/li><\/ul>[caption id=\"\" align=\"alignnone\" width=\"852\"]<img style=\"font-weight: bold;\" src=\"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-content\/uploads\/sites\/350\/2021\/08\/Leaf_Doc_16_2.jpg\" alt=\"Figure 16: Saved Queries, Open and Delete\" width=\"852\" height=\"543\" \/> Figure 16: Saved Queries, Open and Delete[\/caption]<p>\u00a0<\/p><h1><strong>ADDITIONAL RESOURCES<\/strong><\/h1><p>See other resources for Leaf:<\/p><ul><li><a href=\"https:\/\/www.youtube.com\/watch?v=ZuKKC7B8mHI\">\u201cLeaf Clinical Data Explorer\u201d<\/a>(Youtube, 11:04)<\/li><li>Dobbins, Nicholas, et. al.\u00a0\u201cLeaf: an open-source, model-agnostic, data-driven web application for cohort discovery and translational biomedical research.\u201d\u00a0<em>Journal of the American Medical Informatics Association<\/em>, Volume 27, Issue 1, January 2020, Pages 109\u2013118,\u00a0<a href=\"https:\/\/doi.org\/10.1093\/jamia\/ocz165\">https:\/\/doi.org\/10.1093\/jamia\/ocz165<\/a><\/li><\/ul><p>\u00a0<\/p>","_et_gb_content_width":"","footnotes":""},"class_list":["post-689","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-json\/wp\/v2\/pages\/689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-json\/wp\/v2\/comments?post=689"}],"version-history":[{"count":32,"href":"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-json\/wp\/v2\/pages\/689\/revisions"}],"predecessor-version":[{"id":3648,"href":"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-json\/wp\/v2\/pages\/689\/revisions\/3648"}],"wp:attachment":[{"href":"https:\/\/labs.icahn.mssm.edu\/msdw\/wp-json\/wp\/v2\/media?parent=689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}