Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++. Also show sample output for the program. 2. (70) The local medical clinic has decided to automate its scheduling services. You have been

In C++. Also show sample output for the program.

image text in transcribed

image text in transcribed

image text in transcribed

2. (70) The local medical clinic has decided to automate its scheduling services. You have been assigned to design the initial version of the schedules. The basic functions that the clinic has in mind are doctor check-in and check-out and patient check-in and check out. A doctor checks in by telling the scheduler his or her name, an examination room number, and a medical specialty code. Each doctor has a favorite room. The scheduler checks to see whether the room is free. If so, it assigns this doctor to the room; if not, it rejects the request with a message, and the doctor can try again to check in. When a doctor checks out, the examination room is freed A patient checking in gives a name, age, specialist code, and emergency indication. The scheduler tries to match up the patient with a doctor according to a set of rules that are described here. If there is a match, the patient is seen by the assigned doctor. If this doctor is currently seeing a patient, the new patient is queued to see the doctor. If it is the emergency case, the patient should be moved to the front of the waiting list. The rules for assigning doctors to patients are as follows 1. Any patient under age 16 is assigned to see a pediatrician 2. Patients age 16 and older are assigned a doctor according to the specialty requested. If there is no doctor in the clinic with the requested specialty, the patient is assigned to a general practitioner (GP). If there is no GP, the patient can be assigned to any doctor 3. If there is more than one doctor of the requested specialty, the patient is assigned to the doctor with the shortest waiting list. When a patient checks out, the doctor he or she was assigned to is available to see the next patient if there is anyone in the waiting list. Because this is an interactive system, your program should prompt the users to input the correct information. The initial prompt is Tvpe D for Doctor or P for Patient: The next prompt is Type I for check-in or O for checkout: According to the request, your program should prompt the user for any other needed information, as indicated in the following table: Action Additional Information Doctor check-in Doctor check-out Patient check-in Patient check-out Doctor's name Room number Specialty code Doctor's name

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

demonstrate the importance of induction training.

Answered: 1 week ago