Hospital
Hospital
Hospital
CONTENTS
After the product has been delivered the staff will be trained by our development team. We also
propose to provide a help document for the pathent which will help them in using the product
efficiently.
The components of a system encapsulate data and the operations that must be applied to
manipulate data. Communication and coordination between components is accomplished via
message passing.
PRODUCT PRESPECTIVE
This project helps to define internal boundaries achieving the appropriate balance between the
general and the specific, Hospital management giving a positive and efficient workflow to the
staff of the Hospital, thereby helping the business model of the Hospital to expand. In principle
the product exposes a simple and general interface and hides the specific and complex
implementation based. In our example, we want our Hospital design to hide detail that is too
complex or unnecessary, thereby reducing paperwork and increasing efficiency.
Also through this project we aim to reduce operating costs and increase throughput of the staff.
SYSTEM REQUIREMENT
The platform used is C++. Hence we decided to use Microsoft Visual Studio 2008
edition (Professional Edition).
Since BGI graphics aren’t supported in the Visual studio so for actually running the
software we used Borland C++ compiler 3.0 which was recently made free by
Borland Inc.
For optional coding and easy debugging we used Microsoft Visual Studio 2008
edition and made explicit .cpp files.
To Exit
Bjarne Stroustrup began work on "C with Classes" in 1979. The idea of creating a new
language originated from Structure’s experience in programming for his Ph.D. thesis.
Structure found that Simula had features that were very helpful for large software
development, but the language was too slow for practical use, while BCPL was fast but
too low-level to be suitable for large software development. When Structure started
working in AT&T Bell Labs, he had the problem of analyzing the UNIX kernel with
respect to distributed computing. Remembering his Ph.D. experience, Structure set out
to enhance the C language with Simula-like features. C was chosen because it was
general-purpose, fast, portable and widely used. Besides C and Simula, some other
languages that inspired him were ALGOL 68, Ada, CLU and ML. At first, the class,
derived class, strong type checking, inclining, and default argument features were added
to C via Structure’s C++ to C compiler, Front. The first commercial implementation of
C++ was released on October 14, 1985
COADING
/*
**************************************************
* Project: *
* Simulation of hospital Management Software *
**************************************************
*/
else
{
T1.i=T1.serial;
}
for(T1.i=T1.serial;answer=='y'||answer=='Y';T1.i++)
{
cout<<"\a";
T1.current++;
PI[T1.i].reg_no=T1.i;
T1.temp=T1.serial;
clrscr();
T1.entry_index[T1.i]=1;
cout<<"\n\n\t ***ENTERING INFORMATION FOR PATIENT SERIAL NUMBER "<<T1.i<<"
***"<<"\n";
cin.get(ch);
cout<<"\nRegistration Number : "<<PI[T1.i].reg_no<<"\n\n";
cout<<"Enter the name of patient : ";
clreol();
cin.getline(PI[T1.i].name,50);
while(strlen(PI[T1.i].name)==0)
{
cout<<"\a\nPlease enter a name : "; //if enter is pressed before netering a name
cin.getline(PI[T1.i].name,50);
cout<<"\n";
}
for(T1.k=1;T1.k<T1.serial;T1.k++) //loop to avoid duplicate entries
{
if(strcmp(PI[T1.i].name,PI[T1.k].name)==0) //if match is found
{
if(T1.entry_index[T1.k]==0) //if entry is already deleted
{
continue;
}
else //if entry still exists
{
T1.current-=1; //current no. of entries remains same
clreol();
cout<<"\n\n\n\tThe patient is already admitted in the hospital !!!";
cout<<"\n\tWant to view info of this registration number in detail (Y/N) : \a";
cin>>T1.duplicate_answer;
while(T1.duplicate_answer!='Y'&&T1.duplicate_answer!='y'&&T1.duplicate_answer!
='N'&&T1.duplicate_answer!='n')
{
cout<<"\n\t\aPlease re enter a correct option (Y/N) : ";
cin>>T1.duplicate_answer;
}
if(T1.duplicate_answer=='y'||T1.duplicate_answer=='Y')
{
T1.entry_index[T1.i]=-1;
T1.regis=T1.k;
T1.d_index=1;
A1.show_patient_detail();
}
else
{
A1.tasks();
}
}
}
} //end of "for loop" to prevent duplicate entries
cout<<"\nSex ( 1-Male , 2-Female ) : ";
clreol();
cin>>PI[T1.i].sex;
while(PI[T1.i].sex!=1&&PI[T1.i].sex!=2)
{
cout<<"\a\nInvalid input for sex of patient !!!";
cout<<"\nSex : ";
clreol();
cin>>PI[T1.i].sex;
}
cout<<"\nMartial status( 1-Married , 2-Single ) : ";
clreol();
cin>>PI[T1.i].martial_status;
while(PI[T1.i].martial_status<1||PI[T1.i].martial_status>2)
{
cout<<"\a\nInvalid input for martial status !!!"<<"\n";
cout<<"Enter a valid martial status : "<<"\n";
clreol();
cin>>PI[T1.i].martial_status;
}
cin.get(ch);
clreol();
clreol();
cout<<"\n *** Blood group ***"<<"\n";
clreol();
cout<<" 1. A+ "<<"\n";
clreol();
cout<<" 2. A- "<<"\n";
clreol();
cout<<" 3. B+ "<<"\n";
clreol();
cout<<" 4. B- "<<"\n";
clreol();
cout<<" 5. AB+ "<<"\n";
clreol();
cout<<" 6. AB- "<<"\n";
clreol();
cout<<" 7. O+ "<<"\n";
clreol();
cout<<" 8. O- "<<"\n";
clreol();
cout<<"\nEnter a blood group : ";
clreol();
cin>>PI[T1.i].bld_group;
switch(PI[T1.i].bld_group)
{
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:{
break;
}
default:{
while(PI[T1.i].bld_group!=1&&PI[T1.i].bld_group!=2&&
PI[T1.i].bld_group!=3&&PI[T1.i].bld_group!=4&&
PI[T1.i].bld_group!=5&&PI[T1.i].bld_group!=6&&
PI[T1.i].bld_group!=7&&PI[T1.i].bld_group!=8)
{
clreol();
cout<<"\aInvalid input !!!"<<"\n";
clreol();
cout<<"Please enter a valid Blood Group : "<<"\n";
clreol();
cin>>PI[T1.i].bld_group;
} //end of while
break;
}
} //end of switch
cin.get(ch);
clreol();
cout<<"\n\n ***ENTERING ADDRESS**"<<"\n\n";
clreol();
cout<<"House number : ";
clreol();
cin>>PI[T1.i].AD1.house;
while(PI[T1.i].AD1.house<=0)
cout<<"AB-\n";
break;
}
case 7:{
clreol();
cout<<"O+\n";
break;
}
case 8:{
clreol();
cout<<"O-\n";
break;
}
} //end of switch
clreol();
cout<<"\tDate of birth : ";
clreol();
DOB1.show_date();
cout<<"\tMartial Status : ";
clreol();
if(PI[T1.regis].martial_status==1)
{
cout<<"Married "<<"\n";
clreol();
}
else
{
cout<<"Single "<<"\n";
clreol();
}
clreol();
cout<<"\n\t **ADDRESS**"<<"\n";
clreol();
cout<<"\n\tHouse no. : "<<PI[T1.regis].AD1.house;
clreol();
cout<<"\n\tStreet : "<<PI[T1.regis].AD1.street;
clreol();
cout<<"\n\tCity : "<<PI[T1.regis].AD1.city;
clreol();
cout<<"A+\n";
break;
}
case 2:{
clreol();
cout<<"A-\n";
break;
}
case 3:{
clreol();
cout<<"B+\n";
break;
}
case 4:{
clreol();
cout<<"B-\n";
break;
}
case 5:{
clreol();
cout<<"AB+\n";
break;
}
case 6:{
clreol();
cout<<"AB-\n";
break;
}
case 7:{
clreol();
cout<<"O+\n";
break;
}
case 8:{
clreol();
cout<<"O-\n";
break;
}
} //end of switch
clreol();
cout<<"\tDate of birth : ";
clreol();
DOB1.search_show_date();
cout<<"\tMartial Status : ";
clreol();
if(PI[T1.index].martial_status==1)
{
cout<<"Married "<<"\n";
clreol();
}
else
{
cout<<"Single "<<"\n";
clreol();
}
cout<<"\n\t **ADDRESS**"<<"\n";
clreol();
cout<<"\n\tHouse no. : "<<PI[T1.index].AD1.house;
clreol();
cout<<"\n\tStreet : "<<PI[T1.index].AD1.street;
clreol();
cout<<"\n\tCity : "<<PI[T1.index].AD1.city;
clreol();
cout<<"\n\tDistrict : "<<PI[T1.index].AD1.dist;
clreol();
cout<<"\n\tState : "<<PI[T1.index].AD1.state;
clreol();
cout<<"\n\tCountry : "<<PI[T1.index].AD1.country;
clreol();
clreol();
clreol();
cout<<"\n\n\n\tWant to view info of another patient within search results (Y/N) ? ";
cin>>after_search_answer;
while(after_search_answer!='Y'&&after_search_answer!='y'&&after_search_answer!
='N'&&after_search_answer!='n')
{
cout<<"\a\n\tPlease enter a correct option (Y/N) : ";
cin>>after_search_answer;
}
if(after_search_answer=='y'||after_search_answer=='Y')
{
switch(T1.search_index)
{
case 1:{
A1.search_city();
break;
}
case 2:{
A1.search_blood_group();
break;
}
} //end of switch
}
else
{
A1.after_search_options();
}
} //end of function
void dob::search_show_date()
{
cout<<DOB11[T1.index].date;
T1.rem=DOB11[T1.index].date%10;
switch(DOB11[T1.index].date)
{
case 11:
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
case 19:
case 20:{
cout<<"th ";
goto over;
}
} //end of switch
switch(T1.rem)
{
case 1:{
cout<<"st ";
break;
}
case 2:{
cout<<"nd ";
break;
}
case 3:{
cout<<"rd ";
break;
}
default:{
cout<<"th ";
break;
}
} //end of switch
over:
switch(DOB11[T1.index].month)
{
case 1:{
cout<<"January , ";
break;
}
case 2:{
cout<<"February , ";
break;
}
case 3:{
cout<<"March , ";
break;
}
case 4:{
cout<<"April , ";
break;
}
case 5:{
cout<<"May , ";
break;
}
case 6:{
cout<<"June , ";
break;
}
case 7:{
cout<<"July , ";
break;
}
case 8:{
cout<<"August , ";
break;
}
case 9:{
cout<<"September , ";
break;
}
case 10:{
cout<<"October , ";
break;
}
case 11:{
cout<<"November , ";
break;
}
case 12:{
cout<<"December , ";
break;
}
} //end of switch
cout<<DOB11[T1.index].year<<" \n";
clreol();
} //end of function
void all::after_search_options()
{
clrscr();
clreol();
cout<<"\n\n\n\n\t\tWHAT DO U WANT TO DO NOW ?"<<"\n";
clreol();
cout<<"\t\t1. Search again "<<"\n";
clreol();
cout<<"\t\t2. Return to main task menu "<<"\n";
clreol();
cout<<"\n\tEnter your choice : ";
clreol();
clreol();
cin>>T1.after_search_choice;
clreol();
cout<<"\n";
switch(T1.after_search_choice)
{
case 1:{
T1.ssi_count=0;
A1.search_menu();
break;
}
case 2:{
T1.ssi_count=0;
A1.tasks();
break;
}
default:{
clreol();
cout<<"\a\n\n\tInvalid option requested !!!"<<"\n";
clreol();
cout<<"\tPress any key to return to the main searching menu..."<<"\n";
clreol();
getch();
A1.search_menu();
break;
}
} //end of switch
} //end of function
void all::delete_entry()
{
clrscr();
if(T1.current==0)
{
cout<<"\n\n\n";
cout<<"\tDatabase in empty !!!"<<"\n";
cout<<"\tPlease enter some information first. "<<"\n";
cout<<"\n\n\tDo you want to enter now (Y/N) : \a";
cin>>T1.enter_now;
while(T1.enter_now!='Y'&&T1.enter_now!='y'&&T1.enter_now!='N'&&T1.enter_now!='n')
{
cout<<"\a\n\tPlease re-enter a correct option (Y/N) : ";
cin>>T1.enter_now;
}
if(T1.enter_now=='y'||T1.enter_now=='Y')
{
A1.enter_patient_info();
}
else
{
A1.tasks();
}
}
cout<<"\n\t\t ***CURRENT DATABASE ENTRIES***\n\n";
cout<<"\t\tRegistration no. Name of patient\n\n";
for(T1.j=1;T1.j<T1.serial;T1.j++)
{
if(T1.entry_index[T1.j]==0)
{
continue; //to ignore deleted items
}
if(T1.entry_index[T1.j]==1)
{
T1.delete_show++;
cout<<"\t\t "<<T1.j<<" "<<PI[T1.j].name<<"\n";
}
}
if(T1.delete_show==0)
{
clrscr();
cout<<"\n\tDatabase is currently empty!!!\a";
cout<<"\n\tPress any key to continue....";
getch();
A1.tasks();
}
cout<<"\n\n\tPress 0 to return to main menu and 101 to delete all entries... ";
cout<<"\n\n\n\tWhich registration no. to delete ? ";
cin>>en_del_index;
if(en_del_index==101)
{
cout<<"\n\tWarning : You are about to delete all entries !!!\a";
cout<<"\n\tAre you sure you want to do this : ";
cin>>T1.delete_all_confirm;
while(T1.delete_all_confirm!='Y'&&T1.delete_all_confirm!='y'&&T1.delete_all_confirm!
='N'&&T1.delete_all_confirm!='n')
{
cout<<"\n\tSorry, wrong input !!!";
cout<<"\n\tPlease enter a valid choice (Y/N) : \a";
cin>>T1.delete_all_confirm;
}
if(T1.delete_all_confirm=='y'||T1.delete_all_confirm=='Y')
{
for(T1.f=1;T1.f<=100;T1.f++)
{
if(T1.entry_index[T1.f]==1)
{
T1.current--;
T1.entry_index[T1.f]=0;
}
}
cout<<"\n\n\tAll entries have been succesfully deleted!!!";
cout<<"\n\tPress any key to return to the main menu...\a";
getch();
A1.tasks();
}
else
{
cout<<"\n\tNo entries have been deleted.";
cout<<"\n\tPress any key for more options....";
getch();
A1.after_delete_options();
}
}
if(en_del_index==0)
{
clrscr();
A1.tasks();
}
if(en_del_index>0&&en_del_index<T1.serial&&T1.entry_index[en_del_index]==1)
{
T1.delete_attempt=0;
cout<<"\n\n\tAre you sure you want to delete entry "<<en_del_index<<" (Y/N) ? ";
cin>>delete_confirm;
while(delete_confirm!='Y'&&delete_confirm!='y'&&delete_confirm!='N'&&delete_confirm!='n')
{
clreol();
cout<<"\a\n\tPease re-enter a correct option (Y/N) ? ";
clreol();
cin>>delete_confirm;
}
if(delete_confirm=='y'||delete_confirm=='Y')
{
T1.entry_index[en_del_index]=0; //entry now deleted. index value set to 0
T1.current--;
cout<<"\n\tEntry succesfully deleted.\n";
cout<<"\tPress any key to continue.....\a";
getch();
A1.after_delete_options();
}
else
{
T1.entry_index[en_del_index]=1; //entry not deleted. default index value(1) kept
cout<<"\n\tEntry not deleted ";
cout<<"\n\tPress any key to continue.......";
getch();
A1.after_delete_options();
}
}
if(en_del_index>0&&en_del_index<T1.serial&&T1.entry_index[en_del_index]==0)
{
T1.delete_attempt++;
if(T1.delete_attempt==3)
{
cout<<"\n\n\tSorry, you have entered wrong registration number 3 times. ";
cout<<"\n\tAccess denied !!!";
cout<<"\n\tPlease try again later !!!";
cout<<"\n\tPress any key to return to the main task menu....\a";
getch();
A1.tasks();
}
cout<<"\n\n\tSorry, the patient has already left the hospital ."<<"\n";
cout<<"\n\tPress any key to continue...\a"<<"\n";
getch();
A1.delete_entry();
}
else
{
T1.delete_attempt++;
if(T1.delete_attempt==3)
{
cout<<"\n\n\tSorry, you have entered wrong registration number 3 times. ";
cout<<"\n\tAccess denied !!!";
cout<<"\n\tPlease try again later !!! ";
cout<<"\n\tPress any key to return to the main task menu....\a";
getch();
A1.tasks();
}
cout<<"\n\n\tSorry, Invalid registration number ."<<"\a\n";
T1.entry=T1.serial-1;
if(T1.entry==1)
{
cout<<"\tOnly 1 record has been added .\n";
}
else
{
cout<<"\tOnly "<<T1.entry<<" records was added and "<<T1.current<<" are present .\n";
}
cout<<"\tPress any key to continue..."<<"\n";
getch();
A1.delete_entry();
}
clrscr();
} //end of function
void all::after_delete_options()
{
clrscr();
cout<<"\n\t\tWHAT DO YOU WANT TO DO NOW ?";
cout<<"\n\t\t1. Delete more entries ";
cout<<"\n\t\t2. Return to main menu "<<"\n";
cout<<"\n\t\tPlease enter your choice : ";
cin>>delete_choice;
while(delete_choice!=1&&delete_choice!=2)
{
cout<<"\a\n\n\tSorry, wrong choice .";
cout<<"\n\tValid choices are 1 and 2. ";
cout<<"\n\tPlease re-enter your choice : ";
cin>>delete_choice;
}
switch(delete_choice)
{
case 1:{
A1.delete_entry();
break;
}
case 2:{
A1.tasks();
break;
}
} //end of switch
} //end of function
void all::recycle_bin()
{
clrscr();
T1.delete_count=0;
if(T1.serial==0)
{
cout<<"\n\n\n";
cout<<"\tDatabase in empty !!!"<<"\n";
cout<<"\tPlease enter some information first. "<<"\n";
cout<<"\n\n\tDo you want to enter now (Y/N) : \a";
cin>>T1.enter_now;
while(T1.enter_now!='Y'&&T1.enter_now!='y'&&T1.enter_now!='N'&&T1.enter_now!='n')
{
cout<<"\a\n\tPlease enter a correct option (Y/N) : ";
cin>>T1.enter_now;
}
if(T1.enter_now=='y'||T1.enter_now=='Y')
{
A1.enter_patient_info();
}
else
{
A1.tasks();
}
}
cout<<"\n\t\t ****** DELETED ENTRIES ******\n\n";
cout<<"\t\tRegistration no. Name of patient\n\n";
for(T1.d=1;T1.d<T1.serial;T1.d++)
void all::exit_function()
{
clrscr();
if(T1.serial==0)
{
cout<<"\n\n\n\n\tYou have not used the software.";
cout<<"\n\tIt is recommended that you do not exit.";
cout<<"\n\tPress any key to continue......\a";
getch();
clrscr();
cout<<"\n\n\n\tAre you sure you want to exit (Y/N) ? ";
cin>>exit_answer;
while(exit_answer!='Y'&&exit_answer!='y'&&exit_answer!='N'&&exit_answer!='n')
{
clreol();
cout<<"\n\n\tInvalid input !!! ";
cout<<"\n\tPease re-enter a correct option (Y/N) : \a";
clreol();
cin>>exit_answer;
}
if(exit_answer=='y'||exit_answer=='Y')
{
cout<<"\a";
exit(0);
}
else
{
A1.tasks();
}
}
cout<<"\n\n\n\t\t\t ***SOFTWARE DETAILS***\n";
cout<<"\n\n\tDeveloper : Mustafizur Rohman "<<"\n";
cout<<"\tProgramming Language : C++ "<<"\n";
cout<<"\tCompiler version : Borland 5.02 "<<"\n";
cout<<"\tAim : Simulation of Hospital Management Software"<<"\n";
cout<<"\n\tHope you like it..."<<"\n";
cout<<"\n\n\tSend your comments to : mustafizur_04@sify.com "<<"\n";
cout<<"\n\n\tThank You for trying this program. "<<"\n";
cout<<"\n\n\n\tPress any key to continue........"<<"\n";
getch();
clrscr();
cout<<"\n\n\n\tAre you sure you want to exit (Y/N) ? ";
cin>>exit_answer;
while(exit_answer!='Y'&&exit_answer!='y'&&exit_answer!='N'&&exit_answer!='n')
{
clreol();
cout<<"\n\n\tInvalid input !!! ";
cout<<"\n\tPease re-enter a correct option (Y/N) : \a";
clreol();
cin>>exit_answer;
}
if(exit_answer=='y'||exit_answer=='Y')
{
cout<<"\a";
exit(0);
}
else
{
A1.tasks();
}
} //end of function
Output
Welcome Screen
Main menu
Patient Details Input
Though we have completed this project with all our effort but has
certain limitation like it cannot be operated in networking. the
working of project is slow in windows operating system.
CONCLUSION