Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A health care issue that is getting a lot of attention is the computerization of

ID: 3546775 • Letter: A

Question

     A health care issue that is getting a lot of attention is the computerization of health records. Computerizing health records could make it easier for patients to share their health profiles and histories among their various health care professionals. This could improve the quality of health care, help avoid drug conflicts and erroneous drug prescriptions, reduce costs, and in emergencies it could save lives.

     In this problem, you are hired by the Sacred Heart teaching hospital to design a (simple, volatile

Explanation / Answer

#include<iostream>
#include <ctime>
using namespace std;
struct dateofbirth
{
int month;
int day;
int year;
};
struct patientRecord
{
string first_name;
string last_name;
char gender;
dateofbirth dob;
double height;
double weight;
string known_allegries;
string last_illness;
};
void setPatient(patientRecord* record,
                string first_name,
                string last_name,
                char gender,
                dateofbirth dob,
                double height,
                double weight,
                string known_allegries,
                string last_illness)
{
record->first_name = first_name;
record->last_name = last_name;
record->gender = gender;
record->dob.month = dob.month;
record->dob.day = dob.day;
record->dob.year = dob.year;
record->height = height;
record->weight = weight;
record->known_allegries = known_allegries;
record->last_illness = last_illness;
}
void getPatient(patientRecord* record,int& age_in_years,double& maximum_heart_rate,double& target_heart_rate,double& BMI)
{
time_t t = time(0);
struct tm *now = localtime(&t);
age_in_years = (now->tm_year + 1900)-record->dob.year;
maximum_heart_rate = 220 - age_in_years;
target_heart_rate = maximum_heart_rate*0.6;
BMI = (record->weight/(record->height * record->height))*703;
}
int main()
{
string first_name;
string last_name;
char gender;
dateofbirth dob;
double height;
double weight;
string known_allegries;
string last_illness;
patientRecord Array_of_records[5];
int age_in_years;
double maximum_heart_rate;
double target_heart_rate;
double BMI;
for(int i=0; i<5; i++)
{
cout <<"Enter first name of patient : ";
cin >> first_name;
cout << endl;
cout <<"Enter last name of patient : ";
cin >> last_name;
cout << endl;
cout <<"Enter gender(m for male , f for female) : ";
cin >> gender;
cout << endl;
cout <<"Enter date of birth (month, day and year) ";
cin >> dob.month >> dob.day >> dob.year;
cout << endl;
cout <<"Enter height in inches of patient : ";
cin >> height;
cout << endl;
cout <<"Enter weight in pounds of patient : ";
cin >> weight;
cout << endl;
cout <<"Enter known allegries of patient : ";
cin >> known_allegries;
cout << endl;
cout <<"Enter last_illness of patient : ";
cin >> last_illness;
cout << endl;
setPatient(&Array_of_records[i],first_name,last_name,gender,dob,height,weight,known_allegries,last_illness);
}
cout << "Patient 3 details are as follows" << endl;
getPatient(&Array_of_records[2],age_in_years, maximum_heart_rate, target_heart_rate, BMI);
cout << "Patient name is " << Array_of_records[2].first_name << " " << Array_of_records[2].last_name << endl;
cout << "Patient age in year is " << age_in_years << endl;
cout << "Patient maximum heart beat is " << maximum_heart_rate << endl;
cout << "Patient target heart beat is " << target_heart_rate << endl;
cout << "Patient BMI is " << BMI << endl;
return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote