SlideShare a Scribd company logo
………………………………. SCHOOL,…………
Project Report
On
HOSPITAL
MANAGEMENT SYSTEM
(PATIENTS BILL MANAGEMENT SYSTEM)
In the partial fulfillment of All India Senior School
Certificate Examination for the session ………….
conducted by Central Board Of Secondary Education.
…………………….
CLASS--XII
ACKNOWLEDGEMENT
I would like to convey my heartful thanks to
………………….. (Computer Science) who always
gave valuable suggestions & guidance for completion
of my project.
He helped me to understand & remember important
details of the project. My project has been a success
only because of his guidance.
I am especially indented & I am also beholden to my
friends. And finally I thank to the members of my
family for their support & encouragement.
CERTIFICATE
This is to certify that ……………………….. of
class ……. of
……………………………………………. has
completed her project under my supervision. She
has taken proper care & shown sincerity in
completion of this project.
I certify that this project is up to my
expectation & as per the guideline issued by
CBSE.
……………………….
(Computer Science faculty )
Content
1. Introduction
2. Source Code
3. Output
4. Requirement
5. Advantages and disadvantages
6. Conclusion
7. System design
INTRODUCTION
This project HOSPITAL MANAGEMENT
SYSTEM(PATIENTS BILL MANAGEMENT SYSTEM)
includes easy working of the hospital system in maintaining
the hospital system.
This software keep the records of all the patients and their
information about all the bills paid or due
Objective of this software is to computerize the manual system
of a hospital, so that all the transactions become fast and easy.
It replaces all the paper work. It works according to the need
and lowers the workload of user.
Objective of the program is rather simple .It provides easy
management of transaction. It’s provides an easy navigation
menu which a layman user can also use.
It manages the entire record along with date, patient code,
patient’s records and doctors details etc. In this program there
is a working mode available administrator. An administrator is
as usual given all the rights like adding information, modifying
existing information, deleting and viewing the information.
In this system clearly aims at reducing the paper work at the
cost to be borne of the registers and other things are much
higher than the System’s working. Its keep record of all the
information given to it according to the date which makes
locating a record quite easy
OUTPUT
//***************************************************************
// HEADER FILE USED IN PROJECT
//****************************************************************
#include<stdlib.h>
#include<conio.h>
#include<stdio.h>
#include<process.h>
#include<fstream.h>
#include<iomanip.h>
#include<string.h>
#include<ctype.h>
//*****STRUCTURE DEFINATIONS
struct roomlimit
{
char rname[15];
int limit;
};
struct otherinfo
{
char mobno[15];
char email[70];
char bloodgroup[5];
char status;
};
//name structure
struct nameinfo
{
char fname[20];
char lname[20];
int age;
};
// address structure
struct address
{
char hno_street[15];
char city[35];
char state[15];
};
//date structure
struct dateinfo
{
int dd;
int mm;
int yy;
};
//***************room record
struct room_rec
{
char pno[15];
char un[15];
dateinfo dt;
char room_status[15];
};
//*****STRUCTURE DEFINATIONS
//***********FUNCTION PROTOTYPE
void intro();
char *getoldunit(char ptno[15]);
char *getward(char pno[15]);
void intromain();
int checkpass();
void admin_menu();
void patient_menu();
void doctors_menu();
void rooms_menu();
char *getdocno();
void REPORTS();
char *getreg();
void runfirsttime();
void mob_billdesc(char patno[15],dateinfo dt,char desc[50]);
void delete_DOCinfo(char dcno[15]);
void displayallDOC();
void displayallroomlimit();
void displayallDOConmartial(char MR);
void createbillother(char pno[15],char billunitdetail[45],dateinfo dtofbill,float amount);
void modify_roomtype(char ename[15],int value);
void addnewroomstypes(char ename[15],int value);
void patientadmittmenu();
void doctor_new();
void searchPATIENTSwardwise(char ward[15]);
void searchPATIENTS(char sr[15]);
void write_patients(char unit[15]);
void modify_patientinfo(char patno[15]);
void dec_roomlimit(char rname[15]);
void addnewroomstypes();
void addnewbill(char patno[15]);
void discharge_PATinfo(char ptno[15]);
void createmodifyroom(char pno[15],char unNEW[15],char unOLD[15]);
void modify_DOCinfo(char dcno[15]);
void searchPATIENTSdatewise(dateinfo sr);
void billingmenu(char patno[15]);
void inc_roomlimit(char rname[15]);
void mob_billamount(char patno[15],dateinfo dt,float amt);
void create_room_allot(char patno[15],char unit[15],dateinfo d,char st[15]);
void createbillroom(char pno[15],char billunitdetail[45],dateinfo dtofbill,float amount);
//***********FUNCTION PROTOTYPE
//*********CLASS DEFINATION
//********BILLING CLASS
class billing
{
//char billno[15];
char pno[15];
char billdetail[45];
float amount;
dateinfo dateofbill;
char billstatus;
public:
void setbillamount(float ft)
{
amount=ft;
}
void setbilldetails(char bt[45])
{
strcpy(billdetail,bt);
}
void billdeposit(char pn[15],char bdetail[45],float amt,dateinfo dtbill)
{
strcpy(pno,pn);
strcpy(billdetail,bdetail);
amount=amt;
dateofbill=dtbill;
billstatus='N';
}
void createbill(char pn[15])
{
gotoxy(5,7);
cout<<"======================================================================";
strcpy(pno,pn);
gotoxy(1,8);
cout<<"PATIENTS NO: "<<pno;
gotoxy(20,8);
cout<<"DATE(dd/mm/yyyy):";
gotoxy(30,8);
cin>>dateofbill.dd;
gotoxy(35,8);
cout<<"/";
gotoxy(40,8);
cin>>dateofbill.mm;
gotoxy(45,8);
cout<<"/";
gotoxy(50,8);
cin>>dateofbill.yy;
gotoxy(20,8);
cout<<"DETAILS OF BILL TYPE";
cin.ignore();
cin.getline(billdetail,45);
}
char *getpno()
{
return pno;
}
float getamount()
{
return amount;
}
dateinfo getdate()
{
return dateofbill;
}
void showallbills(int c)
{
gotoxy(1,c);
cout<<billdetail<<setw(13)<<amount<<setw(15)<<dateofbill.dd<<"/"<<dateofbill.mm<<"/"<<dateofbill.yy;
gotoxy(1,c+1);
cout<<"------------------------------------------------------------------------";
}
char *getbilldetail()
{
return billdetail;
}
};
//********BILLING CLASS
//***************patient's class**********************************
class patient
{
char pno[15];
nameinfo pnm;
address padd;
otherinfo pother;
char pmartialstatus;
dateinfo pdate1;
float amount;
char admittedto[20];
public:
patient()
{
amount=0.00;
}
void setfullname(nameinfo n)
{
strcpy(pnm.fname,n.fname);
strcpy(pnm.lname,n.lname);
}
void setaddress(address ad1)
{
strcpy(padd.hno_street,ad1.hno_street);
strcpy(padd.city,ad1.city);
strcpy(padd.state,ad1.state);
}
void setage(int ag)
{
pnm.age=ag;
}
void setmobileno(char mb[15])
{
strcpy(pother.mobno,mb);
}
void setemail(char eid[75])
{
strcpy(pother.email,eid);
}
void setblodgrp(char bg[5])
{
strcpy(pother.bloodgroup,bg);
}
//****************show all donars with blood groups row wise
float getamount()
{
return amount;
}
void showallpatientsrowwise(int c)
{
gotoxy(1,c);
cout<<pno<<setw(8)<<pnm.fname<<"-"<<pnm.lname<<setw(10)<<pnm.age<<setw(5)<<padd.hno_street<<"-"<<padd.city<<",
"<<padd.state<<setw(15)<<pother.mobno<<setw(5)<<pother.bloodgroup;
gotoxy(1,c+1);
cout<<"------------------------------------------------------------------------";
}
//****************
//input fuction for patients information
void create_patient()
{
gotoxy(5,7);
cout<<"====================PATIENT'S INFORMATION==============================";
gotoxy(1,8);
cout<<"PAT.NO:";
gotoxy(10,8);
cin>>pno;
gotoxy(20,8);
cout<<"FIRST NAME:";
gotoxy(32,8);
cin>>pnm.fname;
gotoxy(48,8);
cout<<"LAST NAME:";
gotoxy(60,8);
cin>>pnm.lname;
gotoxy(10,9);
cout<<"AGE:";
gotoxy(20,9);
cin>>pnm.age;
gotoxy(50,9);
cout<<"MARTIAL STATUS:";
cin>>pmartialstatus;
gotoxy(10,10);
cout<<"-----------------PATIENT'S ADDRESS DETAIL'S---------------------";
gotoxy(1,12);
cout<<"HOUSE NO:";
gotoxy(12,12);
cin.getline(padd.hno_street,15);
gotoxy(18,12);
cout<<"ADDRESS:";
gotoxy(30,12);
cin>>padd.city;
gotoxy(55,12);
cout<<"STATE:";
gotoxy(65,12);
cin>>padd.state;
gotoxy(10,14);
cout<<"-----------------DATE OF PATIENT ADMITTED--------------------";
gotoxy(10,15);
cout<<"DATE(dd/mm/yyyy):";
gotoxy(30,15);
cin>>pdate1.dd;
gotoxy(35,15);
cout<<"/";
gotoxy(40,15);
cin>>pdate1.mm;
gotoxy(45,15);
cout<<"/";
gotoxy(50,15);
cin>>pdate1.yy;
gotoxy(10,17);
cout<<"-----------------OTHER INFORMATION----------------------";
gotoxy(1,18);
cout<<"MOBILE NO:";
gotoxy(15,18);
cin>>pother.mobno;
gotoxy(1,19);
cout<<"E-MAIL(IF NO ENTER "NO"):";
gotoxy(30,19);
cin.getline(pother.email,70);
if(strcmp(pother.email,"NO")==0||strcmp(pother.email,"no")==0)
strcpy(pother.email,"NO EMAIL ID");
gotoxy(1,20);
cout<<"BLOODGROUP:";
cin>>pother.bloodgroup;
gotoxy(45,20);
cout<<"AMOUNT TO DEPOSIT: ";cin>>amount;
pother.status='Y';
}
//input fuction for patients information
//****************display patients information in a box
void display_patient_rectangle()
{
gotoxy(5,7);
cout<<"======================================================================";
gotoxy(1,8);
cout<<"PAT.REG:";
gotoxy(12,8);
cout<<pno;
gotoxy(25,8);
cout<<"NAME:";
gotoxy(30,8);
cout<<" "<<pnm.fname;
gotoxy(40,8);
cout<<"- "<<pnm.lname;
gotoxy(60,8);
cout<<"AGE:";
gotoxy(65,8);
cout<<pnm.age;
gotoxy(1,9);
cout<<"ADDRESS::";
gotoxy(10,9);
cout<<padd.hno_street<<"-";
gotoxy(15,9);
cout<<padd.city;
cout<<","<<padd.state;
gotoxy(50,9);
cout<<"MARTIAL STATUS:";
cout<<pmartialstatus;
gotoxy(1,10);
cout<<"MOBILE NO:";
gotoxy(12,10);
cout<<pother.mobno;
gotoxy(1,11);
cout<<"E-MAIL:";
gotoxy(10,11);
cout<<pother.email;
gotoxy(40,10);
cout<<"BLOODGROUP:";
gotoxy(60,10);
cout<<pother.bloodgroup;
gotoxy(55,11);
cout<<"Amt.DEPOSIT:"<<amount;
gotoxy(5,12);
cout<<"======================================================================";
}
char getpmartialstatus()
{
return pmartialstatus;
}
char *getpno()
{
return pno;
}
dateinfo getdate()
{
return pdate1;
}
int pdd()
{
return pdate1.dd;
}
int pmm()
{
return pdate1.mm;
}
int pyy()
{
return pdate1.yy;
}
char *getcity()
{
return padd.city;
}
char getstatus()
{
return pother.status;
}
};
//***************patient's class**********************************
//***************doctor's class**********************************
class doctor
{
char dno[15];
nameinfo dnm;
address dadd;
char martialstatus;
char mobno[15];
char email[70];
dateinfo ddate1;
float fees;
char sep[50];
char doc_status[15];
public:
char *getdocsep()
{
return sep;
}
char getdocmartialstatus()
{
return martialstatus;
}
char *getdocstatus()
{
return doc_status;
}
float getdocfees()
{
return fees;
}
char *getdocmob()
{
return mobno;
}
char *getdocemail()
{
return email;
}
char *getdocno()
{
return dno;
}
nameinfo getdocnm()
{
return dnm;
}
address getdocadd()
{
return dadd;
}
dateinfo getdocdate()
{
return ddate1;
}
//*****************
void setDOCfullname(nameinfo n)
{
strcpy(dnm.fname,n.fname);
strcpy(dnm.lname,n.lname);
}
void setDOCaddress(address ad1)
{
strcpy(dadd.hno_street,ad1.hno_street);
strcpy(dadd.city,ad1.city);
strcpy(dadd.state,ad1.state);
}
void setDOCage(int ag)
{
dnm.age=ag;
}
void setDOCmobileno(char mb[15])
{
strcpy(mobno,mb);
}
void setDOCemail(char eid[75])
{
strcpy(email,eid);
}
void setDOCmartialstatus(char m)
{
martialstatus=m;
}
void setDOCstatus(char st[15])
{
strcpy(doc_status,st);
}
void setDOCspec(char sp[45])
{ strcpy(sep,sp); }
void setDOCfees(float chgr)
{ fees=chgr; }
//****************
doctor()
{fees=0.00;}
void input(char dno1[15],nameinfo dnm1,char MS,address dadd1,char mobno2[15],char email2[70],dateinfo ddate2,float
fees2,char sep2[20],char doc_status2[15])
{
strcpy(dno,dno1);
dnm=dnm1;
dadd=dadd1;
martialstatus=MS;
strcpy(mobno,mobno2);
strcpy(email,email2);
ddate1=ddate2;
fees=fees2;
strcpy(sep,sep2);
strcpy(doc_status,doc_status2);
}
void showalldoctorsrowwise(int c)
{ gotoxy(1,c);
cout<<dno<<setw(8)<<dnm.fname<<"-"<<dnm.lname<<setw(5)<<dnm.age<<setw(8)<<dadd.hno_street<<"-"<<dadd.city<<","
<<dadd.state<<setw(12)<<sep;
gotoxy(1,c+1);
cout<<"------------------------------------------------------------------------";
}
//****************show all donars with blood groups row wise
//input fuction for patients information
void create_doctor()
{
gotoxy(5,7);
cout<<"====================DOCTOR'S INFORMATION==============================";
gotoxy(1,8);
cout<<"DOC.NO:";
gotoxy(10,8);
cin>>dno;
gotoxy(20,8);
cout<<"FIRST NAME:";
gotoxy(32,8);
cin>>dnm.fname;
gotoxy(48,8);
cout<<"LAST NAME:";
gotoxy(60,8);
cin>>dnm.lname;
gotoxy(10,9);
cout<<"AGE:";
gotoxy(20,9);
cin>>dnm.age;
gotoxy(50,9);
cout<<"MARTIAL STATUS:";
cin>>martialstatus;
gotoxy(10,10);
cout<<"-----------------DOCTOR'S ADDRESS DETAIL'S---------------------";
gotoxy(1,12);
cout<<"HOUSE NO:";
gotoxy(12,12);
cin.ignore();
cin.getline(dadd.hno_street,15);
gotoxy(18,12);
cout<<"ADDRESS:";
gotoxy(30,12);
cin>>dadd.city;
gotoxy(55,12);
cout<<"STATE:";
gotoxy(65,12);
cin>>dadd.state;
gotoxy(10,14);
cout<<"-----------------DATE OF JOINING --------------------";
gotoxy(10,15);
cout<<"DATE(dd/mm/yyyy):";
gotoxy(30,15);
cin>>ddate1.dd;
gotoxy(35,15);
cout<<"/";
gotoxy(40,15);
cin>>ddate1.mm;
gotoxy(45,15);
cout<<"/";
gotoxy(50,15);
cin>>ddate1.yy;
gotoxy(10,17);
cout<<"-----------------OTHER INFORMATION----------------------";
gotoxy(1,18);
cout<<"MOBILE NO:";
gotoxy(15,18);
cin>>mobno;
gotoxy(1,19);
cout<<"E-MAIL(IF NO ENTER "NO"):";
gotoxy(30,19);
cin.getline(email,70);
if(strcmp(email,"NO")==0||strcmp(email,"no")==0)
strcpy(email,"NO EMAIL ID");
gotoxy(1,20);
cout<<"SPECIALISED IN : ";
cin>>sep;
gotoxy(45,20);
cout<<"AMOUNT TO DEPOSIT: ";cin>>fees;
strcpy(doc_status,"available");
}
//input fuction for patients information
//****************display doctors information in a box
void display_doctor_rectangle()
{
gotoxy(5,7);
cout<<"======================================================================";
gotoxy(1,8);
cout<<"DOC. REG:";
gotoxy(12,8);
cout<<dno;
gotoxy(25,8);
cout<<"NAME:";
gotoxy(30,8);
cout<<" "<<dnm.fname;
gotoxy(40,8);
cout<<"- "<<dnm.lname;
gotoxy(60,8);
cout<<"AGE:";
gotoxy(65,8);
cout<<dnm.age;
gotoxy(1,9);
cout<<"ADDRESS::";
gotoxy(10,9);
cout<<dadd.hno_street<<"-";
gotoxy(15,9);
cout<<dadd.city;
cout<<","<<dadd.state;
gotoxy(50,9);
cout<<"MARTIAL STATUS:";
cout<<martialstatus;
gotoxy(1,10);
cout<<"MOBILE NO:";
gotoxy(12,10);
cout<<mobno;
gotoxy(1,11);
cout<<"E-MAIL:";
gotoxy(10,11);
cout<<email;
gotoxy(40,10);
cout<<"SPECIALIZED:";
gotoxy(60,10);
cout<<sep;
gotoxy(5,12);
cout<<"======================================================================";
}};
//*********CLASS DEFINATION
//********MAIN BODY
void main()
{
char ch;
intro();
if(checkpass()==0)
{
do
{
//****************TEMPORARY***********************
clrscr();
intromain();
gotoxy(20,6);
cout<<"=================MAIN MENU====================";
gotoxy(28,7);
cout<<"01. intro. to hospital system(PLEASE RUN FOR FIRST TIME ONLY) ";
gotoxy(28,8);
cout<<"02. ADMINISTRATOR";
gotoxy(28,9);
cout<<"03. EXIT";
gotoxy(20,10);
cout<<"==============================================";
gotoxy(25,12);
cout<<"Please Select Your Option (1-3) ";
gotoxy(30,14);
ch=getche();
switch(ch)
{
case '1': clrscr();
runfirsttime();
break;
case '2': admin_menu();
break;
case '3':exit(0);
default :cout<<"a";
}
}while(ch!='3');
}else
{
exit(0);
}}
//***************************************************************
//********MAIN BODY
//********FUNCTION DEFINATIOS
//***************************************************************
// INTRODUCTION FUNCTION
//****************************************************************
void intro()
{ clrscr();
gotoxy(4,2);
cout<<"************************HOSPITAL MANAGEMENT ******************************";
gotoxy(5,4);
cout<<"==============(PATIENTS BILLING MANAGEMENT SYSTEM)=====================";
gotoxy(5,5);
cout<<"****************************S=Y=S=T=E=M********************************";
gotoxy(50,10);
cout<<"PROJECT:";
gotoxy(50,12);
cout<<"MADE BY : --------------------";
gotoxy(10,14);
cout<<"---------------CLASS : XII --------------------";
getch();
}
//***************************************************************
// INTRODUCTION FUNCTION
//****************************************************************
void intromain()
{ clrscr();
gotoxy(1,2);
cout<<"*******************HOSPITAL******MANAGEMENT********SYSTEM*************";
gotoxy(1,3);
cout<<"**************************(PATIENTS BILLING SYSTEM********************";
}
//******************************login name and password****************
int checkpass()
{
char nm[20];
char pass[10];
clrscr();
intromain();
gotoxy(20,20);
cout<<"PLEASE ENTER THE USER NAME:";
gotoxy(20,21);
cin>>nm;
clrscr();
gotoxy(20,20);
cout<<"PLEASE ENTER THE PASSWORD:";
gotoxy(20,21);
cin>>pass;
if(strcmp(nm,"admin")==0 && strcmp(pass,"vicky")==0)
{
return 0; }else { return 1; }
}
//********************************************************************
//***************************************************************
// ADMINSTRATOR MENU FUNCTION
//****************************************************************
void admin_menu()
{
clrscr();
char ch2,patno[15];
//************************************************************
clrscr();
intromain();
gotoxy(20,6);
cout<<"=================ADMIN MENU====================";
gotoxy(22,7);
cout<<"1.PATIENTS (OPD/ICU/OTHER)INFORMATION";
gotoxy(22,8);
cout<<"2.BILLS/TRANSCATIONS";
gotoxy(22,9);
cout<<"3.DOCTORS INFORMATION AND CHARGES";
gotoxy(22,10);
cout<<"4.ROOMS INFORMATION AND CHARGES";
gotoxy(22,11);
cout<<"5.REPORTS";
gotoxy(22,12);
cout<<"6.BACK TO MAIN MENU";
gotoxy(22,13);
cout<<"Please Enter Your Choice (1-6) ";
gotoxy(22,14);
//**********************************************************
ch2=getche();
switch(ch2)
{
case '1': clrscr();
patient_menu();
break;
case '2':
clrscr();
intromain();
gotoxy(10,8);
cout<<"*****ENTER THE PATIENTS NO:";
gotoxy(55,9);
cin>>patno;
billingmenu(patno);
break;
case '3':clrscr();
doctors_menu();
break;
case '4':clrscr();
rooms_menu();
break;
case '5':
clrscr();
REPORTS();
break;
default:
cout<<"a";//admin_menu();
}
}
//***************************************************************
//***************************************************************
// PATIENTS INFORMATION ADD / MODIFY / DELETE
//****************************************************************
void patient_menu()
{
clrscr();
char ch2;
char patno[15];
//************************************************************
clrscr();
intromain();
gotoxy(20,6);
cout<<"=================PATIENT'S MENU====================";
gotoxy(22,7);
cout<<"1.ADD PATIENT INFORMATION";
gotoxy(22,8);
cout<<"2.MODIFY PATIENT INFORMATION";
gotoxy(22,9);
cout<<"3.DISCHARGE PATIENT";
gotoxy(22,10);
cout<<"4.BACK TO MAIN MENU";
gotoxy(22,11);
cout<<"Please Enter Your Choice (1-4) ";
gotoxy(22,12);
//**********************************************************
ch2=getche();
switch(ch2)
{
case '1': clrscr();
patientadmittmenu();
break;
case '2':
clrscr();
intromain();
gotoxy(10,8);
cout<<"*****ENTER THE PATIENT. NO. TO BE SEARCHED:";
gotoxy(55,9);
cin>>patno;
modify_patientinfo(patno);
break;
case '3':
clrscr();
intromain();
gotoxy(10,8);
cout<<"*****ENTER THE PATIENT. NO. TO BE SEARCHED AND DISCHARGE:";
gotoxy(55,9);
cin>>patno;
discharge_PATinfo(patno);
break;
default:
cout<<"a";//admin_menu();
}
}
//***************************************************************
//***************************************************************
// DOCTORS INFORMATION ADD / MODIFY / DELETE
//****************************************************************
void doctors_menu()
{
clrscr();
char ch2;
char docno[15];
//************************************************************
clrscr();
intromain();
gotoxy(20,6);
cout<<"=================DOCTOR'S MENU====================";
gotoxy(22,7);
cout<<"1.ADD DOCTOR INFORMATION";
gotoxy(22,8);
cout<<"2.MODIFY DOCTOR INFORMATION";
gotoxy(22,9);
cout<<"3.DELETE DOCTOR INFORMATION";
gotoxy(22,10);
cout<<"4.BACK TO MAIN MENU";
gotoxy(22,11);
cout<<"Please Enter Your Choice (1-4) ";
gotoxy(22,12);
//**********************************************************
ch2=getche();
switch(ch2)
{
case '1': clrscr();
doctor_new();
break;
case '2':
clrscr();
intromain();
gotoxy(10,8);
cout<<"*****ENTER THE DOC. NO.TO BE SEARCHED:";
gotoxy(55,9);
cin>>docno;
modify_DOCinfo(docno);
break;
case '3':
clrscr();
intromain();
gotoxy(10,8);
cout<<"*****ENTER THE DOC NO. OF TO BE SEARCHED AND DELETE:";
gotoxy(55,9);
cin>>docno;
delete_DOCinfo(docno);
break;
default:
cout<<"a";//admin_menu();
}
}
//***************************************************************
//***************************************************************
// ROOMS INFORMATION ADD / MODIFY / DELETE
//****************************************************************
void rooms_menu()
{
clrscr();
char ch2;
char romname[15];
int val=0;
//************************************************************
clrscr();
intromain();
gotoxy(20,6);
cout<<"=================ROOM'S MENU====================";
gotoxy(22,7);
cout<<"1.ADD INCREASE ROOMS INFORMATION";
gotoxy(22,8);
cout<<"2.DECREASE ROOMS INFORMATION";
gotoxy(22,9);
cout<<"3.BACK TO MAIN MENU";
gotoxy(22,10);
cout<<"Please Enter Your Choice (1-3) ";
gotoxy(22,11);
//**********************************************************
ch2=getche();
switch(ch2)
{
case '1': clrscr();
intromain();
gotoxy(10,8);
cout<<"**ENTER THE ROOM NAME: ";
cin>>romname;
gotoxy(10,9);
cout<<"**ENTER THE VALUE TO INCREASE: ";
cin>>val;
addnewroomstypes(romname,val);
break;
case '2':
clrscr();
intromain();
gotoxy(10,8);
cout<<"**ENTER THE ROOM NAME: ";
cin>>romname;
gotoxy(10,9);
cout<<"**ENTER THE VALUE TO INCREASE: ";
cin>>val;
intromain();
modify_roomtype(romname,val);
break;
default:
cout<<"a";//admin_menu();
}
}
//***************************************************************
// REPORTS
//****************************************************************
void REPORTS()
{
clrscr();
char ch2,M;
char sarch[15];
dateinfo dtsearch;
char w[15];
//************************************************************
clrscr();
intromain();
gotoxy(20,6);
cout<<"=================REPORTS====================";
gotoxy(22,7);
cout<<"1.ALL PATIENTS INFORMATION DATE WISE";
gotoxy(22,8);
cout<<"2.ALL PATIENTS INFORMATION CITY WISE";
gotoxy(22,9);
cout<<"3.ALL PATIENTS INFORMATION WARD WISE";
gotoxy(22,10);
cout<<"4.ALL PATIENTS INFORMATION DOCTOR WISE";
gotoxy(22,11);
cout<<"5.PATIENTS DETAILS WITH DOCTOR VISITED LIST";
gotoxy(22,12);
cout<<"6.PATIENTS DETAILS WITH BILLS DETAILS";
gotoxy(22,13);
cout<<"7.ALL DOCTOR LIST";
gotoxy(22,14);
cout<<"8.ALL ROOMS LIST";
gotoxy(22,15);
cout<<"9.ALL DOCTOR LIST ON THE BASIS OF MARTIAL STATUS";
gotoxy(22,16);
cout<<"11.BACK TO MAIN MENU";
gotoxy(22,17);
cout<<"Please Enter Your Choice (1-11) ";
gotoxy(22,18);
//**********************************************************
ch2=getche();
switch(ch2)
{
case '1':intromain();
gotoxy(10,8);
cout<<"*****ENTER THE DATE WISEDATE(dd/mm/yyyy) SEARCH OF PATIENTS:";
gotoxy(30,9);
cin>>dtsearch.dd;
gotoxy(35,9);
cout<<"/";
gotoxy(40,9);
cin>>dtsearch.mm;
gotoxy(45,9);
cout<<"/";
gotoxy(50,9);
cin>>dtsearch.yy;
searchPATIENTSdatewise(dtsearch);
break;
case '2': intromain();
gotoxy(10,8);
cout<<"*****ENTER THE CITY WISE SEARCH OF PATIENTS:";
gotoxy(55,9);
cin>>sarch;
searchPATIENTS(sarch);
break;
case '3':
intromain();
gotoxy(10,8);
cout<<"*****ENTER THE WARD WISE SEARCH OF PATIENTS:";
gotoxy(55,9);
cin>>w;
searchPATIENTSwardwise(w);
break;
case '7':
clrscr();
intromain();
displayallDOC();
break;
case '8':
clrscr();
intromain();
displayallroomlimit();
break;
case '9':
clrscr();
intromain();
gotoxy(10,8);
cout<<"*****ENTER THE MARTIAL (M: MALE or F: FEMALE):";
gotoxy(55,9);
cin>>M;
displayallDOConmartial(M);
break;
default:
cout<<"a";//admin_menu();
}
}
//***************************************************************
//************"roomlimit.dat
void runfirsttime()
{
roomlimit rmlimit[4]={{"GEN",200},{"PAC",50},{"PNONAC",50},{"ICU",100}};
roomlimit rm;
ifstream objiff("roomlimit.dat",ios::binary);
if(!objiff)
{
gotoxy(10,20);
cout<<"File could not be open !! Press any Key...";
objiff.close();
getch();
ofstream objoff("roomlimit.dat",ios::binary);
clrscr();
intromain();
for(int x=0;x<4;x++)
{
rm=rmlimit[x];
objoff.write((char*)&rm,sizeof(roomlimit));
}
objoff.close();
clrscr();
intromain();
gotoxy(5,7);
cout<<"================================================================";
objiff.close();
}
//***********first doctors list by the hospital
nameinfo docnm[5]={{"DR.ANMOL","MIR",45},{"Dr.Shaleen","Agarwal",38},{"Dr.Swati","Aggarwal",45},
{"Dr.Pooja","Aggarwal",55},{"Dr.Rohit","Srivastava",56}};
address dadd[5]={{"SEC-2","Gurgaon","HARYANA"},{"SEC-2","Gurgaon","HARYANA"},{"SEC-2","Gurgaon","HARYANA"},
{"SEC-2","Gurgaon","HARYANA"},{"SEC-2","Gurgaon","HARYANA"}};
dateinfo dt[5]={{12,4,2012},{12,4,2012},{17,7,2015},{12,4,2014},{12,4,2016}};
doctor doc[5];
doc[0].input("D001",docnm[0],'M',dadd[0],"8975652325","NONE",dt[0],1000,"Gastroenterology","AVALIABLE");
doc[1].input("D002",docnm[1],'F',dadd[1],"8975652325","NONE",dt[1],1200,"Liver Transplant ","AVALIABLE");
doc[2].input("D003",docnm[2],'F',dadd[2],"8975652325","NONE",dt[2],1000,"Anaesthesia & Pain","AVALIABLE");
doc[3].input("D004",docnm[3],'F',dadd[3],"8975652325","NONE",dt[3],1000,"Dermatology & Cosmetology","AVALIABLE");
doc[4].input("D005",docnm[4],'M',dadd[4],"8975652325","NONE",dt[4],1000,"Cardiology & Cardiac Surgery","AVALIABLE");
// add martial status of patient and doctor and the Department of doctors also
//doctor(char dno1[15],nameinfo dnm1,char MS,address dadd1,char mobno2[15],char email2[70],dateinfo ddate2,float
fees2,char sep2[20],char doc_status2[15])
ofstream objoff2("doctor.dat",ios::binary|ios::app);
for(int x=0;x<5;x++)
{
objoff2.write((char*)&doc[x],sizeof(doctor));
}
objoff2.close();
getch();
}
//************"roomlimit.dat
//****************reports
void displayallDOC()
{
ifstream objiff("doctor.dat",ios::binary);
doctor doc;
//*****************************
if(!objiff)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
clrscr();
intromain();
int c1=7;
gotoxy(1,5);
cout<<"CODE"<<setw(15)<<"NAME OF DOCTOR"<<setw(5)<<"AGE"<<setw(12)<<"--
ADDRESS---"<<setw(18)<<"SPECIALIZATION";
gotoxy(1,6);
cout<<"========================================================================";
while(objiff.read((char*)&doc,sizeof(doctor)))
{
doc.showalldoctorsrowwise(c1);
c1++;
}
objiff.close();
getch();
//*****************************
}
void displayallroomlimit()
{
roomlimit rm;
ifstream objiff("roomlimit.dat",ios::binary);
//*****************************
if(!objiff)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
clrscr();
intromain();
int c1=7;
gotoxy(1,5);
cout<<"ROOM NAME"<<setw(25)<<"LIMIT OF ROOM";
gotoxy(1,6);
cout<<"========================================================================";
while(objiff.read((char*)&rm,sizeof(roomlimit)))
{
gotoxy(1,c1);
cout<<rm.rname<<setw(25)<<rm.limit;
c1++;
}
objiff.close();
getch();
//*****************************
}
//****************display doctors on the basis of martial status
void displayallDOConmartial(char MR)
{
ifstream objiff("doctor.dat",ios::binary);
doctor doc;
//*****************************
if(!objiff)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
clrscr();
intromain();
int c1=7;
gotoxy(1,5);
cout<<"CODE"<<setw(15)<<"NAME OF DOCTOR"<<setw(5)<<"AGE"<<setw(12)<<"------
ADDRESS-------"<<setw(18)<<"SPECIALIZATION";
gotoxy(1,6);
cout<<"========================================================================";
while(objiff.read((char*)&doc,sizeof(doctor)))
{
if(doc.getdocmartialstatus()==toupper(MR))
{
doc.showalldoctorsrowwise(c1);
c1++;
}
}
objiff.close();
getch();
//*****************************
}
void patientadmittmenu()
{
clrscr();
char ch2;
//************************************************************
clrscr();
intromain();
gotoxy(20,6);
cout<<"=================PATIENT'S MENU====================";
gotoxy(22,7);
cout<<"1.ADMITTED TO ICU";
gotoxy(22,8);
cout<<"2.ADMITTED TO GENERAL WARD";
gotoxy(22,9);
cout<<"3.ADMITTED TO PRIVATE ROOM WITHOUT AC";
gotoxy(22,10);
cout<<"4.ADMITTED TO PRIVATE ROOM WITH AC";
gotoxy(22,11);
cout<<"5.BACK TO MAIN MENU";
gotoxy(22,12);
cout<<"Please Enter Your Choice (1-5) ";
gotoxy(22,13);
//**********************************************************
ch2=getche();
switch(ch2)
{
case '1':
write_patients("ICU");
break;
case '2': write_patients("GEN");
break;
case '3':write_patients("PNONAC");
break;
case '4':write_patients("PAC");
break;
default:
cout<<"a";//admin_menu();
}
}
void write_patients(char unit[15])
{
//*****************add new registered donars information
ofstream objoff;
patient pobj;
objoff.open("patients.dat",ios::binary|ios::app);
//ofstream objofflist("donarlist.dat",ios::binary|ios::app);
clrscr();
intromain();
//int rnn=getdonarno();
char getprv_regno[15];
strcpy(getprv_regno,getreg());
if(strcmp(getprv_regno,"NULL")!=0)
{
gotoxy(5,4);
cout<<"Previous PATIENT NO: "<<getprv_regno;
}
pobj.create_patient();
objoff.write((char*)&pobj,sizeof(patient));
objoff.close();
//************write to billing file
//*********decrease the limit
dec_roomlimit(unit);
//*********decrease the limit
//*********create room list of patient
create_room_allot(pobj.getpno(),unit,pobj.getdate(),"FILLED");
//*****************first room bill
createbillroom(pobj.getpno(),unit,pobj.getdate(),pobj.getamount());
//*****************first room bill
gotoxy(10,24);
cout<<"***************PATIENTS RECORD SAVED******************* ";
cin.ignore();
getch();
objoff.close();
}
//************get the patients last number****************
char *getreg()
{
ifstream objiff;
patient st;
int count=0;
char tmpregno[15];
objiff.open("patients.dat",ios::binary);
objiff.seekg(0,ios::beg);
if(!objiff)
{
cout<<"File could not be open !! Press any Key...";
getch();
}
//**************temporary hiding these lines
while(objiff.read((char *) &st, sizeof(patient)))
{
count++;
}
//***********jump to the last line
objiff.seekg(count-sizeof(st),ios::beg);
objiff.read((char *) &st, sizeof(patient));
strcpy(tmpregno,st.getpno());
objiff.close();
if(count!=0)
return tmpregno;
else
return "NULL";
//objiff.close();
}
//************get thje donars last number****************
void dec_roomlimit(char rname[15])
{
int fpos=0;
roomlimit rm,tmp;
fstream objiff("roomlimit.dat",ios::binary|ios::in|ios::out);
if(!objiff)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
while(objiff.read((char *) &rm, sizeof(roomlimit)))
{
if(strcmp(rm.rname,rname)==0)
{ fpos=(int)objiff.tellg();
break;
}
}
objiff.seekp(fpos-sizeof(roomlimit),ios::beg);
tmp=rm;
if(tmp.limit>0)
{
tmp.limit=tmp.limit-1;
}
objiff.write((char *) &tmp, sizeof(roomlimit));
objiff.close();
}
void create_room_allot(char patno[15],char unit[15],dateinfo d,char st[15])
{
ofstream objoff;
room_rec robj;
objoff.open("roomrecord.dat",ios::binary|ios::app);
strcpy(robj.pno,patno);
strcpy(robj.un,unit);
robj.dt=d;
strcpy(robj.room_status,st);
objoff.write((char*)&robj,sizeof(room_rec));
objoff.close();
}
void createbillroom(char pno[15],char billunitdetail[45],dateinfo dtofbill,float amount)
{
billing billobj;
ofstream objoff;
objoff.open("bills.dat",ios::binary|ios::app);
billobj.billdeposit(pno,billunitdetail,amount,dtofbill);
objoff.write((char*)&billobj,sizeof(billing));
objoff.close();
}
void createbillother(char pno[15],char billunitdetail[45],dateinfo dtofbill,float amount)
{
billing billobj;
ofstream objoff;
objoff.open("bills.dat",ios::binary|ios::app);
billobj.billdeposit(pno,billunitdetail,amount,dtofbill);
objoff.write((char*)&billobj,sizeof(billing));
objoff.close();
}
//*********search the patients details city wise
void searchPATIENTS(char sr[15])
{
ifstream objiff;
patient st;
objiff.open("patients.dat",ios::binary);
if(!objiff)
{
cout<<"File could not be open !! Press any Key...";
getch();
}
clrscr();
intromain();
int c1=7;
gotoxy(1,5);
cout<<"PATNo."<<setw(15)<<"NAME OF PATIENT"<<setw(5)<<"AGE"<<setw(12)<<"------
ADDRESS-------"<<setw(18)<<"MOBILE NO."<<setw(12)<<"BLOOD GROUP";
gotoxy(1,6);
cout<<"========================================================================";
while(objiff.read((char*)&st,sizeof(patient)))
{
if(strcmp(st.getcity(),sr)==0)
{
st.showallpatientsrowwise(c1);
c1++;
}
}
objiff.close();
getch();
}
//*********search the patients details date wise
void searchPATIENTSdatewise(dateinfo sr)
{
ifstream objiff;
patient st;
objiff.open("patients.dat",ios::binary);
if(!objiff)
{
cout<<"File could not be open !! Press any Key...";
getch();
}
clrscr();
intromain();
int c1=7;
gotoxy(1,5);
cout<<"PATNo."<<setw(15)<<"NAME OF PATIENT"<<setw(5)<<"AGE"<<setw(12)<<"------
ADDRESS-------"<<setw(18)<<"MOBILE NO."<<setw(12)<<"BLOOD GROUP";
gotoxy(1,6);
cout<<"========================================================================";
while(objiff.read((char*)&st,sizeof(patient)))
{
if(st.pmm()==sr.dd && st.pdd()==sr.mm && st.pyy()==sr.yy)
{
st.showallpatientsrowwise(c1);
c1++;
}
}
objiff.close();
getch();
}
void searchPATIENTSwardwise(char ward[15])
{
ifstream objiff;
patient st;
objiff.open("patients.dat",ios::binary);
if(!objiff)
{
cout<<"File could not be open !! Press any Key...";
getch();
}
clrscr();
intromain();
int c1=7;
gotoxy(1,5);
cout<<"PATNo."<<setw(15)<<"NAME OF PATIENT"<<setw(5)<<"AGE"<<setw(12)<<"------
ADDRESS-------"<<setw(18)<<"MOBILE NO."<<setw(12)<<"BLOOD GROUP";
gotoxy(1,6);
cout<<"========================================================================";
while(objiff.read((char*)&st,sizeof(patient)))
{
if(strcmp(getward(st.getpno()),ward)==0)
{
st.showallpatientsrowwise(c1);
c1++;
}
}
objiff.close();
getch();
}
char *getward(char pno[15])
{
ifstream objiff;
room_rec robj;
char tmp[15];
objiff.open("roomrecord.dat",ios::binary);
while(objiff.read((char*)&robj,sizeof(room_rec)))
{
if(strcmp(pno,robj.pno)==0)
{
strcpy(tmp,robj.un);
break;
}
}
objiff.close();
return tmp;
}
//********************DISCHARGE OF PATIENTS
void discharge_PATinfo(char ptno[15])
{
clrscr();
intromain();
//********bills file
billing billobj;
ifstream billsiff;
billsiff.open("bills.dat",ios::binary);
int flag=-1;//,fpos=0;
//********bills file
ifstream fp;
patient st;
fp.open("patients.dat",ios::binary);
if(!fp)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
while(fp.read((char*)&st,sizeof(patient)))
{
if(strcmp(st.getpno(),ptno)==0)
{
flag=1;
break;
}
}
if(flag==1)
{
//fp.seekp(fpos-sizeof(patient),ios::beg);
st.display_patient_rectangle();
fp.close();
//*********now display all the bills of patients
gotoxy(5,13);
cout<<"-----------------LIST OF BILLS TO BE PAID BY PATIENTS---------------";
int y1=15;
//*********now display all the bills of patients
dateinfo billdate;
int bno=1;
gotoxy(5,14);
cout<<"BILL NO"<<setw(8)<<"BILL INFO."<<setw(8)<<"DATEOF BILL"<<setw(10)<<"AMOUNT";
while(billsiff.read((char*)&billobj,sizeof(billing)))
{
if(strcmp(billobj.getpno(),ptno)==0)
{
billdate=billobj.getdate();
gotoxy(5,y1);
cout<<bno<<setw(8)<<billobj.getbilldetail()<<setw(8)<<billdate.dd<<"/"<<billdate.mm<<"/"<<billdate.yy<<setw(8)<<billobj.geta
mount();
y1++;
bno++;
}
}
billsiff.close();
}else
{
fp.close();
billsiff.close();
}
getch();
}
//*****************************************
//************modify patients details
void modify_patientinfo(char patno[15])
{
clrscr();
intromain();
fstream fp;
fp.open("patients.dat",ios::binary|ios::in|ios::out);
patient st;
nameinfo nminfo;
address ad1;
char oldunit[15];
int choice=0;
char mb[15],eid[75],bg[5],ch2;
int fpos=-1,ag=0;
int flag=-1;
if(!fp)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
while(fp.read((char*)&st,sizeof(patient)))
{
if(strcmp(st.getpno(),patno)==0)
{
flag=1;
fpos=(int)fp.tellg();
break;
}
}
if(flag==1)
{
fp.seekp(fpos-sizeof(patient),ios::beg);
st.display_patient_rectangle();
gotoxy(20,13);
cout<<"==========PATIENTS'S MODIFICATION MENU====================";
gotoxy(22,14);
cout<<"1.MODIFY NAME";
gotoxy(22,15);
cout<<"2.MODIFY AGE";
gotoxy(22,16);
cout<<"3.MODIFY ADDRESS";
gotoxy(22,17);
cout<<"4.MODIFY MOBILE NO.";
gotoxy(22,18);
cout<<"5.MODIFY EMAIL";
gotoxy(22,19);
cout<<"6.MODIFY BLOOD GROUP";
gotoxy(22,20);
cout<<"7.CHANGE THE ROOM ";
gotoxy(22,21);
cout<<"Please Enter Your Choice (1-7) ";
gotoxy(22,22);
//**********************************************************
ch2=getche();
clrscr();
intromain();
st.display_patient_rectangle();
switch(ch2)
{
case '1':
gotoxy(20,13);
cout<<"===ENTER THE FIRST NAME TO MODIFY: ";cin>>nminfo.fname;
gotoxy(20,14);
cout<<"===ENTER THE LAST NAME TO MODIFY: ";cin>>nminfo.lname;
st.setfullname(nminfo);
break;
case '2':
gotoxy(20,13);
cout<<"===ENTER THE AGE TO MODIFY: ";cin>>ag;
st.setage(ag);
break;
case '3':
gotoxy(20,13);
cout<<"===ENTER THE HNO/STREET TO MODIFY: ";
cin.ignore();
cin.getline(ad1.hno_street,15);
gotoxy(20,14);
cout<<"===ENTER THE CITY TO MODIFY: ";cin>>ad1.city;
gotoxy(20,15);
cout<<"===ENTER THE STATE TO MODIFY: ";cin>>ad1.state;
st.setaddress(ad1);
break;
case '4':
gotoxy(20,13);
cout<<"===ENTER THE MOBILE TO MODIFY: ";cin>>mb;
st.setmobileno(mb);
break;
case '5':
gotoxy(20,13);
cout<<"===ENTER THE EMAIL TO MODIFY: ";
cin.ignore();
cin.getline(eid,75);
st.setemail(eid);
break;
case '6':
gotoxy(20,13);
cout<<"===ENTER THE BLOOD GROUP TO MODIFY: ";cin>>bg;
st.setblodgrp(bg);
break;
case '7':
gotoxy(20,13);
cout<<"===ENTER 1-ICU 2-GEN 3-PNONAC 4-PAC TO MODIFY: ";cin>>choice;
if(choice==1)
{
strcpy(oldunit,getoldunit(patno));
createmodifyroom(patno,"ICU",oldunit);
}else if(choice==2)
{
strcpy(oldunit,getoldunit(patno));
createmodifyroom(patno,"GEN",oldunit);
}else if(choice==3)
{
strcpy(oldunit,getoldunit(patno));
createmodifyroom(patno,"PNONAC",oldunit);
}else if(choice==4)
{
strcpy(oldunit,getoldunit(patno));
createmodifyroom(patno,"PAC",oldunit);
}
break;
}}}
void createmodifyroom(char pno[15],char unNEW[15],char unOLD[15])
{
dateinfo dt;
float amount=0.00;
gotoxy(10,15);
cout<<"Enter the room amount:";
cin>>amount;
gotoxy(5,17);
cout<<"DATE(dd/mm/yyyy):";
gotoxy(30,17);
cin>>dt.dd;
gotoxy(35,17);
cout<<"/";
gotoxy(40,17);
cin>>dt.mm;
gotoxy(45,17);
cout<<"/";
gotoxy(50,17);
cin>>dt.yy;
//*********decrease the limit
inc_roomlimit(unOLD);
dec_roomlimit(unNEW);
//*********decrease the limit
//*********create room list of patient
create_room_allot(pno,unNEW,dt,"FILLED");
//*****************first room bill
createbillroom(pno,unNEW,dt,amount);
//*****************first room bill
}
char *getoldunit(char ptno[15])
{
char tmpunit[15];
fstream fp;
room_rec robj;
int fpos=0,flag=-1;
fp.open("roomrecord.dat",ios::binary|ios::in|ios::out);
if(!fp)
{
cout<<"File could not be open !! Press any Key...";
getch();
}
while(fp.read((char*)&robj,sizeof(room_rec)))
{
if(strcmp(robj.pno,ptno)==0 && strcmp(robj.room_status,"FILLED")==0)
{
flag=1;
fpos=(int)fp.tellg();
break;
}
}
if(flag==1)
{
fp.seekp(fpos-sizeof(room_rec),ios::beg);
strcpy(tmpunit,robj.un);
strcpy(robj.room_status,"EXPIRED");
}
fp.write((char*)&robj,sizeof(room_rec));
fp.close();
return tmpunit;
}
void inc_roomlimit(char rname[15])
{
int fpos=0;
roomlimit rm,tmp;
fstream objiff("roomlimit.dat",ios::binary|ios::in|ios::out);
if(!objiff)
{
cout<<"File could not be open !! Press any Key...";
getch();
}
while(objiff.read((char *) &rm, sizeof(roomlimit)))
{
if(strcmp(rm.rname,rname)==0)
{ fpos=(int)objiff.tellg();
break;
}
}
objiff.seekp(fpos-sizeof(roomlimit),ios::beg);
tmp=rm;
tmp.limit=tmp.limit+1;
objiff.write((char *) &tmp, sizeof(roomlimit));
objiff.close();
}
//*************new doctor information
void doctor_new()
{
ofstream objoff;
objoff.open("doctor.dat",ios::binary|ios::app);
doctor doc;
clrscr();
intromain();
char getprv_regno[15];
strcpy(getprv_regno,getdocno());
if(strcmp(getprv_regno,"NULL")!=0)
{
gotoxy(5,4);
cout<<"Previous NO: "<<getprv_regno;
}
doc.create_doctor();
objoff.write((char*)&doc,sizeof(doctor));
objoff.close();
gotoxy(10,24);
cout<<"***************DOCTORS RECORD SAVED******************* ";
cin.ignore();
getch();
}
//**************DOCTOR PREVIOUS NO
char *getdocno()
{
ifstream objiff;
int count=0;
char tmpregno[15];
objiff.open("doctor.dat",ios::binary);
doctor doc;
objiff.seekg(0,ios::beg);
if(!objiff)
{
cout<<"File could not be open !! Press any Key...";
getch();
}
while(objiff.read((char *) &doc, sizeof(doctor)))
{
count++;
}
//***********jump to the last line
objiff.seekg(count-sizeof(doc),ios::beg);
objiff.read((char *) &doc, sizeof(doctor));
strcpy(tmpregno,doc.getdocno());
objiff.close();
if(count!=0)
return tmpregno;
else
return "NULL";
}
//*************new doctor information
//**********delete the doctor
void delete_DOCinfo(char dcno[15])
{
doctor doc;
clrscr();
intromain();
ifstream fp;
fp.open("doctor.dat",ios::binary);
int flag=-1;
if(!fp)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
while(fp.read((char *) &doc, sizeof(doctor)))
{
if(strcmp(doc.getdocno(),dcno)==0)
{
flag=1;
//fpos=(int)fp.tellg();
break;
}
}
char ch;
if(flag==0)
{
cout<<"nnrecord not exist";
fp.close();
}else
{
doc.display_doctor_rectangle();
fp.close();
gotoxy(1,15);
cout<<"*****************************************************************************";
gotoxy(5,16);
cout<<"======DO YOU WANT TO DELETE THE RECORDS GIVEN ABOVE[YES(Y) OR NO (N)========";
gotoxy(2,17);
cin>>ch;
if (toupper(ch)=='Y')
{
ofstream outFile;
outFile.open("Temp1.dat",ios::binary);
ifstream objiff("doctor.dat",ios::binary);
objiff.seekg(0,ios::beg);
while(fp.read((char *) &doc, sizeof(doctor)))
{
if(strcmp(doc.getdocno(),dcno)!=0)
{
outFile.write((char *) &doc, sizeof(doctor));
}
}
outFile.close();
objiff.close();
remove("doctor.dat");
rename("Temp1.dat","doctor.dat");
gotoxy(30,20);
cout<<"----------------------------Record Deleted----------------------------------";
getch();
}
}
}
//**********delete the doctor
//**************modify doctors list
void modify_DOCinfo(char dcno[15])
{
char ch2;
doctor doc;
clrscr();
intromain();
fstream fp;
fp.open("doctor.dat",ios::binary|ios::in|ios::out);
nameinfo nminfo;
address ad1;
char mb[15],eid[75],spec[45];
int fpos=-1,ag=0;
int flag=-1;
float charges=0.00;
if(!fp)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
while(fp.read((char *) &doc, sizeof(doctor)))
{
if(strcmp(doc.getdocno(),dcno)==0)
{
flag=1;
fpos=(int)fp.tellg();
break;
}
}
if(flag==1)
{
fp.seekp(fpos-sizeof(doctor),ios::beg);
doc.display_doctor_rectangle();
gotoxy(20,13);
cout<<"==========DOCTOR'S MODIFICATION MENU====================";
gotoxy(22,14);
cout<<"1.MODIFY NAME";
gotoxy(22,15);
cout<<"2.MODIFY AGE";
gotoxy(22,16);
cout<<"3.MODIFY ADDRESS";
gotoxy(22,17);
cout<<"4.MODIFY MOBILE NO.";
gotoxy(22,18);
cout<<"5.MODIFY EMAIL";
gotoxy(22,19);
cout<<"6.MODIFY SPECIALIZATION";
gotoxy(22,20);
cout<<"7.MODIFY FEE STRUCTURE";
gotoxy(22,21);
cout<<"Please Enter Your Choice (1-7) ";
gotoxy(22,22);
//**********************************************************
ch2=getche();
clrscr();
intromain();
doc.display_doctor_rectangle();
switch(ch2)
{
case '1':
gotoxy(20,13);
cout<<"===ENTER THE FIRST NAME TO MODIFY: ";cin>>nminfo.fname;
gotoxy(20,14);
cout<<"===ENTER THE LAST NAME TO MODIFY: ";cin>>nminfo.lname;
doc.setDOCfullname(nminfo);
break;
case '2':
gotoxy(20,13);
cout<<"===ENTER THE AGE TO MODIFY: ";cin>>ag;
doc.setDOCage(ag);
break;
case '3':
gotoxy(20,13);
cout<<"===ENTER THE HNO TO MODIFY: ";cin>>ad1.hno_street;
gotoxy(20,14);
cout<<"===ENTER THE CITY TO MODIFY: ";cin>>ad1.city;
gotoxy(20,15);
cout<<"===ENTER THE STATE TO MODIFY: ";cin>>ad1.state;
doc.setDOCaddress(ad1);
break;
case '4':
gotoxy(20,13);
cout<<"===ENTER THE MOBILE TO MODIFY: ";cin>>mb;
doc.setDOCmobileno(mb);
break;
case '5':
gotoxy(20,13);
cout<<"===ENTER THE EMAIL TO MODIFY: ";cin>>eid;
doc.setDOCemail(eid);
break;
case '6':
gotoxy(20,13);
cout<<"===ENTER THE SPECIALIZATION TO MODIFY: ";cin>>spec;
doc.setDOCspec(spec);
break;
case '7':
gotoxy(20,13);
cout<<"===ENTER THE MODIFY DOCTOR FEES: ";cin>>charges;
doc.setDOCfees(charges);
break;
default:
cout<<"a";//admin_menu();
}
fp.write((char *) &doc, sizeof(doctor));
}
fp.close();
}
//**********************add more rooms
void addnewroomstypes(char ename[15],int value)
{
int fpos=0;
roomlimit rm,tmp;
fstream objiff("roomlimit.dat",ios::binary|ios::in|ios::out);
if(!objiff)
{
cout<<"File could not be open !! Press any Key...";
getch();
}
while(objiff.read((char *) &rm, sizeof(roomlimit)))
{
if(strcmp(rm.rname,ename)==0)
{ fpos=(int)objiff.tellg();
break;
}
}
objiff.seekp(fpos-sizeof(roomlimit),ios::beg);
tmp=rm;
tmp.limit=tmp.limit+value;
objiff.write((char *) &tmp, sizeof(roomlimit));
objiff.close();
}
void modify_roomtype(char ename[15],int value)
{
int fpos=0;
roomlimit rm,tmp;
fstream objiff("roomlimit.dat",ios::binary|ios::in|ios::out);
if(!objiff)
{
cout<<"File could not be open !! Press any Key...";
getch();
}
while(objiff.read((char *) &rm, sizeof(roomlimit)))
{
if(strcmp(rm.rname,ename)==0)
{ fpos=(int)objiff.tellg();
break;
}
}
objiff.seekp(fpos-sizeof(roomlimit),ios::beg);
tmp=rm;
tmp.limit=tmp.limit-value;
objiff.write((char *) &tmp, sizeof(roomlimit));
objiff.close();
}
void billingmenu(char patno[15])
{
clrscr();
intromain();
ifstream fp;
fp.open("patients.dat",ios::binary);
patient st;
char ch2;
char newdesc[50];
dateinfo searchdt;
float newamount=0.00;
int flag=-1;
if(!fp)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
while(fp.read((char*)&st,sizeof(patient)))
{
if(strcmp(st.getpno(),patno)==0)
{
flag=1;
//fpos=(int)fp.tellg();
break;
}
}
fp.close();
if(flag==1)
{
//fp.seekp(fpos-sizeof(patient),ios::beg);
st.display_patient_rectangle();
gotoxy(20,13);
cout<<"==========PATIENTS'S BILLS MENU====================";
gotoxy(22,14);
cout<<"1.ADD NEW BILL";
gotoxy(22,15);
cout<<"2.MODIFY BILL DISCRIPTION DATE WISE";
gotoxy(22,16);
cout<<"3.MODIFY BILL AMOUNT DATE WISE";
gotoxy(22,17);
cout<<"Please Enter Your Choice (1-3) ";
gotoxy(22,22);
//**********************************************************
ch2=getche();
clrscr();
intromain();
st.display_patient_rectangle();
switch(ch2)
{
//*****************************
case '1':
addnewbill(patno);
break;
case '2':
clrscr();
intromain();
gotoxy(12,14);
cout<<"Enter the change description details:";
cin.ignore();
cin.getline(newdesc,50);
cout<<"Date Of Bill to search:";
gotoxy(30,15);
cin>>searchdt.dd;
gotoxy(35,15);
cout<<"/";
gotoxy(40,15);
cin>>searchdt.mm;
gotoxy(45,15);
cout<<"/";
gotoxy(50,15);
cin>>searchdt.yy;
mob_billdesc(patno,searchdt,newdesc);
break;
case '3':
clrscr();
intromain();
gotoxy(12,14);
cout<<"Enter the change Amount:";
cin>>newamount;
cout<<"Date Of Bill to search:";
gotoxy(30,15);
cin>>searchdt.dd;
gotoxy(35,15);
cout<<"/";
gotoxy(40,15);
cin>>searchdt.mm;
gotoxy(45,15);
cout<<"/";
gotoxy(50,15);
cin>>searchdt.yy;
mob_billamount(patno,searchdt,newamount);
break;
} }}
void mob_billdesc(char patno[15],dateinfo dt,char desc[50])
{
billing billobj;
fstream fp;
dateinfo tmpdate;
int flag=-1,fpos=0;
fp.open("bills.dat",ios::binary|ios::in|ios::out);
if(!fp)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
while(fp.read((char*)&billobj,sizeof(billing)))
{ tmpdate=billobj.getdate();
if((strcmp(billobj.getpno(),patno)==0) && (dt.dd==tmpdate.dd && dt.mm==tmpdate.mm && dt.yy==tmpdate.yy))
{
flag=1;
fpos=(int)fp.tellg();
break;
}
}
if(flag==1)
{
fp.seekp(fpos-sizeof(billing),ios::beg);
billobj.setbilldetails(desc);
fp.write((char *) &billobj, sizeof(billing));
fp.close();
}else
{
gotoxy(15,15);
cout<<"Record not found!!!!";
fp.close();
}
} //**************add new bill
void addnewbill(char patno[15])
{
clrscr();
intromain();
dateinfo dt;
char detail[45];
float amt=0.00;
gotoxy(5,13);
cout<<"Enter the bill details:";
cin.ignore();
cin.getline(detail,45);
cin.ignore();
gotoxy(5,14);
cout<<"Enter the amount:";
cin>>amt;
gotoxy(28,15);
cout<<"DateOfBill:";
gotoxy(30,16);
cin>>dt.dd;
gotoxy(35,16);
cout<<"/";
gotoxy(40,16);
cin>>dt.mm;
gotoxy(45,16);
cout<<"/";
gotoxy(50,16);
cin>>dt.yy;
createbillother(patno,detail,dt,amt);
}
//**************add new bill
void mob_billamount(char patno[15],dateinfo dt,float amt)
{
billing billobj;
fstream fp;
dateinfo tmpdate;
int flag=-1,fpos=0;
fp.open("bills.dat",ios::binary|ios::in|ios::out);
if(!fp)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
while(fp.read((char*)&billobj,sizeof(billing)))
{ tmpdate=billobj.getdate();
if((strcmp(billobj.getpno(),patno)==0) && (dt.dd==tmpdate.dd && dt.mm==tmpdate.mm && dt.yy==tmpdate.yy))
{ flag=1;
fpos=(int)fp.tellg();
break;
}
}
if(flag==1)
{
fp.seekp(fpos-sizeof(billing),ios::beg);
billobj.setbillamount(amt);
fp.write((char *) &billobj, sizeof(billing));
fp.close();
}else
{
gotoxy(15,15);
cout<<"Record not found!!!!";
fp.close();
}
}
if choice is 1:
If choice 1 in sub menu:
if choice 2:
if choice 3 Doctor informtion:
if choice 4 Room informtion:
if choice 5 Reports
Choice 1:
Choice 2:
Choice 3:
Choice 6:
Choice: 7
Choice: 8
Choice: 9
REQUIREMENTS
HARDWARE REQUIRED
• Printer, to print the required documents of the project
• Compact Drive
• Processor : intel
• Ram : 512 MB or more than 512MB
• Harddisk : 80 GB or more than 80GB.
SOFTWARE REQUIRED
• Operating system : Windows XP
• Turbo C++, for execution of program and Ms word, for
presentation of output.
ADVANTAGES
• Patients do not need to wait in long queues.
• This software reduces paper work.
• It is easy to handle Patients as well as the doctor’s record.
• This software saves the time.
• Information of the patients and doctors stores permanently.
DISADVANTAGES
• This system suitable for only small level hospitals.
• Online facility is not available.
CONCLUSION
This software is efficient in maintaining patient’s details and
can easily perform operations of patient’s entry and discharge
records. This software also reduces the work load of the entry
system as they know how many patients are there and the
detail information about the availability of Doctors.
SYSTEM DESIGN
Then we began with the design phase of the system. System design is a solution, a
“HOW TO” approach to the creation of a new system. It translates system
requirements into ways by which they can be made operational. It is a
translational from a user oriented document to a document oriented
programmers. For that, it provides the understanding and procedural details
necessary for the implementation. Here we use Flowchart to supplement the
working of the new system. The system thus made should be reliable, durable and
above all should have least possible maintenance costs. It should overcome all the
drawbacks of the Old existing system and most important of all meet the user
requirements.
BIBLIOGRAPHY
The C++ Programming Language , 3rd Edition / Stroustrup Addison-Wesley.
C++ Primer, 3rd Edition / Lippman and Lajoie Addison-Wesley.
The Scott Meyers series, Addison-Wesley:
Effective C++ : 50 Specific Ways to Improve Your Programs and Designs, 2nd Edition
More Effective C++ : 35 New Ways to Improve Your Programs and Designs
and Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library
Beginners' C++ Course, 3rd Edition Ron Wein

