Computer Project: Hospital Management
Computer Project: Hospital Management
PROJECT
HOSPITAL
MANAGEMENT
Made by:
Amber Agarwal
XII-E
CERTIFICATE
Ms. Pooja
(Computer Teacher)
2
ACKNOWLEDEGMENT
Amber Agarwal
XII-E
3
INTRODUCTION
The HOSPITAL MANAGEMENT software is
very user- friendly and easy to operate. It adds
all the essential patient’s information to the
hospital database. The patient’s records are
referenced by the his/her own account name.
The patient can see his/her records by using
his/her account name.
• fstream.h
• string.h
• stdio.h
4
HARDWARE AND
SOFTWARE
SPECIFICATIONS
HARDWARE:
• Extended memory (minimum 1 MB )
• Hard disk required (minimum 5 MB of disk
space)
SOFTWARE:
• Microsoft Windows 95 or higher
• Turbo C++ (version 3.0)
• PC-DOS or MS-DOS (version 3.31 or higher)
• Microsoft Mouse Driver (version 7.04 or
higher) or Logitech Mouse Driver (version
5.01 or higher) or Genius Mouse Driver
(version 9.06 or higher)
5
OPERATING
INSTRUCTIONS
the instructions.
6
PROJECT LISTING
#include<iostream.h>
#include<conio.h>
#include<process.h>
#include<dos.h>
#include<fstream.h>
#include<string.h>
#include<stdio.h>
void title()
{
cout<<"\n";
for(int i=0;i<80;i++)cout<<"~";
cout<<"\t\t\t PRIME HOSPITAL RECORD DATABASE\n\n";
for(i=0;i<80;i++)cout<<"~";
}
void menu()
{
cout<<"\n\n";
cout<<"1. Enter a record\n\n2. View a record\n\n";
cout<<"3. Hospital Information\n\n4. Exit";
cout<<"\n\n\n\n\nEnter your choice:";
}
void welcomescreen()
{
clrscr();
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
for(int j=0;j<80;j++)cout<<"*";
cout<<"\n\n\n WELCOME TO THE\n";
cout<<"\n\n PRIME HOSPITAL DATABASE
RECORD\n\n\n";
for(j=0;j<80;j++)cout<<"*";
delay(1000);sound(1000);delay(200);sound(1100);delay(200);
sound(1000);delay(200);sound(1500);delay(250);nosound();
delay(2000);
}
void main()
{
7
welcomescreen();
clrscr();
char name[50];
int age;
char add[100];
int wardno;
int bedno;
long int admno;
char arvldate[20];
char ans;
title();
menu();
while(1)
{
clrscr();
title();
menu();
cin>>ans;
if(ans>='1'&& ans<='4')
{
sound(1900);delay(200);sound(1500);delay(200);nosound();
}
switch(ans)
{
case '1':clrscr();
title();
char ans1;
char fnam[50];
do
{
clrscr();
title();
cout<<"\n\nEnter a new account name: ";
gets(fnam);sound(1500);delay(100);nosound();
ofstream fout;
fout.open(fnam,ios::out);
cout<<"\n\n\n\n";
cout<<"NAME :";
gets(name);
cout<<"\n\nAGE :";
cin>>age;
cout<<"\n\nADDRESS :";
gets(add);
8
cout<<"\n\nHOSPITAL ADMISSION NUMBER :";
cin>>admno;
cout<<"\n\nWARD NUMBER :";
cin>>wardno;
cout<<"\n\nBED NUMBER :";
cin>>bedno;
cout<<"\n\nARRIVAL DATE :";
gets(arvldate);
fout<<"\n\nNAME :";
fout<<name;
fout<<"\n\nAGE :";
fout<<age;
fout<<"\n\nADDRESS :";
fout<<add;
fout<<"\n\nHOSPITAL ADMISSION NUMBER :";
fout<<admno;
fout<<"\n\nWARD NUMBER :";
fout<<wardno;
fout<<"\n\nBED NUMBER :";
fout<<bedno;
fout<<"\n\nARRIVAL DATE :";
fout<<arvldate;
fout.close();
sound(1900);delay(200);sound(1500);delay(200);nosound();
cout<<"\n\n\n\nWant to enter more records(y/n)?:";
cin>>ans1;sound(1500);delay(100);nosound();
}while(ans1=='y'||ans1=='Y');
break;
case '2':clrscr();
title();
char fam[50];
char line[80];
char ans2;
do{
clrscr();
title();
cout<<"\n\nEnter the account name: ";
gets(fam);
ifstream fin;
fin.open(fam,ios::binary);
fin.getline(line,80);
if(strlen(line)==0)
{
9
cout<<"\n\nNo such account exists!!!!!!!";
cout<<"\n\nPress any key to continue.......";
getch();
break;
}
cout<<line<<"\n";
fin.getline(line,80);cout<<line<<"\n";
fin.getline(line,80);cout<<line<<"\n";
fin.getline(line,80);cout<<line<<"\n";
fin.getline(line,80);cout<<line<<"\n";
fin.getline(line,80);cout<<line<<"\n";
fin.getline(line,80);cout<<line<<"\n";
fin.getline(line,80);cout<<line<<"\n";
fin.getline(line,80);cout<<line<<"\n";
fin.getline(line,80);cout<<line<<"\n";
fin.getline(line,80);cout<<line<<"\n";
fin.getline(line,80);cout<<line<<"\n";
fin.getline(line,80);cout<<line<<"\n";
fin.close();
sound(1900);delay(200);sound(1500);delay(200);nosound();
lab:
cout<<"\n\n\nWant to view more records(y/n)?:";
cin>>ans2;sound(1500);delay(100);nosound();
}while(ans2=='y'||ans2=='Y');
break;
case '3':clrscr();
title();
cout<<"\n INFORMATION";
cout<<"\n\n\n\n";
cout<<"ADDRESS : 35,Vasundhara Enclave\n";
cout<<" New Delhi\n";
cout<<" Pin : 110096\n\n\n";
cout<<"PHONE NUMBERS :";
cout<<" Emergency Number : 911\n\n";
cout<<" Reception : 011-22636543\n";
cout<<" : 011-22633552\n";
cout<<" : 011-22635125\n";
cout<<" : 011-22636943\n";
cout<<"\n\n\nPress any key to back to the main menu.....";
getch();
break;
case '4':exit(0);
default:clrscr();
10
title();
cout<<"\n\nWrong
Choice.......";sound(200);delay(500);nosound();
break;
}
}
getch();
}
11
LIMITATIONS AND
ASSUMPTIONS
Limitations:
• No date check is possible in this program.
• No graphical interface is possible in this
program.
Assumptions:
• In the ‘ARRIVAL DATE’, the date has to be
entered in the form: dd-mm-yyyy OR
dd/mm/yyyy.
12
IMPROVEMENTS
AND
ENHANCEMENTS
13