A Project Report


Submitted in partial fulfillment of the requirement for the award of the


Session 2010-2011

Guided by:By:-



Eradication of illiteracy has been identified as one of the major mission for raising the quality of life of the people development of vocational skill and professional competence is essential for employment of the youth. Researches are necessary for developing the need based programs for community and social development & economy of the people. Only a special type of university can meet such educational expedience, that will test his or her creative at all levels and also that student has the opportunity to develop personality and intellectually and to nourish and concern for the making. For all these needs there was a constant demand for the establishment of a central university of Bilaspur, specially to promote the educational interest of the members of scheduled castes and tribes and other segments of the population, which apart from improving their educational back wardens of majority of the population. The state government for establishing the education and economics interest of the weaker section of the people as per requirement of the article-46 of the constitution our longstanding as fulfilled, when state legislation assembly amended Madhya Pradhesh Vishwavidyalaya Adhiniyam (1983), which was inaugurated by to honorable chief minister of MP in order to perpetuate the memory of satnami saint Guru Ghasidas, the University was named other him. The president jurisdiction of the University is conterminous with Bilaspur reroute, diners composing, Raigar, Sarguna and Bilaspur, Korba, Jangir-Champa Dissts. It is situated ina peaceful area 6 KM apart from the city. At present it is on affiliated and teaching University, There are 71 Colleges affiliated to the University and 6 autonomous college.

ABOUT THE BCA COURSE Computer has come to stay as the most face of the man. As on industry it has been making long strides. The young girls have had challenge opportunities have been thrown open for them by computer. The expected large number of computer professional required in the last decade of center. To direct and control the human life, is about 4 lakhs. This course that we offered at the university, is a meaningful contribution toward the enormous manpower that will be required to man almost every human activity in the present time, setting the pattern the pattern of our further in the 21th century. The BCA course almost the whole computer application to every discipline. Apart from programming language like C and COBOL, modern package for database management, spreadsheets and word processing, this course has very significantly made us familiar with two separate operating system platforms a multi-user system and DOS a single user system. Our well equipped instructors have told us also about as how the menace of viruses surfaces before the computer user. The project work has provide to be most. Important source of knowledge to us. It was during this period of project that we had an opportunity to the development work at organization we were at the practical aspects of the use of computer. Undoubtedly, this course opened new avenues for the enhancement of our carriers. We hope to face the present and future with a grater self-confidence, armed as we are with the key to open up and tackle the challenging situations thrown up by the standing achievements of the modern science and technology. Infact, the generation of computer has provided us with the knowledge of the great. Potentiality that computer has inherent within. We know we have to ready to face the explosion already set in rection.


BILASPUR. Software Base 4. CHHATTISGARH PROJECT WORK EVALUATION 1. Name. Candidate 2. Study Center Code. Remark of University Examiner ------------------------------------------------------------- . Submitted fro Course & Year 6. Group Evalution (Project Reports & CD Evaluation marks) Particulars Marks out of Mark Awarded Internal Examiners Name & Signature --------------------------------------Hospital Management System Progamming in C++ --------------------------------------BCA 2010-2011 7. Forwarding by HOD -----------------------------(Signature. Remarks of Study Center 9. Name & Address 5.GURU GHASIDAS UNIVERSITY. Study Center Seal) 8. Project Title 3.

This project report or similar report on the topic has not been submitted for any other examination and does not form part of any other course undergone by the student. Shraddha Sarna and Nikita Kumar in Partial fulfillment of “Bachelor of Computer Application” Examination under the Guru Ghasidas University. Bilaspur (CG) is done by Radhika Shukla. Bilsapur. CG.CRETIFICATE This is to certify that the project report work “HOSPITAL MANAGEMENT SYSTEM” for Jai Ambe Nursing Home. Date: -------------------- Guide ------------------------------------ .

Vishwash Victor the matter embodied in this project work has not been submitted earlier for award of any degree/diploma to the best of my knowledge and belief. Bilaspur (CG) is done by us is an authentic work carried out for the partial fulfillment of the requirement of the award of the Bachelor of Computer Application under the guidance of Mr.SEIF-CRETIFICATE This is to certify that the project report work “HOSPITAL MANAGEMENT SYSTEM” for Jai Ambe Nursing Home. Signature of the Student -------------------------------------- .

I also extend my heartfelt thanks to my family and well wishers. Thanks and appreciation to the helpful people at Jai Ambe Nursing Home for their support. for extending his support. -----------------. Name: --------------------------- Signature . (CG). My deepest thanks to Lecturer. Bilaspur. Bilaspur. I express my thanks to the Principal of-------------------University. support and guidance. Jai Ambe Nursing Home.ACKNOWLEDGEMENT I owe a great many thanks to a great many people who helped and supported me during the writing of this book. I would also thank my Institution and my faculty members without whom this project would have been a distant reality. (CG). HOD the Guide of the project for guiding and correcting various documents of mine with attention and care. He has taken pain to go through the project and make necessary correction as and when needed.

(Signature of Internal Guide) Date: Guide ---------------------- . Department of Computer Science. Vipra PG Colllege.P. (CG) Name: Radhika Shukla Sharaddha Sarna Nikita Kumar Signature ----------------------------------------------------------- This project report or similar report on the topic has not been submitted for any other examination and does not form part of any other course undergone by the student.Declaration I hereby declare that the project report entitled “Hospital Management System” submitted in partial fulfillments of the BCA is the record of my original work under the guidance of Prof. Ramesh Pratap Singh Parihar. HOD. D. Bilaspur.

1. 1. various levels of user access and option will be added.3 EFFICIENT GUI One of the objectives of the proposed system is to provide a user friendly GUI. 1. and extra staff in the information resource department of the Organization . .Scope of Project 1. we will make a decision support system. Controls like passwords. in order to: Increase employer and employee satisfaction Provide the quality Create a controlled information management environment 1.1 IMPROVED SERVICES An objective of the proposed system is to improve the existing system's services.7 ELIMINATION OF RUNNING COST We are going to develop the proposed system with an objective to eliminate the running cost by overcoming the continuous stationery expenses.2 BETTER PERFORMANCE It is an objective of our proposed system to provide better performance which is managed by providing Desired flexibility Fast response Ability to support changes.5 DECISION SUPPORT By providing the facility of what-if analysis. Ability to maintain the quality of services. 1.4 MORE INFORMATION An objective of our proposed system is to develop a system that will eliminate the problem of insufficient and incomplete information. manual storage need. 1. that will enable the user to work on clicks and make the information transfer possible with the most common I/O devices.6 STRONGER CONTROLS The proposed system will have stronger controls.

PRODUCT PRESPECTIVE This project helps to define internal boundaries achieving the appropriate balance between the general and the specific. Communication and coordination between components is accomplished via message passing. create bill or otherwise get function info within the Hospital Management System. . bill function. allocate room. A data-centered architecture promotes integrability. thereby helping the business model of the Hospital to expand. After the product has been delivered the staff will be trained by our development team. Object oriented Data centered approach The components of a system encapsulate data and the operations that must be applied to manipulate data.User Requirement In the above proposed system single category of authenticated users are there that is the Hospital staff. In our example. checks availability of room. Hospital management giving a positive and efficient workflow to the staff of the Hospital. thereby reducing paperwork and increasing efficiency. Also through this project we aim to reduce operating costs and increase throughput of the staff. we want our Hospital design to hide detail that is too complex or unnecessary. Theory about Data centered architecture: A Data store resides at the center of this architecture and is accessed frequently by other components that modify info. We also propose to provide a help document for the pathent which will help them in using the product efficiently. In principle the product exposes a simple and general interface and hides the specific and complex implementation based.

Henceforth for optimal usage of such a software a windows based operating system preferably Windows vista must be there. Also on the hardware part any system having Windows Vista installed will suffice. Since BGI graphics aren’t supported in the Visual studio so for actually running the software we used Borland C++ compiler 3.cpp files. Hence we decided to use Microsoft Visual Studio 2008 edition (Professional Edition).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 . .SYSTEM REQUIREMENT HARDWARE AND SOFTWARE REQUIREMENTS The platform used is C++.

DATA FLOW DIAGRAM JAI AMBE NURSING HOME Registration Process Data Store Doctor Details Call By Data Process Show Details Reports Print Bill Process To Exit To Exit Process Close the program .

1985 . The idea of creating a new language originated from Structure’s experience in programming for his Ph. and default argument features were added to C via Structure’s C++ to C compiler. some other languages that inspired him were ALGOL 68. When Structure started working in AT&T Bell Labs. inclining. thesis. Besides C and Simula. he had the problem of analyzing the UNIX kernel with respect to distributed computing. fast. the class. while BCPL was fast but too low-level to be suitable for large software development. Ada. Structure found that Simula had features that were very helpful for large software development.D. C was chosen because it was general-purpose. portable and widely used. Front. experience. Remembering his Ph. CLU and ML.D. derived class. strong type checking.History/Introduction of C++ Bjarne Stroustrup began work on "C with Classes" in 1979. At first. The first commercial implementation of C++ was released on October 14. but the language was too slow for practical use. Structure set out to enhance the C language with Simula-like features.

h> //for getch() and clrscr() #include<stdio.COADING /* ************************************************** * Project: * * Simulation of hospital Management Software * ************************************************** */ #include<iostream. }. struct doctor { char name[20]. char city[30]. char state[30]. char country[30]. char dist[30]. }.h> #include<fstream.h> ///// ///// ///// class all //declaration for class "all" { private: struct address { int house. int month. }doc.div[20]. struct age { int day.ii.cn[10].h> //for strlen() and strcmp() #include<conio.h> //for input and output stream regulation #include<process. int year.h> #include<graphics. struct patient_info .h> //for exit() #include<string.add[40]. char street[30]. int age.

}PI[100]. void enter_patient_info(). int s_choice. void after_restore(). void after_delete_options(). int reg_no. int task. void exit_function(). //nested structure implemented int sex. void search_show_info(). //nested structure inplemented address AD1. void recycle_bin(). char delete_confirm. . int delete_choice. //end of class "all" class date //declaration for class "date" { private: int date. char s_city[30]. int month. void after_search_options(). char exit_answer. public: void tasks(). char after_search_answer. void putdata(). void delete_entry(). char answer1.{ age A1. void rn(). char answer. int bld_group. void billing(). void show_patient_detail(). }d. int martial_status. int s_group. protected: //functions declared void search_menu(). void search_city(). void search_blood_group(). void showdata(). char ch. char name[50]. int en_del_index.

void show_date(). //end of class "date" class dob //declaration for class "dob" { private: struct dob1 { int date. int entry. int rem. void show_date(). int j. }. }DOB11[100]. public: char birth_answer. int rem. int d_index. public: void enter_date(). int k. int regis. //temporary variables declared with global scope int i. }. int d. int attempt. void search_show_date(). int temp. int f. void enter_date(). int delete_show. int current. int year. int ssi_count. int month. int show_count. int count.int year. . int index. int serial. int e. //end of class "dob" class temp //declaration for class "temp" { public: int m.

int search_index; int search_count; int current_year; int delete_count; int search_number; int restore_serial; int delete_attempt; int restore_attempt; int entry_index[100]; int after_search_choice; int after_restore_choice; char enter_now; char restore_confirm; char duplicate_answer; char delete_all_confirm; char restore_all_confirm; char after_search_answer; temp() //constructor for temp invoked { i=0; j=0; d=0; e=0; f=0; serial=0; current=0; d_index=0; ssi_count=0; show_count=0; delete_show=0; delete_count=0; delete_attempt=0; restore_attempt=0; }; //end of constructor for temp }; all A1; date D1; dob DOB1; temp T1; void main() { T1.count=0; //destructor for temp invoked //end of class "temp" //object for class "all" declared //object for class "date" declared //object for class "dob" declared //object for class "temp" declared //main function

for(T1.m=1;T1.m<=100;T1.m++) //default index value set to -1 for each entry { T1.entry_index[T1.m]=-1; } cout<<"Welcome to..."<<"\n"; cout<<"\n\n\t\t\t***HOSPITAL MANAGEMENT SOFTWARE***"<<"\n"; cout<<"\n\t\t\t By Radhika Shukla, Shraddha Sarna, Nikita Kumar "<<"\n"; D1.enter_date(); A1.tasks(); } //end of main function void all::putdata() { cout <<"\n Name = "; cin >>doc.name; cout <<"\n Age = "; cin >>doc.age; cout <<"\n Specialist = ";cin>>doc.div; cout <<"\n Contact No.= ";cin>>doc.cn; cout <<"\n Address = ";cin>>doc.add; //** } void all::showdata() { //** cout << "\n Name = " <<doc.name; cout << "\n Age = " <<doc.age; cout<< "\n Specialist="<<doc.div; cout<< "\n Contact No= "<< doc.cn; cout<< "\n Address = " << doc.add; } void all::rn() { clrscr(); all per; cout<<"\n\n\t\t1. add"; cout<<"\n\n\t\t2. view"; cout<<"\n\n\t\t3. Back"; cout<<"\n\n\t\t\tEnter Choice:\t"; cin>>doc.ii; switch(doc.ii) { case 1: per.putdata(); ofstream outfile("all.txt"); // Open the file in output mode outfile.write((char*)&per, sizeof(per)); // Write the object into the file tasks(); break; case 2:

ifstream infile; // create input file infile.open("all.txt"); // open the file infile.seekg(0, ios::end); // go to end from 0 byte int endposition = infile.tellg(); // find where we are int n = endposition/sizeof(all); // number of persons int position = (n-1) * sizeof(all); // number times size infile.seekg(position); infile.read( (char*)&per, sizeof(per) ); per.showdata(); // display the person cout<<"press any key to back......"; int rr=getch(); tasks(); break; case 3: tasks(); break; default: cout<<"\n\nInvalid Choice"; break; } getch(); }

void all::tasks() { clrscr(); T1.attempt=0; T1.d_index=0; T1.delete_attempt=0; D1.show_date(); textcolor(2); cout<<"\n\n\t\t\t***HOSPITAL MANAGEMENT SOFTWARE***"<<"\n"; cout<<"\t\t\t By Radhika Shukla, Shraddha Sarna, Nikita Kumar "<<"\n"; cout<<"\t\t\t Guided By Ramesh Singh Parihar"; cout<<"\n\n\t\t\t ***Hospital Management Tasks***"<<"\n"; cout<<"\t\t\t *******************************"<<"\n"; cout<<"\n\n\tPlease select a task to do...."<<"\n"; cout<<"\n\n\t1. Enter a new patient information "<<"\n"; cout<<"\t2. View detail of existing patient "<<"\n"; cout<<"\t3. Search by city or blood group"<<"\n"; cout<<"\t4. Delete entry "<<"\n"; cout<<"\t5. Recycle Bin "<<"\n"; cout<<"\t6. Prepare Bill "<<"\n";

tasks(). cout<<"\t8.. A1. } case 6:{ A1.. } case 5:{ A1. } default:{ clrscr(). break. } case 7:{ rn().\a"<<"\n".cout<<"\t7. break. getch(). break.show_patient_detail(). cout<<"\a Enter your task serial : ". break. cout<<"\tPress any key to return to the main task menu.delete_entry(). } case 4:{ A1. } .. } case 2:{ A1. } case 3:{ A1. Doctor Information"<<"\n". switch(task) { case 1:{ A1. cin>>task. break. cout<<"\tValid options are 1-6 !!!"<<"\n".enter_patient_info(). break.search_menu(). break. cout<<"\n\n\n\n\n\tInvalid task serial !!!"<<"\n".billing(). } case 8:{ exit(0).recycle_bin(). clrscr(). Exit "<<"\n\n\n".

while(year<2000||year>10000) { clreol(). switch(month) { case 1: case 3: case 5: case 7: case 8: case 10: case 12:{ cin>>date. cout<<"Please enter the year correctly : "<<"\n".. cout<<"\nYear : ". cin>>month. cout<<"\n\nFirst of all I need the current date . while(date<1||date>31) //for months with 31 days { cout<<"\aInvalid date !!!"<<"\n". while(month<=0||month>12) //if month is greater then 12 or less then 1 { clreol(). cout<<"Please enter the month correctly : \a"<<"\n". clreol(). cout<<"\aInvalid input for year !!!"<<"\n". cout<<"Month : ". } cout<<"Date : ".} } //end of switch for task //end of function void date::enter_date() { clrscr(). clreol(). cin>>month. clreol(). cout<<"\nInvalid input for month !!!"<<"\n". } T1.. cin>>year. clreol(). ."<<"\n".current_year=year. cin>>year. clreol(). cout<<"Again enter the date : "<<"\n".

} break. //for february if(year%4==0) { while(date<0||date>29) //for leap year { cout<<"\aInvalid date !!!"<<"\n". clreol(). cout<<"Again enter the date : "<<"\n". while(date<1||date>30) { cout<<"\aInvalid date !!!"<<"\n". } default:{ //for other months with 30 days cin>>date. } case 2:{ cin>>date. } } else { while(date<0||date>28) //for non-leap year { cout<<"\aInvalid date !!!"<<"\n". } } //end of switch } //end of function void date::show_date() { clrscr(). cin>>date. cout<<"Again enter the date : "<<"\n". cin>>date. cout<<"Again enter the date : "<<"\n".clreol(). clreol(). } break. cin>>date. cin>>date. clreol(). } } break. .

. } case 2:{ .rem) { case 1:{ cout<<"st ". break..rem=date%10. break. cout<<date.cout<<"Hello. } default:{ cout<<"th ". } } switch(T1.\n It's ". break. goto over. break. } } //end of switch over: //label for jump statement switch(month) { case 1:{ cout<<"January . break. T1.. ". } case 3:{ cout<<"rd ". } case 2:{ cout<<"nd ". switch(date) { case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: case 19: case 20:{ cout<<"th ".

break. } case 3:{ cout<<"March . } } //end of switch cout<<year<<" \n". break. } case 6:{ cout<<"June . break. break. ". ". } case 12:{ cout<<"December . ". } case 7:{ cout<<"July . } case 8:{ cout<<"August . ". ". . ". break. break. ". break. ". ". break. } case 5:{ cout<<"May .cout<<"February . } case 10:{ cout<<"October . ". break. ". break. } case 11:{ cout<<"November . } case 9:{ cout<<"September . } case 4:{ cout<<"April . break.

T1.getline(PI[T1. you cannot enter any more information !!! ". } else { T1.50). cout<<"\n".i]. T1.i<<" ***"<<"\n"..tasks().getline(PI[T1.T1. cout<<"Enter the name of patient : ". cout<<"\nRegistration Number : "<<PI[T1.serial. cin. if(T1.serial. PI[T1..current==100) //to avoid overflow of data in the database { cout<<"\n\n\n\t Database is full !!! ".name.entry_index[T1. cout<<"\n\t Press any key to return to the main menu. while(strlen(PI[T1.current++.i=T1.name)==0) { cout<<"\a\nPlease enter a name : ".serial=1. //if enter is pressed before netering a name cin.temp=T1.i++) { cout<<"\a".i].i. A1.i=T1. cout<<"\n\t Sorry.T1. cout<<"\n\n\t ***ENTERING INFORMATION FOR PATIENT SERIAL NUMBER "<<T1. T1.i].reg_no<<"\n\n".answer=='y'||answer=='Y'.k++) //loop to avoid duplicate entries { .i]. } answer='y'.reg_no=T1.50). clreol(). cin.k<T1.get(ch). } for(T1.name. clrscr().k=1.} //end of function void all::enter_patient_info() { clrscr().serial.serial.count==0) { T1.i]=1. } for(T1.\a ". if(T1.i].. cout<<"\n\t Information of maximum 100 patients can be entered !!!! ". T1. getch().

duplicate_answer=='Y') { T1.entry_index[T1. clreol().d_index=1.duplicate_answer.sex!=2) { cout<<"\a\nInvalid input for sex of patient !!!". T1.sex. } if(T1. clreol().duplicate_answer. cin>>PI[T1. } else { A1.i]. while(PI[T1.current-=1.sex!=1&&PI[T1. cin>>PI[T1. cout<<"\n\tWant to view info of this registration number in detail (Y/N) : \a".k]. } cout<<"\nMartial status( 1-Married .if(strcmp(PI[T1.duplicate_answer!='Y'&&T1. cout<<"\n\n\n\tThe patient is already admitted in the hospital !!!".duplicate_answer=='y'||T1.show_patient_detail().k. cout<<"\nSex : ". while(T1.i]. .i].duplicate_answer!='n') { cout<<"\n\t\aPlease re enter a correct option (Y/N) : ".name.i].martial_status. 2-Single ) : ".i].i].name)==0) //if match is found { if(T1.duplicate_answer! ='N'&&T1. cin>>T1.PI[T1. of entries remains same clreol(). 2-Female ) : ". clreol().entry_index[T1.k]==0) //if entry is already deleted { continue. T1. //current no.i]=-1. cin>>PI[T1. A1.tasks(). } } } } //end of "for loop" to prevent duplicate entries cout<<"\nSex ( 1-Male .duplicate_answer!='y'&&T1. cin>>T1. } else //if entry still exists { T1.regis=T1.sex.

clreol(). cout<<" 2.bld_group!=2&& PI[T1."<<"\n". cout<<" 5. O. cout<<" 6. switch(PI[T1.get(ch). cout<<" 8. clreol(). AB.bld_group. O+ "<<"\n". } cin.i].bld_group) { case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8:{ break.i]. cin>>PI[T1.martial_status>2) { cout<<"\a\nInvalid input for martial status !!!"<<"\n". cout<<"Enter a valid martial status : "<<"\n". B+ "<<"\n".bld_group!=1&&PI[T1.i]. clreol(). AB+ "<<"\n". A+ "<<"\n". cout<<" 3.i].bld_group!=3&&PI[T1.i]. clreol(). cout<<" 7.martial_status<1||PI[T1. clreol(). clreol(). cout<<"\n *** Blood group ***"<<"\n".martial_status. B. cout<<" 4. cin>>PI[T1.i]."<<"\n".while(PI[T1.i].bld_group!=4&& . cout<<" 1. clreol(). cout<<"\nEnter a blood group : ".i]. clreol(). clreol(). clreol()."<<"\n".i]. clreol(). } default:{ while(PI[T1. clreol(). A. clreol()."<<"\n".

} cin.bld_group!=5&&PI[T1. cin.30). cin.PI[T1.i]. cout<<"House number : ".i].i]. cout<<"\a\nPlease enter a street : ".AD1. clreol(). cin>>PI[T1.i]. while(PI[T1.getline(PI[T1. //if enter is pressd before input for street clreol().AD1.AD1. cout<<"\a\nInvalid input for house number !!!". cout<<"Please enter a valid Blood Group : "<<"\n".street)==0) { clreol().i].i].i].street.bld_group.i]. clreol().house. cout<<"Street : ".bld_group!=8) { clreol().getline(PI[T1. cin>>PI[T1.i]. clreol(). } } //end of switch cin. cin>>PI[T1. cout<<"\n". clreol(). clreol(). } //end of while break. clreol().i].AD1.i]. clreol(). clreol().street. clreol().city.city)==0) .i].AD1.house<=0) { clreol(). cin. cout<<"\n\n ***ENTERING ADDRESS**"<<"\n\n".50).30).bld_group!=7&&PI[T1.AD1.house.i]. while(strlen(PI[T1. cout<<"\aInvalid input !!!"<<"\n". cout<<"\nAgain enter the house number : ".bld_group!=6&& PI[T1. while(strlen(PI[T1.get(ch). clreol().AD1.getline(PI[T1.get(ch). } cout<<"City : ".AD1.

dist.AD1. //if enter is pressd before input for city clreol().get(ch).AD1. while(strlen(PI[T1.enter_date().i].AD1.50).city. clreol(). cin. cout<<"\a\nPlease enter a country : ". clreol().i]. cout<<"\n\nWant to enter information for another patient (Y/N) ? ". } DOB1.dist)==0) { clreol().50).i]. cout<<"\n".getline(PI[T1. cout<<"\n".state)==0) { clreol().i].getline(PI[T1.country.AD1. cout<<"\a\nPlease enter a state : ". while(strlen(PI[T1.AD1. } cout<<"District : ".i]. clreol(). cin.AD1.getline(PI[T1.dist. cout<<"\n".30).getline(PI[T1.AD1. clreol().i]. clreol(). cin.getline(PI[T1.i].30).state.getline(PI[T1.country)==0) { clreol(). . cin.getline(PI[T1.i]. cin. clreol(). //if enter is pressed before input for state clreol().50). cout<<"\n". cout<<"\a\nPlease enter a city : ".i].30).state. cout<<"\a\nPlease enter a district : ".30).i]. while(strlen(PI[T1.country.AD1. cin. cin. } cout<<"State : ". //if enter is pressed before input for district clreol(). //if enter is pressd before input for country clreol(). } cout<<"Country : ".AD1. cin.AD1.{ clreol().

clreol(). cout<<"\nThe year of birth must be of 4 digits!!!". cout<<"\nPlease enter the year correctly : ".year<1000) { clreol(). T1.temp]. . T1. clreol(). cin>>answer.temp].year. cout<<"\nThe date of birth cannot be after the current system date !!! ". cin>>DOB11[T1.year.year.count++. cin>>DOB11[T1. A1. cout<<"\nYear : ". clreol(). cout<<"\a\nPease re-enter a correct option (Y/N) : ". } //end of "for loop" for entering information clrscr(). } //end of function void dob::enter_date() { clreol(). } while(DOB11[T1. clreol(). while(answer!='Y'&&answer!='y'&&answer!='N'&&answer!='n') { clrscr().temp].temp]. cout<<"\n".serial++.tasks(). clreol(). cout<<"\n\n *** Date of birth ***"<<"\n". } cout<<"\n".year>T1. cin>>DOB11[T1. clreol(). clreol(). cout<<"Invalid input for year !!! ". clreol(). cout<<"\nPlease enter the year correctly : \a".current_year) //to ensure that the year of birth { //gets entered correctly clreol(). clrscr(). cout<<"\aInvalid input for year !!!".temp]. while(DOB11[T1.cin>>answer.

cout<<"\n".year<1900) { clreol(). cout<<"Please enter a correct option (Y/N) : ". cout<<"\n". cout<<"\a\nInvalid input !!! "<<"\n". } while(DOB11[T1. cin>>birth_answer.temp]. cout<<"\a\nAre you sure (Y/N) ? ". clreol(). cin>>birth_answer. clreol().temp]. clreol().temp]. clreol(). clreol(). cout<<"\n". cin>>DOB11[T1. clreol().year>T1.temp]. } while(DOB11[T1. while(DOB11[T1. cout<<"\nThe date of birth cannot be after the current system date !!! ". clreol(). . cout<<"\nPlease enter the year again : ". while(birth_answer!='Y'&&birth_answer!='y'&&birth_answer!='N'&&birth_answer!='n') { clreol(). clreol(). } if(birth_answer=='n'||birth_answer=='N') { clreol(). cin>>DOB11[T1. clreol(). cout<<"\aInvalid input for year !!! ". cout<<"\nThe year of birth must be of 4 digits!!!\a". cout<<"Invalid input for year !!! ".year<1000) { clreol(). cout<<"\nPlease enter the year correctly : \a". cout<<"\nPlease enter the year correctly : ".current_year) { clreol().year.year. cout<<"\n".temp]. clreol().

temp]. cout<<"\a\nInvalid input for month !!!"<<"\n".temp]. cout<<"Again enter the month : ". clreol(). cin>>DOB11[T1.month<=0||DOB11[T1. } cout<<"Date : ". cin>>DOB11[T1.temp]. cout<<"Again enter the date : ".month>12) { clreol().cin>>DOB11[T1. cout<<"\n". } } //end of inner while while(birth_answer=='y'||birth_answer=='Y') { goto jump.date>31) { clreol().year.date<1||DOB11[T1.temp].temp]. } .month. while(DOB11[T1.month) { case 1: case 3: case 5: case 7: case 8: case 10: case 12:{ cin>>DOB11[T1. cin>>DOB11[T1. clreol().date. } break. clreol(). clreol().temp].temp].temp]. //for months with 31 days while(DOB11[T1. cout<<"Month : ". cout<<"\n". clreol(). cout<<"\aInvalid date !!!"<<"\n". } //end of inner while } //end of outer while jump: clreol().temp]. switch(DOB11[T1.date.temp].month.

cin>>DOB11[T1.date>29) //for leap year { clreol().temp]. cout<<"Again enter the date : ". } break. cout<<"\aInvalid date !!!"<<"\n".date<0||DOB11[T1. cout<<"\aInvalid date !!!"<<"\n".temp]. } //end of function void all::show_patient_detail() . cout<<"\n".date<0||DOB11[T1. cin>>DOB11[T1. } } //end of switch clreol().date>30) { clreol(). if(DOB11[T1. } default:{ cin>>DOB11[T1.temp]. } } break.temp]. } } else { while(DOB11[T1.date<1||DOB11[T1.year%4==0) { while(DOB11[T1. cout<<"Again enter the date : ". cout<<"\n".date.date.temp]. clreol().temp].date>28) //for non-leap year { clreol(). //for other months while(DOB11[T1.date.temp]. clreol(). cout<<"Again enter the date : ".temp].temp].temp]. cout<<"\n".temp].date. cout<<"\aInvalid date !!!"<<"\n". cin>>DOB11[T1. clreol().temp].date.case 2:{ //for february cin>>DOB11[T1.

. cin>>T1. } else { continue.name<<"\n". goto direct.j<100. cout<<"\n\n\tDo you want to enter now (Y/N) : \a".enter_now!='N'&&T1. cout<<"\tDatabase in empty !!!"<<"\n". clreol(). } } cout<<"\n\t\t****** CURRENT DATEBASE ENTRIES ******\n\n".{ clrscr(). cout<<"\n\n".j]. } if(T1.j<<" "<<PI[T1. } } cout<<"\n\n\t\tPress 0 to return to main menu. if(T1.j=1.enter_now!='Y'&&T1.j]==1) { cout<<"\t\t "<<T1.enter_now!='y'&&T1. "<<"\n".enter_now=='y'||T1. cout<<"\n\n\n\tEnter registration number : ". ".enter_now. .enter_now!='n') { cout<<"\a\n\tPlease enter a correct option (Y/N) : ".enter_now=='Y') { A1. for(T1. while(T1. } else { A1. cin>>T1.regis. cout<<"\tPlease enter some information first.d_index=0.j++) { if(T1.entry_index[T1. cin>>T1.d_index==1) { T1.enter_now.current==0) { cout<<"\n\n\n". } if(T1.T1.tasks(). cout<<"\t\tRegistration no..T1..enter_patient_info(). Name of patient\n\n".

get(ch). } cout<<"\n\tPress any key to continue. cout<<"\tPlease try again later. cout<<"\tPlease try again later.. direct: //label for "goto" jump statement if(T1. if(T1.entry_index[T1. "<<"\n". if(T1.clrscr()..attempt==3) { cout<<"\n\n\tYou have entered wrong registration number 3 times .. cin."<<"\n". invalid registration number !!! ". cout<<"\n\n".regis]==-1) . getch(). clrscr(). getch(). "<<"\n". cout<<"\tPress any key to exit to main task menu.attempt==3) { cout<<"\n\n\tYou have entered wrong registration number 3 times .tasks(). if(T1. \a". clrscr().. cout<<"\tAccess Denied!!! "<<"\n".regis==0) { A1.. getch(). A1. } T1.regis<T1. ". cout<<"\tAccess Denied!!! "<<"\n".. } cout<<"\n\n\tSorry. T1."<<"\n"."<<"\n".show_patient_detail().serial&&T1. A1.attempt++. the patient has left the hospital.regis<=0) { T1.regis]==0) { cout<<"\n\tSorry.tasks().regis>=T1.tasks()."."<<"\n". cout<<"\n\tRegistration number starts from 1 .show_count++..regis>0&&T1...serial)&&T1. } if(T1. A1.entry_index[T1."<<"\n". cout<<"\n\n\tPress any key to continue.regis<0||T1.. cout<<"\tPress any key to exit to main task menu. } if((T1. getch().attempt++.

clreol().sex==1) { cout<<"Male "<<"\n".. the registration number is invalid .regis>0&&T1.name<<"\n". clreol().\n".regis<T1..entry<<" records have been added . clreol(). } NUMBER .". A1. clreol().tasks().regis].attempt==3) { cout<<"\n\n\tYou have entered wrong registration number 3 times .show_patient_detail().. } } if(T1. if(T1. } else { cout<<"\tOnly "<<T1.entry==1) { cout<<"\tOnly 1 record has been added . getch().serial-1. cout<<"\tPlease try again later. A1.. if(T1. "<<"\n". } if(T1.regis<<"***\n\n".regis].\n". cout<<"\tAccess Denied!!! "<<"\n". cout<<"\tPress any key to exit to main task menu. cout<<"\tName : "<<PI[T1. cout<<"\n\t ***INFORMATION FOR PATIENT REGISTRATION "<<T1.serial&&T1.entry_index[T1. clreol().. clreol().attempt!=3) { cout<<"\n\n\tSorry."<<"\a\n". if(PI[T1."<<"\n". } cout<<"\n\n\n\tPress any key to continue. cout<<"\tSex : ". clrscr()."<<"\n"..attempt++.regis]==1) { T1. getch().attempt=0.{ T1.entry=T1. T1.

} case 6:{ clreol().sex==2) { cout<<"Female "<<"\n". } cout<<"\tBlood Group : ". } case 2:{ clreol().regis]. cout<<"A+\n". break. cout<<"AB+\n". cout<<"B+\n". break. clreol(). } case 8:{ clreol(). cout<<"AB-\n". cout<<"A-\n". break. } case 5:{ clreol(). break. } case 4:{ clreol(). switch(PI[T1. } case 3:{ clreol(). } case 7:{ clreol().bld_group) { case 1:{ clreol().if(PI[T1.regis]. clreol(). break. break. break. cout<<"O+\n". . cout<<"B-\n".

if(PI[T1. clreol(). clreol().state.street. } T1. clreol(). clreol().AD1. } clreol().regis]. clreol(). clreol().AD1. cin>>answer1.regis]. break. while(answer1!='Y'&&answer1!='y'&&answer1!='N'&&answer1!='n') { clreol(). cout<<"\n\tStreet : "<<PI[T1. cout<<"\n\t **ADDRESS**"<<"\n".country.cout<<"O-\n".AD1. . cout<<"\tMartial Status : ".regis].martial_status==1) { cout<<"Married "<<"\n".AD1. cout<<"\n\tCity : "<<PI[T1.regis].house. } } //end of switch clreol(). clreol().regis]. clreol(). cout<<"\a\tPease re-enter a correct option (Y/N) ? ". } else { cout<<"Single "<<"\n".AD1. cout<<"\n\tCountry : "<<PI[T1.regis]. clreol(). cout<<"\n\n\n\n\tWant to view detail of another patient : ".AD1. cout<<"\n\tDistrict : "<<PI[T1.show_date().dist. cout<<"\tDate of birth : ". clreol(). clreol(). cout<<"\n\tState : "<<PI[T1.city. clreol().regis]. clreol(). clreol(). cout<<"\n\tHouse no. DOB1.d_index=0. : "<<PI[T1.

regis]. switch(DOB11[T1. } case 2:{ cout<<"nd ".date) { case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: case 19: case 20:{ cout<<"th ".rem) { case 1:{ cout<<"st ". } else { A1. } case 3:{ cout<<"rd ". .regis].rem=DOB11[T1. } } //end of switch switch(T1. break.regis]. } clrscr(). T1. break.date%10. if(answer1=='Y'||answer1=='y') { A1. goto over.clreol().date.tasks().show_patient_detail(). cin>>answer1. } } //end of function void dob::show_date() { cout<<DOB11[T1.

} } //end of switch over: switch(DOB11[T1. ". ". } case 9:{ cout<<"September . ". } case 3:{ cout<<"March . ". } case 6:{ cout<<"June . ".month) { case 1:{ cout<<"January . break.regis]. } default:{ cout<<"th ". break. ".break. break. break. } case 7:{ cout<<"July . break. } case 4:{ cout<<"April . break. ". break. } case 5:{ cout<<"May . break. break. } case 2:{ cout<<"February . } case 8:{ cout<<"August . ". break. ". } .

..current==0) { clrscr(). "<<"\n". } //end of function void all::search_menu() { T1. } //end of function void all::billing() { clrscr(). ". cin>>oc."<<"\n". cin>>tc.regis]. cout<<"\nTreatment Charge:\t"..year<<" \n".tot. ". tot=bc+tc+oc. int bc. A1. ". cout<<"\nOther Charges :\t". break. cout<<"\nPatient Name :\t". cout<<"\a\n\n\n\tPress any key to return to the main task menu. } case 12:{ cout<<"December . cin>>bc. cout<<"\tDatabase in empty !!!"<<"\n". if(T1.case 10:{ cout<<"October ..oc. } case 11:{ cout<<"November .. . cout<<"\nBed Charge :\t". cout<<"\n\n\nTotal Billing Charges :\t"<<tot. break.ssi_count=0. gets(pn).. break. } } //end of switch cout<<DOB11[T1. cout<<"\n\n\n". getch().tasks().tc. char pn[25]. cout<<"\tPlease enter some information first.

enter_now!='Y'&&T1. cin. switch(s_choice) { case 1:{ T1.cout<<"\n\n\tDo you want to enter now (Y/N) : \a". } else { A1. clreol(). clrscr(). cout<<"\n\n\t\t***SEARCHING BY CITY***\n". cout<<"\n\n\tEnter city : ". clreol(). while(strlen(s_city)==0) //if enter is pressed before input for city .enter_now.getline(s_city.enter_patient_info(). cout<<"\t\t 3.enter_now=='y'||T1. clreol(). Return to main menu "<<"\n". Search by blood group "<<"\n". cin>>T1. } if(T1. cout<<"\n\n\n". clreol().tasks().30). } } T1.enter_now!='n') { cout<<"\a\n\tPlease enter a correct option (Y/N) : ".enter_now. Search by city "<<"\n". clreol(). cout<<"\n\n\t Enter your choice : \a".enter_now!='y'&&T1.get(ch). clreol(). cout<<"\n\n\n". cin>>s_choice. cout<<"\n\n\t\t ***SEARCH MENU***"<<"\n".enter_now!='N'&&T1. clreol(). cin. clreol(). while(T1.search_number=0. cin>>T1. cout<<"\t\t 2. clreol(). clrscr().search_index=1. clreol(). cout<<"\n\n\t\t 1.enter_now=='Y') { A1.

A1."<<"\n".getline(s_city.{ clreol(). clreol(). cout<<"\n\n\t\t ***BLOOD GROUP MENU***\n\n". O. O+ "<<"\n".search_city(). clreol(). clreol(). clreol(). cout<<"\n\tPlease enter a city : \a". clreol(). break. cout<<"\n\n\t\t***SEARCHING BY BLOOD GROUP***\n". clreol().search_index=2. cin>>s_group."<<"\n".30).search_blood_group(). cout<<"\t2. A+ "<<"\n". A. cout<<"\tInvalid search criteria !!!"<<"\n". clreol(). cout<<"\t5."<<"\n". B+ "<<"\n". cin. cout<<"\t6. } A1. clreol(). } cout<<"\n\n\n". clreol(). cout<<"\t1."<<"\n". } case 2:{ T1. . cout<<"\t8. B."<<"\n". cin>>s_group. clreol(). clreol(). while(s_group!=1&&s_group!=2&&s_group!=3&&s_group!=4&& s_group!=5&&s_group!=6&&s_group!=7&&s_group!=8) { cout<<"\n". cout<<"\t4. AB+ "<<"\n". AB. cout<<"\tEnter a valid blood group : \a". cout<<"\t3. cout<<"\n\n Enter the serial of your required group : ". clreol(). cout<<"\t7. clreol(). cout<<"\tValid serials are 1 to 8.

. } if(T1. } default:{ clreol(). clrscr(). cout<<"\n\t\t "<<T1.search_count++. break. getch(). .AD1.index<<"\t\t"<<PI[T1.."<<"\n". clreol(). } clreol().. T1.T1. clreol(). } } //end of switch } //end of function void all::search_city() { T1. cout<<"\n\n\n". } } clreol(). A1.s_city))==0) { if(T1.search_menu().break.search_number++. cout<<" Valid options are 1 and 2 !!!"<<"\n".serial. } case 3:{ A1. for(T1.T1.index]==0) { continue. cout<<"\a\n\n Invalid search criteria !!!"<<"\n".city.index].search_count==0) { cout<<"\t\tRegistration no.search_count=0.index]. clreol().name.entry_index[T1. Name of patient\n\n". clreol().index=1. T1. break.index<T1.index++) { if((strcmp(PI[T1. cout<<" Press any key to return to the main searching menu.tasks()..

cin>>T1.search_count<<" results found !!! "<<"\n\n\n". while(after_search_answer!='y'&&after_search_answer!='Y'&&after_search_answer! ='N'&&after_search_answer!='n') { cout<<"\a\n\n\t\tPlease enter a correct option .search_count==0) { cout<<"\t\t No result found !!!"<<"\n\n\n". cin>>after_search_answer.search_count>1) { cout<<"\t\t "<<T1.search_show_info().search_number==1) { cout<<"\a\n\n\n\t\t Search is complete !!! "<<"\n". } if(T1. cout<<"\t\t Press any key to continue.search_count==1) { cout<<"\t\t "<<T1. A1. } } if(T1.after_search_options().search_count<<" result found !!! "<<"\n\n\n". if(T1.".search_number==1) { clreol().if(T1. getch(). } if(T1. . } } else { cout<<"\n\n\n\t\tWhich registration number : ".. cout<<"\n\n\t\tWant to view in detail : ".. clreol(). cin>>after_search_answer.after_search_options()... A1. } if(after_search_answer=='y'||after_search_answer=='Y') { cout<<"\n\n\n\t\tWhich registration number : ".index. } else { A1. cout<<"\n\t\tDo you want to view in detail : ".".

search_count++. clreol().index++) { if(s_group==PI[T1.search_count==1) . T1.index].after_search_options(). } if(T1. } } clreol(). A1.index<<"\t\t"<<PI[T1..". cout<<"\t\t Press any key to continue.search_count==0) { cout<<"\t\t No matching result found !!!"<<"\n\n\n". } clreol(). } } //end of function void all::search_blood_group() { T1.name. A1. cout<<"\n\n\n". cout<<"\n\t\t "<<T1. if(T1.T1. } if(T1.index<T1. if(T1.index=1.serial.search_show_info(). T1. } if(T1.search_number==1) { cout<<"\a\n\n\n\t\t Search is complete !!! "<<"\n".index.. clrscr().search_number++.cin>>T1.search_count>1) { cout<<"\t\t "<<T1.search_count=0.bld_group) { if(T1. getch(). clreol().search_count<<" results found !!! "<<"\n\n\n".index].. Name of patient\n\n".T1.index]==0) { continue. for(T1.entry_index[T1.search_count==0) { cout<<"\t\tRegistration no..

". } } if(T1.after_search_options().index<=0) { if(T1. cout<<"\n\n\t\tWant to view in detail : ". cout<<"\n\n\tYou have entered wrong choice 3 times!!!!". cin>>T1.search_show_info(). cin>>after_search_answer. if(T1. } } //end of function void all::search_show_info() { T1. cout<<"\n\t\tDo you want to view in detail : ".ssi_count++. } } else { cout<<"\n\n\n\t\tWhich registration number : ".search_show_info(). } else { A1.{ cout<<"\t\t "<<T1. cout<<"\n\n".search_count<<" result found !!! "<<"\n\n\n". while(after_search_answer!='y'&&after_search_answer!='Y'&&after_search_answer! ='N'&&after_search_answer!='n') { cout<<"\a\n\n\t\tPlease enter a correct option .ssi_count==3) { clrscr(). clrscr(). .search_number==1) { clreol(). A1. A1. cin>>after_search_answer.index. } if(after_search_answer=='y'||after_search_answer=='Y') { cout<<"\n\n\n\t\tWhich registration number : ".index. cin>>T1.

cout<<"\n\tRegistration number starts from 1 ".index]==0) { if(T1.. } } //end of switch } if(T1. break.ssi_count==3) { clrscr(). break. A1..... getch().entry_index[T1.... } cout<<"\n\n\tSorry. cout<<"\tPress any key to continue ..entry_index[T1. getch()..search_blood_group().search_city(). invalid registration number !!!". cout<<"\n\tPress any key for more options.cout<<"\n\tPress any key for more options.."<<"\n".... break. } cout<<"\n\n\tSorry.search_city().after_search_options().\a"<<"\n".index>=T1.index]==-1||T1. getch(). } case 2:{ A1..search_index) { case 1:{ A1... cout<<"\n\n\tYou have entered wrong choice 3 times!!!!".. A1. getch().after_search_options(). break. switch(T1. } case 2:{ A1.\a".search_blood_group().serial) .. switch(T1.search_index) { case 1:{ A1.. } } //end of switch } if(T1.. the patient has left the hospital .\a". cout<<"\n\tPress any key to continue.\n".

