From 3905e728d29896f0c40472060185504c6428a500 Mon Sep 17 00:00:00 2001 From: VaishnaviHapse Date: Tue, 8 Jun 2021 15:15:22 +0530 Subject: [PATCH 1/2] add readme and cpp file --- README.md | 20 +- team50_buffer2.0_project.cpp | 514 +++++++++++++++++++++++++++++++++++ 2 files changed, 531 insertions(+), 3 deletions(-) create mode 100644 team50_buffer2.0_project.cpp diff --git a/README.md b/README.md index e674b94..cd6850d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,19 @@ -# Buffer_2.0 -Buffer_2.0 repo to submit your projects to.Repository containing folder-wise code for all submissions to Buffer : A Project Series, conducted between April, 2021 - June, 2020. +Objective of your project. + The project name is ASKHELP as during covid19 situation it is difficult to find beds , hospitals, and medicines like remdesivir etc. so we have made the project related to database of medical supplys and hospitals. +where you can search about hospitals , medicines etc. +where hospitals will upload their information and people will be able to search if there is availability of the things they are searchimg for. -Each folder should contain a separate README to describe the files and project objective + +Features of the project. + it does include structures, and its easy to access. + +Data Structure(s) /Algorithm(s) used. + array data structure is used. + +the project is a basic project of database about hospital , the hospital information to which anyone can have access. + +Team Members and their contribution. + 1. gayatri belhekar has done the basic code for the project and has applied the ideas. + 2.Vaishnavi Hapse has contributed writing code and making project more representable and has added ideas. + 3. Ragini Bhagwat has supported the idea and contributed in deciding project topic. diff --git a/team50_buffer2.0_project.cpp b/team50_buffer2.0_project.cpp new file mode 100644 index 0000000..a42ea06 --- /dev/null +++ b/team50_buffer2.0_project.cpp @@ -0,0 +1,514 @@ +#include +#include +#include +#include +#include + +struct doctor1 +{ + int id; + char name[20], Q[20], age[20], exp[20], city[20], special[20], phno[20], hospName[20]; +}; +struct patient1 +{ + int id1; + char name[20], age[20], city[20], dis[20], room[20], sym[20], con[20], date[20], charg[20], bill[20], hname[20]; +}; + +using namespace std; +class doctor; +class patient; +class hospital +{ +public: + // int id=0,id1=0, + int counter = 0; +}; + +class doctor : public hospital +{ +public: + int docid = 0; + struct doctor1 arr[10]; + void add_doc_info() + { + int i, en; + cout << "How Many Entries you want to add :"; + cin >> en; + for (i = 1; i <= en; i++) + { + cout << "Enter Hospital's ID : "; + cin >> arr[docid].id; + cout << "Enter the hospital name : "; + cin >> arr[docid].hospName; + cout << "Enter phone number of hospital : "; + cin >> arr[docid].phno; + cout << "Enter Doctor's Name : "; + cin >> arr[docid].name; + cout << "Enter Doctor's Age : "; + cin >> arr[docid].age; + cout << "Enter Doctor's Qualification : "; + cin >> arr[docid].Q; + cout << "Enter Doctor's Specialization : "; + cin >> arr[docid].special; + cout << "Enter Doctor's Experience : "; + cin >> arr[docid].exp; + cout << "Enter Hospital's city : "; + cin >> arr[docid].city; + docid++; + counter++; + cout << "\n"; + cout << "You filled all Entries of " << i << " hospital and doctor successfully" + << "\n"; + cout << "Enter value for " + << " " << i + 1 << " " + << "hospital" + << "\n"; + } + } + void Display() + { + system("cls"); + int n, i; + cout << "\n Enter the hospital's ID to display Record :"; + cin >> n; + if (n == 0) + { + cout << "\n\n OOPS!!!! " + << "\n\n"; + cout << "Note:- No Record To Display Plz Go Back And Enter Some Entries...... " + << "\n"; + } + else + { + int status = 0; + for (i = 0; i < docid; i++) + { + if (arr[i].id == n) + { + status = 1; + break; + } + } + if (status) + { + cout << "\n\n"; + cout << "1.Hospital's ID : " << arr[i].id << "\n"; + cout << "2.Hospital's Name : " << arr[i].hospName << "\n"; + cout << "3.Hospital phone number : " << arr[i].phno << "\n"; + cout << "4.Doctor's Name : " << arr[i].name << "\n"; + cout << "5.Doctor's Age : " << arr[i].age << "\n"; + cout << "6.Doctor's Qualification : " << arr[i].Q << "\n"; + cout << "7.Doctor's Specialization : " << arr[i].special << "\n"; + cout << "8.Doctor's Experience : " << arr[i].exp << "\n"; + cout << "9.Hospital's city : " << arr[i].city << "\n"; + cout << " \n Press Any KEY To choose another Option.... "; + } + else + { + cout << " \n\n No such ID in database " << endl; + cout << " \n Press Any KEY To choose another Option.... "; + } + } + getch(); + } + + void doctor_detail() + { + int i; + if (docid == 0) + { + cout << " \n\n\n OOPS!!!! " + << "\n\n"; + cout << "Note:- No Record To Display Plz Go Back And Enter Some Entries...... " + << "\n"; + } + else + { + cout << "********************************************************************************" + << "\n"; + cout << "\t \t \t Details Of The Doctors In The Hospital \n"; + cout << "********************************************************************************" + << "\n \n"; + + cout << "Hospital id"<< "\t\t"<< "Specialization"<< "\t\t"<< "Qualification"<< "\t\t" << "Age"; + cout << "\n\n"; + + for (i = 0; i < docid; i++) + { + cout << arr[i].id << "\t\t\t" << arr[i].special << "\t\t\t\t" << arr[i].Q << "\t\t\t\t" << arr[i].age << "\n"; + } + cout << " \n Press Any Button To choose another Option.... "; + } + getch(); + } + void tot_no_of_doc() + { + system("cls"); + int i = counter; + cout << "Total Doctor's in Hospital : " << i << "\n"; + cout << " \n Press Any Button To choose another Option.... "; + getch(); + } +}; + +class patient : public hospital +{ +public: + int docid1 = 0; + struct patient1 arr[10]; + void add_pat_info(); + void Display(); + void patient_report(); + void patient_detail(); + void tot_no_of_pat(); + void gen_pat_report(); +}; + +void patient ::add_pat_info() +{ + int i, en; + cout << "How Many Entries you want to add :"; + cin >> en; + for (i = 1; i <= en; i++) + { + cout << " 1.Enter Patient's ID : "; + cin >> arr[docid1].id1; + cout << " 2. Enter patient's Name : "; + cin >> arr[docid1].name; + cout << " 3. Name of hospital where patient is admitted : "; + cin >> arr[docid1].hname; + cout << " 4. Enter patient's Age : "; + cin >> arr[docid1].age; + cout << " 5. Enter patient's Disease : "; + cin >> arr[docid1].dis; + cout << " 6. Enter patient's Symptoms : "; + cin >> arr[docid1].sym; + cout << " 7. Enter Patient's Room No. : "; + cin >> arr[docid1].room; + cout << " 8. Enter Patient's condition Before Admit : "; + cin >> arr[docid1].con; + cout << " 9. Enter Patient's ADMIT Date : "; + cin >> arr[docid1].date; + cout << " 10. Enter Patient's Room Charge : "; + cin >> arr[docid1].charg; + cout << " 11. Enter Patient's Medicine charge : "; + cin >> arr[docid1].bill; + docid1++; + counter++; + cout << "\n"; + cout << "You filled all Entries of " << i << " patient successfully" + << "\n"; + cout << "Enter value for " + << " " << i + 1 << " " + << "patient" + << "\n"; + } +} + +void patient ::Display() +{ + system("cls"); + int n, i; + cout << "\n Enter the Patient's ID to display info :"; + cin >> n; + if (n == 0) + { + cout << "\n\n OOPS!!!! " + << "\n \n"; + cout << "Note:- No Record To Display Plz Go Back And Enter Some Entries...... " + << "\n"; + cout << " \n Press Any KEY To choose another Option.... "; + } + else + { + int status = 0; + for (i = 0; i < docid1; i++) + { + if (arr[i].id1 == n) + { + status = 1; + break; + } + } + if (status == 1) + { + cout << "1.Patient's ID : " << arr[i].id1 << "\n"; + cout << "2.Patient's Name : " << arr[i].name << "\n"; + cout << "3.Patient's Hospital : " << arr[i].hname << "\n"; + cout << "4.Patient's Age : " << arr[i].age << "\n"; + cout << "5.Patient's Disease : " << arr[i].dis << "\n"; + cout << "6.Patient's Symptoms : " << arr[i].sym << "\n"; + cout << "7.Patient's Room No. : " << arr[i].room << "\n"; + cout << "8.Patient's condition Before Admit : " << arr[i].con << "\n"; + cout << "9.Patient's ADMIT Date : " << arr[i].date << "\n"; + cout << "10.Patient's Room Charge : " << arr[i].charg << "\n"; + cout << "11.Patient's Medicine charge : " << arr[i].bill << "\n"; + cout << " \n Press Any KEY To choose another Option.... "; + } + else + { + cout << " \n\n No such ID in database " << endl; + cout << " \n Press Any KEY To choose another Option.... "; + } + } + getch(); +} + +void patient ::patient_report() +{ + system("cls"); + int i, n; + cout << "\n Enter the Patient's ID to Display Report :"; + cin >> n; + int status = 0; + for (i = 0; i < docid1; i++) + { + if (arr[i].id1 == n) + { + status = 1; + break; + } + } + if (status) + { + cout << "\n\n *** Patient's Report *** " + << "\n \n"; + cout << "1. Patient's Name " << arr[i].name << "\n"; + cout << "2. Patient's Age " << arr[i].age << "\n"; + cout << "3. Patient symptoms " << arr[i].sym << "\n"; + cout << "4. Patient Disease " << arr[i].dis << "\n"; + cout << "5. Patient Admit Date " << arr[i].date << "\n"; + cout << "6. Patient condition At The Time Of Discharge " << arr[i].con << "\n"; + cout << "Press Any Key To Go Back...."; + } + else + { + cout << " \n\n No such ID in database " << endl; + cout << " \n Press Any KEY To choose another Option.... "; + } + + getch(); +} + +void patient::patient_detail() +{ + int i; + if (docid1 == 0) + { + cout << " \n\n\n\n\n OOPS!!!! " + << "\n\n\n"; + cout << "Note:- No Record To Display Plz Go Back And Enter Some Entries...... " + << "\n"; + } + else + { + cout << "********************************************************************************" + << "\n"; + cout << "\t \t \t Details Of All The Pateints In The Hospital \n"; + cout << "********************************************************************************" + << "\n \n"; + cout << "ID"<< "\t\t"<<"Illness"<<"\t\t\t"<<"ADMITTED Date"<<"\t\t"<< "Age"; + cout << "\n\n"; + for (i = 0; i < docid1; i++) + { + cout << arr[i].id1 <<"\t\t\t" << arr[i].dis << "\t\t\t\t" << arr[i].date << "\t\t\t\t" << arr[i].age << "\n"; + } + cout << " \n Press Any KEY To choose another Option.... "; + } + getch(); +} + +void patient ::tot_no_of_pat() +{ + system("cls"); + int i = counter; + cout << "Total Patients in Hospital : " << i << "\n"; + cout << " \n Press Any KEY To choose another Option.... "; + getch(); +} + +void patient ::gen_pat_report() +{ + system("cls"); + int i, n; + cout << "\n Enter the Patient's ID to Display Bill :"; + cin >> n; + int status = 0; + for (i = 0; i < docid1; i++) + { + if (arr[i].id1 == n) + { + status = 1; + break; + } + } + if (status) + { + cout << "\n\n *** Patient's Report *** " << "\n \n"; + cout << "1. Patient's Medicine Charge " << arr[i].bill << "\n"; + cout << "2. Patient's Room Charge " << arr[i].charg << "\n"; + cout << "Press Any Key To Go Back...."; + } + + else + { + cout << " \n\n No such ID in database " << endl; + cout << " \n Press Any KEY To choose another Option.... "; + } + getch(); +} + +int main() +{ + system("color B0"); + + bool repeat = true; + int ch1, ch2, ch3, ch4; + doctor d; + patient p; +xyz: + system("cls"); + cout << "\n\n"; + cout << " *** Welcome to the Hospital Management System *** " + << "\n\n\n"; + cout << " 1. Menu : " + << "\n\n"; + ; + cout << " 2. Exit : " + << "\n\n\n\n"; + cout << "Enter Your Choice :"; + cin >> ch1; + cout << "\n\n\n"; + + if (ch1 == 1) + { + xyz2: + system("cls"); + cout << "\n\n"; + cout << " 1. Enter into Hospital and Doctor's DataBase " << endl; + cout << " 2. Enter into Patient's DataBase " << endl; + cout << " 3. Generate Patient's Report " << endl; + cout << " 4. Generate Patient's Bill " << endl; + cout << " 5. EXIT " + << "\n"; + cout << "Please Enter Your choice :" + << " "; + cin >> ch2; + while (repeat == true) + { + system("cls"); + switch (ch2) + case 1: + { + cout << "\n\n"; + cout << " *** Welcome To Hospital and Doctor's DataBase *** " + << "\n \n \n\n"; + + cout << " \t 1. Add New Information " << endl; + cout << " \t 2. Display Information " << endl; + cout << " \t 3. Detail OF ALL The Doctors In The Hospital " << endl; + cout << " \t 4. Total Number of Doctor's in Hospital " << endl; + cout << " \t 5. EXIT " + << "\n"; + + cout << "Please Enter your choice :" + << " "; + cin >> ch3; + switch (ch3) + { + case 1: + system("cls"); + d.add_doc_info(); + break; + case 2: + d.Display(); + cout << "\n"; + break; + + case 3: + system("cls"); + d.doctor_detail(); + break; + + case 4: + d.tot_no_of_doc(); + break; + + case 5: + goto xyz2; + break; + + default: + cout << "invalid"; + } + break; + case 2: + cout << "\n\n"; + cout << " *** Welcome To Patient's DataBase *** " + << "\n \n"; + + cout << "1. Add New Patient's Information " << endl; + cout << "2. Display Patient's Information " << endl; + cout << "3. Detail OF ALL The Patient In The Hospital " << endl; + cout << "4. Total Number of Patient's in Hospital " << endl; + cout << "5. EXIT " + << "\n"; + + cout << "Please Enter your choice :" + << " "; + cin >> ch4; + switch (ch4) + { + case 1: + system("cls"); + p.add_pat_info(); + break; + case 2: + p.Display(); + cout << "\n"; + break; + + case 3: + system("cls"); + p.patient_detail(); + break; + + case 4: + p.tot_no_of_pat(); + break; + + case 5: + goto xyz2; + break; + + default: + cout << "invalid"; + break; + } + break; + case 3: + + p.patient_report(); + goto xyz2; + break; + case 4: + p.gen_pat_report(); + goto xyz2; + break; + case 5: + goto xyz; + break; + } + } + } + else if (ch1 == 2) + { + return 0; + } + else + { + cout << "Wrong Input" << endl; + } + return 0; +} \ No newline at end of file From f5d95578d0a214e0200a84be9f00c574694a8348 Mon Sep 17 00:00:00 2001 From: VaishnaviHapse <81480208+VaishnaviHapse@users.noreply.github.com> Date: Tue, 8 Jun 2021 16:09:07 +0530 Subject: [PATCH 2/2] Update README.md --- README.md | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index cd6850d..dc68bde 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,17 @@ -Objective of your project. - The project name is ASKHELP as during covid19 situation it is difficult to find beds , hospitals, and medicines like remdesivir etc. so we have made the project related to database of medical supplys and hospitals. -where you can search about hospitals , medicines etc. -where hospitals will upload their information and people will be able to search if there is availability of the things they are searchimg for. +Objective of our project: + The project name is ASKHELP. As during covid19 situation it is difficult to find beds , hospitals, and medicines like remdesivir etc. So we have made the project related to database of medical supply and hospitals. You can search about hospitals , medicines etc. Where hospitals will upload their information and people will be able to search if there is availability of the things they are searchimg for. +Features of the project: +It does include structures, and its easy to access. +This is database management project done with the help of array datastrucutre and array of structures. +It is user friendly. -Features of the project. - it does include structures, and its easy to access. +Data Structure(s) /Algorithm(s) used : + Array data structure is used. -Data Structure(s) /Algorithm(s) used. - array data structure is used. -the project is a basic project of database about hospital , the hospital information to which anyone can have access. - -Team Members and their contribution. - 1. gayatri belhekar has done the basic code for the project and has applied the ideas. - 2.Vaishnavi Hapse has contributed writing code and making project more representable and has added ideas. - 3. Ragini Bhagwat has supported the idea and contributed in deciding project topic. +Team Members and their contribution : +1. Gayatri Belhekar has done the code for the project and has applied the ideas. +2. Vaishnavi Hapse has contributed writing code, suggested ideas and helped in making project more representable . +3. Ragini Bhagwat has supported the idea and contributed in deciding project topic.