Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A private hospital needs an application to manage COVID - 1 9 vaccination records for its patients who are allergic to polyethylene glycol ( PEG
A private hospital needs an application to manage COVID vaccination records for its patients who are allergic to polyethylene glycol PEG polysorbate PS or gelatin. A member of the hospital staff enters the patients basic information, such as their name, age and allergy, and decides which vaccine AstraZeneca or Pfizer is suitable, based on Table The staff member then injects the selected vaccine and enters the information in the system. The system generates a report based on the patients allergy, as shown in Table
Table : Sample hospital data
Patient ID First Name Last Name Age Allergy Vaccine Type Date
Georgia Roberts Gelatin Pfizer
Charlie Smith Gelatin Pfizer
Mariam Dawson Gelatin Pfizer
Emmett Miller Gelatin Pfizer
Lily Taylor PEG AstraZeneca
Bill Harley PS AstraZeneca
Mariam Dawson Gelatin Pfizer
Emmett Miller Gelatin Pfizer
Mariam Dawson Gelatin Pfizer
Table : Different allergies and recommended vaccine type
ID Allergy Recommended Vaccine Type
Polyethylene Glycol PEG AstraZeneca
Polysorbate PS AstraZeneca
Gelatin Pfizer
III. Assessment Tasks
Design and build a consolebased application that requires the user to enter patient details and recommended vaccine type via the command line and store them in an appropriate internal data structure.
There is no requirement for this data to be preserved after the application is closed.
You will need to consider what the application outputs to the user that demonstrates the results of each task below.
You should provide the user with the means to close the program once user operations are complete.
Your application should be able to perform the following tasks as given in Section IIScenario:
Task A: Write java code for the tasks given below.
Store collected user input data ie name, age, vaccine type and date based on initial checkup in an appropriate data structure. Sample data is provided in Table
Store sample data on the different allergies and recommended vaccine types in an appropriate data structure. Sample data is provided in Table
Generate the sample report to show how many patients are given each vaccination type, as given in Table below.
Table : Vaccine type given to patients
ID Vaccine Type Count
AstraZeneca
Pfizer
Take user input then sort all patients by last name who were given the AstraZenecaPfizer vaccine. A sample output is shown in Table
Sample user input:
Enter the choice of vaccine type AstraZenecaPfizer: AstraZeneca
Table : Vaccine type given to patients
Patient ID First Name Last Name Age Allergy Vaccine Type Date
Bill Harley PS AstraZeneca
Lily Taylor PEG AstraZeneca
Give preference to patients based on age who are waiting for their next vaccination based on Table A sample output is provided in Table
Table : Next vaccination appointment
Patient ID First Name Last Name Age Allergy Vaccine Type Date
Bill Harley PS AstraZeneca
Charlie Smith Gelatin Pfizer
Emmett Miller Gelatin Pfizer
Mariam Dawson Gelatin Pfizer
Georgia Roberts Gelatin Pfizer
Lily Taylor PEG AstraZeneca
Count the number of patients given for each allergy type based on Table A sample output is provided in Table
Table : Patient count based on allergy type
Allergy Type Total no of patients
PEG
PS
Gelatin
Search, identify and list those patients who have completed three doses of vaccine as given in Table
Table : Sample patient data completed vaccine doses
Patient ID First Name Last Name Age Allergy Vaccine Type Dose
Mariam Dawson Gelatin Pfizer
Search, identify and list the elderly patients ie aged or above who were given fewer than three doses as given in Table
Table : Sample patient data lowest vaccine doses
Patient ID First Name Last Name Age Allergy Vaccine Type Dose
Bill Harley PS AstraZeneca
Task B: Construct the application and implement algorithms.
Develop a single Java program that follows coding conventions and enables the user to search, sort, count and provide list of patients waiting for their next vaccination appointments by using algorithms studied in this module, which are run from the command line. The application should be textbased and menudriven.
Implement all the algorithms you have created for Task A
Note:
You need to ensure that the user input is validated, and feedback is given when an invalid input is entered.
Test all the implemente
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started