Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program for the person talking to the patient and deciding on a Vaccination date. Only people that have made a request can make

Create a program for the person talking to the patient and deciding on a Vaccination date. Only people that have made a request can make a reservation date.

After starting this program, you will ask the patient for his/her Patient ID. You will then open and search through the Covid Request file looking for their original request and display their information on the screen. Then you will prompt for the date they are assigned and write to a new file called CovidRegistration.txt with the following data: the patients' name, patient id, patient age, and the date of their registration to get the vaccine.

A second program will be written to generate a report of those patients that have a reservation date.

image text in transcribed

image text in transcribed

CURRENT FILE CODE:

import os try: file = "covid.txt" # Opening read file f = open(file, 'r') while 1: name = f.readline() # Cancel loop if name == '': break # Reading file details ID = int(f.readline()) age = int(f.readline()) w = f.readline() print("Patient's Name: ", name) print("Patient's ID: ", ID) print("Patient's Age: ", age) print("Preferred Day: ", w) # Vaccination date date = input("Patient Vaccination Date Assigned __________: ") f.close() # Exception except IOError: print("File of Covid Requests not found... aborting program....")

FILE CONTENT

Bill Moore 102 65 F Mary Julian 152 44 W George Cooper 151 67 T Julian Mobile 210 55 M

First program results ****** Covid Patient Reservation Assignment Program ***** Please enter Patient ID # or ENTER to stop:102 Patient Found: Patient Name: : Bill Moore Patrient ID Number: : 102 Patrient Age: : 65 Patrient Preferred DOW: : F Please enter date of Covid Vaccination: 03/01/2021 Please enter Patient ID # or ENTER to stop:152 Patient Found: Patient Name: : Mary Julian Patrient ID Number: : 152 Patrient Age: : 44 Patrient Preferred DOW: : W Please enter date of Covid Vaccination: 03/03/2021 Please enter Patient ID # or ENTER to stop: Program Ending... Second Program results ****** Covid Reservations Report ******* Next Patient: Patient Name: : Bill Moore Patient ID Number: : 102 Patrient Age: : 65 Patient Vaccination Date: 03/01/2021 Next Patient: Patient Name: : Mary Julian Patrient ID Number: : 152 Patrient Age: : 44 Patient Vaccination Date: 03/03/2021 >>>

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

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

More Books

Students also viewed these Databases questions

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago