Answered step by step
Verified Expert Solution
Link Copied!

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-19 vaccination records for its patients who are allergic to polyethylene glycol (PEG), polysorbate 80(PS80) 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 2. 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 1.
Table 1: Sample hospital data
Patient ID First Name Last Name Age Allergy Vaccine Type Date
1 Georgia Roberts 23 Gelatin Pfizer 06/15/2021
2 Charlie Smith 40 Gelatin Pfizer 06/15/2021
3 Mariam Dawson 27 Gelatin Pfizer 06/17/2021
4 Emmett Miller 30 Gelatin Pfizer 06/20/2021
5 Lily Taylor 18 PEG AstraZeneca 06/21/2021
6 Bill Harley 70 PS80 AstraZeneca 07/21/2021
3 Mariam Dawson 27 Gelatin Pfizer 07/17/2021
4 Emmett Miller 30 Gelatin Pfizer 07/20/2021
3 Mariam Dawson 27 Gelatin Pfizer 08/19/2021
Table 2: Different allergies and recommended vaccine type
ID Allergy Recommended Vaccine Type
1 Polyethylene Glycol (PEG) AstraZeneca
2 Polysorbate 80(PS80) AstraZeneca
3 Gelatin Pfizer
III. Assessment Tasks
Design and build a console-based 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 II.(Scenario):
Task A: Write pseudocode algorithms for the tasks given below.
1. Store collected user input data (i.e. name, age, vaccine type and date) based on initial check-up in an appropriate data structure. Sample data is provided in Table 1.
Store sample data on the different allergies and recommended vaccine types in an appropriate data structure. Sample data is provided in Table 2.
2. Generate the sample report to show how many patients are given each vaccination type, as given in Table 3 below.
Table 3: Vaccine type given to patients
ID Vaccine Type Count
1 AstraZeneca 2
2 Pfizer 4
3. Take user input then sort all patients by last name who were given the AstraZeneca/Pfizer vaccine. A sample output is shown in Table 4.
Sample - user input:
Enter the choice of vaccine type (AstraZeneca/Pfizer): AstraZeneca
Table 4: Vaccine type given to patients
Patient ID First Name Last Name Age Allergy Vaccine Type Date
6 Bill Harley 70 PS80 AstraZeneca 07/21/2021
5 Lily Taylor 18 PEG AstraZeneca 06/21/2021
4. Give preference to patients based on age who are waiting for their next vaccination based on Table 1. A sample output is provided in Table 5.
Table 5: Next vaccination appointment
Patient ID First Name Last Name Age Allergy Vaccine Type Date
6 Bill Harley 70 PS80 AstraZeneca 07/21/2021
2 Charlie Smith 40 Gelatin Pfizer 06/15/2021
4 Emmett Miller 30 Gelatin Pfizer 06/20/2021
3 Mariam Dawson 27 Gelatin Pfizer 06/17/2021
1 Georgia Roberts 23 Gelatin Pfizer 06/15/2021
5 Lily Taylor 18 PEG AstraZeneca 06/21/2021
5. Count the number of patients given for each allergy type based on Table 2. A sample output is provided in Table 6.
Table 6: Patient count based on allergy type
Allergy Type Total no. of patients
PEG 1
PS801
Gelatin 4
6. Search, identify and list those patients who have completed three doses of vaccine as given in Table 7.
Table 7: Sample patient data completed vaccine doses
Patient ID First Name Last Name Age Allergy Vaccine Type Dose
3 Mariam Dawson 27 Gelatin Pfizer 3
7. Search, identify and list the elderly patients (i.e. aged 70 or above) who were given fewer than three doses as given in Table 8.
Table 8: Sample patient data lowest vaccine doses
Patient ID First Name Last Name Age Allergy Vaccine Type Dose
6 Bill Harley 70 PS80 AstraZeneca 1
Task B: Construct the application and implement algorithms.
1. 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 text-based and menu-driven.
2. 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 th

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions

Question

1. Make sure you can defend the grade in the first place.

Answered: 1 week ago