Question

In: Computer Science

c++ program Define the following classes to manage the booking of patients in a medical clinic....

c++ program

Define the following classes to manage the booking of patients in a medical clinic.

a) Define a class Date that has the following integer data members: month, day and year.

b) Define a class AppointmentTime that has the following data members: day (string), hour (int) and minute (int).

c) Define a class Patient with the following data members:

• The name of the patient as a standard library string.

• The date of birth of the patient (from part a).

• Medical insurance number of the patient as a standard library string.

• Name of the doctor for the appointment.

• Day and time of the appointment (from part b). A patient may have a single doctor’s appointment each week.

c) Define a class Doctor with the following data members,

• The name of the doctor as a standard library string.

• The date of birth of the doctor (from part a).

• A two-dimensional string pointer array of 12-by-5 that shows the appointments of that doctor. The appointment durations are 30 mins and they always begin on the hour or half hour. Doctors see patients Monday to Friday during 9.00-12.00 and 14.00-17.00. This array is initialized to empty strings to indicate that at the beginning all the appointments are available. When an appointment is given a pointer to the medical insurance of the patient is stored at that location.

d) Define an AppointmentRequest class with the following data members,

• A Patient object from part (b).

• Doctor’s name.

• The day that appointment is requested as a standard library string (Monday to Friday).

e) Define a class ClinicManager with the following data members,

• An array of pointers to the Patient objects of size 200.

• An array of pointers to the Doctor objects of size 20.

• An integer variable that counts total number of patient appointments given by the clinic in a week. At least the following member functions should be provided,

- A member function that receives a patient object and inserts it to the Patient pointer array. It will check if the patient is already in the array to prevent multiple copies of the patient object in the array.

- A member function that receives a doctor object and inserts to the Doctor pointer array.

- A member function that processes appointment requests. The function will receive an AppointmentRequest object, then will check the requested doctor’s schedule to determine if the appointment can be made. If the appointment can be scheduled it will store the medical insurance of the patient in the appointment array of that doctor. It will create an AppointmentTime object from part b). Then, it will find the patient in the Patient pointer array and store the doctor’s name and AppointmentTime object in the patient object in the Patient pointer array. Finally, the member function will return the AppointmentTime object. If the doctor is already fully booked on that day this object should should return zeros for the appointment time.

- A member function that cancels an appointment, receives doctor’s name and medical insurance of the patient. Then it removes the appointment both from the doctor’s schedule and from the patient.

- A member function that receives a doctor’s name as a parameter and prints name and medical insurance number of all the patients that have booked an appointment with that doctor.

f) Write a driver program that demonstrate the functionality of your program including,

- Creates a ClinicManager object

- Creates doctor objects and calls to the doctor insert member function.

- Creates Patient and AppointmentRequest objects and calls to the member functions that processes the appointments, then outputs the time of the appointment.

Key Considerations for the assignment:

§ You must enforce encapsulation by keeping all data members private.

§ You need to make sure that your classes are well defined using the various concepts seen in the class.

§ Provide needed set/get functions for the data members.

§ Objects should be created dynamically and must be deleted when no longer needed. There should be an output statement confirming the deletion of an object from the destructor function

Solutions

Expert Solution

Your description is difficult to understand but I have created the classes and I am providing you with a working program that I made for my school project. This will work


Explanation:

Here is the program I made for my school project

