Sunteți pe pagina 1din 78

Submitted in partial fulfillment of the requirement of C.H.S.

E,
Odisha for the award of higher secondary certificate in
Computer Science.

Submitted by Under the Guidance of


Priyanka Sahoo Mrs. Banishree Mohapatra
Class- XII, Science Lecturer in
Roll No. : IS18-230 Dept. of Computer Science
Exam Roll No: 327MC217
Regd. No: MC27S18230

SAMANTA CHANDRA SEKHAR HIGHER SECONDARY


SCHOOL, PURI-752001, ODISHA

1
CERTIFICATE

This is to certify that Priyanka Sahoo , has completed her


Project work entitled “HOSPITAL MANAGEMENT SYSTEM” as
part of the paper “Computer Science” under my supervision and
guidance. I also certify that the project is in accordance with the
guidelines issued by C.H.S.E, Odisha.

To the best of my knowledge, it is an original of main and this


small project work is worthy consideration in partial fulfillment of the
requirement of C.H.S.E, Odisha of the award of Higher Secondary
Certificate in Science.

Signature of the Guide


Date:

2
ACKNOWLEDGEMENT

I take opportunity to express my heartiest gratitude to my


guide Mrs. Banishree Mohapatra, Lecturer in Computer Science,
for her inspiration and constant encouragement for completion of
my project. I am also indebted to the Principal of my college and
other teachers for their moral support and suggestions. I am highly
obliged to the Authors of the books “Computer Science” who are
real source of knowledge at my foundation stage of Science study.

I thank everyone who has lent a helping hand in the


preparation of project report. Finally, the entire project work is
dedicated to the God and my parents.

Priyanka Sahoo
Class- XII, Science
Roll No. : IS18-230
Exam Roll No: 327MC217
Regd. No: MC27S18230

3
A PROJECT WORK ON

NAME : PRIYANKA SAHOO

CLASS : XII, Science

CHSE ROLL NO. : 327MC217

REGD. NO. : MC27S18230

INSTITUTION : SAMANTA CHANDRA SEKHAR

HIGHER SECONDARY SCHOOL, PURI

EXAMINATION YEAR : 2019-20

(Signature of the Student with date of Submission) : Priyanka Sahoo Dt.

4
Name of the Guide
Mrs. Banishree
Mohapatra

Signature of Internal Signature of External


Examiner Examiner

DECLARATION

I Priyanka Sahoo of 2019-20 session of Samanta


Chandra Sekhar Higher Secondary School, Puri do here
by declare that the project entitled “LIBRARY
INFORMATION SYSTEM” submitted by me. For the
examination of XII, Science to be conducted by CHSE,
Odisha.

Priyanka Sahoo

5
Class- XII, Science
Roll No. : IS18-230
Exam Roll No: 327MC217
Regd. No: MC27S18230

CONTENTS

• INTRODUCTION TO C++
• OBJECTIVE
• SYSTEM DESIGN

6
• SYSTEM ANALYSIS
• CODING
• OUTPUT SCREENS
• SCOPE AND FUTURE
• BIBLIOGRAPHY

'

INTRODUCTION to C++

7
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 gives accurate data.
It not only reduces the work load of the employees but also
makes the work very neat and clean.

8
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.

9
-: SYSTEM DESIGN:-

10
1TECHNICAL FEASIBILITY:

a.MINIMUM HARDWARE 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.

2 ECONOMIC FEASIBILITY:
Any company/ workstation platform can provide
this much technical feasibility. Therefore this project is

. technically feasible
3 OPERATION FEASIBILITY:

11
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.

12
SYSTEM ANALYSIS

Modules and their description:

1 Display 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.

2 Display 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.

3 Addition of a new record :-


This module gives you the facility to add a new
record in the admission system. After imputing the

13
necessary details of the patient it will automatically
save the record.

4 Deletion 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.

5 Modification of a Record :-
In case of a mistake in the entire of a record, you
can edit the record this module.

6 Unit Wise Record :-


If you want see all the records of a particular unit,
then you have to use this option.

7 Doctor Wise Reord :-


By this option one can see all the patient’s records
that are undergoing treatment under a particular
doctor.

14
8 Bed Wise Record :-
In this option you have to enter the bed number of
a patient and his whole record will appear on the
screen.

9 Disease 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.

15
DISPLAY
ENTIRE
PATIENT'S

LIST.

DISPLAY
UNIT WISE
ONLY A
RECORD.
PATIENT'S

LIST.

DOCTOR
WISE ADDITION OF
RECORD.
RECORD. MENU

DISEASE
WISE

DELEITION OF
RECORD.
RECORD.

16
BED WISE MODIFICATION
RECORD. OF RECORD.

17
-: FEASIBILITY STUDY:-

: CODING:-

#include<iostream.h>

#include<conio.h>

#include<ctype.h>

#include<iomanip>

#include<stdio.h>

#include<fstream>

#include<string.h>

#define max 200

struct hospital

char name[25];

char sex[6];

int age;

char add_date[20];

char address[50];

char phone[20];

18
char bed[20];

char doc[25];

char disease[20];

char doc_phone[20];

char release[20];

char doc_address[50];

char unit[10];

};

void reading(char fname[10])

struct hospital patient;

ifstream infile;

infile.open(fname,ios::in);

int n=0;

