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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education