More Related Content

What's hot

Hospital management system
Hospital management systemHospital management system
Hospital management system
Asmat Hayat
 
Hospital Management System
Hospital Management SystemHospital Management System
Hospital Management System
RANJIT SINGH
 
Synopsis of hms(Hospital Management System)
Synopsis of hms(Hospital Management System)Synopsis of hms(Hospital Management System)
Synopsis of hms(Hospital Management System)
Farooq Stanikzai
 
Hospital Management System Project
Hospital Management System ProjectHospital Management System Project
Hospital Management System Project
Sanjit Yadav
 
HOSPITAL MANAGEMENT SYSTEM project report
HOSPITAL MANAGEMENT SYSTEM project reportHOSPITAL MANAGEMENT SYSTEM project report
HOSPITAL MANAGEMENT SYSTEM project report
PDEA's college of engineering, Pune
 
hospital management system
hospital management systemhospital management system
hospital management system
shivangi singh
 
Fee collection system
Fee collection systemFee collection system
Fee collection system
harryz18
 
Hospital Management System proposal
Hospital Management System proposalHospital Management System proposal
Hospital Management System proposal
Chandresh Prasad
 
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4
NICHOLAS RATEMO
 
Design and implementation of a hospital management system
Design and implementation of a hospital management systemDesign and implementation of a hospital management system
Design and implementation of a hospital management system
Overcomer Michael
 
