2. PEOJECT: - The word merely means “a
research work worked out in a scientific but in an
extensive manner”.
While doing a project, a particular topic is to
be brought. It is generally initiated to go on an in
depth study on a particular subject in a very
meticulous way. Doing a project on a particular
topic assigned to a particular subject needs total
understanding of the topic.
“Project is a problematic act carried to its
conclusion in its natural setting”. Learning by
doing seems to be very effective tool for a
student to develop a thread-bare idea on the
topic.
ACKNOWLEDGEMENT: - I am AMAN
GUPTA in “NORTH POINT SENIOR SECONDARY
BOARDING SCHOOL” I have got a GOLDEN
OPPERTUNITY to complete this Computer
Science Project on the topic of “HOSPITAL
MANAGEMENT” our respected teacher” MINTU
GHOSH .
3. Your’s sincerely…..
INTRORUCTION:-
This project is based on the “Hospital Management
System”. More specifically it is a project based on
patient’s admission system in a hospital. The program
gives many options which help the user for an easier
and faster access to the records. It has many beneficial
options like bed wise report, within a few seconds. The
output provided is easily understandable.
The main disadvantage of manual system is that the
papers and files occupy a huge space whereas a
computer needs a small table only.
Through computer one can access the records very
quickly. Also it
4. gives accurate data. It not only reduces the work load
of the employees but also makes the work very neat
and clean.
OBJECTIVE:-
The main objective of this program is to provide:-
Faster access to the record.
Providing accurate and understandable outputs.
Providing maximum information by inputting
minimum information.
-: SYSTEM DESIGN:-
1TECHNICAL FEASIBILITY:
5. aMINIMUM HARD WARE
EXPERIMENT :
For this project we require a 350 MHz
processor, 32 MB DRAM/DDRAM, hard disk
space of 300 MB, 1.44MB floppy drive, CD-
ROM drive (optional).peripheral input/output
devices like monitor, keyboard, mouse and
printer (optional).
b MINIMUM SOFTWARE
REQUIREMENT:
A Windows/ dos based operating system with
Turbo C++
Compiler.
2ECONOMIC FEASIBILITY:
Any company/ workstation platform can
provide this much technical feasibility. Therefore
this project is
technically feasible
.
3OPERATION FEASIBILITY:
This project is very user friendly. One can handle this
very easily. The project itself guides the user. The
program itself interacts with the user by
understandable message. The user is only responsible
for providing the input data values and rest everything
is the program’s responsibility.
6. SYSTEM ANALYSIS
Modules and their description:
1Display the Entire patient list :-
Through this option one can see the whole
patient list that has been inserted.
In this program you will see it one by one
with record numbers. After seeing a record if
you press any key another record will appear
in front of you.
2Display Only a Patients List :-
Through this facility one can see only the
desired patient’s record .This module will
help you finding the record very quickly just
by imputing the patient’s name.
3Addition of a new record :-
This module gives you the facility to add a
new record in the admission system. After
imputing the necessary details of the patient
it will automatically save the record.
4Deletion of a Record :-
This option allows you to delete unwanted
records. In my program you will able to see
all the records one by one and then you can
delete the desired record.
5Modification of a Record :-
7. In case of a mistake in the entire of a record,
you can edit the record this module.
6Unit Wise Record :-
If you want see all the records of a particular
unit, then you have to use this option.
7Doctor Wise Reord :-
By this option one can see all the patient’s
records that are undergoing treatment under
a particular doctor.
8Bed Wise Record :-
In this option you have to enter the bed
number of a patient and his whole record will
appear on the screen.
9Disease Wise Record :-
If you enter the name of a particular disease,
then the entire patient’s record of that
disease will appear on the screen.
10 Menu :-
The complete program is run by a menu.
When you run the program, first you have to
encounter with the menu. There you have to
insert a single character such as ‘A’ for
addition and that function will start running.
10. j=(n/i);
infile.seekg(0);
fflush(stdin);
char name11[20];
cout<<"n Enter Name of the patient-> ";
fflush(stdin);
gets(name11);
fflush(stdin);
cout<<"nYou want record is Here--> ";
for(int t=0;t<=j-1;++t)
{
infile.read((char*)&patient,sizeof(patient));
if(strcmp(name11,patient.name)==0)
{
cout<<"nPatient Name->
"<<patient.name;
cout<<"nAge->"<<patient.age;
cout<<"nSex->"<<patient.sex;
cout<<"nAddress-
>"<<patient.address;
cout<<"nTelephone No-
>"<<patient.phone;
cout<<"nDisease-
>"<<patient.disease;
cout<<"nAddimision Data-
>"<<patient.add_date;
cout<<"nDate of Release-
>"<<patient.release;
cout<<"nBed No-
>"<<patient.bed;
cout<<"nUnit->"<<patient.unit;
cout<<"nDoctore
Name"<<patient.doc;
cout<<"nDoctore Ph No->"
<<patient.doc_phone;
cout<<"nDoctore Address-
>"<<patient.doc_address;
getch();
clrscr();
}
infile.close();
}
}
void addition(char fname[10])
{
struct hospital patient[max];
ifstream infile;
int i=0, n=0;
fflush(stdin);
cout<<"n How Many Records Are To Be Stored?-->";
11. cin>>n;
cout<<"n Enter the following information..nn";
for (i = 0; i < n-1; ++i)
{
cout<<"n Name-->";
gets(patient[i].name);
cout<<"n Sex (M/F)-->";
cin>>patient[i].sex;
cout<<"n Age-->";
cin>>patient[i].age;
cout<<"n Addmission Date of the Patient-->";
gets(patient[i].add_date);
cout<<"n Phone Number of the Patient-->";
gets(patient[i].phone);
cout<<"n Bed Number-->";
cin>>patient[i].bed;
cout<<"n DOCTOR's Name-->";
fflush(stdin);
gets(patient[i].doc);
fflush(stdin);
cout<<"n Disease-->";
fflush(stdin);
gets(patient[i].disease);
fflush(stdin);
cout<<"n DOCTOR's Phone Number-->";
fflush(stdin);
gets(patient[i].doc_phone);
fflush(stdin);
cout<<"n Date of Release from the Hospital-->";
fflush(stdin);
gets(patient[i].release);
fflush(stdin);
cout<<"n DOCTOR's Address-->";
fflush(stdin);
gets(patient[i].doc_address);
fflush(stdin);
cout<<"n Unit-->";
fflush(stdin);
gets(patient[i].unit);
fflush(stdin);
}
infile.open(fname,ios::app);
cout<<"nn Storing on to the file...nn";
cout<<"nn Do you want to return to main menu... Press any key";
for(i=0;i<=n-1;i++)
{
infile.write((char*)&patient[i],sizeof(patient[i]));
}
infile.close();
}
void unit1(char fname[20])
12. {
struct hospital patient;
ifstream infile;
infile.open(fname,ios::in);
int n=0,i=0;
i=sizeof(patient);
infile.seekg(0,ios::end);
n=infile.tellg();
int j=0;
j=(n/i);
infile.seekg(0);
fflush(stdin);
fflush(stdin);
char name1[30];
cout<<"n Enter the number of bed-->";
fflush(stdin);
gets(name1);
cout<<"nn Your wanted record is here-->";
for(int t=0;t<=j-1;++t)
{
infile.read((char*)&patient,sizeof(patient));
if(strcmp(name1,patient.bed)==0)
{
cout<<"nPatient Name->
"<<patient.name;
cout<<"nAge->"<<patient.age;
cout<<"nSex->"<<patient.sex;
cout<<"nAddress-
>"<<patient.address;
cout<<"nTelephone No-
>"<<patient.phone;
cout<<"nDisease-
>"<<patient.disease;
cout<<"nAddimision Data-
>"<<patient.add_date;
cout<<"nDate of Release-
>"<<patient.release;
cout<<"nBed No-
>"<<patient.bed;
cout<<"nUnit->"<<patient.unit;
cout<<"nDoctore
Name"<<patient.doc;
cout<<"nDoctore Ph No->"
<<patient.doc_phone;
cout<<"nDoctore Address-
>"<<patient.doc_address;
getch();
clrscr();
}
infile.close();
}
13. }
void menu(void)
{
cout<<"nn WELCOME TO OUR HOSPITAL PATIRENT ADDMISSION
SYSTEMNN ";
cout<<"===========================================
=============n";
cout<<" ***** Menu ** nn";
cout<<" What do you annt do,please insert the charcater nn";
cout<<" A->Addition of new Recordnn";
cout<<" C->Complete display thepresent Listn";
cout<<" R->Display onle present Recorednn";
cout<<" D->Delete of the present recordn";
cout<<" U->Unit wise present recordn";
cout<<" x->Disese wise present reportnn";
cout<<" Z->Doctor wise present n";
cout<<" Q->Quitn";
cout<<"===========================================
======n";
cout<<" Option please-->";
}
void modi(char fname[10])
{
struct hospital patient;
ifstream infile;
fstream tfile;
infile.open(fname,ios::in);
cout<<" Reading Feom the File--> ";
int n=0,i=0;
i=sizeof(patient);
infile.seekg(0,ios::end);
n=infile.tellg();
int j=0;
j=(n/i);
infile.seekg(0);
fflush(stdin);
fflush(stdin);
char name1[30];
for(int t=0;t<=j-1;++t)
{
14. infile.read((char*)&patient,sizeof(patient));
cout<<" Record Number--> "<<(t+1);
cout<<"n===============================n";
cout<<"nPatient Name->
"<<patient.name;
cout<<"nAge->"<<patient.age;
cout<<"nSex->"<<patient.sex;
cout<<"nAddress-
>"<<patient.address;
cout<<"nTelephone No-
>"<<patient.phone;
cout<<"nDisease-
>"<<patient.disease;
cout<<"nAddimision Data-
>"<<patient.add_date;
cout<<"nDate of Release-
>"<<patient.release;
cout<<"nBed No-
>"<<patient.bed;
cout<<"nUnit->"<<patient.unit;
cout<<"nDoctore
Name"<<patient.doc;
cout<<"nDoctore Ph No->"
<<patient.doc_phone;
cout<<"nDoctore Address-
>"<<patient.doc_address;
getch();
clrscr();
}
infile.close();
infile.open(fname,ios::in);
tfile.open("temp1",ios::out);
cout<<"n Enter the Name of the patient to modified->
";
fflush(stdin);
gets(name1);
fflush(stdin);
cout<<"nYou want record is Here--> ";
for(int t=0;t<=j-1;++t)
{
infile.read((char*)&patient,sizeof(patient));
if(strcmp(name1,patient.disease)!=0)
{
tfile.write((char*)&patient,sizeof(patient));
}
clrscr();
15. } infile.close();
tfile.close();
remove(fname);
rename("temp1",fname);
infile.open(fname,ios::app);
cout<<"nEnter the following information-->n";
cout<<"n Name-->";
gets(patient[i].name);
cout<<"n Sex (M/F)-->";
cin>>patient[i].sex;
cout<<"n Age-->";
cin>>patient[i].age;
cout<<"n Addmission Date of the Patient-->";
gets(patient[i].add_date);
cout<<"n Phone Number of the Patient-->";
gets(patient[i].phone);
cout<<"n Bed Number-->";
cin>>patient[i].bed;
cout<<"n DOCTOR's Name-->";
fflush(stdin);
gets(patient[i].doc);
fflush(stdin);
cout<<"n Disease-->";
fflush(stdin);
gets(patient[i].disease);
fflush(stdin);
cout<<"n DOCTOR's Phone Number-->";
fflush(stdin);
gets(patient[i].doc_phone);
fflush(stdin);
cout<<"n Date of Release from the Hospital-->";
fflush(stdin);
gets(patient[i].release);
fflush(stdin);
cout<<"n DOCTOR's Address-->";
fflush(stdin);
gets(patient[i].doc_address);
fflush(stdin);
cout<<"n Unit-->";
fflush(stdin);
gets(patient.unit);
fflush(stdin);
infile.write((char*)&patient,sizeof(patient));
infile.close();
}
void disease(char fname[20])
{
struct hospital patient;
ifstream infile;
22. cout<<"nBed No-
>"<<patient.bed;
cout<<"nUnit->"<<patient.unit;
cout<<"nDoctore
Name"<<patient.doc;
cout<<"nDoctore Ph No->"
<<patient.doc_phone;
cout<<"nDoctore Address-
>"<<patient.doc_address;
getch();
clrscr();
}
infile.close();
}
void bed(char fname[20])
{
struct hospital patient;
ifstream infile;
infile.open(fname,ios::in);
int n=0,i=0;
i=sizeof(patient);
infile.seekg(0,ios::end);
n=infile.tellg();
int j=0;
j=(n/i);
infile.seekg(0);
fflush(stdin);
fflush(stdin);
char name1[30];
cout<<"n Enter the number of bed-->";
fflush(stdin);
gets(name1);
cout<<"nn Your wanted record is here-->";
for(int t=0;t<=j-1;++t)
{
infile.read((char*)&patient,sizeof(patient));
if(strcmp(name1,patient.bed)==0)
{
cout<<"nPatient Name->
"<<patient.name;
cout<<"nAge->"<<patient.age;
cout<<"nSex->"<<patient.sex;
cout<<"nAddress-
>"<<patient.address;
cout<<"nTelephone No-
>"<<patient.phone;
cout<<"nDisease-
>"<<patient.diseae;
23. cout<<"nAddimision Data-
>"<<patient.add_date;
cout<<"nDate of Release-
>"<<patient.realease;
cout<<"nBed No-
>"<<patient.bed;
cout<<"nUnit->"<<patient.unit;
cout<<"nDoctore
Name"<<patient.doc;
cout<<"nDoctore Ph No->"
<<patient.doc_phone;
cout<<"nDoctore Address-
>"<<patient.doc_address;
getch();
clrscr();
}
infile.close();
}
}
void main()
{
clrscr();
char fname[20];
cout<<"nn Enter the file to be stored";
fflush(stdin);
gets(fname);
fflush(stdin);
clrscr();
char ch;
menu();
while((ch=toupper(getchar()))!='Q')
{
switch(toupper(ch))
{
case 'M' : clrscr();
modi(fname);
menu();
getch();
break;
case 'C' : clrscr();
display(fname);
menu();
getch();
break;
case 'A' : clrscr();
add12(fname);
menu();
getch();
break;
24. case 'R' : clrscr();
reading(fname);
menu();
getch();
break;
case 'D' : clrscr();
delete1(fname);
menu();
getch();
break;
case 'U' : clrscr();
unit1(fname);
menu();
getch();
break;
case 'B' : clrscr();
bed(fname);
menu();
getch();
break;
case 'X' : clrscr();
desease(fname);
menu();
getch();
break;
case 'Z' : clrscr();
doc(fname);
menu();
getch();
break;
}
}
}
25. REPORTS
OUTPUT SCREENS:-
MENU SCREEN:
-: WELCOME TO OUR HOSPITAL’S PATIENT ADMISSION
SYSTEM:-
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
=*=*=*=*=*=*=*=*=*=*=*
********MENU********
What do you want to do, please insert that character?
A -> Addition of new record.
C -> Complete display of the patient list.
R -> Display only a patient’s record.
M ->Modification of a patient’s record.
D -> Deletion of a patient’s record.
U -> Unit wise report.
B -> Bed wise report.
X -> Disease wise report.
Z -> doctor wise report.
Q -> Quit.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
=*=*=*=*=*=*=*=*=*=*=*=
Option Please ->
ADDITION OF RECORD:
HOW MANY RECORDS ARE TO BE MADE->
NAME ->
SEX (M/F) ->
AGE ->
ADMISSION DATE OF THE PATIENT ->
26. PHONE NUMBER OF THE PATIENT ->
RECORD NUMBER->
============================================
PATIENT’S NAME ->
AGE ->
SEX (M/F) ->
ADMISSION DATE OF THE PATIENT ->
PHONE NUMBER OF THE PATIENT ->
BED NUMBER ->
DOCTOR’S NAME ->
DISEASE ->
DOCTOR’S PHONE NUMBER ->
DATE OF RELEASE FROM THE HOSPITAL ->
DOCTOR’S ADDRESS ->
UNIT ->
Enter the Name of the Patient->
Record Deleted ->
UNIT WISE REPORT:
Enter the Unit ->
Your Wanted Record Is Here ->
PATIENT’S NAME ->
AGE ->
SEX (M/F) ->
ADMISSION DATE OF THE PATIENT ->
PHONE NUMBER OF THE PATIENT ->
BED NUMBER ->
DOCTOR’S NAME ->
DISEASE ->
DOCTOR’S PHONE NUMBER ->
DATE OF RELEASE FROM THE HOSPITAL ->
DOCTOR’S ADDRESS ->
UNIT ->
BED WISE REPORT:
Enter the Number of the Bed->
27. Your Wanted Record Is Here ->
BED NUMBER ->
DOCTOR’S NAME ->
DISEASE ->
DOCTOR’S PHONE NUMBER ->
DATE OF RELEASE FROM THE HOSPITAL ->
DOCTOR’S ADDRESS ->
UNIT ->
Storing onto the file…………….
Do You To Return To Main Menu, Press Any Key?
COMPLETE DISPLAY OF RECORDS:
Reading from the File…………
RECORD NUMBER ->
============================================
==========
PATIENT’S NAME ->
AGE ->
SEX (M/F) ->
ADMISSION DATE OF THE PATIENT ->
PHONE NUMBER OF THE PATIENT ->
BED NUMBER ->
DOCTOR’S NAME ->
DISEASE ->
DOCTOR’S PHONE NUMBER ->
DATE OF RELEASE FROM THE HOSPITAL ->
DOCTOR’S ADDRESS ->
UNIT ->
DISPLAY A SINGLE PATIENT LIST:
Enter the Name of the Patient
PATIENT’S NAME ->
AGE ->
SEX (M/F) ->
ADMISSION DATE OF THE PATIENT ->
PHONE NUMBER OF THE PATIENT ->
BED NUMBER ->
DOCTOR’S NAME ->
DISEASE ->
DOCTOR’S PHONE NUMBER ->
DATE OF RELEASE FROM THE HOSPITAL ->
DOCTOR’S ADDRESS ->
28. UNIT ->
MODIFICATION OF RECORDS:
Reading from the File…………
RECORD NUMBER ->
============================================
==========
PATIENT’S NAME ->
AGE ->
SEX (M/F) ->
ADMISSION DATE OF THE PATIENT ->
PHONE NUMBER OF THE PATIENT ->
BED NUMBER ->
DOCTOR’S NAME ->
DISEASE ->
DOCTOR’S PHONE NUMBER ->
Enter the Name of the Patient
PATIENT’S NAME ->
AGE ->
SEX (M/F) ->
ADMISSION DATE OF THE PATIENT ->
PHONE NUMBER OF THE PATIENT ->
BED NUMBER ->
DOCTOR’S NAME ->
DISEASE ->
DOCTOR’S PHONE NUMBER ->
DATE OF RELEASE FROM THE HOSPITAL ->
DOCTOR’S ADDRESS ->
UNIT ->
DELETION OF RECORD
Reading from the File…………
PATIENT’S NAME ->
AGE ->
SEX (M/F) ->
29. ADMISSION DATE OF THE PATIENT ->
PHONE NUMBER OF THE PATIENT ->
BED NUMBER ->
DOCTOR’S NAME ->
DISEASE ->
DOCTOR’S PHONE NUMBER ->
DATE OF RELEASE FROM THE HOSPITAL ->
DOCTOR’S ADDRESS ->
UNIT ->
DISEASE WISE REPORT:
Enter the disease of the patient ->
Your Wanted Record Is Here ->
PATIENT’S NAME ->
AGE ->
SEX (M/F) ->
ADMISSION DATE OF THE PATIENT ->
PHONE NUMBER OF THE PATIENT ->
BED NUMBER ->
DOCTOR’S NAME ->
DISEASE ->
DOCTOR’S PHONE NUMBER ->
DATE OF RELEASE FROM THE HOSPITAL ->
DOCTOR’S ADDRESS ->
UNIT ->
DOCTOR WISE REPORT:
The Doctor’s Name ->
Your Wanted Record Is ->
30. PATIENT’S NAME ->
AGE ->
SEX (M/F) ->
ADMISSION DATE OF THE PATIENT ->
PHONE NUMBER OF THE PATIENT ->
BED NUMBER ->
DOCTOR’S NAME ->
DISEASE ->
DOCTOR’S PHONE NUMBER ->
DATE OF RELEASE FROM THE HOSPITAL ->
DOCTOR’S ADDRESS ->
UNIT ->
-: SCOPE AND FUTURE:-
Internet/Intranet based application
Data Waterhouse and data mining facilities can
be added in future.
The project can be upgraded much more user
friendly and graphics oriented applications.
Example -> V.C++
This project can be implemented as multi –
user system.
BIBLIOGRAPHY
Computer Science with C++ -- Sumita Arora.
C++ projects and practical -- Sumita Arora.
Programming with C++ -- D. Ravichandran.