#include<iostream>
#include<fstream>
#include<sstream>
#include<string>
#include<stdlib.h>
#include<iomanip>
#include<math.h>
using namespace std;
string checkdepart(int z){
   switch (z){
      case 1:
         return "Neurology";
         break;
      case 2:
         return "Pediatrics";
         break;
      case 3:
         return "Emergency";
         break;
      case 4:
         return "Phychiatric";
         break;
      case 5:
         return "E.N.T";
         break;
   
      default:
         return "Internal Medicine";
      
   }
}
showneuro(){
   
   cout<<"\n";
   //string line;
   ifstream a;
  
   a.open("doctors.txt");
   if(!a)
   {
   cout<<"no such file exist"<<endl;
   return 1;
   }
  
   string depart;
   int x,y,z,b,i=0;
    cout << setw(5) << "ID:" << setw(15) << "DEPARTMENT" << setw(15) << "NAME" << setw(15) <<"TIMINGS"<<endl << endl;

   
   while  (i!=4   )
   {
   
   a>>x;
   
   a.ignore();
   
   a>>y;
   depart=checkdepart(y);
   
   a.ignore();
   
   a >> z;
   
   a.ignore();
   
   a>>b;
   
   a.ignore();
   string line;
   getline(a,line,',');
   
   cout<<setw(4)<<x<<setw(15)<<depart<<setw(20)<<line<<setw(7)<<z<<"-"<<b<<endl;
   i++;
 
   }


   a.close();
   
   }
