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

 1164

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 0
Viewed 10

Alphabet To Morse-code Converter Project In C++|| Easiest Programing Code Program In C/C++

This project is about to convert user given string into the morse code. Morse code is the code which is generated using dot(.) and hyphen(-) symbol. It is very much important concept in data compression. ... view more

submited by :- harshvadan on 2017-01-19

0

favorite 0
Download 1
Viewed 14

Shannon-fano Algorithm Coding Using C|| Simplest Way To Code Shannon-fano Algorithm Program In C/C++

This is c program of shannon-fano algorithm using C language. This algorithm technique is used in data compression.... view more

submited by :- harshvadan on 2017-01-19

0

favorite 0
Download 3
Viewed 65

Assignment Using C Language Program In C/C++

Using this project once can use this as an assignment management project. **NOTE: PLEASE FOLLOW PROPER INSTRUCTIONS WHILE GIVING INPUT. IF IT IS ASKING FOR CAPITAL LETTER THEN PLEASE PROVIDE THE INFORMATION IN CAPITAL ONLY. ... view more

submited by :- harshvadan on 2017-01-12

0

favorite 0
Download 30
Viewed 151

ATM Machine Using C || C Project Project In C/C++

The project is about ATM machine & how the inside code of ATM is. **NOTE: PLEASE FOLLOW PROPER INSTRUCTIONS WHILE GIVING INPUT. IF IT IS ASKING FOR CAPITAL LETTER THEN PLEASE PROVIDE THE INFORMATION IN CAPITAL ONLY. @@PLEASE FOLLOW ME AND RATE M... view more

submited by :- harshvadan on 2017-01-12

0

favorite 0
Download 7
Viewed 108

Mini_Quiz-2 Program In C/C++

This game is very easy to play. You'll be asked some general knowledge questions and the right answer is to be chosen among the four options provided. Your score will be calculated at the end. Remember that the more quicker you give answer the more ... view more

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