Question: Using SQL statements: List patient (number and name) along with the doctor (name and number) who was responsible for visit along with the date of

Using SQL statements:

List patient (number and name) along with the doctor (name and number) who was responsible for visit along with the date of their treatments (including description and number), all their visits in order by date within patient record number.

ITEM (MEDICAL/SURGICAL)

Item#

Description

UnitCost

100

Room Semi-Private

1600

101

Room Private

2000

102

Speech Therapy

350

103

Radiology

275

104

Physical Therapy

400

105

EKG Test

500

106

EEG Test

350

107

IV

470

108

X-Rays

450

109

Lab Tests

250

110

Aspirin

3

111

Penicillin

7

PHYSICIANS

Phys#

PhysFirst

PhysLast

Specialty

1

Phyllis

Quinn

Maternity

2

Richard

Smith

Oncology

3

Doris

Davis

Maternity

4

Mario

Gomez

Radiology

5

Robert

Jones

Cardiac

6

George

Carter

Surgery

7

William

Zide

Emergency

8

Kimberly

Vasquez

Surgery

PATIENT

Pat#

PatFirst

PatLast

1

James

Brooks

2

Jennie

Davis

3

Milla

Saunders

4

Andrew

Smith

5

Pamela

Miller

6

Kerry

Lawrence

7

Nathan

Halleck

8

Abigal

Clark

PATIENT TREATMENT

MedRec#

Item#

Date/Time

Phys#

20151226001I

108

2015-12-26

2

20151226001I

109

2015-12-26

2

20151226001I

103

2015-12-26

2

20151226001I

100

2015-12-26

2

20151226002O

107

2015-12-26

7

20151226002O

109

2015-12-26

7

20151226001I

100

2015-12-27

1

20151227001I

110

2015-12-27

1

20151227001I

100

2015-12-28

1

20151227002I

110

2015-12-27

3

20151227002I

100

2015-12-27

3

20160103001O

108

2016-01-03

7

20160103002I

100

2016-01-03

3

20160103002I

109

2016-01-03

3

20160103002I

108

2016-01-04

3

20160104002O

109

2016-01-04

5

20160104003O

109

2016-01-04

5

PATIENT VISIT

MedRec# DateIn DateOut Phys# Pat#
20151226001I 2015-12-26 2015-12-28 2 1
20151226002O 2015-12-26 2015-12-26 7 2
20151227001I 2015-12-27 2015-12-28 1 5
20151227002I 2015-12-27 2015-12-28 3 6
20160103001O 2016-01-03 2016-01-03 7 7
20160103002I 2016-01-03 2016-01-04 3 8
20160104001O 2016-01-04 2016-01-04 5 4
20160104002O 2016-01-04 2016-01-04 5 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!