SQL Queries: The Patient Information Along With The ID
For this assignment, use the following database schema:
1) Patient—PatientID, Name, DOB
2) Doctor—DoctorID, Name, MedLicenseNumber, Phone
3) Medication—MedicationID, BrandName, GenericName
4) Prescription—PrescriptionID, Date, PatientID, PrescriberID, MedicationID
Specify the SQL queries to retrieve:
1) A list of all doctors.
2) The number of patients that were born before 01/01/1994.
3) The patient information along with the ID of any prescribing doctor for each patient.
4) The prescription information along with patient name, DOB, medication brand name, and prescribing doctor name sorted by most recent date.
5) The most prescribed generic medication name.
This assignment uses a grading rubric. Instructors will be using the rubric to grade the assignment; therefore, students should review the rubric prior to beginning the assignment to become familiar with the assignment criteria and expectations for successful completion of the assignment.
SQL
Your name
Your Institution of Affiliation
December 7, 2017
397565430447PATIENTDOCTORD_ID, D_name, D_SSn, MedLicenseNumber, PhoneP_ID, P_Name, P_Ssn, BirthDate, MEDICATIONMedication_ID, Brand Name, Generic NamePRESCRIPTIONPrescription_ID, Date, Patient_ID, Prescriber_ID, Medication_ID0PATIENTDOCTORD_ID, D_name, D_SSn, MedLicenseNumber, PhoneP_ID, P_Name, P_Ssn, BirthDate, MEDICATIONMedication_ID, Brand Name, Generic NamePRESCRIPTIONPrescription_ID, Date, Patient_ID, Prescriber_ID, Medication_ID194807037478800Database Schema
393589623387400
4142630372990029817394525100
20831743797300
3867178762000
22099941441450
Data Dictionary
Candidate Keys Definition
Relations
Candidate Keys (Primary Keys)
Doctor
Doctor
Patient
Patient
Medication
Medication
Prescription
Prescription
D_name
The doctor’s name
D_SSn,
Doctor’s Surname
MedLicenseNumber
Doctor’s License Number
D_Phone
Practitioner’s Phone number
P_ID
Patient’s ID
P_name
Patient’s name
P_SSn,
Patient’s Surname
P_BirthDate
Patient’s birthdate
Prescription_ID
Prescription ID
Date
Date prescrib...
π Other Visitors are Viewing These APA Coursework Samples:
- Definition of Clinical, Satisfaction, and Cost Outcomes5 pages/β1375 words | 5 Sources | APA | Health, Medicine, Nursing | Coursework |
- Solution for Inadequate Funding of University Hospitals3 pages/β825 words | 3 Sources | APA | Health, Medicine, Nursing | Coursework |
- Global Warming and Vector-Borne Diseases Coursework3 pages/β825 words | 4 Sources | APA | Health, Medicine, Nursing | Coursework |
- Data Collection Plan2 pages/β550 words | 6 Sources | APA | Health, Medicine, Nursing | Coursework |
- DNP Essentials Application to Clinical Scolarly Project1 page/β275 words | 1 Source | APA | Health, Medicine, Nursing | Coursework |
- Medicine Nursing Paper: Referral for the Homeless1 page/β275 words | 2 Sources | APA | Health, Medicine, Nursing | Coursework |
- Medicare, Medicaid, and the Military Managed Care Health Systems2 pages/β550 words | 2 Sources | APA | Health, Medicine, Nursing | Coursework |