-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclasses.h
121 lines (100 loc) · 5.04 KB
/
classes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
//
// Created by Admin on 5/8/2023.
//
#ifndef HOSPITAL_MANAGMENT_SYSTEM_CLASSES_H
#define HOSPITAL_MANAGMENT_SYSTEM_CLASSES_H
#include<iostream>
using namespace std;
//Base class//Parent class
class person {
string name;
int age;
string phoneNum,cnic;
string address;
public:
person(); //default constructor to initialize the object
void set_person(); //Function to initialize object by user
void get_person(); //Function to Print object by user
const string &getName() const; //Getter function to return constant string "name" to use outside the class
};
class patient:public person{
int reg_no;
string date_admit;
string date_discharge,disease;
float bill,total;
public:
patient(); //default constructor to initialize the object
void set_patient(); //Function to initialize object by user
void get_patient(); //Function to Print object by user
void bill_cal(); //Function to Calculate bill
static void list_of_dpt(); //Function to display list of all departments
void avail_doctor(); //Function to display list of available doctors
void book_appointment(); //Function to book appointment
void patient_history(); //Function to Display history of the user(patient)
void add_patient_data(); //Function to add patient add in text file
void prev_pat_list(); //Function to display list of Previous patients
void patient_menu(); //Function to display menu for patient
string &getDisease() ; //getter function to return private data member " Disease "
float getTotal() ; //getter function to return private data member " total "
static int patient_count; //static count// to count patients
};
class staff: public person{
float salary;
string time_from,time_to;
public:
staff(); //default constructor to initialize the object
float getSalary() const; //getter function to return private data member " salary "
void set_staff(); //Function to initialize object by user
void get_staff(); //Function to Print object by user
};
class doctor:public staff{
int doc_id;
string spec;
float fees;
string status;
public:
doctor(); //default constructor to initialize the object
void doctor_menu(); //Function to display doctor's menu
void set_doctor(); //Function to initialize object by user
void get_doctor(); //Function to Print object by user
void fees_cal(); //Function to calculate fees
void add_doctor(); //Function to add doctor data
void patients_rec(); //Function to display list of all patients
void this_patient(); //Function to display data of a specific patient
static void add_pat_rec(); //Function to add patient data
void doctor_rec(); //Function to display doctors data
const string &getStatus() const; //getter function to return private data member " status "
};
class accountant:public staff{
int acc_ID;
string chargeRoom ;
public:
accountant(); //default constructor to initialize the object
const string &getchargeRoom() const;//getter function to return private data member " room number "
int getAccId() const; //getter function to return private data member "accountant id "
void set_accountant(); //Function to initialize object by user
void get_accountant(); //Function to Print object by user
void Acc_menu(); //Function to display Accountant's menu
void display_acc(); //Function to display Accountant data
void add_acc(); //Function to add accountant data
};
class nurse:public staff{
int nurseID;
string chargeRoom;
public:
nurse(); //default constructor to initialize the object
const string &getchargeRoom() const;//getter function to return private data member "room number "
int getNurseId() const; //getter function to return private data member "nurse id "
void set_nurse(); //Function to initialize object by user
void get_nurse(); //Function to Print object by user
void nurse_menu(); //Function to display nurse's menu
void display_nurse(); //Function to display nurse data
void add_nurse(); //Function to add nurse data
};
class admin:public staff{
public:
admin(); //default constructor to initialize the object
void admin_menu(); //Function to display admin 's menu
};
void system_end();
#endif //HOSPITAL_MANAGMENT_SYSTEM_CLASSES_H