Must use python language and file i/o system to solve the question. You are assigned the task to automate the patient management system for a hospital. Three categories of patients visit the hospital: 1. Severely ill 2. Moderately ill 3. Regular check up Your system must be able to list the patients according to the seriousness, 1 being the most serious and 3 being the least. Moreover, the system must be able to handle incoming patients while doctors are checking other patients. Solving this problem requires knowledge of Queue. Input: The input file will contain names of the patients as strings with a priority (1, 2 or 3) associated with each name and an operation called "see doctor." When the "see doctor" function will be called one patient from the queue, of course the patient who came first with seriousness 1, will be served first. ABC 3 EWQ 3 SDF 2 KLM 1 see doctor see doctor FDS 1 OPN 3 TYU 3 see doctor XCV 2 see doctor see doctor Output: Every time the "see doctor" function is called, erase the correct patient from the queue and print the name. Methodology: Create a function called enque(name of the patient ) which will insert the name in the queue (use a list). Create a function called seeDoctor() which will basically deque the correct patient from the queue. Create a function named printQueue () which will print all the patients in the queue. You may create additional functions needed to solve the problem. Use a list as the queue. You must build this system using the bubble sort algorithm everytime a new patient comes in, where you sort the patients according to the seriousness and delete when seeDoctor method is called.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter3: Assignment, Formatting, And Interactive Input
Section: Chapter Questions
Problem 6PP: (Heat transfer) The formula developed in Exercise 5 can be used to determine the cooling time, t,...
icon
Related questions
Topic Video
Question
6:41 PM Wed Feb 22
< Untitled document
:
Must use python language and file i/o system to solve the question.
You are assigned the task to automate the patient management system for a
hospital. Three categories of patients visit the hospital: 1. Severely ill 2.
Moderately ill 3. Regular check up
Your system must be able to list the patients according to the seriousness, 1 being
the most serious and 3 being the least. Moreover, the system must be able to handle
incoming patients while doctors are checking other patients.
Solving this problem requires knowledge of Queue.
Input: The input file will contain names of the patients as strings with a priority (1,
2 or 3) associated with each name and an operation called "see doctor." When the
"see doctor" function will be called one patient from the queue, of course the
patient who came first with seriousness 1, will be served first.
ABC 3
EWQ 3
SDF 2
KLM 1
see doctor
see doctor
FDS 1
OPN 3
TYU 3
see doctor
XCV 2
see doctor
see doctor
Output: Every time the "see doctor" function is called, erase the correct patient
from the queue and print the name.
Methodology: Create a function called enque(name of the patient) which will
insert the name in the queue (use a list). Create a function called seeDoctor()
which will basically deque the correct patient from the queue. Create a function
named printQueue() which will print all the patients in the queue. You may create
additional functions needed to solve the problem. Use a list as the queue.
You must build this system using the bubble sort algorithm
everytime a new patient comes in, where you sort the patients according to
the seriousness and delete when seeDoctor method is called.
8+
VPN 100%
=
...
Transcribed Image Text:6:41 PM Wed Feb 22 < Untitled document : Must use python language and file i/o system to solve the question. You are assigned the task to automate the patient management system for a hospital. Three categories of patients visit the hospital: 1. Severely ill 2. Moderately ill 3. Regular check up Your system must be able to list the patients according to the seriousness, 1 being the most serious and 3 being the least. Moreover, the system must be able to handle incoming patients while doctors are checking other patients. Solving this problem requires knowledge of Queue. Input: The input file will contain names of the patients as strings with a priority (1, 2 or 3) associated with each name and an operation called "see doctor." When the "see doctor" function will be called one patient from the queue, of course the patient who came first with seriousness 1, will be served first. ABC 3 EWQ 3 SDF 2 KLM 1 see doctor see doctor FDS 1 OPN 3 TYU 3 see doctor XCV 2 see doctor see doctor Output: Every time the "see doctor" function is called, erase the correct patient from the queue and print the name. Methodology: Create a function called enque(name of the patient) which will insert the name in the queue (use a list). Create a function called seeDoctor() which will basically deque the correct patient from the queue. Create a function named printQueue() which will print all the patients in the queue. You may create additional functions needed to solve the problem. Use a list as the queue. You must build this system using the bubble sort algorithm everytime a new patient comes in, where you sort the patients according to the seriousness and delete when seeDoctor method is called. 8+ VPN 100% = ...
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
A+ Guide To It Technical Support
A+ Guide To It Technical Support
Computer Science
ISBN:
9780357108291
Author:
ANDREWS, Jean.
Publisher:
Cengage,
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning