HOSPITAL ACTIVITY The Academic Program is dedicated to ensure you are properly equipped with the right resources to help you navigate through QlikView. To support you with incorporating QlikView into your curriculum, we have created a “Getting Started with QlikView” kit for you. This kit will help you connect theory to real life subjects and provide you with the tools for you and your students to build, analyze, and understand real life data. Table of Contents Overview Navigating the application Data Model Build Dashboard creation Exercise Where to go from here Overview This application is a hospital activity application for the analysis of patient wait times and length of stay. The application covers a range of hospital criteria such as age group, patient classification, admission type, healthcare resource group, etc. The application contains a Desktop sheet and a Mobile sheet. The sheets that are Presented to the user is determined by the device that is used to analyses the data. A document extension is utilized to detect the device and then this populates a variable to hide or show the relevant sheets. Data: This application includes sample data on hospital information. Navigating the Application A User Interface Application consists of sheets – represented by tabs and individual objects on the sheet. An Object can be a list box, chart, gauge, table, or text object. In this case, the human resource application only consists on one sheet. 1. Click on the desired value. Green is the selected value. 2. White is the associated value. There can be more than one. 3. Grey are not associated values. 4. Make multiple selections by press Ctrl and clicking. 5. Selections carry forward to other sheets. 6. De-select by clicking on a selected value. 7. Click Clear on the toolbar to clear all selected values. 8. Click the Wait Time tab Selections carry over from sheet to sheet. Objects on the sheet reflect the current selection. Click the magnifying glass or click on the Caption box and type “business” to find the list of values. This will show all areas of the organization that has the word business. The Current Selection box shows active selections. You can erase an individual selection by clicking the eraser in the Current Selection box. Each sheet that includes data should include a Current Selection box. Click a bar on the chart to drill down further. Before you begin, please click on the link to download the accompanying dataset: https://www.dropbox.com/s/up627d7gx1348oe/Hospital%20Activity%20Data.zip?n=184119251 Data Model Build Opening a New QVW Document 1. 2. 3. 4. 5. Click File New to open a new document. Click View – Tool Bars to select appropriate tools bars. Usual ones are Standard, Navigation, and Design. Click Settings – User Preferences and Document Preferences to make general application default selections. Name and save document in the same folder where your data is save. Click Edit Script icon. This opens Load Script Editor. From here, all of the ETL tasks can be completed. There are multiple wizards that guide you through the process of importing a file from different databases. a. The QlikCommunity site explains how to work with the Load Script. Script Editor Use the Load Script to: · Call in databases and tables · Change fields · Create fields · Remove fields · Create tables · Manipulate data and tables · Load data into the application 1. 2. 3. System Variables – appear by default at the top of the Load Script. There are various methods for bringing in data depending on the file. There are specific wizards for certain types of files. There is a tab that has a wizard for creating functions with the Load Script. These are QlikView functions that allow data transformation and table maintenance. Loading Hospital Activity Data file 1. Click the Table Files button to select an Excel file. You can select File Types that appear on this dialog box. NOTE – a QVD is a QlikView specific data only file that is created by a QVW and allows for faster processing. A dialog box appears for selecting the desired file. Use the hospital activity Data file. 2. The File Wizard displays the first worksheet in the Excel workbook. The Tables drop down list allows you to select different worksheets within the workbook. Only one worksheet can be selected at a time. 3. Under the Labels drop down, select Embedded Labels to select the first row as your table header. 4. Click an X next to the desired field in the header to exclude it from being loaded into your application. 5. Leave the Transaction table selected. 6. If you click Next, a button appears that allow you to perform transformation of your Excel data such as convert a cross table for use in QlikView. 7. Click the Finish button when completed. 8. After the table is selected, lines are added to the Load Script. This includes a Load statement with fields imported from the Excel worksheet and a From statement that indicates the file. 9. You can add Comments that are non-executed part of script that makes Load Script easier to read and understand. It can be used to highlight individual tables or to exclude a portion of code. You can use // to comment out a line or /* */ to comment out multiple lines. //*****************Details************* * 10. Labels identify the table. It may be used with certain functions to select the affected table. A : (colon) indicates a label and it will automatically italicize the label when entered. Brackets are needed if there is a space in the table name. 11. Repeat steps 1-10 for the following worksheets/tables: Specialties, DateParts, Admission Methods, Ethnicity and include the appropriate Comment and Label for each. 12. Click the Reload button to execute script and create data fields and the associated values that you can use with your application. The Sheet Properties dialog box appears if your Load Script runs. It shows the Available Fields you can use in your application. If you encounter an error, a dialog box will appear with associated data. For assistance in resolving errors, use the Debugger feature that is on the Script Editor toolbar. 13. To see a graphic representation of the associative data model, click the Table Viewer icon. This icon is also available on the main QlikView screen. You can also press Ctrl – T to see the Table Viewer. 14. The Table Viewer will show the selected tables and their respective fields. It also shows the fields that link the tables together. Tables are linked by identically named fields called Key Fields. 15. To see a sample of the data in the table, right click on a table and select Preview. Dashboard Creation The User Interface utilizes the fields created in the Load Script. QlikCommunity site helps explain how to create an effective User Interface. A quick review of the main components: · Sheets – each screen has a tab. This sheet has one object that has already been created. · Tabs – name the sheet. · Objects exist on a sheet. · Click the Add Sheet icon to add another sheet to the document. · Right click on a sheet to make changes to a sheet. Do not click an object to affect a sheet. Template Overview The Hospital Acticity - Starter.qvw provided has two tabs available where you will be creating your first dashboard in. The first tab labeled ‘Main’ will hold a description of the App you are building. The second tab labeled ‘Dashboard’ will be used to create the actual user interface that will be used to analyze the data. Main Tab Overview 1. 2. 3. Let’s begin by changing the lorem ipsum text with a description of the application that we will be creating. Right-click anywhere on the text of lorem ipsum and click on ‘Properties…’ Next to the text box is a button with 3 dots (…). Click here and replace the string inside the text box with the following: This application is a hospital activity application for the analysis of patient wait times and length of stay. The application covers a range of hospital criteria such as age group, patient classification, admission type, healthcare resource group, etc. 4. 5. Next press ok in both the Edit Expression and Text Object Properties windows. Nice job, you have created a nice landing page. Wait Time Overview Next Click on the Dashboard tab. The dashboard tab will be blank which you will begin to create your dashboard. Search 1. 2. 3. 4. Let start by adding a search object to the dashboard. The search object allows the user to search across a defined set of fields or all fields loaded into the dashboard. The search object is one of the most powerful and unique feature available in QlikView. Right click anywhere on the sheet and click on New Sheet Object -> Search Object A ‘New Search Object’ Window will pop up. For now, leave the defaults on the general tab and go to the ‘Presentation Tab’. In the presentation tab, within the Visual Style section, there is an Appearance drop down. Click on the drop down and select Squared. Press OK. A new search object will appear in the sheet. Position the new search object right below the QlikView logo. Current Selection Box 1. 2. 3. 4. Current Selection box allows you to see what selections you have made within your dashboard. This is very useful to have a point of reference on what you are looking within the graph. Right click anywhere on the sheet and click on New Sheet Object -> Current Selections Box… A ‘New Current Selections Box’ window will pop up. Leave the defaults and Press OK A new Current Selection box will appear in the sheet. Position the new current selection object right below the Search Object previously created. List Box 1. 2. 3. 4. 5. 6. List box allows you filter the data and recalculate the charts in the dashboard. Right click anywhere on the sheet and click on New Sheet Object -> List Box… A ‘New List Box’ window will pop up. In the ‘General’ tab under the field section is a drop down. Click on the drop down and select Age Group. A new List box will appear in the sheet. Position the new List Box object right below the Current Selections Object previously created. Repeat steps 1-4 for the following fields: a. Admission Method Group b. Admission Type c. Patient Classification When done, there should be 4 total list box (including Level) 7. 8. Now let’s add the year across the top of the dashboard. Repeat Steps 1 and 2 mentioned above and the ‘new List Box’ appears. In the ‘General’ tab under the field selections is a drop down. Click on the drop down and select Fiscal Year Name. 9. Next click on Presentation tab and uncheck ‘Single Column’. By unchecking ‘Single Column’ you will be able to resize the list box to display the data with multiple columns. 10. Reduce the height and increase the width of the list box and all the years will be displayed horizontal. 11. Repeat steps 8-10 for Month. Multi Box 1. 2. 3. Multi box allows you to filter the data and recalculate the charts in the dashboard. Right click anywhere on the sheet and click on New Sheet Object > Multi Box… A ‘Multi Box’ window will pop up. In the ‘General’ tab under the Available fields section add the following fields: PCT Country, PCG, PCT Name Bar Chart (Specialties) 1. 2. Bar chart allows you to look at data distribution. Right click anywhere on the sheet and click on New Sheet Object > Chart… 3. 4. 5. 6. 7. 8. 9. A new ‘General’ window will pop up. For the Window Title and Show Title in Chart inputs add ‘Specialties - Avg Duration of Wait Times’. Under Chart Type click on the bar picture and click on Next The ‘Dimensions’ window is shown. On the bottom left hand corner there is an Edit Groups… button. Select this and click on New … Name the Groups Name as the following Surg Spec-Ethnicity and select the cycle group radio button. Finally add the following fields to this group, Surgical Specialties, Ethnic Group, Ethnicity. Create 2 more groups repeating steps 1 – 6. a. Second Group Criteria: i. Group Name: Ethnicity Drill ii. Group Type: Drill-down Group iii. Used Fields: Ethnic Group, Ethnicity b. Third Group Criteria: i. Group Name: Age Group Drill Down ii. Group Type: Drill-down Group iii. Used Fields: Age Group, Age on Admission Date Add the new group created labeled Surg Spec-Ethnicity to Used Dimension and click Next. The ‘Edit Expression’ window will open. Please paste the following expression and press OK =Avg(DurationOfElectiveWait) 10. In the Label input box enter Avg. Elective Wait. 11. Leave the Style as is and click Next > 12. Leave the Presentation as is and click Next > 13. Leave the Colors as is and click Next > 14. In the Number window, select the radio button label Integer and click Next > 15. Leave the Font as is and click Next > 16. Leave the Layout as is and click Next > 17. Leave the Caption as is and click Finish Bar Chart (# of Spells) 1. Right click anywhere on the sheet and click on New Sheet Object -> Chart… 2. 3. 4. A new ‘General’ window will pop up. For the Window Title and Show Title in Chart type # of Spells. Under Chart Type click on the bar chart picture and click on Next. The ‘Dimensions’ window is shown. From the ‘Available Fields/Groups’ list find Ethnicity Drill and Add > it to the Used Dimensions list and click Next > The ‘Edit Expression’ window will open. Please paste the following expression and press OK =COUNT(DISTINCT [Spell Number]) 5. 6. In the Label input box enter # of Spells and click Next. In the Colors tab please check multicolor and press finish. Straight Table (Avg Duration of Wait Time) 1. 2. 3. 4. Right click anywhere on the sheet and click on New Sheet Object -> Chart… A new ‘General’ window will pop up. For the Window Title and Show Title in Chart input the ‘Avg Duration of Wait Times’. Under Chart Type click on the Straight table picture and click on Next. The ‘Dimensions’ window is shown. Add the Patient Classification and click next. In the Expression window Add the following 3 expressions: a. b. c. 5. =Avg(DurationOfElectiveWait) With No Label a. In the middle of the window select Mini Chart in the Representation. b. Next click on Mini Chart Settings c. In the dimension select Month and mode Bars. =Avg(DurationOfElectiveWait) With Label: Avg. Wait Times = Avg(DurationOfElectiveWait) With No Label a. In the middle of the window select Linear Gauge in the Representation b. Next click on Gauge Settings c. Setup the segment to only have 1 i. Min = 0 ii. Max = 1 d. Press Ok. Finally Press finish Gauge Charts 1. 2. 3. 4. 5. Gauge chart allows you to look at data with thresholds. Right click anywhere on the sheet and click on New Sheet Object -> Chart… A new ‘General’ window will pop up. For the Window Title and Show Title in Chart inputs add ‘Avg Duration of Wait Times’. Under Chart Type click on the gauge picture and click on Next Next in the Dimensions tab keep it blank and go to your expressions tab. In the Expressions tab add the following definition: Expression: =Avg(DurationOfElectiveWait) Label: Duration of Elective Wait Then click next 6. Click next in the sort tab 7. In the Style select the following look: 8. In the presentation tab doing the following settings: a. Gauge Settings i. Min: 0 ii. Max: 150 b. Segments Setup -> Add... i. Label: Segment 1 1. Lower Bound: 0 ii. Label: Segment 2 1. Lower Bound: 75 iii. Label: Segment 3 1. Lower Bound: 126 c. Show Scale should be checked with 6 Major Units, Show Labels on Every 1 Major Unit should be check as well. d. Finally add Text in Chart and add this in the text input: ='Avg Wait: ' & num(Avg(DurationOfElectiveWait), '#,##0.00') & ' days' 9. Click next, keep all the defaults until the end and click finish. Length of Stay Tab Before we begin, copy all the objects from the Wait Time tab and paste it in the length of Stay (excluding all the charts that were just created). Container Object 1. 2. 3. Right Click on the white background and click on New Sheet Object->Container… Repeat step 1 and create another container. Position these two containers right next to each other near the top. In the first container we will be adding two charts, the first will be a bar chart and the second will be a straight table. Combo Chart (Avg LOS by Speciality) 1. 2. 3. 4. 5. 6. 7. 8. Right click create a New Sheet object and click on Chart… Select a combo chart and add the following for the Window Title: Avg LOS by Specialty Click next and for Dimension use Surgical Specialties Chart. In the expression tab, add the following two expressions: a. =Avg(LOS) with Label: Avg. LOS and Select Bar for Display Options b. ='Spells = ' & count(DISTINCT [Spell Number]) with Label Spells and Select Line for Display Options Click Next and under Sort select the Y-Value Descending Click Next and in the presentation section do the following changes: a. Bar Distance: 5 b. Cluster Distance 1 Click Next on Axes and all other until finish Lastly, add this new combo chart to one of the containers you created earlier. Just drop the object over it and it will jump in. Straight Table (Avg LOS by Speciality) 1. 2. 3. 4. 5. 6. Right click create a New Sheet object and click on Chart… Select a straight table and add the following for the Window Title: Avg LOS by Specialty Click Next and for Dimension use Surgical Specialties Chart. In the expression tab, add the following two expressions: a. =Avg(LOS) with Label: Avg. LOS and Select Bar for Display Options b. ='Spells = ' & count(DISTINCT [Spell Number]) with Label Spells and Select Line for Display Options Click Next until finish Lastly, add this new combo chart to one of the containers you created earlier. Just drop the object over it and it will jump in. Combo Chart (Avg LOS by Age) 1. 2. 3. 4. 5. 6. 7. 8. Right click create a New Sheet object and click on Chart… Select a combo chart and add the following for the Window Title: Avg LOS by Specialty Click next and for Dimension use Age Group Drill Down. In the expression tab, add the following two expressions: a. =Avg(LOS) with Label: Avg. LOS and Select Bar for Display Options b. =count(DISTINCT [Spell Number]) with Label Spells Click Next and under Sort select the Y-Value Descending Click Next and in the presentation section do the following changes: a. Bar Distance: 2 b. Cluster Distance 5 Click Next on Axes and ensure that the Avg. LOS Expression is position in the Left (Bottom) and Spells is position in the Right (Top) Click next until the end and press finish. 9. Lastly, add this new combo chart to one of the containers you created earlier. Just drop the object over it and it will jump in. Straight Table (Avg LOS by Speciality) 1. 2. 3. 4. 5. 6. Right click create a New Sheet object and click on Chart… Select a straight table and add the following for the Window Title: Avg LOS by Specialty Click Next and for Dimension use Age Group Drill Down. In the expression tab, add the following two expressions: a. =Avg(LOS) with Label: Avg. LOS and Select Bar for Display Options b. ='Spells = ' & count(DISTINCT [Spell Number]) with Label Spells and Select Line for Display Options Click Next until finish Lastly, add this new combo chart to one of the containers you created earlier. Just drop the object over it and it will jump in. Final Dashboard Review After following all the steps above, your dashboard should look similar to the one below: Exercises 1. What specialty had the least duration of wait times? 2. What was the average wait time for Pain Management patients in December of 20082009? 3. What is the average wait time for plastic surgery patient’s ages 19 -30? 4. What was the average wait time for day case admission in October of 2009 – 2010 5. How many oral surgery patients were white during September 2009- 2010? 6. What was the average length of stay for a patient in neurology, both elective and nonelective in August 2009 – 2010? 7. What was the average length of stay for patients in the 81 to 95 age group in August 2008 – 2009? 8. What specialty has an average length of stay of 10.22 days? 9. For age group 0 – 12, what is the average length of stay? 10. How many spells did emergency pediatrics have from 2007 – 2010? QlikView Training QlikView will supply you with free training! Our free training can be found on the QlikView website at Free training. Available Courses How Does QlikView Work Business users do not require months, weeks or even one full day of training to begin interacting with QlikView applications. We recommend that all QlikView users spend 30 minutes to review this on-demand training course, which is designed to give business users a starting point for interacting with powerful Business Discovery tools. This e-learning course consists of two modules: How Does QlikView Work? and Navigating in QlikView. It is an excellent introduction for business users who want to learn to navigate and get started in QlikView. Build Your First QlikView This on-demand, e-learning course takes the user through a typical QlikView project from requirements to a distributed final version with focus on objects, and with detailed exercise descriptions. The course structure is broken down into four modules: Overview, Load the Data, Interface Design, and Distributing QlikView. The modules include hands-on exercises. What's New in QlikView 11 This on-demand e-learning course will walk you through the new features, functions and capabilities for QlikView 11. This e-learning course consists of three modules: What's New in QlikView Desktop, What's New in the QlikView Ajax Client, and What's New in QlikView Server and Publisher. It is an excellent overview of the new and improved options available in QlikView. QlikView Tutorial This self-study course consists of three parts. In part 1 you learn about working with the different sheet objects in QlikView. In part 2 you build your own application based on the data sources included in the course. Part 3 gives you a short introduction to some more advanced features in QlikView. The entire course takes approximately 8 hours. System Management Overview This e-learning course is designed to give a quick overview of QlikView Server and its importance in the QlikView platform architecture. Other Useful Resources QlikView Interactive Tutorial: http://us.demo.qlikview.com/detail.aspx?appName=QlikView%20Interactive%20Tutoria l.qvw Qlik Demos: http://us.demo.qlikview.com Qlik Market: http://market.qlikview.com/ QlikCommunity: http://community.qlikview.com/index.jspa