hospital management System
hospital management Systemhospital management System
hospital management System
sabin kafle
 
Hospital presentation
Hospital presentationHospital presentation
Hospital presentation
RANJIT SINGH
 
Blood Bank Management System (including UML diagrams)
Blood Bank Management System (including UML diagrams)Blood Bank Management System (including UML diagrams)
Blood Bank Management System (including UML diagrams)
Harshil Darji
 
Hospital Management System-out patient Detail
Hospital Management System-out patient DetailHospital Management System-out patient Detail
Hospital Management System-out patient Detail
Yogiji Creations
 
Hostpital management system(srs)
Hostpital management system(srs)Hostpital management system(srs)
Hostpital management system(srs)
maamir farooq
 
Hospital mangement system report file
Hospital mangement system report fileHospital mangement system report file
Hospital mangement system report file
Nausheen Hasan
 
Hospital Management System
Hospital Management SystemHospital Management System
Hospital Management System
Pranil Dukare
 
Hospital management system
Hospital management systemHospital management system
Hospital management system
subu
 
Hospital management-system
Hospital management-systemHospital management-system
Hospital management-system
sam143143
 
Hospital Management Record System Proposal
Hospital Management Record System ProposalHospital Management Record System Proposal
Hospital Management Record System Proposal
Bishal Bista
 

