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.
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
Related questions
Topic Video
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 3 images
Knowledge Booster
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.Recommended textbooks for you
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education