showpediatric(){
   cout<<"\n";
    //string line;
  ifstream a;
  
  a.open("doctors.txt");
 if(!a){
   cout<<"no such file exist"<<endl;
   return 1;
 }
  string discard;
  getline(a,discard,'$');
 // cout<<discard;
 string depart;
       int x,y,z,b,i=0;
           cout <<endl<<endl<<endl <<setw(5) << "ID:" << setw(15) << "DEPARTMENT" << setw(15) << "NAME" << setw(15) <<"TIMINGS"<<endl << endl;

   
   while  (i!=4   ){
   
   a>>x;
   
   a.ignore();
   
   a>>y;
   depart=checkdepart(y);
   
   a.ignore();
   
   a >> z;
   
   a.ignore();
   
   a>>b;
   
   a.ignore();
   string line;
   getline(a,line,',');
   
cout<<setw(4)<<x<<setw(15)<<depart<<setw(20)<<line<<setw(7)<<z<<"-"<<b<<endl;
 i++;
 
}


 a.close();
}
showemergency(){
   cout<<"\n";
    //string line;
  ifstream a;
  
  a.open("doctors.txt");
 if(!a){
   cout<<"no such file exist"<<endl;
   return 1;
 }
   string discard;
   getline(a,discard,'&');
 // cout<<discard;
   string depart;
   int x,y,z,b,i=0;
    cout <<endl<<endl<<endl << setw(5) << "ID:" << setw(15) << "DEPARTMENT" << setw(15) << "NAME" << setw(15) <<"TIMINGS"<<endl << endl;

   
   while  (i!=4   ){
   
   a>>x;
   
   a.ignore();
   
   a>>y;
   depart=checkdepart(y);
   
   a.ignore();
   
   a >> z;
   
   a.ignore();
   
   a>>b;
   
   a.ignore();
   string line;
   getline(a,line,',');
   
cout<<setw(4)<<x<<setw(15)<<depart<<setw(20)<<line<<setw(7)<<z<<"-"<<b<<endl;
 i++;
 
}


 a.close();
}
showphychiatric(){
   cout<<"\n";
       //string line;
  ifstream a;
  
  a.open("doctors.txt");
 if(!a){
   cout<<"no such file exist"<<endl;
   return 1;
 }
  string discard;
  getline(a,discard,'@');
 // cout<<discard;
 string depart;
       int x,y,z,b,i=0;
 cout <<endl<<endl<<endl <<setw(5) << "ID:" << setw(15) << "DEPARTMENT" << setw(15) << "NAME" << setw(15) <<"TIMINGS"<<endl << endl;
   
   while  (i!=4   ){
   
   a>>x;
   
   a.ignore();
   
   a>>y;
   depart=checkdepart(y);
   
   a.ignore();
   
   a >> z;
   
   a.ignore();
   
   a>>b;
   
   a.ignore();
   string line;
   getline(a,line,',');
   
cout<<setw(4)<<x<<setw(17)<<depart<<setw(20)<<line<<setw(7)<<z<<"-"<<b<<endl;
 i++;
 
}


 a.close();    
}
showent(){
   cout<<"\n";
       //string line;
       //brought to you by code-projects.org
  ifstream a;
  
  a.open("doctors.txt");
 if(!a){
   cout<<"no such file exist"<<endl;
   return 1;
 }
  string discard;
  getline(a,discard,'#');
 // cout<<discard;
 string depart;
       int x,y,z,b,i=0;
 cout <<endl<<endl<<endl <<setw(5) << "ID:" << setw(15) << "DEPARTMENT" << setw(15) << "NAME" << setw(15) <<"TIMINGS"<<endl << endl;
   
   while  (i!=4   ){
   
   a>>x;
   
   a.ignore();
   
   a>>y;
   depart=checkdepart(y);
   
   a.ignore();
   
   a >> z;
   
   a.ignore();
   
   a>>b;
   
   a.ignore();
   string line;
   getline(a,line,',');
   
cout<<setw(4)<<x<<setw(15)<<depart<<setw(20)<<line<<setw(7)<<z<<"-"<<b<<endl;
 i++;
 
}


 a.close();
}
showinternalmed(){
   cout<<"\n";
          //string line;
  ifstream a;
  
  a.open("doctors.txt");
 if(!a){
   cout<<"no such file exist"<<endl;
   return 1;
 }
  string discard;
  getline(a,discard,'%');
 // cout<<discard;
 string depart;
       int x,y,z,b,i=0;
 cout <<endl<<endl<<endl <<setw(5) << "ID:" << setw(15) << "DEPARTMENT" << setw(18) << "NAME" << setw(15) <<"TIMINGS"<<endl << endl;
   
   while  (i!=4   ){
   
   a>>x;
   
   a.ignore();
   
   a>>y;
   depart=checkdepart(y);
   
   a.ignore();
   
   a >> z;
   
   a.ignore();
   
   a>>b;
   
   a.ignore();
   string line;
   getline(a,line,',');
   
cout<<setw(4)<<x<<setw(20)<<depart<<setw(18)<<line<<setw(7)<<z<<"-"<<b<<endl;
 i++;
 
}


 a.close();
}
bool checkavailibility(int id){
    fstream a ("appointment.txt");
    if (!a)
    {
         
        cout << "Can't open file" << endl;
    return 1;
    }
   
int number;

a >> number;

while(!a.eof())
{
    if (number == id)
    {
      return false;    
    }
    a >> number;
    
}
return true;
a.close();   
}
makeappointment(int d){    
   bool check=false;
      while(!check){
      

   int id;
   cout<<"Enter your desired doctor's ID number:"<<endl;
   cin>>id;
   while(cin.fail()) 
   {
        cout<<"enter an integer from above choices"<<endl;
        cin.clear();
        cin.ignore(256,'\n');
        
        cin >> id;
    }
         switch(d){
         case 1:
            do {
               
               if(id<=0 || id>4){
                  cout<<"enter valid doctor's id number (as shown above)"<<endl;
               }
               else
               break;
               cout<<"Enter your desired doctor's id number:";
               cin>>id;
            } while (id<=0 || id>4);
            break;       
            case 2:
            do {
            
               if(id<=4 || id>8){
                  cout<<"enter valid doctor's id number (as shown above)"<<endl;
               }
               else
               break;
               
                  cout<<"Enter your desired doctor's id number:";
               cin>>id;
            } while (id<=4 || id>8);
         break;
         case 3:
            do {
            
               if(id<=20 || id>24){
                  cout<<"enter valid doctor's id number (as shown above)"<<endl;
               }
               else
               break;
                  cout<<"Enter your desired doctor's id number:";
               cin>>id;
            } while (id<=20 || id>24);
         break;
         case 4:
            do {
            
               if(id<=12 || id>16){
                  cout<<"enter valid doctor's id number (as shown above)"<<endl;
               }
               else
               break;
                  cout<<"Enter your desired doctor's id number:";
               cin>>id;
            } while (id<=12 || id>16);
         break;
               case 5:
            do {
               
               if(id<=16 || id>20){
                  cout<<"enter valid doctor's id number (as shown above)"<<endl;
               }
               else 
               break;
               cout<<"Enter your desired doctor's id number:";
               cin>>id;
            } while (id<=16 || id>20);
         break;
               case 6:
            do {
            
               if(id<=8 || id>12){
                  cout<<"enter valid doctor's id number (as shown above)"<<endl;
               }
               else
               break;
                  cout<<"Enter your desired doctor's id number:";
               cin>>id;
            } while (id<=8 || id>12);
         break;
            default:
               cout<<"enter valid input"<<endl;
      }    
    
    bool found=checkavailibility(id);
   
    if(!found){
      cout<<"doctor unavailable"<<endl;
   
    }
    else{
    
   string data;
   
   ofstream a;
   a.open ("appointment.txt", std::ofstream::out | std::ofstream::app);


   
   a<<id<<endl;
   check=true;
       cout<<"\nAppointment successfully done....";
    }
    int set();
   
}
   
}
checkappointment(int id){
        
   ifstream a ("appointment.txt");
    if (!a)
    {
         
        cout << "Can't open file" << endl;
    return 1;
    }
   
int number;
bool found;
a >> number;


while(!a.eof())
{
    if (number == id)
    {
      cout << "found\nplease proceed to the waiting area on your left\nyou'll shortly be guided to your Doctor" << endl;
      found=true;
     
    }
    a >> number;
    
}
if(!found){
   cout<<"not found\n";

}
a.close();     
}