sex==1) { cout<<"Male "<<"\n". } case 2:{ A1.ssi_count==3) { clrscr().\n".search_index) { case 1:{ A1.\a". break.. cout<<"\n\t ***INFORMATION FOR PATIENT REGISTRATION "<<T1. clreol().search_city(). clreol().\n". A1."<<"\n". the registration number in invalid . cout<<"\n".after_search_options(). T1.entry=T1.name<<"\n". break.. clreol().. NUMBER .. cout<<"\n\tPress any key for more options. } else { cout<<"\t\tOnly "<<T1.. getch(). cout<<"\n\n\tYou have entered wrong choice 3 times!!!!". cout<<"\tName : "<<PI[T1. } } //end of switch } clreol(). switch(T1.. } cout<<"\t\tPress any key to continue. if(PI[T1.\a"<<"\n".index<<"***\n\n".index]. } cout<<"\n\n\t\tSorry..{ if(T1.entry==1) { cout<<"\t\tOnly 1 record has been added . getch().serial-1.search_blood_group()..index].ssi_count=0. cout<<"\tSex : ". T1. if(T1.entry<<" records have been added .

} case 5:{ clreol(). switch(PI[T1. } if(PI[T1. cout<<"O+\n". cout<<"AB-\n". cout<<"B-\n". break.bld_group) { case 1:{ clreol(). } case 6:{ clreol(). break. cout<<"A-\n". cout<<"B+\n". break. } cout<<"\tBlood Group : ".clreol(). clreol(). break. break. break. } case 7:{ clreol(). cout<<"AB+\n".index]. } case 3:{ clreol(). } case 2:{ clreol(). clreol(). } . } case 4:{ clreol(). break.index]. cout<<"A+\n".sex==2) { cout<<"Female "<<"\n".

cout<<"\n\tDistrict : "<<PI[T1. clreol(). 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) : ".AD1.AD1. cout<<"\n\tState : "<<PI[T1. clreol().index].AD1.search_show_date(). } } //end of switch clreol(). cout<<"O-\n". cout<<"\tMartial Status : ".city.index].martial_status==1) { cout<<"Married "<<"\n".AD1. cout<<"\n\tCity : "<<PI[T1. clreol(). if(PI[T1. cout<<"\n\tHouse no. clreol().index]. clreol().index].index]. cout<<"\n\tCountry : "<<PI[T1.state.AD1. clreol(). clreol(). clreol(). cout<<"\n\n\n\tWant to view info of another patient within search results (Y/N) ? ". clreol().AD1.dist. clreol(). clreol(). cin>>after_search_answer.country. : "<<PI[T1. } else { cout<<"Single "<<"\n".case 8:{ clreol(). cout<<"\tDate of birth : ". cin>>after_search_answer.house. DOB1.index]. } . } cout<<"\n\t **ADDRESS**"<<"\n".index]. clreol().street. break. cout<<"\n\tStreet : "<<PI[T1. clreol().

search_city(). } } //end of switch } else { A1. break.index]. T1.date.index]. } } //end of function void dob::search_show_date() { cout<<DOB11[T1. } . break.index]. } } //end of switch switch(T1. break. goto over.rem) { case 1:{ cout<<"st ".after_search_options().date) { case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: case 19: case 20:{ cout<<"th ".rem=DOB11[T1.if(after_search_answer=='y'||after_search_answer=='Y') { switch(T1.search_blood_group(). } case 2:{ A1.search_index) { case 1:{ A1. switch(DOB11[T1.date%10.

break. } } //end of switch over: switch(DOB11[T1.month) { case 1:{ cout<<"January .case 2:{ cout<<"nd ". break. ". } case 4:{ cout<<"April . break. } case 3:{ cout<<"March . } case 6:{ cout<<"June . break. ". } case 5:{ cout<<"May . break. break. break. } case 7:{ cout<<"July . break. ". } default:{ cout<<"th ". ". ". ". ". break. .index]. ". } case 3:{ cout<<"rd ". } case 2:{ cout<<"February . break. } case 8:{ cout<<"August .

