Recent disasters (e.g., hurricanes, wildfires, earthquakes) and attacks (e.g., shooting) can suddenly increase the num- ber of patients seeking help at emergency rooms. Emergency rooms have plans to prepare for the influx. How do I design a system that can handle the influx efficiently in java? The goal for this task is to design and implement a system that can efficiently handle the influx of patients at an emergency room. One plan is to triage patients, where patients are prior- itized by their level of severity. Some patients might need to be treated immediately, while some others can be delayed. Consider Emergency Severity Index (ESI) that ranges from 1 (resusitation) to 5 (nonurgent). For simplicity, the number of minutes needed for a doctor to treat a patient is 2^(7−esi). Initially, the emergency room has two available doctors (Alice and Bob) and two nurses (Nancy, Oliver), more doctors may arrive and become available. Furthermore, assume the patient departs after treatment (discharged or admitted to the hospi- tal for further treatment). A patient might also depart after treatment from a nurse instead of a doctor. If a doctor is NOT available, a nurse can treat a patient with ESI of 5 (nonurgent) for 10 minutes and the patient departs. A nurse cannot treat a patient with ESI smaller than 5. When two patients have the same ESI, the patient who arrives earlier will be treated first. Time stamps are unique. To efficiently decide which patient each doctor is going to treat, how do I implement a priority queue using a HeapPriorityQueue class? Sample input and output are provided. Input:  • PatientArrives time patient esi • PatientDepartsAfterNurseTreatment time patient • DoctorArrives time doctor time is in HHMM format, where HH ranges from 00 to 23 and MM ranges from 00 to 59 (leading zeros are optional). Output: • PatientArrives time patient esi • PatientDepartsAfterNurseTreatment time patient • DoctorArrives time doctor • DoctorStartsTreatingPatient time doctor patient • DoctorFinishesTreatmentAndPatientDeparts time doctor patien

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
Question

Recent disasters (e.g., hurricanes, wildfires, earthquakes)
and attacks (e.g., shooting) can suddenly increase the num-
ber of patients seeking help at emergency rooms. Emergency
rooms have plans to prepare for the influx. How do I
design a system that can handle the influx efficiently in java?
The goal for this task is to design and implement a system that
can efficiently handle the influx of patients at an emergency
room. One plan is to triage patients, where patients are prior-
itized by their level of severity. Some patients might need to
be treated immediately, while some others can be delayed.
Consider Emergency Severity Index (ESI) that ranges from
1 (resusitation) to 5 (nonurgent). For simplicity, the number
of minutes needed for a doctor to treat a patient is 2^(7−esi).
Initially, the emergency room has two available doctors (Alice
and Bob) and two nurses (Nancy, Oliver), more doctors may
arrive and become available. Furthermore, assume the patient
departs after treatment (discharged or admitted to the hospi-
tal for further treatment). A patient might also depart after
treatment from a nurse instead of a doctor. If a doctor is NOT
available, a nurse can treat a patient with ESI of 5 (nonurgent)
for 10 minutes and the patient departs. A nurse cannot treat
a patient with ESI smaller than 5. When two patients have
the same ESI, the patient who arrives earlier will be treated
first. Time stamps are unique.
To efficiently decide which patient each doctor is going
to treat, how do I implement a priority queue using a HeapPriorityQueue class?

Sample input and output are provided.
Input: 
• PatientArrives time patient esi
• PatientDepartsAfterNurseTreatment time patient
• DoctorArrives time doctor
time is in HHMM format, where HH ranges from 00 to 23 and
MM ranges from 00 to 59 (leading zeros are optional).
Output:
• PatientArrives time patient esi
• PatientDepartsAfterNurseTreatment time patient
• DoctorArrives time doctor
• DoctorStartsTreatingPatient time doctor patient
• DoctorFinishesTreatmentAndPatientDeparts time doctor
patien

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 3 images

Blurred answer
Knowledge Booster
Developing computer interface
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
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