Call Girls Patiala Just Call 8250077686 Top Class Call Girl Service Available
Databases and SQL - Lecture D
1. Introduction to Computer Science
Databases and SQL
Lecture d
This material (Comp 4 Unit 5) was developed by Oregon Health & Science University, funded by the Department
of Health and Human Services, Office of the National Coordinator for Health Information Technology under
Award Number 90WT0001.
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/.
2. Databases and SQL
Learning Objectives - 1
• Define and describe the purpose of
databases (Lecture a)
• Define a relational database (Lecture a)
• Describe data modeling and normalization
(Lecture b)
• Describe the structured query language
(SQL) (Lecture c)
2
3. Databases and SQL
Learning Objectives - 2
• Define the basic data operations for
relational databases and how to
implement them in SQL (Lecture c)
• Design a simple relational database and
create corresponding SQL commands
(Lecture c)
• Examine the structure of a health care
database component (Lecture d)
3
4. Sample Database Use in VistA
• VistA: Veterans
Health Information
Systems and
Technology
Architecture
• Used at Department
of Veterans Affairs
(VA) health care
facilities Figure 1. VistA screenshot.
(U.S. Dept. of Veterans Affairs, n.d., PD-US)
4
5. NUMI
• National Utilization Management Integration
(NUMI) supports reviews of clinical care
activities
– Documents patient movements
– Separate from VistA
Figure 2. Stay Movements and Reviews tables in NUMI.
(U.S. Dept. of Veterans Affairs, 2016, PD-US)
5
8. Patient Table (Select Elements)
Element Name Data
Type
Primary
Key
Foreign
Key
Comments
PatientID int Yes No ID number for patient
PatientName varchar No No Name that the NUMI system
associates with patient
Sex varchar No No Sex designation associated
with the patient
SSN varchar No No Social Security Number
associated with patient
SiteID smallint Yes Yes ID number for Site
Table 1. Patient table (select elements).
8
9. Site Table (Select Elements)
Element
Name
Data
Type
Primary
Key
Foreign
Key
Comments
SiteID smallint Yes No ID number for site
SiteName varchar No No Name of site
DisplayName varchar No No Displayed name for site
Table 2. Site table (select elements).
9
11. Patient Review Table
(Select Elements)
Element Name Data
Type
Primary
Key
Foreign
Key
Comments
PatientReviewID bigint Yes No ID number for Patient Review
PatientID int No Yes ID number for Patient
ReviewDate smalldate
time
No No Date patient was reviewed
UMRAttendingPhysicianID int No Yes ID number for Attending
Physician
PatientStayID bigint No Yes ID number for Patient Stay
CurrentCareLevelID tinyint No Yes ID number for Level of Care
WardLocationID smallint No Yes ID number for Ward Location
Table 3. Patient review table (select elements).
11
13. Patient Review in NUMI
Figure 7. Primary Review screen in NUMI.
(U.S. Dept. of Veterans Affairs, 2011, PD-US) 13
14. Databases and SQL
Summary – Lecture d
• Viewed an example application: NUMI
• Examined the NUMI database structure
– Tables
– Relationships
14
15. Databases and SQL
Summary - 1
• Four basic data operations: retrieval,
addition, modification and deletion
• Efficiency of those operations is critical for
efficient use of data
• Information relationships and types are
maintained in a relational database
• Designed a simple database, and
improved it using the normalization
method
15
16. Databases and SQL
Summary - 2
• Provided introduction to SQL statements
and data types
• Learned basic select, insert, delete, and
update SQL statements
• Examined design of a health care
database
16
17. Databases and SQL
References – 1 – Lecture d
References
U.S. Department of Veterans Affairs. (2011, September 21). Veterans Health Information
Systems and Technology Architecture.
U.S. Department of Veterans Affairs, Office of Information and Technology. (2011). User
Guide for National Utilization Management Integration (NUMI). (version 1.1.13.1).
U.S. Department of Veterans Affairs, Office of Information and Technology. (2011).
Systems Management Guide for National Utilization Management Integration (NUMI).
(version 1.1.13.1).
Tables
Table 1: Patient Table (select elements). (2011). Public Domain.
Table 2: Site Table (select elements). (2011). Public Domain.
Table 3. Patient review table (select elements). (2011). Public Domain.
Figures
Figure 1: VistA Image. [image on the Internet]. U.S. Department of Veterans Affairs
(n.d.). Retrieved Jan 2012. Available from VistA Imaging Overview
https://www.va.gov/health/imaging/overview.asp at
https://www.va.gov/health/IMAGING/images/CPRS_IMG_comp.png. Public Domain.
17
18. Databases and SQL
References – 2 – Lecture d
Figures, continued
Figure 2: Stay Movements and Reviews tables in NUMI. [image]. U.S. Department of
Veterans Affairs, Office of Information and Technology. (2016). Figure 43, In User
Guide for National Utilization Management Integration (NUMI). (Version 1.1.14.4).
Retrieved February 27, 2017 from
https://www.va.gov/vdl/documents/HealtheVet/National_Utilization_Management_Inte
gration/numi_user_guide_14_4.docx. Public Domain.
Figure 3: NUMI Workflow. [image]. U.S. Department of Veterans Affairs, Office of
Information and Technology. (2011). In User Guide for National Utilization
Management Integration (NUMI). (Version 1.1.13.1). Public Domain.
Figure 4: List of tables in NUMI database. (2011). Public Domain.
Figure 5: Entity-relationship (ER) Diagram for two tables. (2011). Public Domain.
Figure 6: Entity-relationship diagram for seven tables. (2011). Public Domain.
Figure 7: Primary Review screen in NUMI. [image]. U.S. Department of Veterans Affairs,
Office of Information and Technology. (2011). In User Guide for National Utilization
Management Integration (NUMI). (Version 1.1.13.1). Public Domain.
18
19. Introduction to Computer Science
Databases and SQL
Lecture d
This material was developed by Oregon
Health & Science University, funded by the
Department of Health and Human Services,
Office of the National Coordinator for Health
Information Technology under Award
Number 90WT0001.
19
Editor's Notes
Welcome to Introduction to Computer Science: Databases and SQL. This is lecture d.
The component, Introduction to Computer Science, is a basic overview of computer architecture; data organization, representation and structure; structure of programming languages; networking and data communication. It also includes the basic terminology of computing.
The learning objectives for Databases and SQL are to:
Define and describe the purpose of databases
Define a relational database
Describe data modeling and normalization
Describe the structured query language, or SQL
Define the basic data operations for relational databases and how to implement them in SQL
Design a simple relational database and create corresponding SQL commands
Examine the structure of a health care database component
4
5
6
7
This discussion will begin with the center of the health care system – the patient. Note that for this table, and for all the tables that follow, the examples are from the U.S. Department of Veterans Affairs, or VA, Systems Management Guide for National Utilization Management Integration, or NUMI, written by the architects for system developers and maintainers. To simplify these examples, only a few tables from the NUMI application and only a select number of elements or fields from each table will be presented, which should provide a feel for the database design and relationships without getting lost in too many details.
For each table, the column information shows the element, or column name, the data type for the VA database, whether the column is a primary or foreign key, and comments about that element. Each row contains information about this data element in the corresponding table. For the Patient table, there is information for about five of the elements in the table. You can see the VA System Management Guide for details about all fifteen elements.
The first element, PatientID, has an int data type. This field is the primary key for the table and represents the ID number for the patient. Note that the element name is in bold as it is the primary key for the table.
The next three elements are varchar fields that store the name, sex, and social security number of a patient and are not primary or foreign keys.
Sex is often stored as a single character in medical applications, instead of as a varchar.
The final field is another integer that stores the ID number for the site. The datatype is referred to as smallint, which is an integer that uses fewer numbers of bits than a regular int. This ID is a primary key and foreign key from the site’s table.
This slide shows select elements from the Site table. The SiteID field, which is the primary key for the table, serves as a relationship between the Patient table and the Site table. The other two fields relate to the name of the site--one is the full name and the other is the displayed name for the site in NUMI; this allows for a different variant of the name, for example, an abbreviation, to be displayed within the NUMI application.