cout<<"\t\t1.index]. ". ". clreol().search_menu(). } //end of function void all::after_search_options() { clrscr(). } case 10:{ cout<<"October . ". } case 12:{ cout<<"December .ssi_count=0. } case 11:{ cout<<"November . clreol().after_search_choice.break. cout<<"\n\n\n\n\t\tWHAT DO U WANT TO DO NOW ?"<<"\n". Return to main task menu "<<"\n". clreol(). cin>>T1. Search again "<<"\n". break. break.year<<" \n". } case 9:{ cout<<"September . break. cout<<"\n". break. A1. ". clreol(). break. clreol().after_search_choice) { case 1:{ T1. switch(T1. } . clreol(). cout<<"\t\t2. cout<<"\n\tEnter your choice : ". } } //end of switch cout<<DOB11[T1. clreol(). clreol().

current==0) { cout<<"\n\n\n". cout<<"\t\tRegistration no. clreol(). cin>>T1.tasks(). } } cout<<"\n\t\t ***CURRENT DATABASE ENTRIES***\n\n".enter_now..enter_now!='Y'&&T1. A1."<<"\n".enter_now!='N'&&T1.serial.search_menu().tasks(). break.enter_now!='y'&&T1. cout<<"\n\n\tDo you want to enter now (Y/N) : \a". if(T1. cout<<"\tPress any key to return to the main searching menu. while(T1.case 2:{ T1.enter_now!='n') { cout<<"\a\n\tPlease re-enter a correct option (Y/N) : ".. } else { A1.j=1.enter_patient_info(). clreol(). "<<"\n". break. A1. cout<<"\tPlease enter some information first. for(T1. cout<<"\tDatabase in empty !!!"<<"\n".enter_now=='Y') { A1.enter_now=='y'||T1.enter_now.j++) { .ssi_count=0. cout<<"\a\n\n\tInvalid option requested !!!"<<"\n".j<T1. cin>>T1. getch(). Name of patient\n\n".T1. } default:{ clreol(). } } //end of switch } //end of function void all::delete_entry() { clrscr(). } if(T1.T1.

