Oop

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

G. H.

RAISONI POLYTECHNIC, NAGPUR


CERTIFICATE

2018-2019
This is Certify that the Entitled

“HOPITAL MANAGEMENT SYSTEM


USING C++”

Submitted By

Name of Group Members

1. ANKIT KHARABE 4. ADITYA SHREEPATRE


2. PRATHAMESH DESHKAR 5. YASH KALAMKHEDE
3. RISHABH SAHU

In III- semester for Partial fulfilments of Requirement for the Diploma in Computer Engineering of Maharashtra
State Board of Technical Education

Ms. S.B.PANDEY
Project Guide

(Mrs. R.K. Dharne) (Mr. G.N. Akhade)

Head of Department Principal


SUBMISSION

We, students of third semester of second year diploma in computer engineering humbly submit that we have
completed the micro-project work as prescribed in this report by own skill and the study in academic session
2018-19, as per the instruction and guidance of
Ms. S.B.PANDEY.

The work carried out in the project is our and not copied the report on any appreciable part from any other
literature in contravention of the academic ethics.

The teacher has approved our contribution. The students associated in the microproject are:

Name of Student Sign

1. Ankit Kharabe
2. Yash Kalamkhede
3. Prathamesh Deshkar
4. Rishabh Sahu
5. Aditya Shreepatre

Date: - ------------
ACKNOWLEDGEMENT
We wish to avail this opportunity to acknowledge our profound indebtedness and extend our
deep sense of gratitude of our profound
Ms. S.B.PANDEY
for her valuable guidance, advice and encouragement

that has been feel to successful completion of this micro-project.

We hereby express our deep gratitude to our H.O.D. and Hon’ble Principal for his cooperation

and help and also the other staff members of the department.

We also thank to library for making us available necessary books for reference. I would like to

place on record my sincere thanks to all persons directly or indirectly helped us in completion

of this work.
PART A – Plan
Develop a program in ‘C’ of priority queue using linked list
1.0 Brief Introduction

Hospital Management System is based on a concept of recording patient records and their diagnosis information. Before
stepping into the main system a user has to pass through a login system to get access, then only the user can add a new
patient record, diagnosis information and check the full history of the patient. This mini project contains limited
features, but the essential one.

Talking about the features of the Hospital Management System, after logging in as a user he/she can add new patient
records, diagnosis information, check patient information, and view information about the hospital. To delete a record,
the user has to delete the file from the project folder as this project focuses on adding and retrieving files. While adding
a patient record, he/she has to provide the details which includes the name of the patient, address, contact number,
age, sex, blood group, disease name and patient id number. Similarly, in adding diagnosis information of a particular
patient then he/she has to select the respective patient’s file and provide symptoms, Diagnosis, Medicines, ask
admission, and ward type. The user can view patients history easily as which displays each and every detail of the
patient.
2.0 Aim of the Micro-Project

1. Create a C++ program for HOSPITAL MANAGEMENT SYSTEM

2. To execute a program in Turbo C++/CodeBlocks.

3.0 Action Plan


Name of
S. Planned Planned
Details of activity Responsible Team
No. Start date Finish date
Members

1 Project survey 26/07/2018 30/07/2018 Ankit Kharabe

Gathering Information
2 23/08/2018 30/08/2018 Aditya Shreepatre

Rishi Shau,
3 Execute C++ program 01/09/2018 08/09/2018
Prathamesh Deshkar

Create Report 08/09/2018 12/09/2018


4 Yash Kalamkhede
4.0 Resources Required

S.
Name of Resource / Material Specification Quantity Remark
No.

Computer (Intel Core i3),


1 Hardware: Computer System 1
RAM 4GB, HDD-1TB

2 Operating System Windows 10 1

Turbo ++(4.0) / CodeBlocks


3 Software / Compiler 1
PART B
Title of Micro-Project
1.0 Brief Description
Hospital Management System is based on a concept of recording patient records and their diagnosis
information. Before stepping into the main system a user has to pass through a login system to get
access, then only the user can add a new patient record, diagnosis information and check the full history
of the patient. This mini project contains limited features, but the essential one.

