Hospital Management System In C++ With Source Code
The Hospital Management System In C++ With Source Code is developed using C++ programming language. This Hospital management system in c++ source code is to assist you in tracking and monitoring patients who are being cared for within the hospital.
A Hospital Management System Project in C++ Using Classes was designed and assembled with a simple console program, and it is freely accessible to all hospital users without the need for login details. By simply entering a series of numeric keys, the system user may pick the category in which they specialize.
In program for hospital management system in c++ menus in the categories are the same, but the specializations are different, so select according to the specialization. The user can register a patient or admit them right away if they have a serious illness.
hospital management system project in c++ with output will assist a significant number of patients by monitoring and tracking their needs.
The project was created using a basic C++ programming coding technique that can be used to teach beginners in the field of programming. This system design is straightforward and clean, making it easy for users to learn, use, and navigate.
These are the following features of the system
- Manage Patient Info
- Different Categories
- Each Category Has Different Record Info
- Display Overall Patient Info
- Can Appoint a Patient
Anyway if you want level up your knowledge in programming especially C/C++ Programming Language, try this new article I’ve made for you Best C Projects with Source Code for Beginners Free Download 2020.
To run this hospital management system project in c++ free download make sure that you have a Code Blocks or any platform of C++ installed in your computer.
Hospital Management System In C++ With Source Code Steps On How To Run The Project
Time needed: 5 minutes.
These are the steps on how to run Hospital Management System In C++ With Source Code
- Step 1: Download
First, download the source code given below.
- Step 2: Extract file.
Second, after you finished download the source code, extract the zip file.
- Step 3: Open CodeBlocks
Third, open “CodeBlocks IDE”.
- Step 4: Open Project.
Fourth, open file tab and Open File after that open folder HospitalSystem then click the “Hospital Management System.cpp“.
- Step 5: Run Project
Fifth, run the project.
- Step 6: The actual code.
You are free to copy the given source code below or download the downloadable source code given.
The Code Given Below is the Actual Code of System
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
#include<iostream> #include<conio.h> #include<string.h> #include<stdlib.h> using namespace std; struct patient { long long ID; string firstname; string lastname; int age; char blood[5]; char gender; patient*next; }; class linkedqueue { patient *head,*last; public: linkedqueue() //constructor { head=NULL; last=NULL; } patient input(); void insertatend(); void insertatbeg(); void getpatientout(); void listofpatients(); int search(int); char departmentname[50]; }; int linkedqueue :: search(int item) { if(head==NULL) return false; else { int flag=0; patient*p=new patient(); p=head; while( p->next!=NULL && p->ID!=item ) { p=p->next; } if(p->ID==item) { flag=1; return true; } if(flag==0) return false; } } int readnumber() { char b[20]; cin.getline(b, sizeof(b)); return atoi(b); } patient linkedqueue :: input() { int flag=0; patient *p=new patient(); cout << "\n Please enter data for patient\n"; cout<<"\n First name : "; getline(cin,p->firstname); cout << " Last name : "; getline(cin,p->lastname); again : cout << " Blood Group : "; cin>>p->blood; if((strcmp(p->blood,"A+")==0)||(strcmp(p->blood,"a+")==0)||(strcmp(p->blood,"A-")==0)||(strcmp(p->blood,"a-")==0)|| (strcmp(p->blood,"B+")==0)||(strcmp(p->blood,"b+")==0)||(strcmp(p->blood,"B-")==0)||(strcmp(p->blood,"b-")==0)|| (strcmp(p->blood,"O+")==0)||(strcmp(p->blood,"o+")==0)||(strcmp(p->blood,"O-")==0)||(strcmp(p->blood,"o-")==0)|| (strcmp(p->blood,"AB+")==0)||(strcmp(p->blood,"ab+")==0)||(strcmp(p->blood,"AB-")==0)||(strcmp(p->blood,"ab-")==0)) flag=1; if(flag==0) { cout<<"\n Invalid Blood Group Try Again..\n\n"; goto again; } cout<<" Gender(m/f) : "; cin>>p->gender; cout<<" Age : "; cin>>p->age; cout<<" Mobile number : "; cin>>p->ID; if(search(p->ID)) { p->ID=0; cout << "\n Data not valid. Operation cancelled."; } return *p; } void output(patient *p) { cout<<"\n \xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"; cout<<"\n Patient data:\n"; cout<<"\n First Name : "<<p->firstname; cout<<"\n Last Name : "<<p->lastname; cout<<"\n Gender : "<<p->gender; cout<<"\n Age : "<<p->age; cout<<"\n Blood Group : "<<p->blood; cout<<"\n Mobile Number : "<<p->ID; cout<<"\n\n \xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"; } void linkedqueue :: insertatbeg() { patient*p=new patient(); *p=input(); if(p->ID==0) return; if(head==NULL) { head=p; last=p; p->next=NULL; } else { p->next=head; head=p; } system("cls"); cout << "\n\tPatient added:"; output(p); } void linkedqueue:: insertatend() { patient*p=new patient(); *p=input(); if(p->ID==0) return; if(head==NULL) { head=p; last=p; p->next=NULL; } else { p->next=NULL; last->next=p; last=p; } system("cls"); cout<<"\n \xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"; cout<<"\n |-- HOSPITAL MANAGEMENT SYSTEM --|"; cout<<"\n \xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\n"; cout <<"\n ----------PATIENT ADDED-----------"; output(p); } void linkedqueue :: getpatientout() { system("cls"); if(head==NULL) { cout<<"\n No Patient to operate"; } else { patient*p=new patient(); p=head; head=head->next; cout << "\n Patient to operate:"; output(p); } } void linkedqueue :: listofpatients() { if(head==NULL) { cout<<"\n No patient"; } system("cls"); cout<<"\n \xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"; cout<<"\n |-- HOSPITAL MANAGEMENT SYSTEM --|"; cout<<"\n \xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\n"; patient*p=new patient; p=head; while(p!=NULL) { cout<<"\n Patient data:\n"; cout<<"\n First Name : "<<p->firstname; cout<<"\n Last Name : "<<p->lastname; cout<<"\n Gender : "<<p->gender; cout<<"\n Age : "<<p->age; cout<<"\n Blood Group : "<<p->blood; cout<<"\n Mobile Number : "<<p->ID; cout<<"\n\n \xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\n"; p=p->next; } cout<<"\n"; } void departmentmenu (linkedqueue * q) { int choice = 0, success; patient p; while (choice != 5) { system("cls"); cout<<"\n \xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"; cout<<"\n |-- HOSPITAL MANAGEMENT SYSTEM --|"; cout<<"\n \xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"; cout<<"\n\n "<<q->departmentname; cout<<"\n [1] Add normal patient\n"; cout<<" [2] Add critically ill patient\n"; cout<<" [3] Take patient to Doctor\n"; cout<<" [4] Display list\n"; cout<<" [5] Change department or exit\n"; cout<<"\n Please enter your choice : "; choice=readnumber(); cout<<" \xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"; switch (choice) { case 1: q->insertatend(); cout << "\n Press any key"; getch(); break; case 2: q->insertatbeg(); cout << "\n Press any key"; getch(); break; case 3: q->getpatientout(); cout<<"\n Press any key"; getch(); break; case 4: system("cls"); q->listofpatients(); cout<<"\n Press any key"; getch(); break; } } } int main () { int i, choice = 0; linkedqueue departments[4]; while(choice!=5) { strcpy(departments[0].departmentname,"GENERAL CLINIC\n"); strcpy(departments[1].departmentname,"HEART CLINIC\n"); strcpy(departments[2].departmentname,"LUNG CLINIC\n"); strcpy(departments[3].departmentname,"PLASTIC SURGERY\n"); system("cls"); cout<<"\n \xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"; cout<<"\n |-- HOSPITAL MANAGEMENT SYSTEM --|"; cout<<"\n \xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\n\n"; cout<<" Main Menu\n\n"; for (i = 0; i < 4; i++) { cout<<" "<<(i+1)<<": "<<departments[i].departmentname; } cout<<" 5: Exit"; cout<<"\n\n Please enter your choice : "; choice=readnumber(); if(choice>=1 && choice<=4) { departmentmenu(&departments[choice-1]); } } if(choice==5) cout<<"\n\t\tThank you! \n"; exit(0); } |
Run Quick Virus Scan For Safe Download
Run Quick Scan For Safe DownloadDownloadable Source Code
Conclusion
This hospital management system project in c++ using data structures is only a project made for school requirement purposes only. You can download this source code and modify it to suit your client requirements, since this is a student project it means you cannot really expect 100% functionality from this.
Related Articles
- Hospital Information Management System Using Visual Basic 2008 with MySQL Database
- Hospital Management System PHP Project With Source Code
- Simple Hospital Management System In C With Source Code
- Hospital Management System Project In Python
- Project On Hospital Management System In Java With Source Code
- Online Clinic Management System
- Hospital Management System Project In Django With Source Code
- Clinic Management System Project in C++ with Source Code
- Hospital Management System in C# with Source Code 2021
- Library Management System In C++ With Source Code
- Payroll Management System In C++ With Source Code
- Railway Reservation System in C++ With Source Code
Other Articles you might read also:
- Best Final Year Project for Computer Science 2021
- Best Thesis Title For IT/CS Student [Updated 2021]
- How to Make An Effective Thesis or Capstone Document
- Writing A Good Research Title For Thesis or Capstone Project
- ICHS Library Management System
- College Management System Project in Django with Source Code
- Search Filter In Django With Source Code
- Best Python Course Online | Python Course Free 2021
- ECOMMERCE IN JAVASCRIPT FRAMEWORK WITH SOURCE CODE
- To Do List Project in Python with Source Code | Video | 2020
Inquiries
If you have any questions or suggestions about hospital management system project in c++ documentation, please feel free to leave a comment below.