Cardiac care unit | Computer Science homework help

CARDIAC CARE UNIT

ST GEORGE’S HOSPITAL

Your program will read one input sequential file. You will use textfile “patients.txt” which is located on tracs as a test file but you must write your program so that it invokes the dialog feature of C# ***** the user can select the input file form a Windows template. You will submit your exam on tracs in a zipped folder. If your zipped folder contains fewer than 5KB of data it is garbage and it will receive a 0. You are allowed multiple submissions to safeguard your work, but anything submitted past the end of class will not be graded. I will grade the last submitted version.

As specified above, you should code your program so it can input data from any file the Nurse or the Doctor wants to. The format of the input file is such that the input file contains multiple sets of data for cardiac care patients and it could also be an infinite continuous stream of data records. Each set of 12 consecutive records contains data about one patient. The first record contains the patient name, the next 10 records contain 5 pairs of data representing 5 measurements of the patient’s blood pressure (Systolic over Diastolic) and the 12th record contains the id of the doctor for that patient. The first number is ***** pressure, the second number is ***** pressure, and the third number is ***** pressure and so on. The input file will look like this followed by data for the next patient and the next patient and so on.

Joe A. Patient

180

60

175

76

188

100

190

80

190

80

1There will be an unspecified number of data sets in the various input files to be processed. Your program must create 3 String constants in memory. They should hold the following string values:

D.ABRAMS,MD Dr. Abrams is doctor 0.

D.JARVIC,MD Dr. Jarvic is doctor***** Panos is doctor 2.

PROCESSING:

For each patient in the input file, your program will load the systolic and diastolic blood pressure measurements into the proper variables that you must define. You will compute the average value for each group of variables: one average value for the Systolic values and one average value for the Diastolic values and display them in a listbox, along with the “Status” and the “Doctor’s Name.”

If the average Systolic pressure of a patient is <=90 or >= 160 OR if the average Diastolic pressure is <= 60 or >= 90 then your program must display a “WARNING” under the status for that patient, otherwise you will display ‘NORMAL’ under the status for that patient. The last column of the display will show the Cardiologist’s Name for the patient.SAMPLE GUI FOR YOUR CARDIAC CARE APPLICATIONCODING SPECIFICATIONS:

DisplayPatientStatus_Button:

The codebehind the “DISPLAY PATIENT STATUS” button must only contain calls to VOID methods and Value Returning methods (known as Functions).

Write a void method ProcessFile to process the file until the end of stream and call that method from inside the button click event.

Inside this ProcessFile method your program should call the following sub-methods:

Write two separate Functions (value returning methods.) One, SystolicPressure, to accumulate and return the mean Systolic blood pressure and another Function, DiastolicPressure, to accumulate and return the mean Diastolic pressure of the current patient.

Write a Function PatientStatus, to return the patient’s STATUS after the patient’s numeric data has been processed.

Write a Function DoctorsName to return the doctor’s name.

Write a private void DisplayOutput method, to create a string and display each output line for each patient the app is processing.Clear_MonitorButton

The codebehind the “CLEAR MONITOR” button must contain calls to void methods that will do the field and variable cleaning and re-initializations.