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

 1198

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 0
Download 13
Viewed 106

Snake Game Using C Project In C/C++

It is project developed by me in first year which is Snake game. User can use it as a project in first year or can use it for fun.... view more

submited by :- harshvadan on 2017-02-14

0

favorite 0
Download 0
Viewed 170

"BANK MANAGEMENT SYSTEM USING C" Project In C/C++

Here is a project I developed as mini project in C bank management system during my first semester; it is complete and totally error-free. This project is focused on customer account services in bank, so it is named “Customer Account Bank Managemen... view more

submited by :- harshvadan on 2017-02-11

0

favorite 0
Download 3
Viewed 140

Foyd's Triangle Printing Program In C/C++

This is a simple c program which prints foyd's_triangle pyramid, the main aim of this program is how to use for loop and nested for loop.. and you also gets different pattern..... view more

submited by :- kushal.muliya on 2017-01-24

0

favorite 0
Download 2
Viewed 115

Pascal's Triangle Printing Program In C/C++

This is a simple c program which prints pascal's_triangle, the main aim of this program is how to use for loop and nested for loop.. and you also gets different pattern..... view more

submited by :- kushal.muliya on 2017-01-24

0

favorite 0
Download 0
Viewed 73

Inverted Full Pyramid Printing Program In C/C++

This is a simple c program which prints inverted pyramid using *(star pattern), the main aim of this program is how to use for loop and nested for loop.. and you also gets different pattern..... view more

submited by :- kushal.muliya on 2017-01-24