What's hot (20)

Hospital management system
Hospital management systemHospital management system
Hospital management system
 
Hospital Management System
Hospital Management SystemHospital Management System
Hospital Management System
 
Synopsis of hms(Hospital Management System)
Synopsis of hms(Hospital Management System)Synopsis of hms(Hospital Management System)
Synopsis of hms(Hospital Management System)
 
Hospital Management System Project
Hospital Management System ProjectHospital Management System Project
Hospital Management System Project
 
HOSPITAL MANAGEMENT SYSTEM project report
HOSPITAL MANAGEMENT SYSTEM project reportHOSPITAL MANAGEMENT SYSTEM project report
HOSPITAL MANAGEMENT SYSTEM project report
 
hospital management system
hospital management systemhospital management system
hospital management system
 
Fee collection system
Fee collection systemFee collection system
Fee collection system
 
Hospital Management System proposal
Hospital Management System proposalHospital Management System proposal
Hospital Management System proposal
 
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4
 
Design and implementation of a hospital management system
Design and implementation of a hospital management systemDesign and implementation of a hospital management system
Design and implementation of a hospital management system
 
hospital management System
hospital management Systemhospital management System
hospital management System
 
Hospital presentation
Hospital presentationHospital presentation
Hospital presentation
 
Blood Bank Management System (including UML diagrams)
Blood Bank Management System (including UML diagrams)Blood Bank Management System (including UML diagrams)
Blood Bank Management System (including UML diagrams)
 
Hospital Management System-out patient Detail
Hospital Management System-out patient DetailHospital Management System-out patient Detail
Hospital Management System-out patient Detail
 
Hostpital management system(srs)
Hostpital management system(srs)Hostpital management system(srs)
Hostpital management system(srs)
 
Hospital mangement system report file
Hospital mangement system report fileHospital mangement system report file
Hospital mangement system report file
 
Hospital Management System
Hospital Management SystemHospital Management System
Hospital Management System
 
Hospital management system
Hospital management systemHospital management system
Hospital management system
 
Hospital management-system
Hospital management-systemHospital management-system
Hospital management-system
 
Hospital Management Record System Proposal
Hospital Management Record System ProposalHospital Management Record System Proposal
Hospital Management Record System Proposal
 

Similar to Hospitalmanagement

project report on Gas booking system in c++
project report on Gas booking system in c++ project report on Gas booking system in c++
project report on Gas booking system in c++
vikram mahendra
 
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
 
STUDENT REPORT CARD GENERATE SYSTEM
STUDENT REPORT CARD GENERATE SYSTEMSTUDENT REPORT CARD GENERATE SYSTEM
STUDENT REPORT CARD GENERATE SYSTEM
vikram mahendra
 
Aditya PROJECT .docx
Aditya PROJECT .docxAditya PROJECT .docx
Aditya PROJECT .docx
DeepikaKamboj7
 
CANTEEN MANAGEMENT SYSTEM IN PYTHON
CANTEEN MANAGEMENT SYSTEM IN PYTHONCANTEEN MANAGEMENT SYSTEM IN PYTHON
CANTEEN MANAGEMENT SYSTEM IN PYTHON
vikram mahendra
 
Computer Science Investigatory Project
Computer Science Investigatory ProjectComputer Science Investigatory Project
Computer Science Investigatory Project
Prakhar Seth
 
Telephone billing system in c++
Telephone billing system in c++Telephone billing system in c++
Telephone billing system in c++
vikram mahendra
 
Python Project on Computer Shop
Python Project on Computer ShopPython Project on Computer Shop
Python Project on Computer Shop
vikram mahendra
 
