SlideShare a Scribd company logo
1
Session 2017-2018
By:
Ms. Ritika Sahu
Class XII (Section A)
Roll Number: 12116
2
CONTENTS
CERTIFICATE
ACKNOWLEDGEMENT
INTRODUCTION TO THE PROJECT
OBJECTIVE OF THE PROJECT
CITY HOSPITAL MUNGAOLI DATA MANAGEMENT SYSTEM
PROGRAMME CODE
CITY HOSPITAL MUNGAOLI DATA MANAGEMENT SYSTEM
OUTPUT AND CONSOLE SCREEN
BIBLIOGRAPHY
3
CERTIFICATE
This is to certify that the Computer Science project
titled “Hospital Data Management System’ has been
successfully completed by Ms. Ritika Sahu of Class
XII (Section A) in partial fulfillment of curriculum
of CENTRAL BOARD OF SECONDARY
EDUCATION (CBSE) leading to the award of
annual examination of the year 2017-2018.
Mr. Vikram Singh Rathore External Examiner
(P.G.T, Computer Science)
4
ACKNOWLEDGEMENT
It gives me great pleasure to express my gratitude
towards our Computer Science teacher Mr. Vikram
Singh Rathore sir for his guidance, support and
encouragement throughout the duration of the project.
Without his motivation and help the successful
completion of this project would not have been
possible.
Ritika Sahu
Class XII (Section A)
Roll Number: 12116
5
Introduction to the Project
This program is very useful in real life situation for data management of a Hospital
where patients record can be entered, stored and retrieved. A hospital may have
various departments and in all the departments many services related to the patient
management are provided.
The Programme stores the information about Patients like First Name, Last Name,
Aadhar Number. In this C++ program we can modify, add, delete, recall and list the
patients records.
Being OOP concept available, we can add or remove function anytime we need and
even add classes and derived classes for further improvement of the program
without recording.
Objective of the Project
Hospital Management Programme is to be developed for City Hospital Mungaoli.
City Hospital Mungaoli has following 3 departments:
1. Heart Department
2. Lung Department
3. Plastic Surgery Department
Programme should be able to take Patient data from its user, there should be 3 fields
of patient data:
(i) First Name
(ii) Last Name
(iii) Aadhar Number
In each of the three departments of City Hospital Mungaoli, Following operation
related to patient data should be performed.
(i) Add Normal Patient Information
(ii) Add Critically ill Patient Information
(iii) To take out an admitted patient for operation
(iv) Remove dead patient from queue
(v) List all the admitted patient of a department
6
City Hospital Mungaoli Data Management System
Programme Code
City Hospital Mungaoli Data Management Programme.cpp
Compiled, run and tested on: 26-01-2018
#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdlib.h>
//***************** define maximum number of patients in a queue
****************
#define MAXPATIENTS 100
// ****************define structure for patient data**************************
struct patient
{
char FirstName[50];
char LastName[50];
char ID[20];
};
// ***********************define class for queue******************************
class queue
{
public:
queue (void);
int AddPatientAtEnd (patient p);
int AddPatientAtBeginning (patient p);
patient GetNextPatient (void);
int RemoveDeadPatient (patient * p);
void OutputList (void);
char DepartmentName[50];
private:
int NumberOfPatients;
patient List[MAXPATIENTS];
};
// *****************declare member functions for
queue**************************
queue::queue ()
{
// constructor
NumberOfPatients = 0;
}
int queue::AddPatientAtEnd (patient p)
{
// ***************adds a normal patient to the end of the
queue.****************
// returns 1 if successful, 0 if queue is full.
if (NumberOfPatients >= MAXPATIENTS)
{
// queue is full
return 0;
}
// put in new patient
else
List[NumberOfPatients] = p; NumberOfPatients++;
return 1;
}
int queue::AddPatientAtBeginning (patient p)
{
7
// ****************adds a critically ill patient to the beginning of the
queue.****
// returns 1 if successful, 0 if queue is full.
int i;
if (NumberOfPatients >= MAXPATIENTS)
{
// queue is full
return 0;
}
// move all patients one position back in queue
for (i = NumberOfPatients-1; i >= 0; i--)
{
List[i+1] = List[i];
}
// put in new patient
List[0] = p; NumberOfPatients++;
return 1;
}
patient queue::GetNextPatient (void)
{
// *****************gets the patient that is first in the queue.*************
// ************returns patient with no ID if queue is empty *****************
int i; patient p;
if (NumberOfPatients == 0) {
// queue is empty
strcpy(p.ID,"");
return p;}
// get first patient
p = List[0];
// move all remaining patients one position forward in queue
NumberOfPatients--;
for (i=0; i<NumberOfPatients; i++)
{
List[i] = List[i+1];
}
// return patient
return p;
}
int queue::RemoveDeadPatient (patient * p)
{
// removes a patient from queue.
// returns 1 if successful, 0 if patient not found
int i, j, found = 0;
// search for patient
for (i=0; i<NumberOfPatients; i++)
{
if (stricmp(List[i].ID, p->ID) == 0)
{
// patient found in queue
*p = List[i]; found = 1;
// move all following patients one position forward in queue
NumberOfPatients;
for (j=i; j<NumberOfPatients; j++)
{
List[j] = List[j+1];
}
}
}
return found;
}
void queue::OutputList (void)
{
// lists entire queue on screen
int i;
if (NumberOfPatients == 0)
8
{
cout << "Queue is empty";
}
else
{
for (i=0; i<NumberOfPatients; i++)
{
cout << "Patient Name " << List[i].FirstName;
cout << " " << List[i].LastName;
cout << 'n';
cout << "Patient ID " << List[i].ID;
cout << 'n';
}
}
}
// ******************declare functions used by main:*************************
patient InputPatient (void) // this function asks user for patient data.
{
patient p;
cout << "Please enter data for new patient First name: ";
cin.getline(p.FirstName, sizeof(p.FirstName));
cout << "Last name: ";
cin.getline(p.LastName, sizeof(p.LastName));
cout << "Aadhar number: ";
cin.getline(p.ID, sizeof(p.ID));
// check if data valid
if (p.FirstName[0]==0 || p.LastName[0]==0 || p.ID[0]==0)
{
// rejected
strcpy(p.ID,"");
cout << "Error: Data not valid. Operation cancelled.";
getch();
}
return p;
}
void OutputPatient (patient * p)
{
// this function outputs patient data to the screen
if (p == NULL || p->ID[0]==0)
{
cout << "No patient";
return;
}
else
cout << "Patient data:";
cout << "First name: " << p->FirstName;
cout << "Last name: " << p->LastName;
cout << "Aadhar number: " << p->ID;
}
int ReadNumber() // this function reads an integer number from the
keyboard. // it is used because input with cin >> doesn’t
work properly!
{
char buffer[20];
cin.getline(buffer, sizeof(buffer));
return atoi(buffer);
}
void DepartmentMenu (queue * q) // this function defines the user interface
with menu for one department
{
int choice = 0, success; patient p;
while (choice != 6)
{
9
// clear screen
//clrscr();
//system("cls");
// print menu
cout << "Welcome to department: " << q->DepartmentName;
cout << "Please enter your choice:"<< 'n';
cout << "1: Add normal patient"<< 'n';
cout << "2: Add critically ill patient"<< 'n';
cout << "3: Take out patient for operation"<< 'n';
cout << "4: Remove dead patient from queue"<< 'n';
cout << "5: List queue"<< 'n';
cout << "6: Change department or "<< 'n';
// get user choice
choice = ReadNumber();
// do indicated action
switch (choice)
{
case 1: // Add normal patient
p = InputPatient();
if (p.ID[0])
{
success = q->AddPatientAtEnd(p);
//clrscr();
//system("cls");
if (success)
{
cout << "Patient added successfully:";
}
else
{
// error
cout << "Error: The queue is full. Cannot add patient:";
}
OutputPatient(&p);
cout << "Press any key"<<'n';
getch();
}
break;
case 2: // Add critically ill patient
p = InputPatient();
if (p.ID[0])
{
success = q->AddPatientAtBeginning(p);
//clrscr();
//system("cls");
if (success)
{
cout << "Patient added successfully:"<< 'n';
}
else
{
// error
cout << "Error: The queue is full. Cannot add patient:"<< 'n';
}
OutputPatient(&p);
cout << "Press any key"<<'n';
getch();
}
break;
case 3: // Take out patient for operation
p = q->GetNextPatient();
//clrscr();
//system("cls");
if (p.ID[0])
{
10
cout << "Patient to operate:"<< 'n';
OutputPatient(&p);}
else
{
cout << "There is no patient to operate."<< 'n';
}
cout << "Press any key"<<'n';
getch();
break;
case 4: // Remove dead patient from queue
p = InputPatient();
if (p.ID[0])
{
success = q->RemoveDeadPatient(&p);
//clrscr();
//system("cls");
if (success)
{
cout << "Patient removed:"<< 'n';
}
else
{
// error
cout << "Error: Cannot find patient:"<< 'n';
}
OutputPatient(&p);
cout << "Press any key"<<'n';
getch();
}
break;
case 5: // List queue
//clrscr();
//system("cls");
q->OutputList();
cout << "Press any key"<<'n';
getch(); break;
}
}
}
// ******************main function defining queues and main
menu*****************
int main ()
{
int i, MenuChoice = 0;
// define three queues
queue departments[3];
// set department names
strcpy (departments[0].DepartmentName, "Heart clinic");
strcpy (departments[1].DepartmentName, "Lung clinic");
strcpy (departments[2].DepartmentName, "Plastic surgery");
while (MenuChoice != 4)
{
// clear screen
//clrscr();
//system("cls");
// print menu
cout << "Welcome to the City Hospital Mungaoli"<< 'n';
cout << "Please enter your choice:"<< 'n';
for (i = 0; i < 3; i++)
{
// write menu item for department i
cout << "" << (i+1) << ": " << departments[i].DepartmentName<< 'n';
}
cout << "4: Exit"<< 'n';
11
// get user choice
MenuChoice = ReadNumber();
// is it a department name?
if (MenuChoice >= 1 && MenuChoice <= 3)
{
// call submenu for department
// (using pointer arithmetics here:)
DepartmentMenu (departments + (MenuChoice-1));
}
}
}
// ************************End of the Programme********************************
City Hospital Mungaoli Data Management System
Output and Console Screen
City Hospital Mungaoli Data Management Programme.cpp
Tested on: 26-01-2018
Programme Code run successfully and results have been obtained as expected in the
objective of the Project. Department wise patient data management system results
for City Hospital Mungaoli (output Screen Shots) are given below:
(1) City Hospital Mungaoli Welcome Screen and Output for Heart Clinic
12
(ii) Output for Lung Clinic Department of City Hospital Mungaoli
13
14
(iii) Output for Plastic Surgery Department
Bibliography
To make this project I have taken source from a book “Computer Science with C++”
written by Sumita Arora and “Computer Science” NCERT text book, and taken help
of my computer science teacher Mr. Vikram Singh Rathore and My elder brother
Mr. Hitendra Sahu.
*End of the Report*

