kashipara.com

250,000+ members

our android apps in store



Kashipara.com is a community of 2.25 lakh programmers and students, just like you, helping each other. Join them; it only takes a minute: Sign Up

Hospital Management project on C/C++


Hospital Management project features and function requirement. Share C/C++ Project ideas and topics with us. grate and many C/C++ project ideas and topics. here some C/C++ project ideas for research paper. here large collection of C/C++ project with source code and database. we many idea to development application like mobile application,desktop software application,web application development. you can find more project topics and ideas on C/C++. development ideas on Hospital Management. many project available to download with C/C++ source code and database. free download Hospital Management project synopsis available.

free download Hospital Management mini and major C/C++ project source code. download simple learning C/C++ project source code with diagram and documentations.


user details


Education
university
My Specialities
working in

other project submit by sharon




view favorite

add to favorite


Hospital Management project abstract


Posted by

 sharon sv

Project Name  Hospital Management
Upload Date

 2013-11-17

Platform

 C/C++

Programming Language

 c++

Database

 Hospital

Project Type

 desktop Application

View

 1136

download more C/C++ projects


what's your project requirement .. tell us ..

Hospital Management project description


I want to add delete a patient database in the following code


#include<stdio.h>

#include<conio.h>

#include<fstream.h>

#include<stdlib.h>

#include<string.h>

#include<iomanip.h>

//*******************************************************

//    CLASS NAME : patient

//*******************************************************

class patient

{

public:

char name[20];

char blood_group[5];

int pat_id;

long int phn;

 

 

int a;

void patientdata();

void showdata();

 

};

//*******************************************************

//    FUNCTIONS TO GET AND SHOW DATA

//*******************************************************

void patient::patientdata()

{

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

cout<<" \n\n\t\t\tCreate New Patient Database ";

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

cout<<"\nEnter Patient ID : ";

cin>>pat_id;

cout<<"\nEnter Patient Name : ";

cin>>name;

cout<<"\nEnter Patient Blood Group : ";

cin>>blood_group;

fflush(stdin);

cout<<"\nEnter Patient Phone  : ";

cin>>phn;

 

}

void patient::showdata()

{

cout<<"\nPatient ID\t: "<<pat_id;

cout<<"\nPatient Name\t: "<<name;

cout<<"\nBlood Group\t: "<<blood_group;

cout<<"\nPatient Phone\t: "<<phn;

 

cout<<"\n\n";

}

/***************************************************************************

Main Function

*************************************************************************/

void main()

