Question: Write a program using hash-tables to model patient-doctor encounter using three tables: patient-table, doctor-table, and patient-doctor encounter table. Each relation in patient-table is of the

Write a program using hash-tables to model patient-doctor encounter using three tables: patient-table, doctor-table, and patient-doctor encounter table. Each relation in patient-table is of the form (patient- id, social security number, name, date-of-birth, insurance company). Each relation in the doctor table is (doctor id, name, affiliation, expertise). Each relation in the patient-encounter table is of the form (patient-id, doctor-id, time of appointment, date-of-appointment, type of appointment, diagnostic statement, medications). Create your own data for ten patients, ten doctors and twenty patient-doctor encounters. The program should be able to answer following queries: 1) when is the next appointment with a given doctor for a given patient? 2) which doctors have a specific expertise? 3) what is a diagnosis of a patient? 4) when was the last appointment for a patient; 5) when did a given doctor last see a patient
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
