Using Object-Oriented Programming Abstract Data Types (ADT) principles in Python: 1.1 Create a class Patient File Reader
Fantastic news! We've Found the answer you've been seeking!
Question:
Using Object-Oriented Programming Abstract Data Types (ADT) principles in Python: 1.1 Create a class “Patient File Reader ()” for retrieving the patient data from the given text file (this should have been created by the student).
Transcribed Image Text:
Steve Biko Hospital is in the process of storing her patient's data in a format stipulated in Table 1.1 below which will, in turn, be uploaded to a database. Note that the patient numbers are arranged in ascending order. The hospital office administrator uses a specific format to capture the patient's data in a text file in no particular order. Suppose the specific format structure is defined line by line where each patient's data consists of the following: patient number, surname, name, age group, sex, and weight, which are captured in this order. The age groups are given with descriptions as follows: Neonate (first 4 weeks of life), Infant (1 month to 1 year), Toddler (1- 3 years), Pre-school child (3-5 years), School Age Child (6- 12 years), Adolescent (13- 18 years), Young Adult (19 - 40), Middle Age Adult (41 - 65 years), and Older Adult (over 65 years) which are often represented by digits 1 to 9 (where 1 is Neonate and 9 is Older Adult). You are expected to develop a Python program that will produce the output as shown Table 1.1 by creating a text file using the format described above, which will serve as the input to your program. PATIENT DATA PATIENT NO. SURNAME NAME AGE GROUP SEX WEIGHT (KG) Young Adult School Age Child Infant Older Adult 10005 Linda Khumalo 56.40 Mokoena Mkhize Nkosi 10012 M 9.82 10015 Dlamini M 5.60 10100 Sithole Mahlangu M 91.77 10132 Ntombi Zulu Pre-school child F 10.61 Number of patients: 5 Table 1.1: Patient Data Steve Biko Hospital is in the process of storing her patient's data in a format stipulated in Table 1.1 below which will, in turn, be uploaded to a database. Note that the patient numbers are arranged in ascending order. The hospital office administrator uses a specific format to capture the patient's data in a text file in no particular order. Suppose the specific format structure is defined line by line where each patient's data consists of the following: patient number, surname, name, age group, sex, and weight, which are captured in this order. The age groups are given with descriptions as follows: Neonate (first 4 weeks of life), Infant (1 month to 1 year), Toddler (1- 3 years), Pre-school child (3-5 years), School Age Child (6- 12 years), Adolescent (13- 18 years), Young Adult (19 - 40), Middle Age Adult (41 - 65 years), and Older Adult (over 65 years) which are often represented by digits 1 to 9 (where 1 is Neonate and 9 is Older Adult). You are expected to develop a Python program that will produce the output as shown Table 1.1 by creating a text file using the format described above, which will serve as the input to your program. PATIENT DATA PATIENT NO. SURNAME NAME AGE GROUP SEX WEIGHT (KG) Young Adult School Age Child Infant Older Adult 10005 Linda Khumalo 56.40 Mokoena Mkhize Nkosi 10012 M 9.82 10015 Dlamini M 5.60 10100 Sithole Mahlangu M 91.77 10132 Ntombi Zulu Pre-school child F 10.61 Number of patients: 5 Table 1.1: Patient Data
Expert Answer:
Answer rating: 100% (QA)
Please refer to the screenshot of the code to understand the indentation of the code Language C Visual Studio Console Project NET version 472 Project ... View the full answer
Posted Date:
Students also viewed these accounting questions
-
Distinguish among companies and corporations that have been created by special acts of parliament, by royal charter, by registration, by letters patent and by filing articles of incorporation.
-
What costs have been created by these problems, and how do they compare with the underlying costs and root cause of the problem?
-
Three alternative designs have been created by Snakisco engineers for a new machine that spreads cheese between the crackers in a Snakisco snack. Each machine design has unique total costs (fixed and...
-
Izmir A.S. issued convertible bonds at their face value of 100,000 lira on December 31, 2020. The bonds have a 10-year life with interest of 10 percent payable annually. At the date of issue, the...
-
What substantive audit procedures apply to taxes?
-
In a volcanic eruption, 4 km 3 of mountain with a density of 1600 kg/m 3 was lifted an average height of 500 m. (a) How much energy in joules was released in this eruption? (b) The energy released by...
-
You are the manager of internal audit for a large Australian city council. The council is responsible for all the normal services-for example, water, sewerage, roads, waste disposal, parklands, and...
-
Six samples of five observations each have been taken of 80 kg concrete slabs produced by a machine, and the results are displayed below. a. Using factors from Table 10-2, determine the upper and...
-
Specify the name of the test you will use and identify whether it is left tailed or right tailed
-
One reason why recoveries were jobless after 1990 was that O in the run-up to each of the post-1990 recessions, over-hiring had occurred in important industries. O recoveries were not jobless in...
-
Simplify. (3x-4x-5)+(6x-7x+2) B X
-
Admitting New Partner Who Contributes Assets After the tangible assets have been adjusted to current market prices, the capital accounts of Elayne Summers and Murv Newcomb have balances of $116,000...
-
The discharge pressure of a water pump is 9 , 0 0 0 kPa. The temperature is 1 5 0 deg \ deg C and density is 9 1 7 kg / m 3 . What is the equivalent pump head in meters?
-
If electron density in plasma has been increased 100 time, haw much the plasma frequency was increased? Calculate the Debye radius when electron temperature is 1 eV and electron density is 10^14 cm^-3
-
On July 1, Y6, Nickel Ltd. leases equipment from Dime Corp., under an eight year capital (finance) lease. Equal annual payments of $100,000 are required, payable on July 1 of each year. The first...
-
0 22 0% 0 Mi 0 23 0% 0 Mi 0 34 0% 0 Mi 8 Mi Ex 12 Mi Ex 10. An industrial designer has created a chair made out of concrete for an outdoor recreation area. Using the isometric dot grid below, draw an...
-
1. What is the semi-annually compounded interest rate if $200 accumulates to $318.77 in eight years? Answer in percentage with two decimal places. 2. What is the quarterly compounded interest rate if...
-
Consider a publicly-held company whose products you are familiar with. Some examples might include: Access the companys public website and search for its most recent annual report. ies: Some pre al...
-
The 2014 financial statements of LVMH Moet Hennessey-Louis Vuitton S.A. are presented in Appendix C of this book. LVMH is a Paris-based holding company and one of the worlds largest and best-known...
-
The basic concept behind a learning organization is: A. The popularity to change. B. The people change. C. The adaptation to change. D. The resources of change.
Study smarter with the SolutionInn App