cout<<"\n\tPlease enter a valid choice (Y/N) : \a". getch(). while(T1..delete_all_confirm=='y'||T1.delete_all_confirm!='y'&&T1.current--.tasks().T1.". A1.j<<" "<<PI[T1..f<=100. cin>>T1.. ". } cout<<"\n\n\tPress 0 to return to main menu and 101 to delete all entries.. //to ignore deleted items } if(T1.f=1. .delete_all_confirm! ='N'&&T1.entry_index[T1. getch(). to delete ? ".f++) { if(T1.j].delete_show++. if(en_del_index==101) { cout<<"\n\tWarning : You are about to delete all entries !!!\a". } } if(T1.name<<"\n".entry_index[T1.delete_all_confirm. cout<<"\n\n\n\tWhich registration no. cin>>en_del_index. } } cout<<"\n\n\tAll entries have been succesfully deleted!!!". wrong input !!!"..delete_all_confirm=='Y') { for(T1. cout<<"\n\tAre you sure you want to do this : ".\a".T1. } if(T1.delete_show==0) { clrscr().entry_index[T1..j]==1) { T1. cout<<"\n\tPress any key to return to the main menu.j]==0) { continue.f]=0. cout<<"\n\tDatabase is currently empty!!!\a". cout<<"\t\t "<<T1. cout<<"\n\tPress any key to continue.delete_all_confirm!='Y'&&T1..delete_all_confirm!='n') { cout<<"\n\tSorry. T1.if(T1.f]==1) { T1.delete_all_confirm.entry_index[T1. cin>>T1.

//entry now deleted.entry_index[en_del_index]==1) { T1.entry_index[en_del_index]=1.\a"..current--...". cin>>delete_confirm.after_delete_options(). } if(en_del_index>0&&en_del_index<T1.after_delete_options().tasks().... default index value(1) kept cout<<"\n\tEntry not deleted ". A1. A1. } if(delete_confirm=='y'||delete_confirm=='Y') { T1. index value set to 0 T1.. cout<<"\n\tPress any key to continue. cout<<"\a\n\tPease re-enter a correct option (Y/N) ? ". //entry not deleted. cout<<"\n\tEntry succesfully deleted.serial&&T1.. cout<<"\n\n\tAre you sure you want to delete entry "<<en_del_index<<" (Y/N) ? ". getch()... getch().".. while(delete_confirm!='Y'&&delete_confirm!='y'&&delete_confirm!='N'&&delete_confirm!='n') { clreol().A1. cout<<"\n\tPress any key for more options.after_delete_options().serial&&T1. clreol().tasks().. } else { T1.\n".entry_index[en_del_index]=0.entry_index[en_del_index]==0) . A1. cin>>delete_confirm.delete_attempt=0. } else { cout<<"\n\tNo entries have been deleted. } } if(en_del_index==0) { clrscr().. } } if(en_del_index>0&&en_del_index<T1.". A1. getch(). cout<<"\tPress any key to continue.

getch().delete_attempt==3) { cout<<"\n\n\tSorry. getch(). if(T1. } cout<<"\tPress any key to continue. cout<<"\n\tAccess denied !!!"..current<<" are present ..delete_entry()..tasks(). if(T1. } //end of function void all::after_delete_options() .. cout<<"\n\tPress any key to return to the main task menu.delete_entry(). cout<<"\n\tPress any key to return to the main task menu. ". getch()."<<"\a\n".serial-1.. A1. } else { cout<<"\tOnly "<<T1. if(T1. you have entered wrong registration number 3 times. T1.\a". cout<<"\n\tPlease try again later !!! ".entry=T1.tasks().{ T1..entry<<" records was added and "<<T1."<<"\n". } else { T1."<<"\n". you have entered wrong registration number 3 times. A1. A1. ". cout<<"\n\tPress any key to continue. } clrscr(). cout<<"\n\tAccess denied !!!".delete_attempt==3) { cout<<"\n\n\tSorry. cout<<"\n\tPlease try again later !!!". } cout<<"\n\n\tSorry.entry==1) { cout<<"\tOnly 1 record has been added ..\n". Invalid registration number ... A1.delete_attempt++. } cout<<"\n\n\tSorry. getch().delete_attempt++.\a"<<"\n".\a". the patient has already left the hospital .\n"..

serial==0) { cout<<"\n\n\n". .". cout<<"\tPlease enter some information first. Delete more entries ". wrong choice . "<<"\n". cin>>T1. if(T1. cout<<"\n\t\t1. cout<<"\n\tPlease re-enter your choice : ". cout<<"\n\n\tDo you want to enter now (Y/N) : \a".tasks(). while(T1. cin>>delete_choice.enter_now!='n') { cout<<"\a\n\tPlease enter a correct option (Y/N) : ". cout<<"\n\t\tWHAT DO YOU WANT TO DO NOW ?". cout<<"\n\t\t2. cin>>T1.delete_count=0. cin>>delete_choice. } } //end of switch } //end of function void all::recycle_bin() { clrscr().enter_now=='y'||T1. break.{ clrscr().enter_now!='N'&&T1. cout<<"\n\tValid choices are 1 and 2. } if(T1. while(delete_choice!=1&&delete_choice!=2) { cout<<"\a\n\n\tSorry.delete_entry().enter_now!='y'&&T1.enter_now=='Y') { A1.enter_now. } switch(delete_choice) { case 1:{ A1. cout<<"\n\t\tPlease enter your choice : ". T1. cout<<"\tDatabase in empty !!!"<<"\n". ".enter_patient_info().enter_now!='Y'&&T1. Return to main menu "<<"\n". } case 2:{ A1.enter_now. break.