int i=0;

i=sizeof(patient);

infile.seekg(0,ios::end);

n=infile.tellg();

int j=0;

19
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;
20
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();

21
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?-->";

22
cin>>n;

cout<<"\n Enter the following information..\n\n"; 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);

23
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<<"\n\n
Storing on to the file...\n\n";

cout<<"\n\n 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]));

24
infile.close();

void unit1(char fname[20])

25
{

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<<"\n\n 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)

26
{

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->"

27
<<patient.doc_phone;

cout<<"\nDoctore Address-

>"<<patient.doc_address;

getch();

clrscr();

infile.close();

28
}

void menu(void)

cout<<"\n\n WELCOME TO OUR HOSPITAL PATIR\ENT ADDMISSION


SYSTEM\N\N ";

cout<<"===========================================

=============\n";

cout<<" ***** Menu ** \n\n";

cout<<" What do you annt do,please insert the charcater \n\n";

cout<<" A->Addition of new Record\n\n";

cout<<" C->Complete display thepresent List\n";

cout<<" R->Display onle present Recored\n\n";

cout<<" D->Delete of the present record\n";

cout<<" U->Unit wise present record\n";

cout<<" x->Disese wise present report\n\n";

cout<<" Z->Doctor wise present \n";

cout<<" Q->Quit\n";

cout<<"===========================================

======\n";

cout<<" Option please-->";

void modi(char fname[10])

29
{

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)

30
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;

31
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)

32
tfile.write((char*)&patient,sizeof(patient));

clrscr();

33
} 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-->";


34
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;

35
ifstream infile;

36
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 Disease of thr Present-> ";


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)

cout<<"\nPatient Name->

37
"<<patient.name;

cout<<"\nAge->"<<patient.age;

cout<<"\nSex->"<<patient.sex;

cout<<"\nAddress-

>"<<patient.address;

cout<<"\nTelephone No-

>"<<patient.phone;

cout<<"\nDisease-

>"<<patient.diseae;

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-

38
>"<<patient.doc_address;

getch();

clrscr();

} infile.close();

39
}

void doc(char fname[30])

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 Doctore Name-> ";

fflush(stdin);

gets(name1);

fflush(stdin);

cout<<"\nYou want record is Here--> ";

40
for(int t=0;t<=j-1;++t)

infile.read((char*)&patient,sizeof(patient));

if(strcmp(name1,patient.disease)==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;

cout<<"\nAddimision Data-

>"<<patient.add_date;

cout<<"\nDate of Release-

>"<<patient.realease;

cout<<"\nBed No-

>"<<patient.bed;

41
cout<<"\nUnit->"<<patient.unit;

cout<<"\nDoctore

Name"<<patient.doc;

cout<<"\nDoctore Ph No->"

<<patient.doc_phone;

cout<<"\nDoctore Address-

>"<<patient.doc_address;

42
getch();

clrscr();

infile.close();

void add12(char fname[30])

struct hospital patient;

fstream infile;

infile.open(fname,ios::in);

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-->";

43
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-->";

44
fflush(stdin);

gets(patient.unit);

fflush(stdin);

infile.write((char*)&patient,sizeof(patient));

45
infile.close();

void delete1(char fname[20])

struct hospital patient;

ifstream infile;

infile.open(fname,ios::in);

cout<<" Reading From 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);

char name1[30];

for(int t=0;t<=j-1;++t)

infile.read((char*)&patient,sizeof(patient));
cout<<" Record Number--> "<<(t+1);

46
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.diseae;

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;

47
cout<<"\nDoctore Address-

>"<<patient.doc_address;

getch();

clrscr();

48
infile.close();

infile.open(fname,ios::in);

tfile.open("temp1",ios::out);

cout<<"\n Enter the Name of the patient-> ";


cout<<"\n Record Deleted";

fflush(stdin);

gets(name1);

fflush(stdin);

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();

} infile.close(); tfile.close();
remove(fname);
rename("temp1",fname);

cout<<"\n Enter Doctore Name-> ";


fflush(stdin);

49
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)

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;

cout<<"\nAddimision Data-

>"<<patient.add_date;

cout<<"\nDate of Release-

>"<<patient.realease;
50
cout<<"\nBed No-

>"<<patient.bed;

51
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 display(char fname[30])

struct hospital patient;

ifstream infile;

fstream tfile;

infile.open(fname,ios::in);

cout<<" Reading From the File--> ";

52
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);

for(int t=0;t<=j-1;++t)

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-

53
>"<<patient.diseae;

cout<<"\nAddimision Data-

>"<<patient.add_date;

cout<<"\nDate of Release-

>"<<patient.realease;

54
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;

55
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<<"\n\n 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;

56
cout<<"\nAddress-

>"<<patient.address;

cout<<"\nTelephone No-

>"<<patient.phone;

cout<<"\nDisease-

>"<<patient.diseae;

57
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()

{
58
clrscr();

char fname[20];

cout<<"\n\n 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();

59
add12(fname);

menu();

getch();

break;

60
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;

61
}

62
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.

63
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 ->

64
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->

65
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->

66
67
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) ->

68
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 ->

69
DOCTOR’S ADDRESS ->

70
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 ->

71
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) ->

72
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) ->

73
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 ->

74
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.

75
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.


76
77
78

S-ar putea să vă placă și