class Person
{
   protected:
      int id;
      string name;
       char gender;
      long long phone_num;
         
   public:
      void set()
      {
         cin.ignore();
         cout<<"\n\n\t\t--------------------\n";
         cout<<"\t\tEnter Name:";
         getline(cin,name);
         
         cout<<"\n\t\tEnter Gender(M/F):";
      
         cin>>gender;
            bool check=false;

   while(check==false){
      
   
      if(gender!='M'&&gender!='m'&&gender!='F'&&gender!='f')
   {
      
   
   try
   {
      throw &gender;
   }
   catch (char *gender)
   {
      cout<<"enter valid input:"<<endl;
      cin>>*gender;
      if(*gender=='M'||*gender=='m'||*gender=='F'||*gender=='f'){
         check=true;
      }
   }
   }
   else{
      check=true;
   }
   }
         cout<<"\n\t\tEnter phone number:";
         cin.ignore();  
         cin>>phone_num;
          while(cin.fail()) {
        cout<<"Phone number is in integer form,sire!";
        cin.clear();
        cin.ignore(256,'\n');
        
        cin >> phone_num;
    }
      
         
      }
      
      string getname()
      {
         return name;
      }
      int getid()
      {
         return id;
      }
      char getgender()
      {
         return gender;
         
      }
      