if(T1.d]==0) { cout<<"\t\t "<<T1.restore_serial==101) { cout<<"\n\n\tAre you sure you want to restore all the entries : ".d=1.T1. cout<<"\t\tRegistration no. } cout<<"\n\n\tPress 0 to return to main menu and 101 to restore all items. cin>>T1. } if(T1..d++) { if(T1.restore_all_confirm!='n') { cout<<"\n\n\tPlease re-enter a corrent option : ".serial.d<T1.delete_count==0) { T1. getch().tasks().restore_all_confirm! ='N'&&T1.delete_count=0. clrscr().restore_serial==0) { clrscr().T1. cin>>T1. A1. cout<<"\n\n\n\tNo entry is currently in recycle bin.d].restore_serial.".entry_index[T1.} else { A1.delete_count++.tasks(). ". T1.restore_all_confirm.restore_all_confirm!='Y'&&T1. for(T1.. cin>>T1..restore_all_confirm. } } if(T1. while(T1. } } cout<<"\n\t\t ****** DELETED ENTRIES ******\n\n". . } else { continue.restore_all_confirm!='y'&&T1. A1.\a". Name of patient\n\n". cout<<"\n\n\n\tWhich item to restore : ".name<<"\n".d<<" "<<PI[T1..tasks(). cout<<"\n\tPress any key to return to the main menu.

entry_index[T1. T1.e]==0) { T1.restore_confirm!='y'&&T1.e]=1. clrscr().e<=100.restore_attempt=0. } } if(T1. } else { cout<<"\n\n\tNo entry has been restored. T1.restore_confirm!='Y'&&T1. cout<<"\n\tPease re-enter a correct option (Y/N) : \a".restore_serial]=1. cin>>T1.".restore_all_confirm=='Y') { for(T1. } if(T1.entry_index[T1.current++.tasks(). clrscr().T1.".restore_confirm=='y') { T1. A1. getch().e=1. cout<<"\n\tPress any key to return to the main menu. T1..\a".recycle_bin(). cout<<"\n\tAre you sure you want to restore entry "<<T1. clreol().entry_index[T1.e++) { if(T1.restore_confirm! ='N'&&T1. cout<<"\n\n\tInvalid input !!! ".T1. .restore_confirm. cin>>T1.entry_index[T1.current++.restore_all_confirm=='y'||T1. getch().restore_confirm=='Y'||T1.restore_confirm.".restore_serial]==0) { T1. //index value set to 1 cout<<"\n\tEntry succesfully restored!!!". cout<<"\n\tPress any key to view the recycle bin.restore_serial<<" : ".restore_confirm!='n') { clreol().. } } cout<<"\n\tAll deleted items have been succesfully restored.} if(T1.delete_count=0. A1. while(T1...

. } } if(T1. getch(). if(T1.". if(T1.restore_attempt++. } if(T1.tasks(). getch().tasks().\a". getch().restore_serial]==1) { T1.restore_serial]==-1) { T1.. A1.. A1..". } cout<<"\n\tThe entry is already present in the database.entry_index[T1.". //index value kept 0 cout<<"\n\tPress any key to continue.entry_index[T1. } } //end of function void all::after_restore() .. cout<<"\n\tPress any key to continue. A1. getch().". cout<<"\n\n\tYou have unsuccesfully tried to restore 3 times..".\n\a".. } else { cout<<"\n\tEntry not restored!!!".after_restore()... } cout<<"\n\tInvalid serial number".cout<<"\n\tPress any key to continue. cout<<"\n\n\tYou have unsuccesfully tried to restore 3 times.restore_attempt++.recycle_bin().. cout<<"\n\tPress any key to return to the main task menu. A1.". cout<<"\n\tPress any key to return to the main task menu.restore_attempt==3) { clrscr(). A1. getch().recycle_bin()...restore_serial<0||T1. cout<<"\n\tPress any key to continue.".restore_serial>100||T1.after_restore(). A1..restore_attempt==3) { clrscr().

cout<<"\n\n\n\t\tWHAT DO YOU WANT TO DO NOW? ".". cout<<"\n\t\t2. cout<<"\n\tValid choices are 1 and 2 ". getch().. cout<<"\n\t\t1.".serial==0) { cout<<"\n\n\n\n\tYou have not used the software...tasks().". while(exit_answer!='Y'&&exit_answer!='y'&&exit_answer!='N'&&exit_answer!='n') { clreol(). getch()..\a". } case 2:{ A1. clrscr(). cout<<"\n\tPease re-enter a correct option (Y/N) : \a"..after_restore_choice.. } } } //end of function void all::exit_function() { clrscr(). cout<<"\n\n\t\tPlease enter your choice : ".{ clrscr(). cout<<"\n\tPress any key to continue. cout<<"\n\tIt is recommended that you do not exit... break. } default:{ cout<<"\n\n\n\tSorry.recycle_bin(). cin>>exit_answer. cin>>T1.after_restore(). switch(T1. . Restore more entries ".. cout<<"\n\n\tInvalid input !!! ". break.after_restore_choice) { case 1:{ A1. A1. cin>>exit_answer. Return to main manu ". cout<<"\n\tPress any key to continue. if(T1. clreol(). wrong choice ".. cout<<"\n\n\n\tAre you sure you want to exit (Y/N) ? ".

} } //end of function .. cout<<"\n\n\tInvalid input !!! ".tasks(). exit(0).com "<<"\n". cout<<"\n\n\tSend your comments to : mustafizur_04@sify. cin>>exit_answer... } if(exit_answer=='y'||exit_answer=='Y') { cout<<"\a".. while(exit_answer!='Y'&&exit_answer!='y'&&exit_answer!='N'&&exit_answer!='n') { clreol(). cout<<"\n\n\tThank You for trying this program. "<<"\n"..} if(exit_answer=='y'||exit_answer=='Y') { cout<<"\a"."<<"\n"... cout<<"\tAim : Simulation of Hospital Management Software"<<"\n". exit(0). cout<<"\n\n\n\tAre you sure you want to exit (Y/N) ? ". } } cout<<"\n\n\n\t\t\t ***SOFTWARE DETAILS***\n". } else { A1. cout<<"\tProgramming Language : C++ "<<"\n". cin>>exit_answer.."<<"\n".02 "<<"\n". } else { A1. getch(). clrscr(). cout<<"\n\n\tDeveloper : Mustafizur Rohman "<<"\n".. cout<<"\n\tPease re-enter a correct option (Y/N) : \a". cout<<"\n\tHope you like it.tasks(). cout<<"\tCompiler version : Borland 5. cout<<"\n\n\n\tPress any key to continue. clreol().

Output Welcome Screen Main menu Patient Details Input .

View Patient details .

. the working of project is slow in windows operating system.Limitation Though we have completed this project with all our effort but has certain limitation like it cannot be operated in networking.

who want their hospital Mnagement to be computerized.CONCLUSION This project is very useful in preparing hospital management. . this software is really of great use for Hospital Management. this project meets our requirements and complete in all sense.

BIBLIOGRAPHY The C++ Programming Language 3e . Addison-Wesley . Bjarne Stroustrup . 2003 ISBN: 0470846747 Accelerated C++ . 1999 ISBN: 0-201-37926-0 The C++ Standard . 2003 ISBN: 0-7645-2644-8 . . Steve Donovan . 1997 ISBN: 0-201-88954-4 The C++ Standard Library . 2000 ISBN: 0-201-70353-X C++ by Example: UnderC Learning Edition . John Wiley and Sons . Addison-Wesley . Al Stevens . Wiley . Que . Andrew Koenig and Barbara Moo . Nicolai Josuttis . 2001 ISBN: 0-7897-2676-9 Teach Yourself C++ 7e . Addison-Wesley .

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.