Talking about the features of the Hospital Management System, after logging in as a user he/she can add new
patient records, diagnosis information, check patient information, and view information about the hospital. To
delete a record, the user has to delete the file from the project folder as this project focuses on adding and
retrieving files. While adding a patient record, he/she has to provide the details which includes the name of the
patient, address, contact number, age, sex, blood group, disease name and patient id number. Similarly, in
adding diagnosis information of a particular patient then he/she has to select the respective patient’s file and
provide symptoms, Diagnosis, Medicines, ask admission, and ward type. The user can view patients history
easily as which displays each and every detail of the patient.

2.0 Aim of the Micro-Project


1. Create a C++ program for the application

2. To execute a program in Turbo C++/CodeBlocks.

3.0 Course Outcomes Integrated


a) Perform basic operations on the program
b) store the data of patients and other details
4.0 Actual Procedure Followed.

S.
Name of Resource / Material Specification Quantity Remarks
No.

Computer (Intel Core i3),


1 Hardware: Computer System 1
RAM 4GB, HDD-1TB

2 Operating System Windows 10 1

3 Software / Compiler Turbo ++(4.0) / CodeBlocks 1


5 .0 Main c++ code

#include<iostream> cout<<"\t\t\t\t\t@@|
#include<fstream> WELCOME TO
#include<cstdlib> |@@\n";
#include<conio.h> cout<<"\t\t\t\t\t@@|
#include<time.h> |@@\n";
#include<iomanip> cout<<"\t\t\t\t\t@@|
using namespace std; HOSPITAL MANAGEMENT SYSTEM
int main() |@@\n";
cout<<"\t\t\t\t\t@@|
//NOTE: RUN THE PROGRAM IN FULL |@@\n";
SCREEN ONLY cout<<"\t\t\t\t\t@@|
|@@\n";
{ cout<<"\t\t\t\t\t@@|
char fname[20]; |@@\n";
time_t rawtime; cout<<"\t\t\t\t\t@@|
struct tm * timeinfo; |@@\n";
cout<<"\t\t\t\t\t@@|
time ( &rawtime ); |@@\n";
timeinfo = localtime ( &rawtime ); cout<<"\t\t\t\t\t@@|
-Brought To You by code-projects.org
//printing the welcome note |@@\n";
re: cout<<"\t\t\t\t\t@@|_________________
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ ____________________________________
n\n\n\t\t\t\t\t@@@@@@@@@@@@@ __________________________________|
@@@@@@@@@@@@@@@@@@@@ @@\n";
@@@@@@@@@@@@@@@@@@@@ cout<<"\t\t\t\t\t@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@
\n"; @@@@@@@@@@@@@@@@@@@@
cout<<"\t\t\t\t\t@@ @@@@@@@@@@@@@@@@@@@@
____________________________________ @\n\n\n\n\t\t\t\t\t";
____________________________________ system("pause");
_______________ @@\n"; system("cls");
cout<<"\t\t\t\t\t@@|
|@@\n";
cout<<"\t\t\t\t\t@@|
|@@\n"; int i;
cout<<"\t\t\t\t\t@@| int login();
|@@\n"; login();
cout<<"\t\t\t\t\t@@| //giving option to the user for their choice
|@@\n"; b:
cout<<"\t\t\t\t\t@@| cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t
|@@\n"; \t\t\t\t HOSPITAL MANAGEMENT SYSTEM
cout<<"\t\t\t\t\t@@| \n\n";
|@@\n"; cout<<"\n\n\t\t\t\t\t\tPlease, Choose
from the following Options: \n\n";
cout<<"\t\t\t\t\t\t {
____________________________________ getline(file,line);
_____________________________ \n"; cout<<line<<"\n\t\t";
cout<<"\t\t\t\t\t\t| }
|\n"; cout<<"\n\n\t\t";
cout<<"\t\t\t\t\t\t| 1 >> Add New system("pause");
Patient Record |\n"; system("cls");
cout<<"\t\t\t\t\t\t| 2 >> Add goto b;
Diagnosis Information |\n"; }
cout<<"\t\t\t\t\t\t| 3 >> Full History }
of the Patient |\n";
cout<<"\t\t\t\t\t\t| 4 >> //Adding the record of the new
Information About the Hospital patient..................option 3
|\n"; if(i==1)
cout<<"\t\t\t\t\t\t| 5 >> Exit the {
Program |\n"; time_t rawtime;
cout<<"\t\t\t\t\t\t|___________________ struct tm * timeinfo;
____________________________________
__________|\n\n"; time ( &rawtime );
a:cout<<"\t\t\t\t\t\tEnter your choice: timeinfo = localtime ( &rawtime );
";cin>>i; cout<<"\n\n\t\t\t\t\t\t\t\t"<< asctime
if(i>5||i<1){cout<<"\n\n\t\t\t\t\t\tInvalid (timeinfo);
Choice\n";cout<<"\t\t\t\t\t\tTry ofstream pat_file;
again...........\n\n";goto a;} //if inputed char fname[20];
choice is other than given choice cout<<"\n\n\n\nEnter the patient's file
name : ";
cin.ignore();
gets(fname);
system("cls"); pat_file.open(fname);
if(!fname)
//displaying the information about the {
hospital........option 4 cout<<"\nError while opening
if(i==4) the file\n";goto b;
{ }
ifstream file; else
file.open("hos.txt"); {
if(!file) struct patient_info
{ {
cout<<"\nError while opening char name[20];
the file\n";goto b; char address[100];
} char contact[10];
else char age[5];
{ char sex[8];
char blood_gp[5];
cout<<"\n\n\n\n\n\n\n\t\t\t\t\t char disease_past[50];
...........................Information about the char id[15];
Hospital.............................\n\n"; };
string line;
while(file.good()) patient_info ak;
//Appending diagnosis information of
cout<<"\n**************************** patient datewise.................option 2
************************************ if(i==2)
****\n";pat_file<<"\n****************** {
************************************ fstream pat_file;
**************\n\n";//fn1353 st cout<<"\n\nEnter the patient's file name
cout<<"\nName : ";pat_file<<"Name to be opened : ";
: cin.ignore();
";gets(ak.name);pat_file<<ak.name<<"\n"; gets(fname);
cout<<"\nAddress : system("cls");
";pat_file<<"Address : pat_file.open(fname, ios::in);
";gets(ak.address);pat_file<<ak.address<<" if(!pat_file)
\n"; {
cout<<"\nContact Number : cout<<"\nError while opening
";pat_file<<"Contact Number : the file\n";goto b;
";gets(ak.contact);pat_file<<ak.contact<<"\ }
n"; else
cout<<"\nAge : ";pat_file<<"Age : {
";gets(ak.age);pat_file<<ak.age<<"\n";
cout<<"\nSex : ";pat_file<<"Sex : cout<<"\n\n\n\n\t\t\t\t..............................
";gets(ak.sex);pat_file<<ak.sex<<"\n"; .......... Information about "<<fname<<"
cout<<"\nBlood Group : ........................................\n\n\n\n";
";pat_file<<"Blood Group : string info;
";gets(ak.blood_gp);pat_file<<ak.blood_gp while(pat_file.good())
<<"\n"; {
cout<<"\nAny Major disease getline(pat_file,info);
suffered earlier : ";pat_file<<"Any Major cout<<info<<"\n";
disease suffered earlier : }
";gets(ak.disease_past);pat_file<<ak.diseas cout<<"\n";
e_past<<"\n"; pat_file.close();
cout<<"\nPatient ID : pat_file.open(fname,
";pat_file<<"Patient ID : ios::out | ios::app);
";gets(ak.id);pat_file<<ak.id<<"\n"; cout<<"\n";
cout<<"Adding more
cout<<"\n**************************** information in patient's file................on :
************************************ "<<asctime
****\n";pat_file<<"\n****************** (timeinfo);pat_file<<"Description of
************************************ "<<asctime (timeinfo)<<"\n";
**************\n\n"; struct app
cout<<"\nInformation Saved {
Successfully\n"; char symptom[500];
} char diagnosis[500];
system("pause"); char medicine[500];
system("cls"); char addmission[30];
goto b; char ward[15];
};
} app add;
cout<<"\nSymptoms : ";
pat_file<<"Symptoms :
";gets(add.symptom);
pat_file<<add.symptom<<"\n"; cout<<"\n\n\n\n\t\t\t\t..............................
cout<<"\nDiagnosis : "; .......... Full Medical History of "<<fname<<"
pat_file<<"Diagnosis : ........................................\n\n\n\n";
";gets(add.diagnosis); string info;
pat_file<<add.diagnosis<<"\n"; while(pat_file.good())
cout<<"\nMedicines : "; {
pat_file<<"Medicines : getline(pat_file,info);
";gets(add.medicine); cout<<info<<"\n";
pat_file<<add.medicine<<"\n"; }
cout<<"\nAddmission Required? : "; cout<<"\n";
pat_file<<"Addmission Required? : }
";gets(add.addmission); system("pause");
pat_file<<add.addmission<<"\n"; system("cls");
cout<<"\nType of ward : "; goto b;
pat_file<<"Type of ward : ";gets(add.ward); }
pat_file<<add.ward<<"\n";pat_file<<"\n**
************************************ //Exiting Through the system with a Thank
***********************************\ You note........................option 5
n"; if(i==5)
cout<<"\n\n"<<add.ward<<" ward is {
alloted Successfully\n"; system("cls");
pat_file.close(); cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t
cout<<"\n\n"; \t@@@@@@@@@@@@@@@@@@@
system("pause"); @@@@@@@@@@@@@@@@@@@@
system("cls"); @@@@@@@@@@@@@@@@@@@@
goto b; @@@@@@@@@@@@@@@@@@@@
} @@@@@@@@@@@@@@\n";
} cout<<"\t\t\t\t\t@@
____________________________________
//For displaying the full medical history of ____________________________________
patient in that hospital............option 3 _______________ @@\n";
if(i==3) cout<<"\t\t\t\t\t@@|
{ |@@\n";
fstream pat_file; cout<<"\t\t\t\t\t@@|
cout<<"\n\nEnter the patient's file name |@@\n";
to be opened : "; cout<<"\t\t\t\t\t@@|
cin.ignore(); |@@\n";
gets(fname); cout<<"\t\t\t\t\t@@|
system("cls"); |@@\n";
pat_file.open(fname, ios::in); cout<<"\t\t\t\t\t@@|
if(!pat_file) |@@\n";
{ cout<<"\t\t\t\t\t@@|
cout<<"\nError while opening THANK YOU FOR USING
the file\n";goto b; |@@\n";
} cout<<"\t\t\t\t\t@@|
else |@@\n";
{
cout<<"\t\t\t\t\t@@| cout << '*';
HOSPITAL MANAGEMENT SYSTEM ch = _getch();
|@@\n"; }
cout<<"\t\t\t\t\t@@| if(pass == "pass"){
|@@\n"; cout << "\n\n\t\t\t\t\t\t\t\tAccess
cout<<"\t\t\t\t\t@@| Granted! \n";
|@@\n"; system("PAUSE");
cout<<"\t\t\t\t\t@@| system ("CLS");
|@@\n"; }else{
cout<<"\t\t\t\t\t@@| cout << "\n\n\t\t\t\t\t\t\t\tAccess
|@@\n"; Aborted...\n\t\t\t\t\t\t\t\tPlease Try
cout<<"\t\t\t\t\t@@| Again\n\n";
|@@\n"; system("PAUSE");
cout<<"\t\t\t\t\t@@| system("CLS");
-Brought To You by code-projects.org login();
|@@\n"; }
cout<<"\t\t\t\t\t@@|_________________ }
____________________________________
__________________________________|
@@\n";
cout<<"\t\t\t\t\t@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@
@\n\n\n\n\t\t\t\t\t";
}

cout<<"\n";

int login(){
string pass ="";
char ch;

cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t
\t\t\t\t HOSPITAL MANAGEMENT SYSTEM
\n\n";
cout<<"\t\t\t\t\t\t\t\t--------------------------
----";
cout<<"\n\t\t\t\t\t\t\t\t\t LOGIN \n";
cout<<"\t\t\t\t\t\t\t\t--------------------------
----\n\n";
cout << "\t\t\t\t\t\t\t\tEnter Password: ";
ch = _getch();
while(ch != 13){//character 13 is enter
pass.push_back(ch);
6.0:- Outputs of the Micro-Projects (Drawings of the protype, drawing of survey,
presentation of collected data, findings etc.)

OUTPUT:
7.0 Skill Developed / learning out of this Micro-Project

• Disciple Knowledge: Apply computer engineering disciple-specific


knowledge to solve core computer engineering related problems.
• Experiment and Practice: Plan to perform experiments and practices to use
the results to solve broad-based Computer engineering problems.
• Engineering Tools: Apply relevant Computer technologies and tools with an
`understanding to the limitations.
• Communication: Communication effectively in oral and written form.

You might also like