0% found this document useful (0 votes)
18 views1 page

Scenario - Patient Summary

The document outlines a program structure for managing patient data using arrays to store details such as ID, name, gender, disease, smoking, and alcohol consumption. It specifies procedures for calculating disease counts, average ages by gender, percentages of smokers and alcohol consumers, identifying the youngest and oldest patients, finding the highest medical score, and searching for patients. The program requires pseudocode or code with comments for clarity, and does not require initialization of data arrays or variables.

Uploaded by

Sooraj Rajmohan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Scenario - Patient Summary

The document outlines a program structure for managing patient data using arrays to store details such as ID, name, gender, disease, smoking, and alcohol consumption. It specifies procedures for calculating disease counts, average ages by gender, percentages of smokers and alcohol consumers, identifying the youngest and oldest patients, finding the highest medical score, and searching for patients. The program requires pseudocode or code with comments for clarity, and does not require initialization of data arrays or variables.

Uploaded by

Sooraj Rajmohan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Scenario -Patient Summary

The 2D array PatientDetails stores the following data:

Patient ID Name Gender Disease Smoker Alcohol Consumer

The 1D array ages stores the ages of all the patients and the 1D array
MedicalScores stores the medical history score of each patient. All
patients have the same position in each array, for instance, the patient at
number 4 in PatientDetails will be 4 at ages and in MedicalScores. The
variable PatientCount stores the number of patients.
Your program should include the following procedures:
• A procedure called "disease_counter" that calculates the total
number of patients diagnosed with a certain disease as per the user’s
request.
• A procedure called "average_age" that calculates the average age of
male and female patients separately.
• A procedure called "smokers_percentage" that calculates the
percentage of patients who have a history of smoking.
• A procedure called "alcohol_consumers" that calculates the
percentage of patients who have a history of alcohol consumption.
• A procedure called "young_old" that finds the age of the youngest
and oldest patient diagnosed.
• A procedure called "highest_medical_score" that finds the name of
the patient with the highest medical history score.
• A procedure called "search_patient" that allows the user to search
for a particular patient using their unique identifier.
You must use pseudocode or program code and add comments to explain
how your code works.
All inputs and outputs must contain suitable messages. You do not need to
initialise the data in the 2D array patient_details or the 1D array
MedicalScores or the variable PatientCount.

You might also like