Topic: Cleaning Data
Learning Module Objectives:
After completing the activities in this section, you should be able to:
Teach One Assignment
If you are supposed to teach about this section of the course, select one of the assignments, do the assignment and show it to the instructor to make sure you have done it correctly. Prepare your slides, narrate your slides, remove excess words from narrated slides, convert narrated slides to a file format that can be uploaded, upload your file, email everyone in the class the URL of your file. Make sure that all these tasks are done ahead of scheduled class session. Your peers will appreciate receiving your advice on how to solve a class assignment as soon as possible and well before last day prior to class session.
No individual assignment should be completed in teams. Submit your work in Blackboard. Do not discuss the work with other students.
Question 1: Calculate various queries using the data provided
Question 3: Create three tables: patient, provider and encounter tables. Make sure that each table has a unique primary key. The patient table should include first name, last name, street name, street number, and zip code. Provider's table should include first name, last name, and whether board certified. The encounter table should indicate the patient and provider involved, the diagnosis, and the treatment provided. Enter three rows of data into each table. Join the tables and identify providers that do not have patients.
Question 4: Using the data you imported in previous week, count how many patients continue to visit despite having been reported to be dead. Download Data►
Question 5: Using the data you imported last week, use GROUP BY and COUNT to report how many patients have same diagnosis occurring at same age, essentially having a duplicate entry in the database. Download Data►
Work in teams of 2 persons, never working with the same person again. Each person to initially work individually and then share your work with each other. Help each other to get to the same answers. At submission, indicate the name of your team member. Each member of the team should submit a separate assignment. No copying of code from each other but feel free to learn from each other. If team assignments are completed with individual effort, then the student loses 10% of the grade.
Download data in zipped files. Merge the files. For password contact your instructor. By opening this file you agree not to share the file with anyone. Unzip the files, first to get to the directory and then to get to the actual file. Import data into Microsoft SQL server. To create the database, open SQL server and right click on the database and start a new database. Right click on the database, select "Tasks," select "Import Data," select "Flat File Source" as the source of the data, change file type to "CSV Files," browse to where you unzipped the files, indicate that field names are in the first row, select as destination "SQL Server Native Client" file type. Video► Download► SQL► Slides► Screen Shots►
Copyright © 1996 Farrokh Alemi, Ph.D. First created on January 9th 2005. Most recent revision 06/18/2018. This page is part of the course on Healthcare Databases, the lecture on Tables and Records.