Electricitybillsystemreport
ElectricitybillsystemreportElectricitybillsystemreport
Electricitybillsystemreport
vikram mahendra
 
Book store automation system
Book store automation systemBook store automation system
Book store automation system
Upendra Sengar
 
Hyper market management system project +2 computer science
Hyper market management system   project +2 computer scienceHyper market management system   project +2 computer science
Hyper market management system project +2 computer science
Vaishak AP
 
Doctor appointment system.docx
Doctor appointment system.docxDoctor appointment system.docx
Doctor appointment system.docx
bbc53020
 
Hospital Management System SRS for software
Hospital Management System SRS for softwareHospital Management System SRS for software
Hospital Management System SRS for software
knowledgeradha07
 
20137 mini projectdocumentation
20137 mini projectdocumentation20137 mini projectdocumentation
20137 mini projectdocumentation
PriyankaSonawane40
 
Hospital management project_BY RITIKA SAHU.
Hospital management project_BY RITIKA SAHU.Hospital management project_BY RITIKA SAHU.
Hospital management project_BY RITIKA SAHU.
Ritika sahu
 
Python Project On Cosmetic Shop system
Python Project On Cosmetic Shop systemPython Project On Cosmetic Shop system
Python Project On Cosmetic Shop system
vikram mahendra
 
Computer Science class 12
Computer Science  class 12Computer Science  class 12
Computer Science class 12
Abhishek Sinha
 
Hospital management system in java
Hospital management system in javaHospital management system in java
Hospital management system in java
Varun Yadav
 
Computer project
Computer projectComputer project
Computer project
Varun Yadav
 
Computer project
Computer projectComputer project
Computer project
Varun Yadav
 

Similar to Hospitalmanagement (20)

project report on Gas booking system in c++
project report on Gas booking system in c++ project report on Gas booking system in c++
project report on Gas booking system in c++
 
SUPER MARKET COMPUTER SYSTEM IN C++
SUPER MARKET COMPUTER SYSTEM IN C++SUPER MARKET COMPUTER SYSTEM IN C++
SUPER MARKET COMPUTER SYSTEM IN C++
 
STUDENT REPORT CARD GENERATE SYSTEM
STUDENT REPORT CARD GENERATE SYSTEMSTUDENT REPORT CARD GENERATE SYSTEM
STUDENT REPORT CARD GENERATE SYSTEM
 
Aditya PROJECT .docx
Aditya PROJECT .docxAditya PROJECT .docx
Aditya PROJECT .docx
 
CANTEEN MANAGEMENT SYSTEM IN PYTHON
CANTEEN MANAGEMENT SYSTEM IN PYTHONCANTEEN MANAGEMENT SYSTEM IN PYTHON
CANTEEN MANAGEMENT SYSTEM IN PYTHON
 
Computer Science Investigatory Project
Computer Science Investigatory ProjectComputer Science Investigatory Project
Computer Science Investigatory Project
 
Telephone billing system in c++
Telephone billing system in c++Telephone billing system in c++
Telephone billing system in c++
 
Python Project on Computer Shop
Python Project on Computer ShopPython Project on Computer Shop
Python Project on Computer Shop
 
Electricitybillsystemreport
ElectricitybillsystemreportElectricitybillsystemreport
Electricitybillsystemreport
 
Book store automation system
Book store automation systemBook store automation system
Book store automation system
 
Hyper market management system project +2 computer science
Hyper market management system   project +2 computer scienceHyper market management system   project +2 computer science
Hyper market management system project +2 computer science
 
Doctor appointment system.docx
Doctor appointment system.docxDoctor appointment system.docx
Doctor appointment system.docx
 
Hospital Management System SRS for software
Hospital Management System SRS for softwareHospital Management System SRS for software
Hospital Management System SRS for software
 
20137 mini projectdocumentation
20137 mini projectdocumentation20137 mini projectdocumentation
20137 mini projectdocumentation
 
Hospital management project_BY RITIKA SAHU.
Hospital management project_BY RITIKA SAHU.Hospital management project_BY RITIKA SAHU.
Hospital management project_BY RITIKA SAHU.
 
Python Project On Cosmetic Shop system
Python Project On Cosmetic Shop systemPython Project On Cosmetic Shop system
Python Project On Cosmetic Shop system
 
Computer Science class 12
Computer Science  class 12Computer Science  class 12
Computer Science class 12
 
Hospital management system in java
Hospital management system in javaHospital management system in java
Hospital management system in java
 
Computer project
Computer projectComputer project
Computer project
 
Computer project
Computer projectComputer project
Computer project
 

More from vikram mahendra

Communication skill
Communication skillCommunication skill
Communication skill
vikram mahendra
 
PYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEMPYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEM
vikram mahendra
 
BOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in PythonBOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in Python
vikram mahendra
 
FLOW OF CONTROL-NESTED IFS IN PYTHON
FLOW OF CONTROL-NESTED IFS IN PYTHONFLOW OF CONTROL-NESTED IFS IN PYTHON
FLOW OF CONTROL-NESTED IFS IN PYTHON
vikram mahendra
 
FLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHONFLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHON
vikram mahendra
 
FLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHONFLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHON
vikram mahendra
 
OPERATOR IN PYTHON-PART1
OPERATOR IN PYTHON-PART1OPERATOR IN PYTHON-PART1
OPERATOR IN PYTHON-PART1
vikram mahendra
 
OPERATOR IN PYTHON-PART2
OPERATOR IN PYTHON-PART2OPERATOR IN PYTHON-PART2
OPERATOR IN PYTHON-PART2
vikram mahendra
 
USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2
vikram mahendra
 
DATA TYPE IN PYTHON
DATA TYPE IN PYTHONDATA TYPE IN PYTHON
DATA TYPE IN PYTHON
vikram mahendra
 
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
vikram mahendra
 
USER DEFINE FUNCTIONS IN PYTHON
USER DEFINE FUNCTIONS IN PYTHONUSER DEFINE FUNCTIONS IN PYTHON
USER DEFINE FUNCTIONS IN PYTHON
vikram mahendra
 
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
vikram mahendra
 
INTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHONINTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHON
vikram mahendra
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
vikram mahendra
 
GREEN SKILL[PART-2]
GREEN SKILL[PART-2]GREEN SKILL[PART-2]
GREEN SKILL[PART-2]
vikram mahendra
 
GREEN SKILLS[PART-1]
GREEN SKILLS[PART-1]GREEN SKILLS[PART-1]
GREEN SKILLS[PART-1]
vikram mahendra
 
Dictionary in python
Dictionary in pythonDictionary in python
Dictionary in python
vikram mahendra
 
Entrepreneurial skills
Entrepreneurial skillsEntrepreneurial skills
Entrepreneurial skills
vikram mahendra
 
Boolean logic
Boolean logicBoolean logic
Boolean logic
vikram mahendra
 

More from vikram mahendra (20)

Communication skill
Communication skillCommunication skill
Communication skill
 
PYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEMPYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEM
 
BOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in PythonBOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in Python
 
FLOW OF CONTROL-NESTED IFS IN PYTHON
FLOW OF CONTROL-NESTED IFS IN PYTHONFLOW OF CONTROL-NESTED IFS IN PYTHON
FLOW OF CONTROL-NESTED IFS IN PYTHON
 
FLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHONFLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHON
 
FLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHONFLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHON
 
OPERATOR IN PYTHON-PART1
OPERATOR IN PYTHON-PART1OPERATOR IN PYTHON-PART1
OPERATOR IN PYTHON-PART1
 
OPERATOR IN PYTHON-PART2
OPERATOR IN PYTHON-PART2OPERATOR IN PYTHON-PART2
OPERATOR IN PYTHON-PART2
 
USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2
 
DATA TYPE IN PYTHON
DATA TYPE IN PYTHONDATA TYPE IN PYTHON
DATA TYPE IN PYTHON
 
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
 
USER DEFINE FUNCTIONS IN PYTHON
USER DEFINE FUNCTIONS IN PYTHONUSER DEFINE FUNCTIONS IN PYTHON
USER DEFINE FUNCTIONS IN PYTHON
 
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
 
INTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHONINTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHON
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 
GREEN SKILL[PART-2]
GREEN SKILL[PART-2]GREEN SKILL[PART-2]
GREEN SKILL[PART-2]
 
GREEN SKILLS[PART-1]
GREEN SKILLS[PART-1]GREEN SKILLS[PART-1]
GREEN SKILLS[PART-1]
 
Dictionary in python
Dictionary in pythonDictionary in python
Dictionary in python
 
Entrepreneurial skills
Entrepreneurial skillsEntrepreneurial skills
Entrepreneurial skills
 
Boolean logic
Boolean logicBoolean logic
Boolean logic
 

Recently uploaded

Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
flufftailshop
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
saastr
 

Recently uploaded (20)

Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
 

