My Queries Help Page
This feature allows you to save your query definitions for use at a later time. Listed below are the general
steps needed for you to do this.
The following is an example using the Inpatient Hospital Discharge Query Module with the Emergency Department Encounter Query Module:
- PREREQUISITE: You need to self-register for an account
- STEP 1: You need to be logged into your account
- STEP 2 You need to define a query
- STEP 3 You need to save the definition
- STEP 4 Running a saved query definition
- STEP 5 Applying a saved query definition to another data set
Prerequisite: Register for an account: Before you can save your query definitions you must first have an account.
- Complete the Self Registration information and submit. If you use your Utah Department of Health and Human Services gmail account, do not use the same password that you use for Utah State gmail.
- The system will send an email to the address you entered.
- Respond to the system email to verify that your information is correct.
- Once you verify your email address, your account will be activated.
- If you forget your password or need to have your account verification email resent, please use the Account Access page.
Step 1: Log in to your account: To save a query or run a saved query, you should be logged in.
- Log in using the user login page by entering the email address and password that you specified when registering for your account.
- Once logged in you will be directed to the 'My Selections' page.
- Once logged in you have the option to save (and run) as many query definitions as you want.
NOTE: The screenshot of 'My Selections' below shows no saved queries. Once you save a query, the title will
be listed here and can be run by clicking its link.
Step 2: Define a query.
- To create a query definition, select the dataset you wish to query.
- Define your selections using the query builder page.
- If necessary, please see the General Help page for more information about querying data sets.
Step 3: Save a query definition: Once you have defined a query, you can save it before or after running it.
- Select "Save Query Definition" on the left navigation tab. (The screen shot below is an example of saving a query BEFORE it is run).
- If you are not logged into your account, the system will prompt you to do so at this time (same as Step 1).
- The system will bring you to the 'Saved Query Criteria Definition' window. It displays the selected criteria to be saved and a default name and title as illustrated below.
- Give your saved query a Name that is a unique value across all your saved query definitions. It may NOT contain any spaces. Valid values are A-z, 0-9,'-'and '_'.
- Give your saved query a Title. This Title is what will show up on both your 'My Selections' and 'My Saved Query Definitions' lists. You should title it something that will allow you to quickly identify its purpose (dataset, year(s), custom groupings, filters, etc.). (The default Title is the same as the description in the text box below it and comes from the title of the dataset selected).
- You may also edit the Description to clearly identify the query's purpose. See the screenshot below for an example of an edited Name, Title, and Description.
- This page also contains a special checkbox that is labeled Show this definition on your criteria list page. Checking the box will "flag" the definition so that it will be displayed on your 'My Saved Query Criteria Definitions' list. The 'Saved Query Criteria Definition List' is a subset of the 'Alphabetical Saved Query Definition List'. It only includes saved query definitions that are intended to be used as a common set of selections that you want to apply to a variety of query modules or datasets. As such the criteria lists provide a special shorter list that only contains those definitions that you have created for selection reuse.
- Click the 'Save' button when you have finished. You will be directed to the 'Alphabetical Saved Query Definition List' shown below. If you hover over the '?', you will see the query definition description.
NOTE: If you give this definition the same Name as an existing definition,
you will overwrite that existing definition with this new one, even if you give it a different title.
(The default Name is simply the path to the dataset query builder
page and does not specify any filtering criteria from your query definition).
NOTE: Currently for Utah IBIS-PH, the only two pairs of datasets that can utilize this function are the Inpatient
Hospital Discharge Query Module with the Emergency Department Encounter Query Module, and the Behavioral Risk Factor
Surveillance System Combined Landline and Cell Query Module with the BRFSS Landline Only Query Module.
So for the example below, using the Population Estimates Query Module, it wouldn't make sense to show the
definition on your criteria list page.
Step 4: Run a saved query definition: Once you have one or more saved query definitions and are logged in, you may run, edit, or apply the query definitions.
- For a general list of all saved query definitions, go to the My Selections page available on the 'Dataset Queries' top tab, 'My Queries' dropdown box (see screenshot below). This page displays a list of the titles of all of your saved query definitions. From here you are able to run the saved queries by clicking on the title.
- From the 'My Selections' page, you may run the query by clicking on the title.
- Once you run a query from the 'My Selections' page, then you may access the My Saved Query Definitions List.
- The 'Alphabetical Saved Query Definition List' provides an alphabetical index of your saved query definitions. From this list maintenance page, the four tabs at the bottom of the table allow you to run or edit a saved query definition, apply a saved query definition to another dataset, or delete a definition.
Step 5: Apply a saved query definition to another dataset.
NOTE: Currently for Utah IBIS-PH, the only two pairs of Query Modules that can utilize this function are:
- Inpatient Hospital Discharge Query Module with the Emergency Department Encounter Query Module, and
- Behavioral Risk Factor Surveillance System Combined Landline and Cell Query Module with the BRFSS Landline Only Query Module.
The following is an example using the Inpatient Hospital Discharge Query Module with the Emergency Department Encounter Query Module:
1. Build the following query in the Inpatient Hospital Discharge Query Module:
- 1.1 Choose the Inpatient Hospital Discharge Query Module (see below).
- 1.2 On the selection page, chose 'Hospital Discharges' and 'Count of Hospital Visits' (see below).
- 1.3 On the selection page, chose 'Hospital Discharges' and 'Count of Hospital Visits' (see below).
Step 1: Select year: 3-year groups => 2010-2012
Step 2: Select diagnosis: User-defined ICD-9 diagnosis codes- primary diagnosis code: 410-410-92
Step 3: Select Procedure: Clinical classification system (AHCPR, CCS)- procedure => 47 Diagnostic cardiac catheterization, coronary arteriography
Step 4: Select age: Age adjustment age groups=>35-44 through 85+
Step 5: Select sex: default (both sexes)
Step 6: Select primary payer: Medicare and Medicaid
Step 7: Select discharge status: default (all)
Step 8: Select resident status: default (Utah residence)
Step 9: Select geographic area: default (Local Health Districts)
Step 10: Select how to display results: Row Values Grouped By: Age Group, Column Values Grouped By: Sex
Chart Graphic Type: Vertical Bar
- 1.4 Once you have finished building the above query, the builder page should appear as in the screen shot below. Click on the 'Save Query Definition' left navigation button to save your query.
- 1.5 Give your query definition a title and name as described above in #4 and #5 under STEP 3. The 'Saved Query Criteria Definition' page has a special checkbox labeled 'Show this definition on your criteria list page'. By checking the checkbox you are instructing the application to keep track of the query criteria definition that you select and to apply those criteria selections to an applicable dataset query module that you open into the "Query Builder" page. Remember that a saved query for the Inpatient Hospital Discharge Query Module, the criteria can only be applied to one other data set: the Emergency Encounter Query Module.
- 1.6 If you run the query, you will see the result below, including the description of your 'Query Criteria for the Count Measure'.
2. Apply your Saved Query Definition for the Inpatient Hospital Discharge Query Module to the Emergency Encounter Query Module
- 2.1 Select the Hospital Emergency Department & EMS = > ED Encounter tab from the Dataset dropdown box.
- 2.2 On the Emergency Department Encounter Query Module Configuration Selection page in the 'Quick Selection' bar, choose the 'All ED Encounters', then 'Hospital ED Encounters' and lastly 'Count-ED Encounters'. You will be directed to the screen below. From here you can click on the 'My Saved Query Criteria Definitions' left navigation box.
- 2.3 You will be directed to the 'Saved Query Criteria Definition List' shown below.
- 2.3.1 The above page has a special checkbox labeled 'Apply criteria to any and all subsequent queries'. By checking the checkbox you are instructing the application to keep track of the query criteria definition that you select and to apply those criteria selections to any and all dataset query modules that you open into the "Query Builder" page. This will remain in effect until you end your session, or uncheck the checkbox. This feature provides a mechanism to more quickly perform studies on different query data sets as it will automatically apply the defined criteria to any selected query data set.
- 2.3.2 From this page you may apply the selections from the Hospital Discharge data to the ED dataset that you selected by clicking on the 'Apply Criteria' icon. The screenshot below shows that the same criteria have been applied for each of the steps. Now you can either submit your query as is or you may edit it before submitting it, with or without saving your edits.