      long getphone()
      {
         return phone_num;
      }
};
class Doctor:public Person
{
   private:
      string specialization;
   public:
      setspcialization(string sp){
      specialization=sp;
   }
      string getspecialization(){
         return specialization;
   }
      void checkPatient(){
      cout<<"Patient checked.";  
   }
      void prescribeMedicine(){
      cout<<"Medicine prescription sent to pharmacy."<<endl;
   }
      void generateReport(){
      cout<<"reports will be available to collect after 10 days from the check-up date."<<endl;
   }
};
class Patient:public Person
{
   int choice;
   public:
   int set()
   {
   
   Person::set();
    system("CLS");
   cout<<"\n\t\t\t\tChoose Department:"<<endl;
   cout<<"\n\t\t\t\t1)Neurology \n\t\t\t\t2)Pediatric \n\t\t\t\t3)Internal Medicine \n\t\t\t\t4)Phychiatric \n\t\t\t\t5)E.N.T \n\t\t\t\t6)Emergency \n\n\n\t\t\tYour Choice:";
   cin>>choice;
    while(cin.fail()) {
        cout<<"enter an integer from above choices";
        cin.clear();
        cin.ignore(256,'\n');
        
        cin >> choice;
    }
   bool check=false;
   
   while(!check){
   if(choice>=1&&choice<=6){
      check=true;
   }
   else{
      try
      {
         throw &choice;
      }
      catch(int *choice)
      {
         cout<<"enter valid input:"<<endl;
         cin>>*choice;
          while(cin.fail()) {
        cout<<"enter an integer from above choices";
        cin.clear();
        cin.ignore(256,'\n');
        
        cin >> *choice;
    }
      }
   }
}
   switch(choice)
   {
      case 1:
         
         showneuro();
         break;
      case 2:
         
         showpediatric();
         break;
       case 3:
          
         showinternalmed();
         break;
      case 4:
         
         showphychiatric();
         break;

      case 5:
         showent();
         break;
      
      case 6:
         showemergency();
         break;
         
      default:
         cout<<"\nDepartment not present:\n";      
      }
      return choice; 
   }
};
class Receptionist:public Person
{
   bool available=false;
   char ans;
   int id=90;
   public:
      Receptionist(){
         
      }
   Receptionist(int d){
   cout<<"Do you have an appointment(Y/N)?"<<endl;
   cin>>ans;
   bool check=false;
//acception handling
   while(check==false){
      
   
      if(ans!='Y'&&ans!='y'&&ans!='N'&&ans!='n')
   {
      
   
   try
   {
      throw &ans;
   }
   catch (char *ans)
   {
      cout<<"enter valid input:"<<endl;
      cin>>*ans;
      if(*ans=='Y'||*ans=='y'||*ans=='N'||*ans=='n'){
         check=true;
      }
   }
   }
   else{
      check=true;
   }
   }
   char choice;
   switch(ans) 
   {
   
   case 'n':
   case 'N':
      
      cout<<"do you want to make an appointment?(M) OR Walk in?(W)";
      
      cin>>choice;
    check=false;
//acception handling
   while(check==false){
      
   
      if(choice!='M'&&choice!='m'&&choice!='W'&&choice!='w')
   {
      
   
   try
   {
      throw &choice;
   }
   catch (char *choice)
   {
      cout<<"enter valid input:"<<endl;
      cin>>*choice;
      if(*choice=='M'||*choice=='m'||*choice=='W'||*choice=='w'){
         check=true;
      }
   }
   }
   else{
      check=true;
   }
   }  
      if(choice=='M'||choice=='m'){
         makeappointment(d);
      }
      else if(choice=='W'||choice=='w'){
         while(!available){

      switch(d){
         case 1:
            do {
               cout<<"Enter your desired doctor's id number:";
               cin>>id;
               while(cin.fail())
               {
                 cout<<"cenrtainly you made a typo!"<<endl;
                 cin.clear();
                 cin.ignore(256,'\n');
                 
                 cin >> id;
                }
               if(id<=0 || id>4){
                  cout<<"enter valid doctor's id number (as shown above)"<<endl;
               }
            } while (id<=0 || id>4);
            break;       
            case 2:
            do {
               cout<<"Enter your desired doctor's id number:";
               cin>>id;
               while(cin.fail())
               {
                 cout<<"certainly you made a typo!"<<endl;
                 cin.clear();
                 cin.ignore(256,'\n');
        
                 cin >> id;
                }
               if(id<=4 || id>8){
                  cout<<"enter valid doctor's id number (as shown above)"<<endl;
               }
            } while (id<=4 || id>8);
         break;
         case 3:
            do {
               cout<<"Enter your desired doctor's id number:";
               cin>>id;
               while(cin.fail())
               {
                 cout<<"certainly you made a typo!"<<endl;
                 cin.clear();
                 cin.ignore(256,'\n');
        
                 cin >> id;
                }
               if(id<=20 || id>24){
                  cout<<"enter valid doctor's id number (as shown above)"<<endl;
               }
            } while (id<=20 || id>24);
         break;
         case 4:
            do {
               cout<<"Enter your desired doctor's id number:";
               cin>>id;
               while(cin.fail())
               {
                 cout<<"cenrtainly you made a typo!"<<endl;
                 cin.clear();
                 cin.ignore(256,'\n');
        
                 cin >> id;
                }
               if(id<=12 || id>16){
                  cout<<"enter valid doctor's id number (as shown above)"<<endl;
               }
               } while (id<=12 || id>16);
               break;
            case 5:
            do
               {
               cout<<"Enter your desired doctor's id number:";
               cin>>id;
               while(cin.fail())
               {
                 cout<<"certainly you made a typo!"<<endl;
                 cin.clear();
                 cin.ignore(256,'\n');
        
                 cin >> id;
                }
               if(id<=16 || id>20){
                  cout<<"enter valid doctor's id number (as shown above)"<<endl;
               }
               } while (id<=16 || id>20);
            break;
            case 6:
            do {
               cout<<"Enter your desired doctor's id number:";
               cin>>id;
               while(cin.fail())
               {
                 cout<<"cenrtainly you made a typo!"<<endl;
                 cin.clear();
                 cin.ignore(256,'\n');
        
                 cin >> id;
                }
               if(id<=8 || id>12){
                  cout<<"enter valid doctor's id number (as shown above)"<<endl;
               }
               } while (id<=8 || id>12);
         break;
         default:
               cout<<"enter valid input"<<endl;
      }
      
      available=checkavailibility(id);
      if (!available){
         cout<<"not available at this time"<<endl;
      }
      else {
         cout<<"doctor available"<<endl;
      }        
         }
   
      }
      else
      cout<<"enter valid input";
   
      break;
      
   case 'y':
   case 'Y':
   
      int id;
      
      cout<<"enter your assigned doctor's ID number:";
      cin>>id;
       while(cin.fail()) {
        cout<<"certainly you made a typo!"<<endl;
        cin.clear();
        cin.ignore(256,'\n');
      cin >> id;
    }
      checkappointment(id);
      break; 
      default:
         cout<<"";
   }
   }
};
class Building
{
   private:
      int    No_of_Rooms;
   public:
      
      
updatedoctor(){
    fstream fin;
   fin.open("doctors.txt",fstream::in);
   
   stringstream sstr;

   string x;
   string o;
   string temp;
   cin.ignore();
   cout<<"Enter the name of Doctor which you want to replace:"<<endl;
   
  getline(cin,x);
   
   cout<<"Enter the name of new doctor:";
   getline(cin,o);
 

   int comma=0;
   while(! fin.eof() ) {
      getline(fin, temp, '\n');
      if (temp.find(x) != std::string::npos) {
         for (int i=0; i<temp.length(); i++) {
            sstr<<temp[i]; 
            if (temp[i] == ',') {
               comma++;
            }
            if (comma==4) {
               break;
            }
         }
         sstr<<o<<",";
         if (temp[temp.length()-1] != ',') {
            sstr<<temp[temp.length()-1];
         }
         sstr<<endl;
         //cout<<o<<","<<endl;     

      } else {
         sstr << temp << endl;
         //cout<<temp<<endl;    
      }
   }
   
   fin.close();
   
   fstream fout;
   fin.open("doctors.txt", fstream::out | fstream::trunc);
   fin << sstr.str();
   //cout<< sstr.str();
}


bool checkpass(string pass){
   string password="pass";//operator overloadig cAN BE DONE.
   if(password==pass){
      return true;
   }
   else
   return false;
}
};