Hospitalmanagement

  • 1. ………………………………. SCHOOL,………… Project Report On HOSPITAL MANAGEMENT SYSTEM (PATIENTS BILL MANAGEMENT SYSTEM) In the partial fulfillment of All India Senior School Certificate Examination for the session …………. conducted by Central Board Of Secondary Education. ……………………. CLASS--XII
  • 2. ACKNOWLEDGEMENT I would like to convey my heartful thanks to ………………….. (Computer Science) who always gave valuable suggestions & guidance for completion of my project. He helped me to understand & remember important details of the project. My project has been a success only because of his guidance. I am especially indented & I am also beholden to my friends. And finally I thank to the members of my family for their support & encouragement.
  • 3. CERTIFICATE This is to certify that ……………………….. of class ……. of ……………………………………………. has completed her project under my supervision. She has taken proper care & shown sincerity in completion of this project. I certify that this project is up to my expectation & as per the guideline issued by CBSE. ………………………. (Computer Science faculty )
  • 4. Content 1. Introduction 2. Source Code 3. Output 4. Requirement 5. Advantages and disadvantages 6. Conclusion 7. System design
  • 5. INTRODUCTION This project HOSPITAL MANAGEMENT SYSTEM(PATIENTS BILL MANAGEMENT SYSTEM) includes easy working of the hospital system in maintaining the hospital system. This software keep the records of all the patients and their information about all the bills paid or due Objective of this software is to computerize the manual system of a hospital, so that all the transactions become fast and easy. It replaces all the paper work. It works according to the need and lowers the workload of user. Objective of the program is rather simple .It provides easy management of transaction. It’s provides an easy navigation menu which a layman user can also use. It manages the entire record along with date, patient code, patient’s records and doctors details etc. In this program there is a working mode available administrator. An administrator is as usual given all the rights like adding information, modifying existing information, deleting and viewing the information. In this system clearly aims at reducing the paper work at the cost to be borne of the registers and other things are much higher than the System’s working. Its keep record of all the information given to it according to the date which makes locating a record quite easy
  • 6. OUTPUT //*************************************************************** // HEADER FILE USED IN PROJECT //**************************************************************** #include<stdlib.h> #include<conio.h> #include<stdio.h> #include<process.h> #include<fstream.h> #include<iomanip.h> #include<string.h> #include<ctype.h> //*****STRUCTURE DEFINATIONS struct roomlimit { char rname[15]; int limit; }; struct otherinfo { char mobno[15]; char email[70]; char bloodgroup[5]; char status; }; //name structure struct nameinfo { char fname[20]; char lname[20]; int age; }; // address structure struct address { char hno_street[15]; char city[35]; char state[15]; }; //date structure struct dateinfo { int dd; int mm; int yy; }; //***************room record struct room_rec { char pno[15]; char un[15]; dateinfo dt; char room_status[15]; }; //*****STRUCTURE DEFINATIONS //***********FUNCTION PROTOTYPE void intro(); char *getoldunit(char ptno[15]); char *getward(char pno[15]); void intromain(); int checkpass(); void admin_menu(); void patient_menu(); void doctors_menu(); void rooms_menu(); char *getdocno(); void REPORTS();
  • 7. char *getreg(); void runfirsttime(); void mob_billdesc(char patno[15],dateinfo dt,char desc[50]); void delete_DOCinfo(char dcno[15]); void displayallDOC(); void displayallroomlimit(); void displayallDOConmartial(char MR); void createbillother(char pno[15],char billunitdetail[45],dateinfo dtofbill,float amount); void modify_roomtype(char ename[15],int value); void addnewroomstypes(char ename[15],int value); void patientadmittmenu(); void doctor_new(); void searchPATIENTSwardwise(char ward[15]); void searchPATIENTS(char sr[15]); void write_patients(char unit[15]); void modify_patientinfo(char patno[15]); void dec_roomlimit(char rname[15]); void addnewroomstypes(); void addnewbill(char patno[15]); void discharge_PATinfo(char ptno[15]); void createmodifyroom(char pno[15],char unNEW[15],char unOLD[15]); void modify_DOCinfo(char dcno[15]); void searchPATIENTSdatewise(dateinfo sr); void billingmenu(char patno[15]); void inc_roomlimit(char rname[15]); void mob_billamount(char patno[15],dateinfo dt,float amt); void create_room_allot(char patno[15],char unit[15],dateinfo d,char st[15]); void createbillroom(char pno[15],char billunitdetail[45],dateinfo dtofbill,float amount); //***********FUNCTION PROTOTYPE //*********CLASS DEFINATION //********BILLING CLASS class billing { //char billno[15]; char pno[15]; char billdetail[45]; float amount; dateinfo dateofbill; char billstatus; public: void setbillamount(float ft) { amount=ft; } void setbilldetails(char bt[45]) { strcpy(billdetail,bt); } void billdeposit(char pn[15],char bdetail[45],float amt,dateinfo dtbill) { strcpy(pno,pn); strcpy(billdetail,bdetail); amount=amt; dateofbill=dtbill; billstatus='N'; } void createbill(char pn[15]) { gotoxy(5,7); cout<<"======================================================================"; strcpy(pno,pn); gotoxy(1,8); cout<<"PATIENTS NO: "<<pno; gotoxy(20,8); cout<<"DATE(dd/mm/yyyy):"; gotoxy(30,8); cin>>dateofbill.dd; gotoxy(35,8); cout<<"/"; gotoxy(40,8);
  • 8. cin>>dateofbill.mm; gotoxy(45,8); cout<<"/"; gotoxy(50,8); cin>>dateofbill.yy; gotoxy(20,8); cout<<"DETAILS OF BILL TYPE"; cin.ignore(); cin.getline(billdetail,45); } char *getpno() { return pno; } float getamount() { return amount; } dateinfo getdate() { return dateofbill; } void showallbills(int c) { gotoxy(1,c); cout<<billdetail<<setw(13)<<amount<<setw(15)<<dateofbill.dd<<"/"<<dateofbill.mm<<"/"<<dateofbill.yy; gotoxy(1,c+1); cout<<"------------------------------------------------------------------------"; } char *getbilldetail() { return billdetail; } }; //********BILLING CLASS //***************patient's class********************************** class patient { char pno[15]; nameinfo pnm; address padd; otherinfo pother; char pmartialstatus; dateinfo pdate1; float amount; char admittedto[20]; public: patient() { amount=0.00; } void setfullname(nameinfo n) { strcpy(pnm.fname,n.fname); strcpy(pnm.lname,n.lname); } void setaddress(address ad1) { strcpy(padd.hno_street,ad1.hno_street); strcpy(padd.city,ad1.city); strcpy(padd.state,ad1.state); } void setage(int ag) { pnm.age=ag; } void setmobileno(char mb[15]) { strcpy(pother.mobno,mb); }
  • 9. void setemail(char eid[75]) { strcpy(pother.email,eid); } void setblodgrp(char bg[5]) { strcpy(pother.bloodgroup,bg); } //****************show all donars with blood groups row wise float getamount() { return amount; } void showallpatientsrowwise(int c) { gotoxy(1,c); cout<<pno<<setw(8)<<pnm.fname<<"-"<<pnm.lname<<setw(10)<<pnm.age<<setw(5)<<padd.hno_street<<"-"<<padd.city<<", "<<padd.state<<setw(15)<<pother.mobno<<setw(5)<<pother.bloodgroup; gotoxy(1,c+1); cout<<"------------------------------------------------------------------------"; } //**************** //input fuction for patients information void create_patient() { gotoxy(5,7); cout<<"====================PATIENT'S INFORMATION=============================="; gotoxy(1,8); cout<<"PAT.NO:"; gotoxy(10,8); cin>>pno; gotoxy(20,8); cout<<"FIRST NAME:"; gotoxy(32,8); cin>>pnm.fname; gotoxy(48,8); cout<<"LAST NAME:"; gotoxy(60,8); cin>>pnm.lname; gotoxy(10,9); cout<<"AGE:"; gotoxy(20,9); cin>>pnm.age; gotoxy(50,9); cout<<"MARTIAL STATUS:"; cin>>pmartialstatus; gotoxy(10,10); cout<<"-----------------PATIENT'S ADDRESS DETAIL'S---------------------"; gotoxy(1,12); cout<<"HOUSE NO:"; gotoxy(12,12); cin.getline(padd.hno_street,15); gotoxy(18,12); cout<<"ADDRESS:"; gotoxy(30,12); cin>>padd.city; gotoxy(55,12); cout<<"STATE:"; gotoxy(65,12); cin>>padd.state; gotoxy(10,14); cout<<"-----------------DATE OF PATIENT ADMITTED--------------------"; gotoxy(10,15); cout<<"DATE(dd/mm/yyyy):"; gotoxy(30,15); cin>>pdate1.dd; gotoxy(35,15); cout<<"/";
  • 10. gotoxy(40,15); cin>>pdate1.mm; gotoxy(45,15); cout<<"/"; gotoxy(50,15); cin>>pdate1.yy; gotoxy(10,17); cout<<"-----------------OTHER INFORMATION----------------------"; gotoxy(1,18); cout<<"MOBILE NO:"; gotoxy(15,18); cin>>pother.mobno; gotoxy(1,19); cout<<"E-MAIL(IF NO ENTER "NO"):"; gotoxy(30,19); cin.getline(pother.email,70); if(strcmp(pother.email,"NO")==0||strcmp(pother.email,"no")==0) strcpy(pother.email,"NO EMAIL ID"); gotoxy(1,20); cout<<"BLOODGROUP:"; cin>>pother.bloodgroup; gotoxy(45,20); cout<<"AMOUNT TO DEPOSIT: ";cin>>amount; pother.status='Y'; } //input fuction for patients information //****************display patients information in a box void display_patient_rectangle() { gotoxy(5,7); cout<<"======================================================================"; gotoxy(1,8); cout<<"PAT.REG:"; gotoxy(12,8); cout<<pno; gotoxy(25,8); cout<<"NAME:"; gotoxy(30,8); cout<<" "<<pnm.fname; gotoxy(40,8); cout<<"- "<<pnm.lname; gotoxy(60,8); cout<<"AGE:"; gotoxy(65,8); cout<<pnm.age; gotoxy(1,9); cout<<"ADDRESS::"; gotoxy(10,9); cout<<padd.hno_street<<"-"; gotoxy(15,9); cout<<padd.city; cout<<","<<padd.state; gotoxy(50,9); cout<<"MARTIAL STATUS:"; cout<<pmartialstatus; gotoxy(1,10); cout<<"MOBILE NO:"; gotoxy(12,10); cout<<pother.mobno; gotoxy(1,11); cout<<"E-MAIL:"; gotoxy(10,11); cout<<pother.email; gotoxy(40,10); cout<<"BLOODGROUP:"; gotoxy(60,10); cout<<pother.bloodgroup; gotoxy(55,11); cout<<"Amt.DEPOSIT:"<<amount; gotoxy(5,12);
  • 11. cout<<"======================================================================"; } char getpmartialstatus() { return pmartialstatus; } char *getpno() { return pno; } dateinfo getdate() { return pdate1; } int pdd() { return pdate1.dd; } int pmm() { return pdate1.mm; } int pyy() { return pdate1.yy; } char *getcity() { return padd.city; } char getstatus() { return pother.status; } }; //***************patient's class********************************** //***************doctor's class********************************** class doctor { char dno[15]; nameinfo dnm; address dadd; char martialstatus; char mobno[15]; char email[70]; dateinfo ddate1; float fees; char sep[50]; char doc_status[15]; public: char *getdocsep() { return sep; } char getdocmartialstatus() { return martialstatus; } char *getdocstatus() { return doc_status; } float getdocfees() { return fees; } char *getdocmob() { return mobno;
  • 12. } char *getdocemail() { return email; } char *getdocno() { return dno; } nameinfo getdocnm() { return dnm; } address getdocadd() { return dadd; } dateinfo getdocdate() { return ddate1; } //***************** void setDOCfullname(nameinfo n) { strcpy(dnm.fname,n.fname); strcpy(dnm.lname,n.lname); } void setDOCaddress(address ad1) { strcpy(dadd.hno_street,ad1.hno_street); strcpy(dadd.city,ad1.city); strcpy(dadd.state,ad1.state); } void setDOCage(int ag) { dnm.age=ag; } void setDOCmobileno(char mb[15]) { strcpy(mobno,mb); } void setDOCemail(char eid[75]) { strcpy(email,eid); } void setDOCmartialstatus(char m) { martialstatus=m; } void setDOCstatus(char st[15]) { strcpy(doc_status,st); } void setDOCspec(char sp[45]) { strcpy(sep,sp); } void setDOCfees(float chgr) { fees=chgr; } //**************** doctor() {fees=0.00;} void input(char dno1[15],nameinfo dnm1,char MS,address dadd1,char mobno2[15],char email2[70],dateinfo ddate2,float fees2,char sep2[20],char doc_status2[15]) { strcpy(dno,dno1); dnm=dnm1; dadd=dadd1; martialstatus=MS; strcpy(mobno,mobno2); strcpy(email,email2);
  • 13. ddate1=ddate2; fees=fees2; strcpy(sep,sep2); strcpy(doc_status,doc_status2); } void showalldoctorsrowwise(int c) { gotoxy(1,c); cout<<dno<<setw(8)<<dnm.fname<<"-"<<dnm.lname<<setw(5)<<dnm.age<<setw(8)<<dadd.hno_street<<"-"<<dadd.city<<"," <<dadd.state<<setw(12)<<sep; gotoxy(1,c+1); cout<<"------------------------------------------------------------------------"; } //****************show all donars with blood groups row wise //input fuction for patients information void create_doctor() { gotoxy(5,7); cout<<"====================DOCTOR'S INFORMATION=============================="; gotoxy(1,8); cout<<"DOC.NO:"; gotoxy(10,8); cin>>dno; gotoxy(20,8); cout<<"FIRST NAME:"; gotoxy(32,8); cin>>dnm.fname; gotoxy(48,8); cout<<"LAST NAME:"; gotoxy(60,8); cin>>dnm.lname; gotoxy(10,9); cout<<"AGE:"; gotoxy(20,9); cin>>dnm.age; gotoxy(50,9); cout<<"MARTIAL STATUS:"; cin>>martialstatus; gotoxy(10,10); cout<<"-----------------DOCTOR'S ADDRESS DETAIL'S---------------------"; gotoxy(1,12); cout<<"HOUSE NO:"; gotoxy(12,12); cin.ignore(); cin.getline(dadd.hno_street,15); gotoxy(18,12); cout<<"ADDRESS:"; gotoxy(30,12); cin>>dadd.city; gotoxy(55,12); cout<<"STATE:"; gotoxy(65,12); cin>>dadd.state; gotoxy(10,14); cout<<"-----------------DATE OF JOINING --------------------"; gotoxy(10,15); cout<<"DATE(dd/mm/yyyy):"; gotoxy(30,15); cin>>ddate1.dd; gotoxy(35,15); cout<<"/"; gotoxy(40,15); cin>>ddate1.mm; gotoxy(45,15); cout<<"/"; gotoxy(50,15); cin>>ddate1.yy; gotoxy(10,17); cout<<"-----------------OTHER INFORMATION----------------------"; gotoxy(1,18);
  • 14. cout<<"MOBILE NO:"; gotoxy(15,18); cin>>mobno; gotoxy(1,19); cout<<"E-MAIL(IF NO ENTER "NO"):"; gotoxy(30,19); cin.getline(email,70); if(strcmp(email,"NO")==0||strcmp(email,"no")==0) strcpy(email,"NO EMAIL ID"); gotoxy(1,20); cout<<"SPECIALISED IN : "; cin>>sep; gotoxy(45,20); cout<<"AMOUNT TO DEPOSIT: ";cin>>fees; strcpy(doc_status,"available"); } //input fuction for patients information //****************display doctors information in a box void display_doctor_rectangle() { gotoxy(5,7); cout<<"======================================================================"; gotoxy(1,8); cout<<"DOC. REG:"; gotoxy(12,8); cout<<dno; gotoxy(25,8); cout<<"NAME:"; gotoxy(30,8); cout<<" "<<dnm.fname; gotoxy(40,8); cout<<"- "<<dnm.lname; gotoxy(60,8); cout<<"AGE:"; gotoxy(65,8); cout<<dnm.age; gotoxy(1,9); cout<<"ADDRESS::"; gotoxy(10,9); cout<<dadd.hno_street<<"-"; gotoxy(15,9); cout<<dadd.city; cout<<","<<dadd.state; gotoxy(50,9); cout<<"MARTIAL STATUS:"; cout<<martialstatus; gotoxy(1,10); cout<<"MOBILE NO:"; gotoxy(12,10); cout<<mobno; gotoxy(1,11); cout<<"E-MAIL:"; gotoxy(10,11); cout<<email; gotoxy(40,10); cout<<"SPECIALIZED:"; gotoxy(60,10); cout<<sep; gotoxy(5,12); cout<<"======================================================================"; }}; //*********CLASS DEFINATION //********MAIN BODY void main() { char ch; intro(); if(checkpass()==0) { do
  • 15. { //****************TEMPORARY*********************** clrscr(); intromain(); gotoxy(20,6); cout<<"=================MAIN MENU===================="; gotoxy(28,7); cout<<"01. intro. to hospital system(PLEASE RUN FOR FIRST TIME ONLY) "; gotoxy(28,8); cout<<"02. ADMINISTRATOR"; gotoxy(28,9); cout<<"03. EXIT"; gotoxy(20,10); cout<<"=============================================="; gotoxy(25,12); cout<<"Please Select Your Option (1-3) "; gotoxy(30,14); ch=getche(); switch(ch) { case '1': clrscr(); runfirsttime(); break; case '2': admin_menu(); break; case '3':exit(0); default :cout<<"a"; } }while(ch!='3'); }else { exit(0); }} //*************************************************************** //********MAIN BODY //********FUNCTION DEFINATIOS //*************************************************************** // INTRODUCTION FUNCTION //**************************************************************** void intro() { clrscr(); gotoxy(4,2); cout<<"************************HOSPITAL MANAGEMENT ******************************"; gotoxy(5,4); cout<<"==============(PATIENTS BILLING MANAGEMENT SYSTEM)====================="; gotoxy(5,5); cout<<"****************************S=Y=S=T=E=M********************************"; gotoxy(50,10); cout<<"PROJECT:"; gotoxy(50,12); cout<<"MADE BY : --------------------"; gotoxy(10,14); cout<<"---------------CLASS : XII --------------------"; getch(); } //*************************************************************** // INTRODUCTION FUNCTION //**************************************************************** void intromain() { clrscr(); gotoxy(1,2); cout<<"*******************HOSPITAL******MANAGEMENT********SYSTEM*************"; gotoxy(1,3); cout<<"**************************(PATIENTS BILLING SYSTEM********************"; } //******************************login name and password**************** int checkpass() { char nm[20]; char pass[10];
  • 16. clrscr(); intromain(); gotoxy(20,20); cout<<"PLEASE ENTER THE USER NAME:"; gotoxy(20,21); cin>>nm; clrscr(); gotoxy(20,20); cout<<"PLEASE ENTER THE PASSWORD:"; gotoxy(20,21); cin>>pass; if(strcmp(nm,"admin")==0 && strcmp(pass,"vicky")==0) { return 0; }else { return 1; } } //******************************************************************** //*************************************************************** // ADMINSTRATOR MENU FUNCTION //**************************************************************** void admin_menu() { clrscr(); char ch2,patno[15]; //************************************************************ clrscr(); intromain(); gotoxy(20,6); cout<<"=================ADMIN MENU===================="; gotoxy(22,7); cout<<"1.PATIENTS (OPD/ICU/OTHER)INFORMATION"; gotoxy(22,8); cout<<"2.BILLS/TRANSCATIONS"; gotoxy(22,9); cout<<"3.DOCTORS INFORMATION AND CHARGES"; gotoxy(22,10); cout<<"4.ROOMS INFORMATION AND CHARGES"; gotoxy(22,11); cout<<"5.REPORTS"; gotoxy(22,12); cout<<"6.BACK TO MAIN MENU"; gotoxy(22,13); cout<<"Please Enter Your Choice (1-6) "; gotoxy(22,14); //********************************************************** ch2=getche(); switch(ch2) { case '1': clrscr(); patient_menu(); break; case '2': clrscr(); intromain(); gotoxy(10,8); cout<<"*****ENTER THE PATIENTS NO:"; gotoxy(55,9); cin>>patno; billingmenu(patno); break; case '3':clrscr(); doctors_menu(); break; case '4':clrscr(); rooms_menu(); break; case '5': clrscr(); REPORTS(); break; default:
  • 17. cout<<"a";//admin_menu(); } } //*************************************************************** //*************************************************************** // PATIENTS INFORMATION ADD / MODIFY / DELETE //**************************************************************** void patient_menu() { clrscr(); char ch2; char patno[15]; //************************************************************ clrscr(); intromain(); gotoxy(20,6); cout<<"=================PATIENT'S MENU===================="; gotoxy(22,7); cout<<"1.ADD PATIENT INFORMATION"; gotoxy(22,8); cout<<"2.MODIFY PATIENT INFORMATION"; gotoxy(22,9); cout<<"3.DISCHARGE PATIENT"; gotoxy(22,10); cout<<"4.BACK TO MAIN MENU"; gotoxy(22,11); cout<<"Please Enter Your Choice (1-4) "; gotoxy(22,12); //********************************************************** ch2=getche(); switch(ch2) { case '1': clrscr(); patientadmittmenu(); break; case '2': clrscr(); intromain(); gotoxy(10,8); cout<<"*****ENTER THE PATIENT. NO. TO BE SEARCHED:"; gotoxy(55,9); cin>>patno; modify_patientinfo(patno); break; case '3': clrscr(); intromain(); gotoxy(10,8); cout<<"*****ENTER THE PATIENT. NO. TO BE SEARCHED AND DISCHARGE:"; gotoxy(55,9); cin>>patno; discharge_PATinfo(patno); break; default: cout<<"a";//admin_menu(); } } //*************************************************************** //*************************************************************** // DOCTORS INFORMATION ADD / MODIFY / DELETE //**************************************************************** void doctors_menu() { clrscr(); char ch2; char docno[15]; //************************************************************ clrscr(); intromain();
  • 18. gotoxy(20,6); cout<<"=================DOCTOR'S MENU===================="; gotoxy(22,7); cout<<"1.ADD DOCTOR INFORMATION"; gotoxy(22,8); cout<<"2.MODIFY DOCTOR INFORMATION"; gotoxy(22,9); cout<<"3.DELETE DOCTOR INFORMATION"; gotoxy(22,10); cout<<"4.BACK TO MAIN MENU"; gotoxy(22,11); cout<<"Please Enter Your Choice (1-4) "; gotoxy(22,12); //********************************************************** ch2=getche(); switch(ch2) { case '1': clrscr(); doctor_new(); break; case '2': clrscr(); intromain(); gotoxy(10,8); cout<<"*****ENTER THE DOC. NO.TO BE SEARCHED:"; gotoxy(55,9); cin>>docno; modify_DOCinfo(docno); break; case '3': clrscr(); intromain(); gotoxy(10,8); cout<<"*****ENTER THE DOC NO. OF TO BE SEARCHED AND DELETE:"; gotoxy(55,9); cin>>docno; delete_DOCinfo(docno); break; default: cout<<"a";//admin_menu(); } } //*************************************************************** //*************************************************************** // ROOMS INFORMATION ADD / MODIFY / DELETE //**************************************************************** void rooms_menu() { clrscr(); char ch2; char romname[15]; int val=0; //************************************************************ clrscr(); intromain(); gotoxy(20,6); cout<<"=================ROOM'S MENU===================="; gotoxy(22,7); cout<<"1.ADD INCREASE ROOMS INFORMATION"; gotoxy(22,8); cout<<"2.DECREASE ROOMS INFORMATION"; gotoxy(22,9); cout<<"3.BACK TO MAIN MENU"; gotoxy(22,10); cout<<"Please Enter Your Choice (1-3) "; gotoxy(22,11); //********************************************************** ch2=getche(); switch(ch2) {
  • 19. case '1': clrscr(); intromain(); gotoxy(10,8); cout<<"**ENTER THE ROOM NAME: "; cin>>romname; gotoxy(10,9); cout<<"**ENTER THE VALUE TO INCREASE: "; cin>>val; addnewroomstypes(romname,val); break; case '2': clrscr(); intromain(); gotoxy(10,8); cout<<"**ENTER THE ROOM NAME: "; cin>>romname; gotoxy(10,9); cout<<"**ENTER THE VALUE TO INCREASE: "; cin>>val; intromain(); modify_roomtype(romname,val); break; default: cout<<"a";//admin_menu(); } } //*************************************************************** // REPORTS //**************************************************************** void REPORTS() { clrscr(); char ch2,M; char sarch[15]; dateinfo dtsearch; char w[15]; //************************************************************ clrscr(); intromain(); gotoxy(20,6); cout<<"=================REPORTS===================="; gotoxy(22,7); cout<<"1.ALL PATIENTS INFORMATION DATE WISE"; gotoxy(22,8); cout<<"2.ALL PATIENTS INFORMATION CITY WISE"; gotoxy(22,9); cout<<"3.ALL PATIENTS INFORMATION WARD WISE"; gotoxy(22,10); cout<<"4.ALL PATIENTS INFORMATION DOCTOR WISE"; gotoxy(22,11); cout<<"5.PATIENTS DETAILS WITH DOCTOR VISITED LIST"; gotoxy(22,12); cout<<"6.PATIENTS DETAILS WITH BILLS DETAILS"; gotoxy(22,13); cout<<"7.ALL DOCTOR LIST"; gotoxy(22,14); cout<<"8.ALL ROOMS LIST"; gotoxy(22,15); cout<<"9.ALL DOCTOR LIST ON THE BASIS OF MARTIAL STATUS"; gotoxy(22,16); cout<<"11.BACK TO MAIN MENU"; gotoxy(22,17); cout<<"Please Enter Your Choice (1-11) "; gotoxy(22,18); //********************************************************** ch2=getche(); switch(ch2) { case '1':intromain(); gotoxy(10,8);
  • 20. cout<<"*****ENTER THE DATE WISEDATE(dd/mm/yyyy) SEARCH OF PATIENTS:"; gotoxy(30,9); cin>>dtsearch.dd; gotoxy(35,9); cout<<"/"; gotoxy(40,9); cin>>dtsearch.mm; gotoxy(45,9); cout<<"/"; gotoxy(50,9); cin>>dtsearch.yy; searchPATIENTSdatewise(dtsearch); break; case '2': intromain(); gotoxy(10,8); cout<<"*****ENTER THE CITY WISE SEARCH OF PATIENTS:"; gotoxy(55,9); cin>>sarch; searchPATIENTS(sarch); break; case '3': intromain(); gotoxy(10,8); cout<<"*****ENTER THE WARD WISE SEARCH OF PATIENTS:"; gotoxy(55,9); cin>>w; searchPATIENTSwardwise(w); break; case '7': clrscr(); intromain(); displayallDOC(); break; case '8': clrscr(); intromain(); displayallroomlimit(); break; case '9': clrscr(); intromain(); gotoxy(10,8); cout<<"*****ENTER THE MARTIAL (M: MALE or F: FEMALE):"; gotoxy(55,9); cin>>M; displayallDOConmartial(M); break; default: cout<<"a";//admin_menu(); } } //*************************************************************** //************"roomlimit.dat void runfirsttime() { roomlimit rmlimit[4]={{"GEN",200},{"PAC",50},{"PNONAC",50},{"ICU",100}}; roomlimit rm; ifstream objiff("roomlimit.dat",ios::binary); if(!objiff) { gotoxy(10,20); cout<<"File could not be open !! Press any Key..."; objiff.close(); getch(); ofstream objoff("roomlimit.dat",ios::binary); clrscr(); intromain(); for(int x=0;x<4;x++) { rm=rmlimit[x];
  • 21. objoff.write((char*)&rm,sizeof(roomlimit)); } objoff.close(); clrscr(); intromain(); gotoxy(5,7); cout<<"================================================================"; objiff.close(); } //***********first doctors list by the hospital nameinfo docnm[5]={{"DR.ANMOL","MIR",45},{"Dr.Shaleen","Agarwal",38},{"Dr.Swati","Aggarwal",45}, {"Dr.Pooja","Aggarwal",55},{"Dr.Rohit","Srivastava",56}}; address dadd[5]={{"SEC-2","Gurgaon","HARYANA"},{"SEC-2","Gurgaon","HARYANA"},{"SEC-2","Gurgaon","HARYANA"}, {"SEC-2","Gurgaon","HARYANA"},{"SEC-2","Gurgaon","HARYANA"}}; dateinfo dt[5]={{12,4,2012},{12,4,2012},{17,7,2015},{12,4,2014},{12,4,2016}}; doctor doc[5]; doc[0].input("D001",docnm[0],'M',dadd[0],"8975652325","NONE",dt[0],1000,"Gastroenterology","AVALIABLE"); doc[1].input("D002",docnm[1],'F',dadd[1],"8975652325","NONE",dt[1],1200,"Liver Transplant ","AVALIABLE"); doc[2].input("D003",docnm[2],'F',dadd[2],"8975652325","NONE",dt[2],1000,"Anaesthesia & Pain","AVALIABLE"); doc[3].input("D004",docnm[3],'F',dadd[3],"8975652325","NONE",dt[3],1000,"Dermatology & Cosmetology","AVALIABLE"); doc[4].input("D005",docnm[4],'M',dadd[4],"8975652325","NONE",dt[4],1000,"Cardiology & Cardiac Surgery","AVALIABLE"); // add martial status of patient and doctor and the Department of doctors also //doctor(char dno1[15],nameinfo dnm1,char MS,address dadd1,char mobno2[15],char email2[70],dateinfo ddate2,float fees2,char sep2[20],char doc_status2[15]) ofstream objoff2("doctor.dat",ios::binary|ios::app); for(int x=0;x<5;x++) { objoff2.write((char*)&doc[x],sizeof(doctor)); } objoff2.close(); getch(); } //************"roomlimit.dat //****************reports void displayallDOC() { ifstream objiff("doctor.dat",ios::binary); doctor doc; //***************************** if(!objiff) { cout<<"File could not be open !! Press any Key..."; getch(); return; } clrscr(); intromain(); int c1=7; gotoxy(1,5); cout<<"CODE"<<setw(15)<<"NAME OF DOCTOR"<<setw(5)<<"AGE"<<setw(12)<<"-- ADDRESS---"<<setw(18)<<"SPECIALIZATION"; gotoxy(1,6); cout<<"========================================================================"; while(objiff.read((char*)&doc,sizeof(doctor))) { doc.showalldoctorsrowwise(c1); c1++; } objiff.close(); getch(); //***************************** } void displayallroomlimit() { roomlimit rm; ifstream objiff("roomlimit.dat",ios::binary); //***************************** if(!objiff) {
  • 22. cout<<"File could not be open !! Press any Key..."; getch(); return; } clrscr(); intromain(); int c1=7; gotoxy(1,5); cout<<"ROOM NAME"<<setw(25)<<"LIMIT OF ROOM"; gotoxy(1,6); cout<<"========================================================================"; while(objiff.read((char*)&rm,sizeof(roomlimit))) { gotoxy(1,c1); cout<<rm.rname<<setw(25)<<rm.limit; c1++; } objiff.close(); getch(); //***************************** } //****************display doctors on the basis of martial status void displayallDOConmartial(char MR) { ifstream objiff("doctor.dat",ios::binary); doctor doc; //***************************** if(!objiff) { cout<<"File could not be open !! Press any Key..."; getch(); return; } clrscr(); intromain(); int c1=7; gotoxy(1,5); cout<<"CODE"<<setw(15)<<"NAME OF DOCTOR"<<setw(5)<<"AGE"<<setw(12)<<"------ ADDRESS-------"<<setw(18)<<"SPECIALIZATION"; gotoxy(1,6); cout<<"========================================================================"; while(objiff.read((char*)&doc,sizeof(doctor))) { if(doc.getdocmartialstatus()==toupper(MR)) { doc.showalldoctorsrowwise(c1); c1++; } } objiff.close(); getch(); //***************************** } void patientadmittmenu() { clrscr(); char ch2; //************************************************************ clrscr(); intromain(); gotoxy(20,6); cout<<"=================PATIENT'S MENU===================="; gotoxy(22,7); cout<<"1.ADMITTED TO ICU"; gotoxy(22,8); cout<<"2.ADMITTED TO GENERAL WARD"; gotoxy(22,9); cout<<"3.ADMITTED TO PRIVATE ROOM WITHOUT AC"; gotoxy(22,10); cout<<"4.ADMITTED TO PRIVATE ROOM WITH AC";
  • 23. gotoxy(22,11); cout<<"5.BACK TO MAIN MENU"; gotoxy(22,12); cout<<"Please Enter Your Choice (1-5) "; gotoxy(22,13); //********************************************************** ch2=getche(); switch(ch2) { case '1': write_patients("ICU"); break; case '2': write_patients("GEN"); break; case '3':write_patients("PNONAC"); break; case '4':write_patients("PAC"); break; default: cout<<"a";//admin_menu(); } } void write_patients(char unit[15]) { //*****************add new registered donars information ofstream objoff; patient pobj; objoff.open("patients.dat",ios::binary|ios::app); //ofstream objofflist("donarlist.dat",ios::binary|ios::app); clrscr(); intromain(); //int rnn=getdonarno(); char getprv_regno[15]; strcpy(getprv_regno,getreg()); if(strcmp(getprv_regno,"NULL")!=0) { gotoxy(5,4); cout<<"Previous PATIENT NO: "<<getprv_regno; } pobj.create_patient(); objoff.write((char*)&pobj,sizeof(patient)); objoff.close(); //************write to billing file //*********decrease the limit dec_roomlimit(unit); //*********decrease the limit //*********create room list of patient create_room_allot(pobj.getpno(),unit,pobj.getdate(),"FILLED"); //*****************first room bill createbillroom(pobj.getpno(),unit,pobj.getdate(),pobj.getamount()); //*****************first room bill gotoxy(10,24); cout<<"***************PATIENTS RECORD SAVED******************* "; cin.ignore(); getch(); objoff.close(); } //************get the patients last number**************** char *getreg() { ifstream objiff; patient st; int count=0; char tmpregno[15]; objiff.open("patients.dat",ios::binary); objiff.seekg(0,ios::beg); if(!objiff) { cout<<"File could not be open !! Press any Key...";
  • 24. getch(); } //**************temporary hiding these lines while(objiff.read((char *) &st, sizeof(patient))) { count++; } //***********jump to the last line objiff.seekg(count-sizeof(st),ios::beg); objiff.read((char *) &st, sizeof(patient)); strcpy(tmpregno,st.getpno()); objiff.close(); if(count!=0) return tmpregno; else return "NULL"; //objiff.close(); } //************get thje donars last number**************** void dec_roomlimit(char rname[15]) { int fpos=0; roomlimit rm,tmp; fstream objiff("roomlimit.dat",ios::binary|ios::in|ios::out); if(!objiff) { cout<<"File could not be open !! Press any Key..."; getch(); return; } while(objiff.read((char *) &rm, sizeof(roomlimit))) { if(strcmp(rm.rname,rname)==0) { fpos=(int)objiff.tellg(); break; } } objiff.seekp(fpos-sizeof(roomlimit),ios::beg); tmp=rm; if(tmp.limit>0) { tmp.limit=tmp.limit-1; } objiff.write((char *) &tmp, sizeof(roomlimit)); objiff.close(); } void create_room_allot(char patno[15],char unit[15],dateinfo d,char st[15]) { ofstream objoff; room_rec robj; objoff.open("roomrecord.dat",ios::binary|ios::app); strcpy(robj.pno,patno); strcpy(robj.un,unit); robj.dt=d; strcpy(robj.room_status,st); objoff.write((char*)&robj,sizeof(room_rec)); objoff.close(); } void createbillroom(char pno[15],char billunitdetail[45],dateinfo dtofbill,float amount) { billing billobj; ofstream objoff; objoff.open("bills.dat",ios::binary|ios::app); billobj.billdeposit(pno,billunitdetail,amount,dtofbill); objoff.write((char*)&billobj,sizeof(billing)); objoff.close(); } void createbillother(char pno[15],char billunitdetail[45],dateinfo dtofbill,float amount) {
  • 25. billing billobj; ofstream objoff; objoff.open("bills.dat",ios::binary|ios::app); billobj.billdeposit(pno,billunitdetail,amount,dtofbill); objoff.write((char*)&billobj,sizeof(billing)); objoff.close(); } //*********search the patients details city wise void searchPATIENTS(char sr[15]) { ifstream objiff; patient st; objiff.open("patients.dat",ios::binary); if(!objiff) { cout<<"File could not be open !! Press any Key..."; getch(); } clrscr(); intromain(); int c1=7; gotoxy(1,5); cout<<"PATNo."<<setw(15)<<"NAME OF PATIENT"<<setw(5)<<"AGE"<<setw(12)<<"------ ADDRESS-------"<<setw(18)<<"MOBILE NO."<<setw(12)<<"BLOOD GROUP"; gotoxy(1,6); cout<<"========================================================================"; while(objiff.read((char*)&st,sizeof(patient))) { if(strcmp(st.getcity(),sr)==0) { st.showallpatientsrowwise(c1); c1++; } } objiff.close(); getch(); } //*********search the patients details date wise void searchPATIENTSdatewise(dateinfo sr) { ifstream objiff; patient st; objiff.open("patients.dat",ios::binary); if(!objiff) { cout<<"File could not be open !! Press any Key..."; getch(); } clrscr(); intromain(); int c1=7; gotoxy(1,5); cout<<"PATNo."<<setw(15)<<"NAME OF PATIENT"<<setw(5)<<"AGE"<<setw(12)<<"------ ADDRESS-------"<<setw(18)<<"MOBILE NO."<<setw(12)<<"BLOOD GROUP"; gotoxy(1,6); cout<<"========================================================================"; while(objiff.read((char*)&st,sizeof(patient))) { if(st.pmm()==sr.dd && st.pdd()==sr.mm && st.pyy()==sr.yy) { st.showallpatientsrowwise(c1); c1++; } } objiff.close(); getch(); } void searchPATIENTSwardwise(char ward[15]) {
  • 26. ifstream objiff; patient st; objiff.open("patients.dat",ios::binary); if(!objiff) { cout<<"File could not be open !! Press any Key..."; getch(); } clrscr(); intromain(); int c1=7; gotoxy(1,5); cout<<"PATNo."<<setw(15)<<"NAME OF PATIENT"<<setw(5)<<"AGE"<<setw(12)<<"------ ADDRESS-------"<<setw(18)<<"MOBILE NO."<<setw(12)<<"BLOOD GROUP"; gotoxy(1,6); cout<<"========================================================================"; while(objiff.read((char*)&st,sizeof(patient))) { if(strcmp(getward(st.getpno()),ward)==0) { st.showallpatientsrowwise(c1); c1++; } } objiff.close(); getch(); } char *getward(char pno[15]) { ifstream objiff; room_rec robj; char tmp[15]; objiff.open("roomrecord.dat",ios::binary); while(objiff.read((char*)&robj,sizeof(room_rec))) { if(strcmp(pno,robj.pno)==0) { strcpy(tmp,robj.un); break; } } objiff.close(); return tmp; } //********************DISCHARGE OF PATIENTS void discharge_PATinfo(char ptno[15]) { clrscr(); intromain(); //********bills file billing billobj; ifstream billsiff; billsiff.open("bills.dat",ios::binary); int flag=-1;//,fpos=0; //********bills file ifstream fp; patient st; fp.open("patients.dat",ios::binary); if(!fp) { cout<<"File could not be open !! Press any Key..."; getch(); return; } while(fp.read((char*)&st,sizeof(patient))) { if(strcmp(st.getpno(),ptno)==0)
  • 27. { flag=1; break; } } if(flag==1) { //fp.seekp(fpos-sizeof(patient),ios::beg); st.display_patient_rectangle(); fp.close(); //*********now display all the bills of patients gotoxy(5,13); cout<<"-----------------LIST OF BILLS TO BE PAID BY PATIENTS---------------"; int y1=15; //*********now display all the bills of patients dateinfo billdate; int bno=1; gotoxy(5,14); cout<<"BILL NO"<<setw(8)<<"BILL INFO."<<setw(8)<<"DATEOF BILL"<<setw(10)<<"AMOUNT"; while(billsiff.read((char*)&billobj,sizeof(billing))) { if(strcmp(billobj.getpno(),ptno)==0) { billdate=billobj.getdate(); gotoxy(5,y1); cout<<bno<<setw(8)<<billobj.getbilldetail()<<setw(8)<<billdate.dd<<"/"<<billdate.mm<<"/"<<billdate.yy<<setw(8)<<billobj.geta mount(); y1++; bno++; } } billsiff.close(); }else { fp.close(); billsiff.close(); } getch(); } //***************************************** //************modify patients details void modify_patientinfo(char patno[15]) { clrscr(); intromain(); fstream fp; fp.open("patients.dat",ios::binary|ios::in|ios::out); patient st; nameinfo nminfo; address ad1; char oldunit[15]; int choice=0; char mb[15],eid[75],bg[5],ch2; int fpos=-1,ag=0; int flag=-1; if(!fp) { cout<<"File could not be open !! Press any Key..."; getch(); return; } while(fp.read((char*)&st,sizeof(patient))) { if(strcmp(st.getpno(),patno)==0) { flag=1; fpos=(int)fp.tellg(); break; } }
  • 28. if(flag==1) { fp.seekp(fpos-sizeof(patient),ios::beg); st.display_patient_rectangle(); gotoxy(20,13); cout<<"==========PATIENTS'S MODIFICATION MENU===================="; gotoxy(22,14); cout<<"1.MODIFY NAME"; gotoxy(22,15); cout<<"2.MODIFY AGE"; gotoxy(22,16); cout<<"3.MODIFY ADDRESS"; gotoxy(22,17); cout<<"4.MODIFY MOBILE NO."; gotoxy(22,18); cout<<"5.MODIFY EMAIL"; gotoxy(22,19); cout<<"6.MODIFY BLOOD GROUP"; gotoxy(22,20); cout<<"7.CHANGE THE ROOM "; gotoxy(22,21); cout<<"Please Enter Your Choice (1-7) "; gotoxy(22,22); //********************************************************** ch2=getche(); clrscr(); intromain(); st.display_patient_rectangle(); switch(ch2) { case '1': gotoxy(20,13); cout<<"===ENTER THE FIRST NAME TO MODIFY: ";cin>>nminfo.fname; gotoxy(20,14); cout<<"===ENTER THE LAST NAME TO MODIFY: ";cin>>nminfo.lname; st.setfullname(nminfo); break; case '2': gotoxy(20,13); cout<<"===ENTER THE AGE TO MODIFY: ";cin>>ag; st.setage(ag); break; case '3': gotoxy(20,13); cout<<"===ENTER THE HNO/STREET TO MODIFY: "; cin.ignore(); cin.getline(ad1.hno_street,15); gotoxy(20,14); cout<<"===ENTER THE CITY TO MODIFY: ";cin>>ad1.city; gotoxy(20,15); cout<<"===ENTER THE STATE TO MODIFY: ";cin>>ad1.state; st.setaddress(ad1); break; case '4': gotoxy(20,13); cout<<"===ENTER THE MOBILE TO MODIFY: ";cin>>mb; st.setmobileno(mb); break; case '5': gotoxy(20,13); cout<<"===ENTER THE EMAIL TO MODIFY: "; cin.ignore(); cin.getline(eid,75); st.setemail(eid); break; case '6': gotoxy(20,13); cout<<"===ENTER THE BLOOD GROUP TO MODIFY: ";cin>>bg; st.setblodgrp(bg);
  • 29. break; case '7': gotoxy(20,13); cout<<"===ENTER 1-ICU 2-GEN 3-PNONAC 4-PAC TO MODIFY: ";cin>>choice; if(choice==1) { strcpy(oldunit,getoldunit(patno)); createmodifyroom(patno,"ICU",oldunit); }else if(choice==2) { strcpy(oldunit,getoldunit(patno)); createmodifyroom(patno,"GEN",oldunit); }else if(choice==3) { strcpy(oldunit,getoldunit(patno)); createmodifyroom(patno,"PNONAC",oldunit); }else if(choice==4) { strcpy(oldunit,getoldunit(patno)); createmodifyroom(patno,"PAC",oldunit); } break; }}} void createmodifyroom(char pno[15],char unNEW[15],char unOLD[15]) { dateinfo dt; float amount=0.00; gotoxy(10,15); cout<<"Enter the room amount:"; cin>>amount; gotoxy(5,17); cout<<"DATE(dd/mm/yyyy):"; gotoxy(30,17); cin>>dt.dd; gotoxy(35,17); cout<<"/"; gotoxy(40,17); cin>>dt.mm; gotoxy(45,17); cout<<"/"; gotoxy(50,17); cin>>dt.yy; //*********decrease the limit inc_roomlimit(unOLD); dec_roomlimit(unNEW); //*********decrease the limit //*********create room list of patient create_room_allot(pno,unNEW,dt,"FILLED"); //*****************first room bill createbillroom(pno,unNEW,dt,amount); //*****************first room bill } char *getoldunit(char ptno[15]) { char tmpunit[15]; fstream fp; room_rec robj; int fpos=0,flag=-1; fp.open("roomrecord.dat",ios::binary|ios::in|ios::out); if(!fp) { cout<<"File could not be open !! Press any Key..."; getch(); } while(fp.read((char*)&robj,sizeof(room_rec))) { if(strcmp(robj.pno,ptno)==0 && strcmp(robj.room_status,"FILLED")==0) { flag=1; fpos=(int)fp.tellg();
  • 30. break; } } if(flag==1) { fp.seekp(fpos-sizeof(room_rec),ios::beg); strcpy(tmpunit,robj.un); strcpy(robj.room_status,"EXPIRED"); } fp.write((char*)&robj,sizeof(room_rec)); fp.close(); return tmpunit; } void inc_roomlimit(char rname[15]) { int fpos=0; roomlimit rm,tmp; fstream objiff("roomlimit.dat",ios::binary|ios::in|ios::out); if(!objiff) { cout<<"File could not be open !! Press any Key..."; getch(); } while(objiff.read((char *) &rm, sizeof(roomlimit))) { if(strcmp(rm.rname,rname)==0) { fpos=(int)objiff.tellg(); break; } } objiff.seekp(fpos-sizeof(roomlimit),ios::beg); tmp=rm; tmp.limit=tmp.limit+1; objiff.write((char *) &tmp, sizeof(roomlimit)); objiff.close(); } //*************new doctor information void doctor_new() { ofstream objoff; objoff.open("doctor.dat",ios::binary|ios::app); doctor doc; clrscr(); intromain(); char getprv_regno[15]; strcpy(getprv_regno,getdocno()); if(strcmp(getprv_regno,"NULL")!=0) { gotoxy(5,4); cout<<"Previous NO: "<<getprv_regno; } doc.create_doctor(); objoff.write((char*)&doc,sizeof(doctor)); objoff.close(); gotoxy(10,24); cout<<"***************DOCTORS RECORD SAVED******************* "; cin.ignore(); getch(); } //**************DOCTOR PREVIOUS NO char *getdocno() { ifstream objiff; int count=0; char tmpregno[15]; objiff.open("doctor.dat",ios::binary); doctor doc; objiff.seekg(0,ios::beg); if(!objiff)
  • 31. { cout<<"File could not be open !! Press any Key..."; getch(); } while(objiff.read((char *) &doc, sizeof(doctor))) { count++; } //***********jump to the last line objiff.seekg(count-sizeof(doc),ios::beg); objiff.read((char *) &doc, sizeof(doctor)); strcpy(tmpregno,doc.getdocno()); objiff.close(); if(count!=0) return tmpregno; else return "NULL"; } //*************new doctor information //**********delete the doctor void delete_DOCinfo(char dcno[15]) { doctor doc; clrscr(); intromain(); ifstream fp; fp.open("doctor.dat",ios::binary); int flag=-1; if(!fp) { cout<<"File could not be open !! Press any Key..."; getch(); return; } while(fp.read((char *) &doc, sizeof(doctor))) { if(strcmp(doc.getdocno(),dcno)==0) { flag=1; //fpos=(int)fp.tellg(); break; } } char ch; if(flag==0) { cout<<"nnrecord not exist"; fp.close(); }else { doc.display_doctor_rectangle(); fp.close(); gotoxy(1,15); cout<<"*****************************************************************************"; gotoxy(5,16); cout<<"======DO YOU WANT TO DELETE THE RECORDS GIVEN ABOVE[YES(Y) OR NO (N)========"; gotoxy(2,17); cin>>ch; if (toupper(ch)=='Y') { ofstream outFile; outFile.open("Temp1.dat",ios::binary); ifstream objiff("doctor.dat",ios::binary); objiff.seekg(0,ios::beg); while(fp.read((char *) &doc, sizeof(doctor))) { if(strcmp(doc.getdocno(),dcno)!=0) { outFile.write((char *) &doc, sizeof(doctor)); }
  • 32. } outFile.close(); objiff.close(); remove("doctor.dat"); rename("Temp1.dat","doctor.dat"); gotoxy(30,20); cout<<"----------------------------Record Deleted----------------------------------"; getch(); } } } //**********delete the doctor //**************modify doctors list void modify_DOCinfo(char dcno[15]) { char ch2; doctor doc; clrscr(); intromain(); fstream fp; fp.open("doctor.dat",ios::binary|ios::in|ios::out); nameinfo nminfo; address ad1; char mb[15],eid[75],spec[45]; int fpos=-1,ag=0; int flag=-1; float charges=0.00; if(!fp) { cout<<"File could not be open !! Press any Key..."; getch(); return; } while(fp.read((char *) &doc, sizeof(doctor))) { if(strcmp(doc.getdocno(),dcno)==0) { flag=1; fpos=(int)fp.tellg(); break; } } if(flag==1) { fp.seekp(fpos-sizeof(doctor),ios::beg); doc.display_doctor_rectangle(); gotoxy(20,13); cout<<"==========DOCTOR'S MODIFICATION MENU===================="; gotoxy(22,14); cout<<"1.MODIFY NAME"; gotoxy(22,15); cout<<"2.MODIFY AGE"; gotoxy(22,16); cout<<"3.MODIFY ADDRESS"; gotoxy(22,17); cout<<"4.MODIFY MOBILE NO."; gotoxy(22,18); cout<<"5.MODIFY EMAIL"; gotoxy(22,19); cout<<"6.MODIFY SPECIALIZATION"; gotoxy(22,20); cout<<"7.MODIFY FEE STRUCTURE"; gotoxy(22,21); cout<<"Please Enter Your Choice (1-7) "; gotoxy(22,22); //********************************************************** ch2=getche(); clrscr(); intromain(); doc.display_doctor_rectangle();
  • 33. switch(ch2) { case '1': gotoxy(20,13); cout<<"===ENTER THE FIRST NAME TO MODIFY: ";cin>>nminfo.fname; gotoxy(20,14); cout<<"===ENTER THE LAST NAME TO MODIFY: ";cin>>nminfo.lname; doc.setDOCfullname(nminfo); break; case '2': gotoxy(20,13); cout<<"===ENTER THE AGE TO MODIFY: ";cin>>ag; doc.setDOCage(ag); break; case '3': gotoxy(20,13); cout<<"===ENTER THE HNO TO MODIFY: ";cin>>ad1.hno_street; gotoxy(20,14); cout<<"===ENTER THE CITY TO MODIFY: ";cin>>ad1.city; gotoxy(20,15); cout<<"===ENTER THE STATE TO MODIFY: ";cin>>ad1.state; doc.setDOCaddress(ad1); break; case '4': gotoxy(20,13); cout<<"===ENTER THE MOBILE TO MODIFY: ";cin>>mb; doc.setDOCmobileno(mb); break; case '5': gotoxy(20,13); cout<<"===ENTER THE EMAIL TO MODIFY: ";cin>>eid; doc.setDOCemail(eid); break; case '6': gotoxy(20,13); cout<<"===ENTER THE SPECIALIZATION TO MODIFY: ";cin>>spec; doc.setDOCspec(spec); break; case '7': gotoxy(20,13); cout<<"===ENTER THE MODIFY DOCTOR FEES: ";cin>>charges; doc.setDOCfees(charges); break; default: cout<<"a";//admin_menu(); } fp.write((char *) &doc, sizeof(doctor)); } fp.close(); } //**********************add more rooms void addnewroomstypes(char ename[15],int value) { int fpos=0; roomlimit rm,tmp; fstream objiff("roomlimit.dat",ios::binary|ios::in|ios::out); if(!objiff) { cout<<"File could not be open !! Press any Key..."; getch(); } while(objiff.read((char *) &rm, sizeof(roomlimit))) { if(strcmp(rm.rname,ename)==0) { fpos=(int)objiff.tellg(); break; } } objiff.seekp(fpos-sizeof(roomlimit),ios::beg); tmp=rm;
  • 34. tmp.limit=tmp.limit+value; objiff.write((char *) &tmp, sizeof(roomlimit)); objiff.close(); } void modify_roomtype(char ename[15],int value) { int fpos=0; roomlimit rm,tmp; fstream objiff("roomlimit.dat",ios::binary|ios::in|ios::out); if(!objiff) { cout<<"File could not be open !! Press any Key..."; getch(); } while(objiff.read((char *) &rm, sizeof(roomlimit))) { if(strcmp(rm.rname,ename)==0) { fpos=(int)objiff.tellg(); break; } } objiff.seekp(fpos-sizeof(roomlimit),ios::beg); tmp=rm; tmp.limit=tmp.limit-value; objiff.write((char *) &tmp, sizeof(roomlimit)); objiff.close(); } void billingmenu(char patno[15]) { clrscr(); intromain(); ifstream fp; fp.open("patients.dat",ios::binary); patient st; char ch2; char newdesc[50]; dateinfo searchdt; float newamount=0.00; int flag=-1; if(!fp) { cout<<"File could not be open !! Press any Key..."; getch(); return; } while(fp.read((char*)&st,sizeof(patient))) { if(strcmp(st.getpno(),patno)==0) { flag=1; //fpos=(int)fp.tellg(); break; } } fp.close(); if(flag==1) { //fp.seekp(fpos-sizeof(patient),ios::beg); st.display_patient_rectangle(); gotoxy(20,13); cout<<"==========PATIENTS'S BILLS MENU===================="; gotoxy(22,14); cout<<"1.ADD NEW BILL"; gotoxy(22,15); cout<<"2.MODIFY BILL DISCRIPTION DATE WISE"; gotoxy(22,16); cout<<"3.MODIFY BILL AMOUNT DATE WISE"; gotoxy(22,17); cout<<"Please Enter Your Choice (1-3) "; gotoxy(22,22);
  • 35. //********************************************************** ch2=getche(); clrscr(); intromain(); st.display_patient_rectangle(); switch(ch2) { //***************************** case '1': addnewbill(patno); break; case '2': clrscr(); intromain(); gotoxy(12,14); cout<<"Enter the change description details:"; cin.ignore(); cin.getline(newdesc,50); cout<<"Date Of Bill to search:"; gotoxy(30,15); cin>>searchdt.dd; gotoxy(35,15); cout<<"/"; gotoxy(40,15); cin>>searchdt.mm; gotoxy(45,15); cout<<"/"; gotoxy(50,15); cin>>searchdt.yy; mob_billdesc(patno,searchdt,newdesc); break; case '3': clrscr(); intromain(); gotoxy(12,14); cout<<"Enter the change Amount:"; cin>>newamount; cout<<"Date Of Bill to search:"; gotoxy(30,15); cin>>searchdt.dd; gotoxy(35,15); cout<<"/"; gotoxy(40,15); cin>>searchdt.mm; gotoxy(45,15); cout<<"/"; gotoxy(50,15); cin>>searchdt.yy; mob_billamount(patno,searchdt,newamount); break; } }} void mob_billdesc(char patno[15],dateinfo dt,char desc[50]) { billing billobj; fstream fp; dateinfo tmpdate; int flag=-1,fpos=0; fp.open("bills.dat",ios::binary|ios::in|ios::out); if(!fp) { cout<<"File could not be open !! Press any Key..."; getch(); return; } while(fp.read((char*)&billobj,sizeof(billing))) { tmpdate=billobj.getdate(); if((strcmp(billobj.getpno(),patno)==0) && (dt.dd==tmpdate.dd && dt.mm==tmpdate.mm && dt.yy==tmpdate.yy)) { flag=1;
  • 36. fpos=(int)fp.tellg(); break; } } if(flag==1) { fp.seekp(fpos-sizeof(billing),ios::beg); billobj.setbilldetails(desc); fp.write((char *) &billobj, sizeof(billing)); fp.close(); }else { gotoxy(15,15); cout<<"Record not found!!!!"; fp.close(); } } //**************add new bill void addnewbill(char patno[15]) { clrscr(); intromain(); dateinfo dt; char detail[45]; float amt=0.00; gotoxy(5,13); cout<<"Enter the bill details:"; cin.ignore(); cin.getline(detail,45); cin.ignore(); gotoxy(5,14); cout<<"Enter the amount:"; cin>>amt; gotoxy(28,15); cout<<"DateOfBill:"; gotoxy(30,16); cin>>dt.dd; gotoxy(35,16); cout<<"/"; gotoxy(40,16); cin>>dt.mm; gotoxy(45,16); cout<<"/"; gotoxy(50,16); cin>>dt.yy; createbillother(patno,detail,dt,amt); } //**************add new bill void mob_billamount(char patno[15],dateinfo dt,float amt) { billing billobj; fstream fp; dateinfo tmpdate; int flag=-1,fpos=0; fp.open("bills.dat",ios::binary|ios::in|ios::out); if(!fp) { cout<<"File could not be open !! Press any Key..."; getch(); return; } while(fp.read((char*)&billobj,sizeof(billing))) { tmpdate=billobj.getdate(); if((strcmp(billobj.getpno(),patno)==0) && (dt.dd==tmpdate.dd && dt.mm==tmpdate.mm && dt.yy==tmpdate.yy)) { flag=1; fpos=(int)fp.tellg(); break; } } if(flag==1)
  • 37. { fp.seekp(fpos-sizeof(billing),ios::beg); billobj.setbillamount(amt); fp.write((char *) &billobj, sizeof(billing)); fp.close(); }else { gotoxy(15,15); cout<<"Record not found!!!!"; fp.close(); } }
  • 38. if choice is 1: If choice 1 in sub menu:
  • 39. if choice 2: if choice 3 Doctor informtion:
  • 40. if choice 4 Room informtion: if choice 5 Reports Choice 1: Choice 2: Choice 3:
  • 42. REQUIREMENTS HARDWARE REQUIRED • Printer, to print the required documents of the project • Compact Drive • Processor : intel • Ram : 512 MB or more than 512MB • Harddisk : 80 GB or more than 80GB. SOFTWARE REQUIRED • Operating system : Windows XP • Turbo C++, for execution of program and Ms word, for presentation of output.
  • 43. ADVANTAGES • Patients do not need to wait in long queues. • This software reduces paper work. • It is easy to handle Patients as well as the doctor’s record. • This software saves the time. • Information of the patients and doctors stores permanently. DISADVANTAGES • This system suitable for only small level hospitals. • Online facility is not available.
  • 44. CONCLUSION This software is efficient in maintaining patient’s details and can easily perform operations of patient’s entry and discharge records. This software also reduces the work load of the entry system as they know how many patients are there and the detail information about the availability of Doctors.
  • 45. SYSTEM DESIGN Then we began with the design phase of the system. System design is a solution, a “HOW TO” approach to the creation of a new system. It translates system requirements into ways by which they can be made operational. It is a translational from a user oriented document to a document oriented programmers. For that, it provides the understanding and procedural details necessary for the implementation. Here we use Flowchart to supplement the working of the new system. The system thus made should be reliable, durable and above all should have least possible maintenance costs. It should overcome all the drawbacks of the Old existing system and most important of all meet the user requirements.
  • 46. BIBLIOGRAPHY The C++ Programming Language , 3rd Edition / Stroustrup Addison-Wesley. C++ Primer, 3rd Edition / Lippman and Lajoie Addison-Wesley. The Scott Meyers series, Addison-Wesley: Effective C++ : 50 Specific Ways to Improve Your Programs and Designs, 2nd Edition More Effective C++ : 35 New Ways to Improve Your Programs and Designs and Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library Beginners' C++ Course, 3rd Edition Ron Wein