More Related Content

Similar to Hospital management project_BY RITIKA SAHU.

Reshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third YearReshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third Year
dezyneecole
 
Single server queue (Simulation Project)
Single server queue (Simulation Project)Single server queue (Simulation Project)
Single server queue (Simulation Project)
Md.zahedul Karim Tuhin
 
Write the code above and the ones below in netbeans IDE 8.13. (Eli.pdf
Write the code above and the ones below in netbeans IDE 8.13. (Eli.pdfWrite the code above and the ones below in netbeans IDE 8.13. (Eli.pdf
Write the code above and the ones below in netbeans IDE 8.13. (Eli.pdf
arihantmum
 
C++ project
C++ projectC++ project
C++ project
Sonu S S
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
pratikbakane
 
Below is my program, I just have some issues when I want to check ou.pdf
Below is my program, I just have some issues when I want to check ou.pdfBelow is my program, I just have some issues when I want to check ou.pdf
Below is my program, I just have some issues when I want to check ou.pdf
dhavalbl38
 
Document of Turbo ++ project|| Railway Reservation System project
Document of Turbo ++  project|| Railway Reservation System projectDocument of Turbo ++  project|| Railway Reservation System project
Document of Turbo ++ project|| Railway Reservation System project
Jiangxi University of Science and Technology (江西理工大学)
 
Priority Queue as a Heap ArrayEmergency Room Patient AdmittanceO.pdf
Priority Queue as a Heap ArrayEmergency Room Patient AdmittanceO.pdfPriority Queue as a Heap ArrayEmergency Room Patient AdmittanceO.pdf
Priority Queue as a Heap ArrayEmergency Room Patient AdmittanceO.pdf
seamusschwaabl99557
 
C++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdfC++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdf
yamew16788
 
Qprgs
QprgsQprgs
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd marchRajeev Sharan
 
when I compile to get the survey title the overload constructor asks.docx
when I compile to get the survey title the overload constructor asks.docxwhen I compile to get the survey title the overload constructor asks.docx
when I compile to get the survey title the overload constructor asks.docx
lashandaotley
 
SUPER MARKET COMPUTER SYSTEM IN C++
SUPER MARKET COMPUTER SYSTEM IN C++SUPER MARKET COMPUTER SYSTEM IN C++
SUPER MARKET COMPUTER SYSTEM IN C++
vikram mahendra
 
C++ ProgrammingSo I received help with a code that takes a diabet.pdf
C++ ProgrammingSo I received help with a code that takes a diabet.pdfC++ ProgrammingSo I received help with a code that takes a diabet.pdf
C++ ProgrammingSo I received help with a code that takes a diabet.pdf
fathimafancy
 
C++ coding for Banking System program
C++ coding for Banking System programC++ coding for Banking System program
C++ coding for Banking System program
Harsh Solanki
 
Design various classes and write a program to computerize the billing.pdf
Design various classes and write a program to computerize the billing.pdfDesign various classes and write a program to computerize the billing.pdf
Design various classes and write a program to computerize the billing.pdf
sktambifortune
 
Chapter 7: Queue data structure
Chapter 7:  Queue data structureChapter 7:  Queue data structure
Chapter 7: Queue data structure
Mahmoud Alfarra
 
programming in C++ report
programming in C++ reportprogramming in C++ report
programming in C++ report
vikram mahendra
 

Similar to Hospital management project_BY RITIKA SAHU. (20)

Reshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third YearReshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third Year
 
Single server queue (Simulation Project)
Single server queue (Simulation Project)Single server queue (Simulation Project)
Single server queue (Simulation Project)
 
Write the code above and the ones below in netbeans IDE 8.13. (Eli.pdf
Write the code above and the ones below in netbeans IDE 8.13. (Eli.pdfWrite the code above and the ones below in netbeans IDE 8.13. (Eli.pdf
Write the code above and the ones below in netbeans IDE 8.13. (Eli.pdf
 
C++ project
C++ projectC++ project
C++ project
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
 
Below is my program, I just have some issues when I want to check ou.pdf
Below is my program, I just have some issues when I want to check ou.pdfBelow is my program, I just have some issues when I want to check ou.pdf
Below is my program, I just have some issues when I want to check ou.pdf
 
Document of Turbo ++ project|| Railway Reservation System project
Document of Turbo ++  project|| Railway Reservation System projectDocument of Turbo ++  project|| Railway Reservation System project
Document of Turbo ++ project|| Railway Reservation System project
 
Priority Queue as a Heap ArrayEmergency Room Patient AdmittanceO.pdf
Priority Queue as a Heap ArrayEmergency Room Patient AdmittanceO.pdfPriority Queue as a Heap ArrayEmergency Room Patient AdmittanceO.pdf
Priority Queue as a Heap ArrayEmergency Room Patient AdmittanceO.pdf
 
C++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdfC++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdf
 
Qprgs
QprgsQprgs
Qprgs
 
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd march
 
when I compile to get the survey title the overload constructor asks.docx
when I compile to get the survey title the overload constructor asks.docxwhen I compile to get the survey title the overload constructor asks.docx
when I compile to get the survey title the overload constructor asks.docx
 
SUPER MARKET COMPUTER SYSTEM IN C++
SUPER MARKET COMPUTER SYSTEM IN C++SUPER MARKET COMPUTER SYSTEM IN C++
SUPER MARKET COMPUTER SYSTEM IN C++
 
C++ ProgrammingSo I received help with a code that takes a diabet.pdf
C++ ProgrammingSo I received help with a code that takes a diabet.pdfC++ ProgrammingSo I received help with a code that takes a diabet.pdf
C++ ProgrammingSo I received help with a code that takes a diabet.pdf
 
C++ coding for Banking System program
C++ coding for Banking System programC++ coding for Banking System program
C++ coding for Banking System program
 
Design various classes and write a program to computerize the billing.pdf
Design various classes and write a program to computerize the billing.pdfDesign various classes and write a program to computerize the billing.pdf
Design various classes and write a program to computerize the billing.pdf
 
Ip
IpIp
Ip
 
Chapter 7: Queue data structure
Chapter 7:  Queue data structureChapter 7:  Queue data structure
Chapter 7: Queue data structure
 
C# labprograms
C# labprogramsC# labprograms
C# labprograms
 
programming in C++ report
programming in C++ reportprogramming in C++ report
programming in C++ report
 

Recently uploaded

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 

Recently uploaded (20)

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 

Hospital management project_BY RITIKA SAHU.

  • 1. 1 Session 2017-2018 By: Ms. Ritika Sahu Class XII (Section A) Roll Number: 12116
  • 2. 2 CONTENTS CERTIFICATE ACKNOWLEDGEMENT INTRODUCTION TO THE PROJECT OBJECTIVE OF THE PROJECT CITY HOSPITAL MUNGAOLI DATA MANAGEMENT SYSTEM PROGRAMME CODE CITY HOSPITAL MUNGAOLI DATA MANAGEMENT SYSTEM OUTPUT AND CONSOLE SCREEN BIBLIOGRAPHY
  • 3. 3 CERTIFICATE This is to certify that the Computer Science project titled “Hospital Data Management System’ has been successfully completed by Ms. Ritika Sahu of Class XII (Section A) in partial fulfillment of curriculum of CENTRAL BOARD OF SECONDARY EDUCATION (CBSE) leading to the award of annual examination of the year 2017-2018. Mr. Vikram Singh Rathore External Examiner (P.G.T, Computer Science)
  • 4. 4 ACKNOWLEDGEMENT It gives me great pleasure to express my gratitude towards our Computer Science teacher Mr. Vikram Singh Rathore sir for his guidance, support and encouragement throughout the duration of the project. Without his motivation and help the successful completion of this project would not have been possible. Ritika Sahu Class XII (Section A) Roll Number: 12116
  • 5. 5 Introduction to the Project This program is very useful in real life situation for data management of a Hospital where patients record can be entered, stored and retrieved. A hospital may have various departments and in all the departments many services related to the patient management are provided. The Programme stores the information about Patients like First Name, Last Name, Aadhar Number. In this C++ program we can modify, add, delete, recall and list the patients records. Being OOP concept available, we can add or remove function anytime we need and even add classes and derived classes for further improvement of the program without recording. Objective of the Project Hospital Management Programme is to be developed for City Hospital Mungaoli. City Hospital Mungaoli has following 3 departments: 1. Heart Department 2. Lung Department 3. Plastic Surgery Department Programme should be able to take Patient data from its user, there should be 3 fields of patient data: (i) First Name (ii) Last Name (iii) Aadhar Number In each of the three departments of City Hospital Mungaoli, Following operation related to patient data should be performed. (i) Add Normal Patient Information (ii) Add Critically ill Patient Information (iii) To take out an admitted patient for operation (iv) Remove dead patient from queue (v) List all the admitted patient of a department
  • 6. 6 City Hospital Mungaoli Data Management System Programme Code City Hospital Mungaoli Data Management Programme.cpp Compiled, run and tested on: 26-01-2018 #include<iostream.h> #include<conio.h> #include<string.h> #include<stdlib.h> //***************** define maximum number of patients in a queue **************** #define MAXPATIENTS 100 // ****************define structure for patient data************************** struct patient { char FirstName[50]; char LastName[50]; char ID[20]; }; // ***********************define class for queue****************************** class queue { public: queue (void); int AddPatientAtEnd (patient p); int AddPatientAtBeginning (patient p); patient GetNextPatient (void); int RemoveDeadPatient (patient * p); void OutputList (void); char DepartmentName[50]; private: int NumberOfPatients; patient List[MAXPATIENTS]; }; // *****************declare member functions for queue************************** queue::queue () { // constructor NumberOfPatients = 0; } int queue::AddPatientAtEnd (patient p) { // ***************adds a normal patient to the end of the queue.**************** // returns 1 if successful, 0 if queue is full. if (NumberOfPatients >= MAXPATIENTS) { // queue is full return 0; } // put in new patient else List[NumberOfPatients] = p; NumberOfPatients++; return 1; } int queue::AddPatientAtBeginning (patient p) {
  • 7. 7 // ****************adds a critically ill patient to the beginning of the queue.**** // returns 1 if successful, 0 if queue is full. int i; if (NumberOfPatients >= MAXPATIENTS) { // queue is full return 0; } // move all patients one position back in queue for (i = NumberOfPatients-1; i >= 0; i--) { List[i+1] = List[i]; } // put in new patient List[0] = p; NumberOfPatients++; return 1; } patient queue::GetNextPatient (void) { // *****************gets the patient that is first in the queue.************* // ************returns patient with no ID if queue is empty ***************** int i; patient p; if (NumberOfPatients == 0) { // queue is empty strcpy(p.ID,""); return p;} // get first patient p = List[0]; // move all remaining patients one position forward in queue NumberOfPatients--; for (i=0; i<NumberOfPatients; i++) { List[i] = List[i+1]; } // return patient return p; } int queue::RemoveDeadPatient (patient * p) { // removes a patient from queue. // returns 1 if successful, 0 if patient not found int i, j, found = 0; // search for patient for (i=0; i<NumberOfPatients; i++) { if (stricmp(List[i].ID, p->ID) == 0) { // patient found in queue *p = List[i]; found = 1; // move all following patients one position forward in queue NumberOfPatients; for (j=i; j<NumberOfPatients; j++) { List[j] = List[j+1]; } } } return found; } void queue::OutputList (void) { // lists entire queue on screen int i; if (NumberOfPatients == 0)
  • 8. 8 { cout << "Queue is empty"; } else { for (i=0; i<NumberOfPatients; i++) { cout << "Patient Name " << List[i].FirstName; cout << " " << List[i].LastName; cout << 'n'; cout << "Patient ID " << List[i].ID; cout << 'n'; } } } // ******************declare functions used by main:************************* patient InputPatient (void) // this function asks user for patient data. { patient p; cout << "Please enter data for new patient First name: "; cin.getline(p.FirstName, sizeof(p.FirstName)); cout << "Last name: "; cin.getline(p.LastName, sizeof(p.LastName)); cout << "Aadhar number: "; cin.getline(p.ID, sizeof(p.ID)); // check if data valid if (p.FirstName[0]==0 || p.LastName[0]==0 || p.ID[0]==0) { // rejected strcpy(p.ID,""); cout << "Error: Data not valid. Operation cancelled."; getch(); } return p; } void OutputPatient (patient * p) { // this function outputs patient data to the screen if (p == NULL || p->ID[0]==0) { cout << "No patient"; return; } else cout << "Patient data:"; cout << "First name: " << p->FirstName; cout << "Last name: " << p->LastName; cout << "Aadhar number: " << p->ID; } int ReadNumber() // this function reads an integer number from the keyboard. // it is used because input with cin >> doesn’t work properly! { char buffer[20]; cin.getline(buffer, sizeof(buffer)); return atoi(buffer); } void DepartmentMenu (queue * q) // this function defines the user interface with menu for one department { int choice = 0, success; patient p; while (choice != 6) {
  • 9. 9 // clear screen //clrscr(); //system("cls"); // print menu cout << "Welcome to department: " << q->DepartmentName; cout << "Please enter your choice:"<< 'n'; cout << "1: Add normal patient"<< 'n'; cout << "2: Add critically ill patient"<< 'n'; cout << "3: Take out patient for operation"<< 'n'; cout << "4: Remove dead patient from queue"<< 'n'; cout << "5: List queue"<< 'n'; cout << "6: Change department or "<< 'n'; // get user choice choice = ReadNumber(); // do indicated action switch (choice) { case 1: // Add normal patient p = InputPatient(); if (p.ID[0]) { success = q->AddPatientAtEnd(p); //clrscr(); //system("cls"); if (success) { cout << "Patient added successfully:"; } else { // error cout << "Error: The queue is full. Cannot add patient:"; } OutputPatient(&p); cout << "Press any key"<<'n'; getch(); } break; case 2: // Add critically ill patient p = InputPatient(); if (p.ID[0]) { success = q->AddPatientAtBeginning(p); //clrscr(); //system("cls"); if (success) { cout << "Patient added successfully:"<< 'n'; } else { // error cout << "Error: The queue is full. Cannot add patient:"<< 'n'; } OutputPatient(&p); cout << "Press any key"<<'n'; getch(); } break; case 3: // Take out patient for operation p = q->GetNextPatient(); //clrscr(); //system("cls"); if (p.ID[0]) {
  • 10. 10 cout << "Patient to operate:"<< 'n'; OutputPatient(&p);} else { cout << "There is no patient to operate."<< 'n'; } cout << "Press any key"<<'n'; getch(); break; case 4: // Remove dead patient from queue p = InputPatient(); if (p.ID[0]) { success = q->RemoveDeadPatient(&p); //clrscr(); //system("cls"); if (success) { cout << "Patient removed:"<< 'n'; } else { // error cout << "Error: Cannot find patient:"<< 'n'; } OutputPatient(&p); cout << "Press any key"<<'n'; getch(); } break; case 5: // List queue //clrscr(); //system("cls"); q->OutputList(); cout << "Press any key"<<'n'; getch(); break; } } } // ******************main function defining queues and main menu***************** int main () { int i, MenuChoice = 0; // define three queues queue departments[3]; // set department names strcpy (departments[0].DepartmentName, "Heart clinic"); strcpy (departments[1].DepartmentName, "Lung clinic"); strcpy (departments[2].DepartmentName, "Plastic surgery"); while (MenuChoice != 4) { // clear screen //clrscr(); //system("cls"); // print menu cout << "Welcome to the City Hospital Mungaoli"<< 'n'; cout << "Please enter your choice:"<< 'n'; for (i = 0; i < 3; i++) { // write menu item for department i cout << "" << (i+1) << ": " << departments[i].DepartmentName<< 'n'; } cout << "4: Exit"<< 'n';
  • 11. 11 // get user choice MenuChoice = ReadNumber(); // is it a department name? if (MenuChoice >= 1 && MenuChoice <= 3) { // call submenu for department // (using pointer arithmetics here:) DepartmentMenu (departments + (MenuChoice-1)); } } } // ************************End of the Programme******************************** City Hospital Mungaoli Data Management System Output and Console Screen City Hospital Mungaoli Data Management Programme.cpp Tested on: 26-01-2018 Programme Code run successfully and results have been obtained as expected in the objective of the Project. Department wise patient data management system results for City Hospital Mungaoli (output Screen Shots) are given below: (1) City Hospital Mungaoli Welcome Screen and Output for Heart Clinic
  • 12. 12 (ii) Output for Lung Clinic Department of City Hospital Mungaoli
  • 13. 13
  • 14. 14 (iii) Output for Plastic Surgery Department Bibliography To make this project I have taken source from a book “Computer Science with C++” written by Sumita Arora and “Computer Science” NCERT text book, and taken help of my computer science teacher Mr. Vikram Singh Rathore and My elder brother Mr. Hitendra Sahu. *End of the Report*