int main(void){
cout<<setw(30)<<"\t\t\t-------------------";
cout<<setw(30)<<"\n\t\t\t\tHOSPITAL MANAGEMENT"<<endl;
cout<<setw(30)<<"\t\t\t-------------------"<<endl; 
int ans;
bool check=false;
cout<<"\t\tPRESS 1 : To View Doctors Present in our hospital"<<endl;
cout<<"\n\t\tPRESS 2 : To Go To Appointment Section"<<endl;
cout<<"\t\t-----------------------------";
cout<<"\n\t\tAdministration Login"<<endl;
cout<<"\t\tPRESS 3 : To Update Doctor";
cout<<"\n\t\t-----------------------------";
cout<<"\n\n\t\t\t\tInput:";
cin>>ans;
 while(cin.fail()) {
        cout<<"enter an integer from above choices"<<endl;
        cin.clear();
        cin.ignore(256,'\n');
        
        cin >> ans;
    }
   while(!check){
   if(ans>=1&&ans<=3){
      check=true;
   }
   else{
      try
      {
         throw &ans;
      }
      catch(int *ans)
      {
         cout<<"enter valid input:"<<endl;
         cin>>*ans;
          while(cin.fail()) {
        cout<<"enter an integer from above choices"<<endl;
        cin.clear();
        cin.ignore(256,'\n');
        
        cin >> *ans;
    }
      }
      
   }
}
int pass,d;

  switch (ans){
   case 1:
   system("CLS");
      showneuro();
      showpediatric();
      showemergency();
      showphychiatric();
      showent();
      showinternalmed();
   
      break;
      
   case 2:
      {
         Patient pa;
         d=pa.set();
      }
      {
         Receptionist re(d);
      }
      break;
   case 3:
{
      Building b;
      string pass;
      bool check=false;
      while(check!=true){
            
      cout<<"\n\t\t\t\tEnter pass key:";
      cin>>pass;
      check=b.checkpass(pass);
      if(check==true){
      cout<<"\n\n\t\t\t\tAccess granted"<<endl;
      b.updatedoctor();     
      }
   
      else
      cout<<"\n\n\t\t\t\tAccess denied"<<endl;
}}
   break;
   default:
   cout<<"enter valid input"<<endl;
      
   }
    system("pause");
}