{

clrscr();

gotoxy(20,18);

cout<<"\tProgram Developed by :-";

gotoxy(28,22);

cout<<"\tMe\n";

gotoxy(25,28);

cout<<"Press Any Key to Continue";

getch();

clrscr();

char s;

patient obj;

z:

fstream f;

f.open("patient",ios::in|ios::out|ios::app|ios::ate|ios::binary);

cout<<"\n =============================================================================\n";

cout<<"\t\t\t Blood Group Automation\n";

cout<<"\n =============================================================================\n";

cout<<"\n\t 1 . Enter Patient Database";

cout<<"\n\t 2 . View Patient Database";

cout<<"\n\t 3 . Modify Patient Database";

cout<<"\n\t 4 . Search Patient Database";

cout<<"\n\t 5 . Exit ";

int a;

cout<<"\n\n\n\tEnter your Choice:";

f.seekg(0);

cin>>a;

char x;

switch (a)

{

//*******************************************************

//                     ADD A PATIENT RECORD

//*******************************************************

case 1:

clrscr();

fstream f;

f.open("patient",ios::in|ios::out|ios::ate|ios::app|ios::binary);

char ans;

obj.patientdata();

f.write((char *)&obj,sizeof(obj));

getch();

cout<<"Do You Want To Continue? y/n  :";

ans=getchar();

if(ans=='Y' || ans=='y')

goto z;

else

break;

//*******************************************************

//    CASE       : 2

//    DETAILS    : TO SHOW ALL patient RECORDS

//*******************************************************

case 2:

{

cout<<"\n\n";

fstream f;

f.open("patient",ios::in|ios::out|ios::ate|ios::app|ios::binary);

// cout<<"\n\n";

char ans;

f.seekg(0);

int ctr=0;

while(f.read((char *)&obj,sizeof(obj)) )

{

ctr=ctr+1;

if(ctr==8)

{

getchar();

clrscr();

ctr=0;

}

obj.showdata();

if(f.eof()==1)

{

break;

}

}

f.close();

cout<<"Do You Want To Continue? y/n :";

cin>>ans;

if(ans=='y'|| ans=='Y')

goto z;

else

{

 

exit(1);

}

}

break;

//===========================================================

//                           Case 3

//============================================================

case 3:

{

clrscr();

// char ans;

fstream f;

patient obj;

char name[20];

char blood_group[5];

long int phn;

int pat_id;

f.open("patient",ios::in|ios::binary);

cout<<"\n";

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

cout<<"\n                  Modify Patient  Database       \n";

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

cout<<"\n Enter Patient Name  :";

cin>>name;

do

{ f.read((char *)&obj,sizeof(obj));

if(f.eof()==1) {break;}

if(strcmp(obj.name,name)==0)

{

cout<<"\n\tPatient Name :"<<obj.name;

cout<<"\n\tPatient ID : "<<obj.pat_id;

cout<<"\n\tBlood Group :"<<obj.blood_group;

cout<<"\n\tPatient Phone :" <<obj.phn;

getchar();

cout<<endl;

cout<<endl;

cout<<"\n \t      Enter New Database" ;

cout<<"\n\n\tEnter  Patient name : ";

cin>>name;

cout<<"\n\tEnter Patient ID : ";

cin>>pat_id;

cout<<"\n\tBlood Group  : ";

cin>>blood_group;

cout<<"\n\tEnter Patient Phone :";

cin>>phn;

cout<<"\n\n";

strcpy(obj.name,name);

strcpy(obj.blood_group,blood_group);

obj.a=a;

int l=f.tellg();

f.close();

f.open("patient",ios::out|ios::binary|ios::ate);

f.seekg(l-sizeof(obj));

f.write((char *)&obj,sizeof(obj));

}

}while(f);

f.close();

cout<<"Do You Want To Continue?y/n :";

ans=getchar();

if(ans=='Y'||ans=='y')

{goto z;}

else

break;

}

//******************************************************

//            Case 4    Searching The Patient From Database

//******************************************************

case 4:

{

clrscr();

// char ans;

fstream f;

patient obj;

char name[20];

char blood_group[5];

long int phn;

int pat_id;

f.open("patient",ios::in|ios::binary);

cout<<"\n";

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

cout<<"\n                  Search Patient  Database       \n";

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

cout<<"\n Enter Patient Name  :";

cin>>name;

do

{ f.read((char *)&obj,sizeof(obj));

if(f.eof()==1) {break;}

if(strcmp(obj.name,name)==0)

{

cout<<"\n\tPatient Name :"<<obj.name;

cout<<"\n\tPatient ID : "<<obj.pat_id;

cout<<"\n\tBlood Group :"<<obj.blood_group;

cout<<"\n\tPatient Phone :" <<obj.phn;

getchar();

cout<<endl;

strcpy(obj.name,name);

strcpy(obj.blood_group,blood_group);

obj.a=a;

int l=f.tellg();

f.close();

f.open("patient",ios::out|ios::binary|ios::ate);

f.seekg(l-sizeof(obj));

//f.write((char *)&obj,sizeof(obj));

}

else

{

cout<<"\n\n\Patient Does Not Exist\n\n\n";

}

}while(f);

f.close();

cout<<"\n\nDo You Want To Continue?y/n :";

ans=getchar();

if(ans=='Y'||ans=='y')

{goto z;}

else

break;

}

/*    Exit  */

case 5:

{

exit(1);

}

default:

{

cout<<"\n\tWrong input \n";

}

cout<<"\n\tDo You Want To Continue?y/n :";

ans=getchar();

clrscr();

if(ans=='Y'||ans=='y')

{goto z;}

else

break;

}

getch();

}  





Latest C/C++ Project Source Code


0

favorite 1
Download 96
Viewed 800

Banking System Project In C/C++

This is an admin , customer based banking system in which admin creates customer accounts and customer creates their bank accounts and can perform various operations.... view more

submited by :- ave_19 on 2016-10-29

0

favorite 0
Download 36
Viewed 264

Typing Master Program In C/C++

yping is the basic command to run a computer and your typing speed plays vital role while working in computer to save time. Here I have presented a Typing Master Project in C to measure user’s typing speed and to enhance their typing speed. This is... view more

submited by :- h3ck4rz on 2016-10-27

0

favorite 0
Download 17
Viewed 309

Periodic Table Program In C/C++

The Modern Periodic Table project is a simple console application built without the use of graphics. It is developed using the C programming language for the purpose of storing name, symbol, atomic number, atomic weight, and some important properties... view more

submited by :- h3ck4rz on 2016-10-27

0

favorite 0
Download 6
Viewed 165

Inverse A Character Program In C/C++

This is a simple graphics game that can inverse putted character . This graphics program is very simple and made for beginners . Enjoy coding happy diwali :)... view more

submited by :- premang on 2016-10-24

0

favorite 0
Download 19
Viewed 301

My Character Animation Game Program In C/C++

This is a simple program that make a cool character and that is able to run , you can also define size and speed of the character .... view more

submited by :- premang on 2016-10-24