Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

6- Ophthalmology The patient is to be ask to write his/her name and to enter the number of the selected medical clinic. A randomly generated

image text in transcribed
image text in transcribed
6- Ophthalmology The patient is to be ask to write his/her name and to enter the number of the selected medical clinic. A randomly generated number between 1000 and 5000 called queueorder is generated and assigned to the patient and a printed paper of this number provided to the patient as his/her position in the queue. At that time, the patient asked to wait in the queue. For each newly arrived patient, the position of the previous patient (queucorder number) is to be added by one unit and it is saved along with the name of the patient and the number reflects the selected medical clinic. Then the patient waits in the queue. This process repeats until 12 patients are in the queue. Write a C program that uses the queue and patient structure given below to simulate the Scheduling Appointments System explained above. Your program should start by adding 12 patients to the queue. Then the patient will receive the treatment and they will leave the queue one by one. Each time a patient leaves the queue his/her name and the corresponding queueorder number must be shown on the screen. Giving treatment to the patients is based on FIFO strategy. struct queue Node : patient c; struct queue Node *nextptr: Struct patient Char name [20]; int clinic Num; int pos: An Automatic Scheduling Appointments System for Medical Services in a Hospital, works as follows: When the first patient comes to the Hospital, the machine interface provides all the available specialized medical clinics as follows 1. Cardiology 2- Endocrinology 3- Neurology 4. Pediatrics 5. Oral and dental health 6- Ophthalmology The patient is to be ask to write his/her name and to enter the number of the selected medical clinic. A randomly generated number between 1000 and 5000 called queueorder is generated and assigned to the patient and a printed paper of this number provided to the patient as his/her position in the queue. At that time, the patient asked to wait in the queue. For each newly arrived patient, the position of the previous patient (queueorder number) is to be added by one unit and it is saved along with the name of the patient and the number reflects the selected medical clinic. Then the patient waits in the queue. This process repeats until 12 patients are in the queue

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

Recommended Textbook for

Database Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

Explain the chemical properties of acids with examples.

Answered: 1 week ago

Question

Write the properties of Group theory.

Answered: 1 week ago

Question

Have roles been defined and assigned?

Answered: 1 week ago

Question

Are these written ground rules?

Answered: 1 week ago

Question

How do members envision the ideal team?

Answered: 1 week ago