here is the classes code. All you have to do is create the member function according to how you want to enter the input.

#include<iostream>
#include<fstream>
using namespace std;

class Date{
public:
    int day;
    int month;
    int year;
};

class AppointmentTime{
public:
    string day;
    int hour;
    int minute;
};

class Patient{
public:
    string name;
    Date patientBirthDate;
    string insuranceNumber;
    string doctorName;
    AppointmentTime appointment;
};

class Doctor{
public:
    string doctor;
    Date doctorBirthDate;
    string *appintmentArray[12][5];
};

class AppointmentRequest{
public:
    Patient nameOfThePatient;
    string nameOfDoctor;
    string appointmentDay;
};

class ClinicManager{
public:
    Patient *patientsArray[200];
    Doctor *doctorsArray[20];
    int appointmentCount;

    void getPatients(Patient patientInfo){
        cout<<"Enter patient info:\n";
        cout<<"Enter name: ";
        cin>>patientInfo.name;
        cout<<"Enter DOB: ";
        cin>>patientInfo.patientBirthDate;
        cout<<"Enter insurance number: ";
        cin>>patientInfo.insuranceNumber;
        cout<<"Enter doctor's name: ";
        cin>>patientInfo.doctorName;
        cout<<"Enter appointment time: ";
        cin>>patientInfo.appointment;
    }
};

int main()
{
    return 0;
}

Please comment if any query and like if it is helpful for you. Thanks


Related Solutions

