-
Notifications
You must be signed in to change notification settings - Fork 0
/
Hospital_Management_System.cpp
207 lines (185 loc) · 7.33 KB
/
Hospital_Management_System.cpp
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
#include <iostream>
#include <conio.h>
#include <string>
using namespace std;
class mainn
{
private:
string name[10], fname[10], adress[10], doctname[10];
int i = 0;
long int cnic[10];
string sname[10], sfname[10], sadress[10], designation[10];
int o = 0;
long int scnic[10];
public:
void main_menu();
void doct_info();
void doct_appoint();
void check_appoint();
void sav_staf_info();
void show_staff_info();
};
void mainn ::show_staff_info()
{
system("CLS");
string check_name;
cout << "Check Staff Members Here..\n\n\n";
cout << "Enter Member Name : ";
cin.ignore();
getline(cin, check_name);
for (int n = 0; n <= o; n++)
{
if (check_name == sname[o])
{
cout << "\n\nYour Name is : " << sname[o];
cout << "\n\nYour Father Name is : " << sfname[o];
cout << "\n\nYour CNIC No. is : " << scnic[o];
cout << "\n\nYour Address is : " << sadress[o];
cout << "\n\nThe Designation of this Member is : " << designation[o];
cout << "\n\n\nPress any Key to Continue. " << getch();
}
}
}
/*=====================================================================================================*/
void mainn ::sav_staf_info()
{
system("CLS");
cout << " Adding Staff Informations\n\n\n";
cout << "Enter Your Name : ";
cin.ignore();
getline(cin, sname[i]);
cout << "\nEnter Your Father Name : ";
getline(cin, sfname[i]);
cout << "\nEnter Your CNIC No. : ";
cin >> scnic[10];
cout << "\nEnter Your Address : ";
cin.ignore();
getline(cin, sadress[i]);
cout << "\nEnter Designation : ";
getline(cin, designation[i]);
cout << "\n\nOkay. New Staff Member Data is Stored Successfully... ";
cout << "\n\nPress Any Key To Continue. " << getch();
o++;
}
/*======================================================================================================*/
void mainn ::check_appoint()
{
system("CLS");
string check_name;
cout << "Check Appointments Here..\n\n\n";
cout << "Enter Your Name : ";
cin.ignore();
getline(cin, check_name);
for (int n = 0; n <= i; n++)
{
if (check_name == name[n])
{
cout << "\n\nYour Name is : " << name[n];
cout << "\n\nYour Father Name is : " << fname[n];
cout << "\n\nYour CNIC No. is : " << cnic[n];
cout << "\n\nYour Address is : " << adress[n];
cout << "\n\nThe Doctor You Choose is : " << doctname[n];
cout << "\n\n\nPress any Key to Continue. " << getch();
}
}
}
/*=========================================================================================================*/
void mainn ::doct_appoint()
{
system("CLS");
cout << " =====DOCTOR APPOINTMENTS=====\n\n\n";
cout << "Enter Your Name : ";
cin.ignore();
getline(cin, name[i]);
cout << "\nEnter Your Father Name : ";
getline(cin, fname[i]);
cout << "\nEnter Your CNIC No. : ";
cin >> cnic[10];
cout << "\nEnter Your Address : ";
cin.ignore();
getline(cin, adress[i]);
cout << "\nEnter Doctor Name : ";
getline(cin, doctname[i]);
cout << "\n\nOkay. Your Appointment Is Approved. ";
cout << "\n\nPress Any Key To Continue. " << getch();
i++;
}
/*===========================================================================================================*/
void mainn ::doct_info()
{
system("CLS");
cout << "____________________________________DOCTORS INFORMATION____________________________________\n\n\n"
<< "===========================================================================================\n"
<< " Dr. Iftikhar Ahmad \n"
<< " (Heart Specialist) \n"
<< "\nTimings:\n"
<< "\n Monday to Friday 2PM to 10PM \n"
<< "\n Saturday 8AM to 1PM \n"
<< "\n Sunday 8AM to 9PM \n\n";
cout << "===========================================================================================\n"
<< " Dr. Mazhar Iqbal \n"
<< " (Child Specialist) \n"
<< "\nTimings:\n"
<< "\n Monday to Friday 2PM to 10PM \n"
<< "\n Saturday 8AM to 1PM \n"
<< "\n Sunday 8AM to 9PM \n\n";
cout << "===========================================================================================\n"
<< " Dr. Haroon Rasheed \n"
<< " (Stomach Specialist) \n"
<< "\nTimings:\n"
<< "\n Monday to Friday 2PM to 10PM \n"
<< "\n Saturday 8AM to 1PM \n"
<< "\n Sunday 8AM to 9PM \n\n";
cout << "Press Any Key To Continue " << getch();
// getch();
}
/*===========================================================================================================*/
void mainn ::main_menu()
{
int opt;
do
{
system("CLS");
cout << "\t\t--------------------------------------------------------\n";
cout << "\t\t||===============CITY HOSPITAL BUREWALA===============||\n";
cout << "\t\t--------------------------------------------------------\n";
cout << "\n\n\n";
cout << "1. Available Doctor Information.\n\n";
cout << "2. Doctor Appointment.\n\n";
cout << "3. Checking Patient's Appointment.\n\n";
cout << "4. Saving Staff Information\n\n";
cout << "5. Checking Staff's Information\n\n";
cout << "6. Exit.\n\n\n";
cout << "\t\tWhich Option You Want to Select : ";
cin >> opt;
switch (opt)
{
case 1:
doct_info();
break;
case 2:
doct_appoint();
break;
case 3:
check_appoint();
break;
case 4:
sav_staf_info();
break;
case 5:
show_staff_info();
break;
default:
cout << "Invalid Number.\n";
cout << "Please Choose Correct Option. ";
getch();
}
} while (opt != 6);
}
/*===========================================================================================================*/
int main()
{
system("CLS");
mainn M;
M.main_menu();
}