Professional Documents
Culture Documents
On
To
UTTARANCHAL UNIVERSITY
BSc.-IT(2020-23)
ACKNOWLEDGEMENT
The most awaited moment of any endeavor is successful completion, but nothing
can be done successfully if done alone. Success is the outcome of contribution
and consistent help of various persons and we thank those ones who helped us in
successful completion of this project.
Primarily, we would like to Prof (Dr). Pradeep Suri, Director UIM for providing
a healthy and encouraging environment to study.
Aman Tomar
Aditya Kamboj
DECLARATION
Aman Tomar
Aditya Kamboj
CERTIFICATE OF ORIGINALITY
This is to certify that Aman Tomar & Aditya Kamboj student of BSc.-IT
1st Semester, at Uttaranchal Institute of Management, Dehradun, has
completed the Project titled HOSPITAL MANAGEMENT SYESTEM using
Codeblocks v20.03,Eclipse IDE, Turbo c IDE and MySQL for the Batch (2020-
23)
[Assistant Professor]
TABLE OF CONTENTS
SNO. CONTENT PAGE NO.
i. Acknowledgment I
ii. Declaration II
1. Introduction 1.
2. Objective 2.
Module 4 serach
Module 7 Exit
1.INTRODUCTION
Diagnosis details; while system output is to get these details on to the CRT screen.
for every patient and stores the details of every patient and the staff
automatically. It includes a search facility to know the current status of each
room. User can search availability of a doctor and the details of a patient using
the id.
Traditionally, it was done manually. The main function of the system is to register
and store patient details and doctor details and retrieve these details as and when
required, and also to manipulate these details meaningfully System input contains
patient details
2.OBJECTIVE
1. The system will be less probable to make mistake, since it’s a machine:
4.To provide regular updates on latest software.-Means that admin can add
patient record any time to the software and user can access it to their ease.
3.HARDWARE AND SOFTWARE USED
Hardware Used:-
Software Used:-
• Codeblocks v20.03
• Eclipse IDE for Enterprise C Developers - 2020-09
• Turbo c++
• Operating System :Windows 10
4. Main Features of the Project:
• The user can perform all the CRUD operations such as Add, Edit, Delete
and View patient’s record.
• They can add the details by entering a patient’s name, disease name,
phone number, and cabin number, etc.
• Moreover, the user can also view all the records of the patients that are
recorded.
• Besides, they can also edit information and delete patient record in the
system.
• All the details that are related to the patient can be searched by their
name, age, disease, cabin number.
This project basically creates an external file for the permanent storage of the
user data. Thus, the system is developed using the C programming language and
various variables, strings are used to develop it.
5. scope of the project hospital management system
It may help colleting perfect management in details. In very short time, the
collection will be obvious, simple and sensible. It will help a person to know the
management of passed year perfectly and vividly. It also helps in current all works
relative to hospital management system. It will be also reduced the cost of
colleting the management
• In computer system the person has to fill the various forms and number of
copies of the form can be easily generated at a time
• In computer system, it is not necessary to create the manifest but we can
directly print it, which save our time.
• To assist the staff in capturing the effort spent on their respective working
areas.
• To utilize resources in an efficient manner by increasing their abroad
productivity thought Automation.
• the system generates types of information that can be used for various
purpose.
• It safety the user requirement be easy to understand by the user and
operator be easy to operate.
• have a good user interface.
• be Expendable.
• delivered on schedule within the budget.
6. Modules of hospital Management system
This mini project, like any other, is built without graphics and comes with simple
file handling operations. The key features in hospital management system are:
In this feature, user can add a new patient record choosing between O.P.D. service
and Emergency service. In O.P.D. service (shown in output screen below), name,
address, age, sex, disease description and specialist room number to be referred
are available. Thus given information is stored in file. The information to be given
are same in Emergency service.
In this mini project, two features – searching and editing patient records are
placed under a single feature. User can search or edit via. Record number of the
patient or his/her full name.
All the information corresponding to the respective patient are displayed. These
include the ones provided while adding a new patient record. If wrong
information about record number or patient full name is provided, the program
displays a message saying that no records were available.
Also, user can view the list of expenditures of the particular patient whose record
is sought. In the program, the financial information include total charge, total
deposited and total money to return.
As in the two features mentioned above, user can view financial records
corresponding to any particular patient listed according to any one of the four
options mentioned above. Pressing ‘Enter’ user can view the records of next
patients.
This features allows user to delete added record of any patient. For this the patient
number to be removed is to be provided. Upon ‘Enter’, user can view the patient
record and the financial records of the patient. To delete the record, press ‘Enter’
and the respective patient record will be deleted from the file.
5. Exit
Last option is exit after fill all detail’s we use exit function.
8.
1.Advantages
• communication more effective patient
• information available 24 hours
• cost effectiveness
• faster than manual system
2.Disadvantage
1. One of the greatest disadvantages is related to the security. It is a common
matter of concern, if you go online without enough protection that can create big
security problem. The data breach is one of the greatest problems of health care
industry and is considered as the most sophisticated problem.
#include<stdio.h>
#include<string.h>
struct ad
{
char name[30];
char disease[30];
int cabin,phone,age;
} x[100];
int n,i,j=0,a=0,sum=0,g,flag,num;
void read();
void add();
void view();
void search();
void edit();
void del();
void show();
int main()
{
read();
int c,i,q;
printf("Simple Hospital Management System\n");
int m,n;
//making out the pattern
void view()
{
for(i=0; i<num; i++)
{
printf("\n");
printf("Serial Number=%d\n",i);
printf("Name = ");
puts(x[i].name);
printf("Disease = ");
puts(x[i].disease);
printf("Cabin no = %d\nPhone number = 0%d\nAge=%d",x[i].cabin,x[i].phone,x[i].age);
printf("\n\n");
}
}
void edit()
{
int q,p;
fflush(stdin);
printf("What do you want to edit ?\n");
printf("Enter your option\n");
printf("1.Name\n2.Disease\n3.Age\n4.Cabin\n5.Phone no.\n");
printf("Option=");
scanf("%d",&q);//option
if(q<=5)
{
printf("Enter the serial no of that patient= (0 - %d)=",num-1);
scanf("%d",&p);//serial number
if(p<num)
{
if(q==1)
{
fflush(stdin);
printf("Enter the new name=");
gets(x[p].name);
}
else if(q==2)
{
fflush(stdin);
printf("Enter the new Disease=");
gets(x[p].disease);
}
else if(q==3)
{
fflush(stdin);
printf("Enter the new Age=");
scanf("%d",&x[p].age);
}
else if(q==4)
{
fflush(stdin);
printf("Enter the new Cabin no=");
scanf("%d",&x[p].cabin);
}
else if(q==5)
{
fflush(stdin);
printf("Enter the new Phone no =");
scanf("%d",&x[p].phone);
}
}
else
{
printf("\n\nInvalid Serial \nTry Again !!\n\n");
}
}
else
{
printf("\n\nInvalid option\nTry Again!!\n\n");
}
}
void search()
{
int s,h,f;
char u[100];
printf("By what do you want to search ?\n");
printf("1.Serial no.\n2.Name\n3.Disease\n4.Cabin no.\n5.Phone no.\n6.Age\n\nOption = ");
scanf("%d",&h);
if(h==1)
{
printf("Enter Serial number of the patient=");
scanf("%d",&s);
if(s<num)
{
printf("\n");
printf("Serial Number=%d\n",s);
printf("Name = ");
puts(x[s].name);
printf("Disease = ");
puts(x[s].disease);
printf("Cabin no = %d\nPhone number = 0%d\nAge = %d",x[s].cabin,x[s].phone,x[s].age);
printf("\n\n");
}
else
printf("\n\nNot Found\n\n");
}
else if(h==2)//problem is here.........
{
int f=1;
fflush(stdin);
printf("Enter your name=");
gets(u);
fflush(stdin);
for(g=0; g<num; g++)
{
if(strcmp(u,x[g].name)==0)
{
printf("\n");
printf("Serial Number=%d\n",g);
printf("Name = ");
puts(x[g].name);
printf("Disease = ");
puts(x[g].disease);
printf("Cabin no = %d\nPhone number = 0%d\nAge = %d",x[g].cabin,x[g].phone,x[g].age);
printf("\n\n");
f=0;
}
}
if(f==1)
printf("\nNot Found\n");
}
else if(h==3)
{
int f=1;
fflush(stdin);
printf("Enter Disease = ");
gets(u);
fflush(stdin);
for(g=0; g<num; g++)
{
if(strcmp(u,x[g].disease)==0)
{
printf("\n");
printf("Serial Number=%d\n",g);
printf("Name = ");
puts(x[g].name);
printf("Disease = ");
puts(x[g].disease);
printf("Cabin no = %d\nPhone number = 0%d\nAge = %d",x[g].cabin,x[g].phone,x[g].age);
printf("\n\n");
f=0;
}
}
if(f==1)
printf("\nNot Found\n");
}
else if(h==4)
{
int f=1;
printf("Enter Cabin number = ");
scanf("%d",&f);
for(g=0; g<num; g++)
{
if(f==x[g].cabin)
{
printf("\n");
printf("Serial Number=%d\n",g);
printf("Name = ");
puts(x[g].name);
printf("Disease = ");
puts(x[g].disease);
printf("Cabin no = %d\nPhone number = 0%d\nAge = %d",x[g].cabin,x[g].phone,x[g].age);
printf("\n\n");
f=0;
}
}
if(f==1)
printf("Not Found\n\n");
}
else if(h==5)
{
int f=1;
printf("Enter Phone number = ");
scanf("%d",&f);
for(g=0; g<num; g++)
{
if(f==x[g].phone)
{
printf("\n");
printf("Serial Number=%d\n",g);
printf("Name = ");
puts(x[g].name);
printf("Disease = ");
puts(x[g].disease);
printf("Cabin no = %d\nPhone number = 0%d\nAge = %d",x[g].cabin,x[g].phone,x[g].age);
printf("\n\n");
f=0;
}
}
if(f==1)
printf("Not Found");
}
else if(h==6)
{
int f=1;
printf("Enter Age = ");
scanf("%d",&f);
for(g=0; g<num; g++)
{
if(f==x[g].age)
{
printf("\n");
printf("Serial Number=%d\n",g);
printf("Name = ");
puts(x[g].name);
printf("Disease = ");
puts(x[g].disease);
printf("Cabin no = %d\nPhone number = 0%d\nAge = %d",x[g].cabin,x[g].phone,x[g].age);
printf("\n\n");
f=0;
}
}
if(f==1)
printf("Not Found\n\n");
}
else
printf("\n\nInvalid input\n\n");
}
void del()
{
int f,h;
printf("Enter the serial number of the patient that you want to delete=");
scanf("%d",&f);
if(f<num)
{
printf("What do you want ?\n");
printf("1.Remove the whole record\n2.Remove Name\n3.Remove Disease\n4.Remove
age\n5.Remove Cabin\n6.Remove phone number\nOption = ");
scanf("%d",&h);
if(h==1)
{
while(f<num)
{
strcpy(x[f].name,x[f+1].name);
strcpy(x[f].disease,x[f+1].disease);
x[f].age=x[f+1].age;
x[f].cabin=x[f+1].cabin;
x[f].phone=x[f+1].phone;
f++;
}
num--;
}
else if(h==2)
{
strcpy(x[f].name,"Cleared");
}
else if(h==3)
{
strcpy(x[f].disease,"Cleared");
}
else if(h==4)
{
x[f].age=0;
}
else if(h==5)
{
x[f].cabin=0;
}
else if(h==6)
{
x[f].phone=0;
}
}
else
printf("\n\nInvalid Serial number\n");
}
void read()
{
FILE *fp = fopen("patient.txt","r");
if(fp == NULL)
{
//create empty file, so that we can open it
//in the next execution of this program
fp = fopen("patient.txt","w");
fclose(fp);
printf("File does not exist, I JUST CREATED IT, exiting...\n\n\n");
return 0;
}
OUTPUT