A java program with classes and methods to manage employment. Program should be able to store/add...
A java program with classes and methods to manage employment. Program should be able to store/add employees, calculate payroll, display or schedule shifts. All classes should have at least a null constructor and copy constructor. Other constructors are up to your discretion. Include all necessary accessors and modifiers. To test the classes, create a container class with simply a main() method. The container class will have attributes that are class objects of each of the classes you create. The main()...
You are the nurse manager of an outpatient medical clinic. Your patients are diagnosed with heart...
You are the nurse manager of an outpatient medical clinic. Your patients are diagnosed with heart failure. You have noticed that recently, patients have seemed unhappy with the care they receive in your office. You want to design a quality improvement project to increase patient satisfaction with their office visit. You do not know specifically why patients are unhappy. You will create a plan to gather information to help you understand why patients are unhappy with their care. Please do...
The actual demand for the patients at Omaha Emergency Medical Clinic for the first six weeks...
The actual demand for the patients at Omaha Emergency Medical Clinic for the first six weeks of this       year are as follows: Week                   Actual # of Patients 65 66 70 58 63 54 Compute a simple exponential smoothing forecast for week 7 with ?=.5.   Assume the forecast for week 1 is 65. b)Compute MAPE. c)What is the interpretation of your answer in part b)?
A large medical clinic is working on improving waiting times for patients. While some delays are...
A large medical clinic is working on improving waiting times for patients. While some delays are inevitable, for example due to doctors having to deal with urgent cases, having patients wait more than 15 minutes past their appointment time is considered excessive. Through patient surveys the clinic management has learnt that only 25% of the patients were able to see their doctor without waiting more than 15 minutes; 5% said they had to wait over 60 minutes. The clinic management...
Write a program for hotel booking system using C++ Program Requirement 1. You can write any...
Write a program for hotel booking system using C++ Program Requirement 1. You can write any program based on the title assigned. 2. The program must fulfill ALL the requirements below. The requirements listed below are the MINIMUM requirement. Your program may extend beyond the requirements if needed. a) Create at least one (1) base class. b) Create at least two (2) derived classes that inherit from the base class created in 2(a). c) Create at least one (1) object...
​The actual demand for the patients at Omaha Emergency Medical Clinic for the first 6 weeks of this year follows:
The actual demand for the patients at Omaha Emergency Medical Clinic for the first 6 weeks of this year follows: WEEKACTUAL NO. OF PATIENTS165262370448563652Clinic administrator Marc Schniederjans wants you to forecast patient demand at the clinic for week 7 by using this data. You decide to use a weighted moving average method to find this fore-cast. Your method uses four actual demand levels, with weights of 0.333 on the present period, 0.25 one period ago, 0.25 two periods ago, and 0.167...
(using c) You will build a system to manage patients’ data in a hospital. The hospital...
(using c) You will build a system to manage patients’ data in a hospital. The hospital patient management system stores specific information in the form of health record to keep track of the patients’ data. Your program should read the information from a file called “patients.txt” that should be on the following format: Patient Name#Gender#Date of admission#Date of birth #Illness#Address (City)#Blood type (using c) Example of data input: Alma Mukhles#F#2212019#01012000#Ear infection#Nablus#B+ Ahmed A. Ali#M#01102020#05101970#Low blood pressure#AlBireh#A- Your program should be...
C++ program to implement Matrix Class with following requirements, Classes :- matrix.cpp and main.cpp (to test...
C++ program to implement Matrix Class with following requirements, Classes :- matrix.cpp and main.cpp (to test it) with following requirements: - Please use Vectors of double. Declare and define an matrix class: - The matrix stores doubles. Implement a default constructor which initializes square 1 x 1 matrix that contains  0.0. Implement a constructor that accepts a positive integer n and creates a square n x n matrix that contains 0.0s. Throw an exception if the integer passed to the constructor...
Several patients were admitted in the medical ward. Answer the following questions pertinent to the patients’...
Several patients were admitted in the medical ward. Answer the following questions pertinent to the patients’ conditions. PATIENT A–Presented in the emergency department with severe headache, irritability, and tremors after finishing a full marathon. Laboratory values reveal Serum sodium level of 130 mEq/L. PATIENT B–Presented in the emergency department with severe body malaise, diminished bowel sounds, and ECG reveals an extra U-wave in the tracing after 8 bouts of watery diarrhea. Laboratory values further reveal a Serum potassium level of...
A family consisting of four persons—A, B, C, and D—belongs to a medical clinic that always...
A family consisting of four persons—A, B, C, and D—belongs to a medical clinic that always has a doctor at each of stations 1, 2, and 3. During a certain week, each member of the family visits the clinic once and is assigned at random to a station. The experiment consists of recording the station number for each member. Suppose that any incoming individual is equally likely to be assigned to any of the three stations irrespective of where other...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT