└── Hospital-Management-System-dbmsminiproject-main └── hospital system ├── PROJECT ├── main.py ├── static │ ├── b1.jpeg │ ├── b1.jpg │ ├── b2.jpg │ ├── css │ │ └── virtualregister.css │ ├── d1.jpg │ ├── d2.jpg │ ├── d3.jpg │ └── images │ │ ├── doc.jpg │ │ ├── friendspic │ │ ├── AR.jpg │ │ ├── bes.jpg │ │ └── ilya-pavlov-OqtafYT5kTw-unsplash.jpg │ │ ├── one.jpg │ │ ├── onee.jpg │ │ ├── small1.jpg │ │ ├── three.jpg │ │ ├── threee.jpg │ │ ├── two.jpg │ │ └── twoo.jpg └── templates │ ├── base.html │ ├── booking.html │ ├── doctor.html │ ├── edit.html │ ├── index.html │ ├── login.html │ ├── patient.html │ ├── signup.html │ └── trigers.html ├── hms.sql └── requirements.txt /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/main.py: -------------------------------------------------------------------------------- 1 | from flask import Flask,render_template,request,session,redirect,url_for,flash 2 | from flask_sqlalchemy import SQLAlchemy 3 | from flask_login import UserMixin 4 | from werkzeug.security import generate_password_hash,check_password_hash 5 | from flask_login import login_user,logout_user,login_manager,LoginManager 6 | from flask_login import login_required,current_user 7 | # from flask_mail import Mail 8 | import json 9 | 10 | 11 | 12 | # MY db connection 13 | local_server= True 14 | app = Flask(__name__) 15 | app.secret_key='hmsprojects' 16 | 17 | 18 | # this is for getting unique user access 19 | login_manager=LoginManager(app) 20 | login_manager.login_view='login' 21 | 22 | # SMTP MAIL SERVER SETTINGS 23 | 24 | # app.config.update( 25 | # MAIL_SERVER='smtp.gmail.com', 26 | # MAIL_PORT='465', 27 | # MAIL_USE_SSL=True, 28 | # MAIL_USERNAME="add your gmail-id", 29 | # MAIL_PASSWORD="add your gmail-password" 30 | # ) 31 | # mail = Mail(app) 32 | 33 | 34 | @login_manager.user_loader 35 | def load_user(user_id): 36 | return User.query.get(int(user_id)) 37 | 38 | 39 | 40 | 41 | # app.config['SQLALCHEMY_DATABASE_URL']='mysql://username:password@localhost/databas_table_name' 42 | app.config['SQLALCHEMY_DATABASE_URI']='mysql://root:@localhost/hmdbms' 43 | db=SQLAlchemy(app) 44 | 45 | 46 | 47 | # here we will create db models that is tables 48 | class Test(db.Model): 49 | id=db.Column(db.Integer,primary_key=True) 50 | name=db.Column(db.String(100)) 51 | email=db.Column(db.String(100)) 52 | 53 | class User(UserMixin,db.Model): 54 | id=db.Column(db.Integer,primary_key=True) 55 | username=db.Column(db.String(50)) 56 | usertype=db.Column(db.String(50)) 57 | email=db.Column(db.String(50),unique=True) 58 | password=db.Column(db.String(1000)) 59 | 60 | class Patients(db.Model): 61 | pid=db.Column(db.Integer,primary_key=True) 62 | email=db.Column(db.String(50)) 63 | name=db.Column(db.String(50)) 64 | gender=db.Column(db.String(50)) 65 | slot=db.Column(db.String(50)) 66 | disease=db.Column(db.String(50)) 67 | time=db.Column(db.String(50),nullable=False) 68 | date=db.Column(db.String(50),nullable=False) 69 | dept=db.Column(db.String(50)) 70 | number=db.Column(db.String(50)) 71 | 72 | class Doctors(db.Model): 73 | did=db.Column(db.Integer,primary_key=True) 74 | email=db.Column(db.String(50)) 75 | doctorname=db.Column(db.String(50)) 76 | dept=db.Column(db.String(50)) 77 | 78 | class Trigr(db.Model): 79 | tid=db.Column(db.Integer,primary_key=True) 80 | pid=db.Column(db.Integer) 81 | email=db.Column(db.String(50)) 82 | name=db.Column(db.String(50)) 83 | action=db.Column(db.String(50)) 84 | timestamp=db.Column(db.String(50)) 85 | 86 | 87 | 88 | 89 | 90 | # here we will pass endpoints and run the fuction 91 | @app.route('/') 92 | def index(): 93 | return render_template('index.html') 94 | 95 | 96 | 97 | @app.route('/doctors',methods=['POST','GET']) 98 | def doctors(): 99 | 100 | if request.method=="POST": 101 | 102 | email=request.form.get('email') 103 | doctorname=request.form.get('doctorname') 104 | dept=request.form.get('dept') 105 | 106 | # query=db.engine.execute(f"INSERT INTO `doctors` (`email`,`doctorname`,`dept`) VALUES ('{email}','{doctorname}','{dept}')") 107 | query=Doctors(email=email,doctorname=doctorname,dept=dept) 108 | db.session.add(query) 109 | db.session.commit() 110 | flash("Information is Stored","primary") 111 | 112 | return render_template('doctor.html') 113 | 114 | 115 | 116 | @app.route('/patients',methods=['POST','GET']) 117 | @login_required 118 | def patient(): 119 | # doct=db.engine.execute("SELECT * FROM `doctors`") 120 | doct=Doctors.query.all() 121 | 122 | if request.method=="POST": 123 | email=request.form.get('email') 124 | name=request.form.get('name') 125 | gender=request.form.get('gender') 126 | slot=request.form.get('slot') 127 | disease=request.form.get('disease') 128 | time=request.form.get('time') 129 | date=request.form.get('date') 130 | dept=request.form.get('dept') 131 | number=request.form.get('number') 132 | # subject="HOSPITAL MANAGEMENT SYSTEM" 133 | if len(number)<10 or len(number)>10: 134 | flash("Please give 10 digit number") 135 | return render_template('patient.html',doct=doct) 136 | 137 | 138 | # query=db.engine.execute(f"INSERT INTO `patients` (`email`,`name`, `gender`,`slot`,`disease`,`time`,`date`,`dept`,`number`) VALUES ('{email}','{name}','{gender}','{slot}','{disease}','{time}','{date}','{dept}','{number}')") 139 | query=Patients(email=email,name=name,gender=gender,slot=slot,disease=disease,time=time,date=date,dept=dept,number=number) 140 | db.session.add(query) 141 | db.session.commit() 142 | 143 | # mail starts from here 144 | 145 | # mail.send_message(subject, sender=params['gmail-user'], recipients=[email],body=f"YOUR bOOKING IS CONFIRMED THANKS FOR CHOOSING US \nYour Entered Details are :\nName: {name}\nSlot: {slot}") 146 | 147 | 148 | 149 | flash("Booking Confirmed","info") 150 | 151 | 152 | return render_template('patient.html',doct=doct) 153 | 154 | 155 | @app.route('/bookings') 156 | @login_required 157 | def bookings(): 158 | em=current_user.email 159 | if current_user.usertype=="Doctor": 160 | # query=db.engine.execute(f"SELECT * FROM `patients`") 161 | query=Patients.query.all() 162 | return render_template('booking.html',query=query) 163 | else: 164 | # query=db.engine.execute(f"SELECT * FROM `patients` WHERE email='{em}'") 165 | query=Patients.query.filter_by(email=em) 166 | print(query) 167 | return render_template('booking.html',query=query) 168 | 169 | 170 | 171 | @app.route("/edit/",methods=['POST','GET']) 172 | @login_required 173 | def edit(pid): 174 | if request.method=="POST": 175 | email=request.form.get('email') 176 | name=request.form.get('name') 177 | gender=request.form.get('gender') 178 | slot=request.form.get('slot') 179 | disease=request.form.get('disease') 180 | time=request.form.get('time') 181 | date=request.form.get('date') 182 | dept=request.form.get('dept') 183 | number=request.form.get('number') 184 | # db.engine.execute(f"UPDATE `patients` SET `email` = '{email}', `name` = '{name}', `gender` = '{gender}', `slot` = '{slot}', `disease` = '{disease}', `time` = '{time}', `date` = '{date}', `dept` = '{dept}', `number` = '{number}' WHERE `patients`.`pid` = {pid}") 185 | post=Patients.query.filter_by(pid=pid).first() 186 | post.email=email 187 | post.name=name 188 | post.gender=gender 189 | post.slot=slot 190 | post.disease=disease 191 | post.time=time 192 | post.date=date 193 | post.dept=dept 194 | post.number=number 195 | db.session.commit() 196 | 197 | flash("Slot is Updates","success") 198 | return redirect('/bookings') 199 | 200 | posts=Patients.query.filter_by(pid=pid).first() 201 | return render_template('edit.html',posts=posts) 202 | 203 | 204 | @app.route("/delete/",methods=['POST','GET']) 205 | @login_required 206 | def delete(pid): 207 | # db.engine.execute(f"DELETE FROM `patients` WHERE `patients`.`pid`={pid}") 208 | query=Patients.query.filter_by(pid=pid).first() 209 | db.session.delete(query) 210 | db.session.commit() 211 | flash("Slot Deleted Successful","danger") 212 | return redirect('/bookings') 213 | 214 | 215 | 216 | 217 | 218 | 219 | @app.route('/signup',methods=['POST','GET']) 220 | def signup(): 221 | if request.method == "POST": 222 | username=request.form.get('username') 223 | usertype=request.form.get('usertype') 224 | email=request.form.get('email') 225 | password=request.form.get('password') 226 | user=User.query.filter_by(email=email).first() 227 | # encpassword=generate_password_hash(password) 228 | if user: 229 | flash("Email Already Exist","warning") 230 | return render_template('/signup.html') 231 | 232 | # new_user=db.engine.execute(f"INSERT INTO `user` (`username`,`usertype`,`email`,`password`) VALUES ('{username}','{usertype}','{email}','{encpassword}')") 233 | myquery=User(username=username,usertype=usertype,email=email,password=password) 234 | db.session.add(myquery) 235 | db.session.commit() 236 | flash("Signup Succes Please Login","success") 237 | return render_template('login.html') 238 | 239 | 240 | 241 | return render_template('signup.html') 242 | 243 | @app.route('/login',methods=['POST','GET']) 244 | def login(): 245 | if request.method == "POST": 246 | email=request.form.get('email') 247 | password=request.form.get('password') 248 | user=User.query.filter_by(email=email).first() 249 | 250 | if user and user.password == password: 251 | login_user(user) 252 | flash("Login Success","primary") 253 | return redirect(url_for('index')) 254 | else: 255 | flash("invalid credentials","danger") 256 | return render_template('login.html') 257 | 258 | 259 | 260 | 261 | 262 | return render_template('login.html') 263 | 264 | @app.route('/logout') 265 | @login_required 266 | def logout(): 267 | logout_user() 268 | flash("Logout SuccessFul","warning") 269 | return redirect(url_for('login')) 270 | 271 | 272 | 273 | @app.route('/test') 274 | def test(): 275 | try: 276 | Test.query.all() 277 | return 'My database is Connected' 278 | except: 279 | return 'My db is not Connected' 280 | 281 | 282 | @app.route('/details') 283 | @login_required 284 | def details(): 285 | posts=Trigr.query.all() 286 | # posts=db.engine.execute("SELECT * FROM `trigr`") 287 | return render_template('trigers.html',posts=posts) 288 | 289 | 290 | @app.route('/search',methods=['POST','GET']) 291 | @login_required 292 | def search(): 293 | if request.method=="POST": 294 | query=request.form.get('search') 295 | dept=Doctors.query.filter_by(dept=query).first() 296 | name=Doctors.query.filter_by(doctorname=query).first() 297 | if name: 298 | 299 | flash("Doctor is Available","info") 300 | else: 301 | 302 | flash("Doctor is Not Available","danger") 303 | return render_template('index.html') 304 | 305 | 306 | 307 | 308 | 309 | 310 | app.run(debug=True) 311 | 312 | -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/b1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishnakumarKPK/hms/5fcc4abc9cb355cf4a98f45b9b1b6510546fb5c7/Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/b1.jpeg -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/b1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishnakumarKPK/hms/5fcc4abc9cb355cf4a98f45b9b1b6510546fb5c7/Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/b1.jpg -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/b2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishnakumarKPK/hms/5fcc4abc9cb355cf4a98f45b9b1b6510546fb5c7/Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/b2.jpg -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/css/virtualregister.css: -------------------------------------------------------------------------------- 1 | .section-title { 2 | text-align: center; 3 | /* padding-bottom: 30px; */ 4 | } 5 | 6 | .pricing .row { 7 | padding-top: 0px; 8 | } 9 | 10 | .card { 11 | margin-top: 57px; 12 | border-radius: 8px 40px 40px 8px; 13 | transition: all 0.5s ease-in-out; 14 | box-shadow: 1px 0px 8px 2px rgb(63, 101, 159); 15 | } 16 | 17 | .bg-dark { 18 | background-color: #3e588c; 19 | background-image: linear-gradient(315deg, #3e588c 0%, #233329 74%); 20 | } 21 | 22 | label { 23 | color: white; 24 | margin-top: 15px; 25 | font-family: 'Itim', cursive; 26 | } 27 | 28 | .jumbotron { 29 | background-color: #3e588c; 30 | background-image: linear-gradient(315deg, #3e588c 0%, #233329 74%); 31 | } 32 | 33 | #gender { 34 | width: 300px; 35 | } 36 | 37 | #slot { 38 | width: 300px; 39 | } 40 | 41 | #dept { 42 | width: 300px; 43 | } 44 | 45 | .form-group input { 46 | width: 300px; 47 | border: none; 48 | /* border-bottom: 1px solid purple; */ 49 | border-bottom: 2px solid #3e588c; 50 | outline: none; 51 | font-size: 22px; 52 | margin-bottom: 5px; 53 | font-family: 'Itim', cursive; 54 | } 55 | 56 | option { 57 | width: 400px; 58 | border: none; 59 | border-bottom: 2px solid #3e588c; 60 | outline: none; 61 | font-size: 22px; 62 | margin-bottom: 5px; 63 | } 64 | 65 | .form-group input:hover { 66 | background-color: ghostwhite; 67 | } 68 | 69 | #btn { 70 | background-color: #3e588c; 71 | background-image: linear-gradient(315deg, #3e588c 0%, #233329 74%); 72 | border-radius: 15px; 73 | border: none; 74 | position: relative; 75 | width: 300px; 76 | } 77 | 78 | #btn:hover { 79 | background-color: white; 80 | color: white; 81 | } -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/d1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishnakumarKPK/hms/5fcc4abc9cb355cf4a98f45b9b1b6510546fb5c7/Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/d1.jpg -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/d2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishnakumarKPK/hms/5fcc4abc9cb355cf4a98f45b9b1b6510546fb5c7/Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/d2.jpg -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/d3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishnakumarKPK/hms/5fcc4abc9cb355cf4a98f45b9b1b6510546fb5c7/Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/d3.jpg -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/doc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishnakumarKPK/hms/5fcc4abc9cb355cf4a98f45b9b1b6510546fb5c7/Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/doc.jpg -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/friendspic/AR.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishnakumarKPK/hms/5fcc4abc9cb355cf4a98f45b9b1b6510546fb5c7/Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/friendspic/AR.jpg -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/friendspic/bes.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishnakumarKPK/hms/5fcc4abc9cb355cf4a98f45b9b1b6510546fb5c7/Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/friendspic/bes.jpg -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/friendspic/ilya-pavlov-OqtafYT5kTw-unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishnakumarKPK/hms/5fcc4abc9cb355cf4a98f45b9b1b6510546fb5c7/Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/friendspic/ilya-pavlov-OqtafYT5kTw-unsplash.jpg -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/one.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishnakumarKPK/hms/5fcc4abc9cb355cf4a98f45b9b1b6510546fb5c7/Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/one.jpg -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/onee.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishnakumarKPK/hms/5fcc4abc9cb355cf4a98f45b9b1b6510546fb5c7/Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/onee.jpg -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/small1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishnakumarKPK/hms/5fcc4abc9cb355cf4a98f45b9b1b6510546fb5c7/Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/small1.jpg -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/three.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishnakumarKPK/hms/5fcc4abc9cb355cf4a98f45b9b1b6510546fb5c7/Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/three.jpg -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/threee.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishnakumarKPK/hms/5fcc4abc9cb355cf4a98f45b9b1b6510546fb5c7/Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/threee.jpg -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/two.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishnakumarKPK/hms/5fcc4abc9cb355cf4a98f45b9b1b6510546fb5c7/Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/two.jpg -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/twoo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishnakumarKPK/hms/5fcc4abc9cb355cf4a98f45b9b1b6510546fb5c7/Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/static/images/twoo.jpg -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | {% block css %} 13 | {% endblock css %} 14 | 15 | 16 | 17 | {% block title %} 18 | 19 | {% endblock title %} 20 | 21 | 22 | 23 | 24 | 25 | 97 | 98 | {% block body %} 99 | 100 | {% endblock body %} 101 | 102 |
103 |
Done By:
104 |
105 |
Product realization Project Team
106 |

K.SIDDHARTHA|L.VISHNU PRIYA|M.PAVANI|G.SAKETH

107 |
108 |
109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/templates/booking.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} 4 | Booking 5 | {% endblock title %} 6 | 7 | {% block body %} 8 | {% with messages=get_flashed_messages(with_categories=true) %} 9 | {% if messages %} 10 | {% for category, message in messages %} 11 | 12 | 19 | 20 | 21 | {% endfor %} 22 | {% endif %} 23 | {% endwith %} 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | {% for post in query %} 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | {% endfor %} 59 | 60 | 61 |
PIDEMAILNAMEGENDERSLOTDISEASEDATETIMED.DEPARTMENTPHONE NUMBEREDITDELETE
{{post.pid}}{{post.email}}{{post.name}}{{post.gender}}{{post.slot}}{{post.disease}}{{post.date}}{{post.time}}{{post.dept}}{{post.number}}
62 | 63 | 64 | {% endblock body %} -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/templates/doctor.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} 4 | Doctors 5 | {% endblock title %} 6 | 7 | {% block body %} 8 | 9 |
10 | 11 |
12 | 13 |
14 |
15 | {% with messages=get_flashed_messages(with_categories=true) %} 16 | {% if messages %} 17 | {% for category, message in messages %} 18 | 19 | 26 | 27 | 28 | {% endfor %} 29 | {% endif %} 30 | {% endwith %} 31 |
32 |

Doctors Booking

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 | {% endblock body %} -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/templates/edit.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} 4 | Edit Patient BOOKING 5 | {% endblock title %} 6 | 7 | {% block body %} 8 | 9 |
10 | 11 |
12 |
13 | 14 |
15 |
16 | 17 |

Update Your Slot

18 |
19 | 20 | 21 |
22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 |
30 | 31 |
32 | 33 | 34 | 35 |
36 | 37 |
38 | 39 | 40 | 41 | 48 |
49 | 50 |
51 | 52 | 53 | 54 | 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 | {% endblock body %} -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} 4 | HOME 5 | {% endblock title %} 6 | 7 | {% block body %} 8 | 9 | {% with messages=get_flashed_messages(with_categories=true) %} 10 | {% if messages %} 11 | {% for category, message in messages %} 12 | 13 | 20 | 21 | 22 | {% endfor %} 23 | {% endif %} 24 | {% endwith %} 25 | 26 | 27 | 28 | 66 | 67 | {% endblock body %} -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/templates/login.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} 4 | Login 5 | {% endblock title %} 6 | 7 | {% block body %} 8 |
9 | 10 |
11 | 12 | 13 |
14 | 15 |
16 | 17 |
18 | 19 |

Login

20 |
21 | 22 | {% with messages=get_flashed_messages(with_categories=true) %} 23 | {% if messages %} 24 | {% for category, message in messages %} 25 | 26 | 33 | 34 | 35 | {% endfor %} 36 | {% endif %} 37 | {% endwith %} 38 | 39 | 40 |
41 | 42 | 43 | 44 |
45 | 46 | 47 | 48 |
49 | 50 | 51 |
52 | 53 | 54 |
55 | 56 | 57 |
58 | 59 |
60 | Not a User Signup 61 | 62 | 63 |
64 | 65 |
66 | 67 |
68 | 69 | 70 |
71 | 72 |
73 | 74 | 75 | {% endblock body %} -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/templates/patient.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} 4 | Patients Booking 5 | {% endblock title %} 6 | 7 | {% block body %} 8 | 9 |
10 |
11 | 12 |
13 |
14 | ... 15 |
16 |
HOSPITAL DOCTORS
17 |

Doctors Names

18 |
19 |
    20 |
  • Dr.Arjun
  • 21 |
  • Dr.Vinod Kumar
  • 22 |
  • Dr.Srinivas
  • 23 |
24 |
25 | Contact Us 26 | About US 27 |
28 |
29 | 30 |
31 | 32 |
33 | 34 |

Book Your Slot

35 |
36 | 37 | 38 | {% with messages=get_flashed_messages(with_categories=true) %} 39 | {% if messages %} 40 | {% for category, message in messages %} 41 | 42 | 49 | 50 | 51 | {% endfor %} 52 | {% endif %} 53 | {% endwith %} 54 | 55 | 56 | 57 |
58 | 59 | 60 | 61 |
62 | 63 | 64 | 65 |
66 | 67 |
68 | 69 | 70 | 71 |
72 | 73 |
74 | 75 | 76 | 77 | 84 |
85 | 86 |
87 | 88 | 89 | 90 | 97 |
98 | 99 |
100 | 101 | 102 | 103 |
104 |
105 | 106 | 107 | 108 |
109 |
110 | 111 | 112 | 113 |
114 | 115 |
116 | 117 | 118 | 119 | 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 | {% endblock body %} -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/templates/signup.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} 4 | Signup 5 | {% endblock title %} 6 | 7 | {% block body %} 8 |
9 | 10 |
11 | 12 | 13 |
14 | 15 |
16 | 17 |
18 |

Sign Up Here

19 |
20 | 21 | 22 | {% with messages=get_flashed_messages(with_categories=true) %} 23 | {% if messages %} 24 | {% for category, message in messages %} 25 | 26 | 33 | 34 | 35 | {% endfor %} 36 | {% endif %} 37 | {% endwith %} 38 | 39 | 40 |
41 | 42 |
43 | 44 | 45 |
46 | 47 | 48 |
49 | 50 | 51 | 52 | 57 |
58 | 59 |
60 | 61 | 62 | We'll never share your email with anyone else. 63 |
64 | 65 | 66 |
67 | 68 | 69 |
70 | 71 | 72 |
73 |
74 | Already a User Login 75 | 76 |
77 | 78 |
79 | 80 |
81 | 82 | 83 |
84 | 85 |
86 | 87 | 88 | 89 | {% endblock body %} -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/PROJECT/templates/trigers.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} 4 | Trigers 5 | {% endblock title %} 6 | 7 | {% block body %} 8 | {% with messages=get_flashed_messages(with_categories=true) %} 9 | {% if messages %} 10 | {% for category, message in messages %} 11 | 12 | 19 | 20 | 21 | {% endfor %} 22 | {% endif %} 23 | {% endwith %} 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | {% for post in posts %} 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | {% endfor %} 50 | 51 | 52 |
TIDPIDEMAILNAMEACTIONTIMESTAMP
{{post.tid}}{{post.pid}}{{post.email}}{{post.name}}{{post.action}}{{post.timestamp}}
53 |
54 | 55 | {% endblock body %} -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/hms.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 5.0.2 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Host: 127.0.0.1 6 | -- Generation Time: Jan 22, 2021 at 11:52 AM 7 | -- Server version: 10.4.11-MariaDB 8 | -- PHP Version: 7.2.29 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | START TRANSACTION; 12 | SET time_zone = "+00:00"; 13 | 14 | 15 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 16 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 17 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 18 | /*!40101 SET NAMES utf8mb4 */; 19 | 20 | -- 21 | -- Database: `hms` 22 | -- 23 | 24 | -- -------------------------------------------------------- 25 | 26 | -- 27 | -- Table structure for table `doctors` 28 | -- 29 | 30 | CREATE TABLE `doctors` ( 31 | `did` int(11) NOT NULL, 32 | `email` varchar(50) NOT NULL, 33 | `doctorname` varchar(50) NOT NULL, 34 | `dept` varchar(100) NOT NULL 35 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 36 | 37 | -- 38 | -- Dumping data for table `doctors` 39 | -- 40 | 41 | INSERT INTO `doctors` (`did`, `email`, `doctorname`, `dept`) VALUES 42 | (1, 'anees@gmail.com', 'anees', 'Cardiologists'), 43 | (2, 'amrutha@gmail.com', 'amrutha bhatta', 'Dermatologists'), 44 | (3, 'aadithyaa@gmail.com', 'aadithyaa', 'Anesthesiologists'), 45 | (4, 'anees@gmail', 'anees', 'Endocrinologists'), 46 | (5, 'aneeqah@gmail.com', 'aneekha', 'corona'); 47 | 48 | -- -------------------------------------------------------- 49 | 50 | -- 51 | -- Table structure for table `patients` 52 | -- 53 | 54 | CREATE TABLE `patients` ( 55 | `pid` int(11) NOT NULL, 56 | `email` varchar(50) NOT NULL, 57 | `name` varchar(50) NOT NULL, 58 | `gender` varchar(50) NOT NULL, 59 | `slot` varchar(50) NOT NULL, 60 | `disease` varchar(50) NOT NULL, 61 | `time` time NOT NULL, 62 | `date` date NOT NULL, 63 | `dept` varchar(50) NOT NULL, 64 | `number` varchar(12) NOT NULL 65 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 66 | 67 | -- 68 | -- Dumping data for table `patients` 69 | -- 70 | 71 | INSERT INTO `patients` (`pid`, `email`, `name`, `gender`, `slot`, `disease`, `time`, `date`, `dept`, `number`) VALUES 72 | (2, 'anees1@gmail.com', 'anees1 rehman khan', 'Male1', 'evening1', 'cold1', '21:20:00', '2020-02-02', 'ortho11predict', '9874561110'), 73 | (5, 'patient@gmail.com', 'patien', 'Male', 'morning', 'fevr', '18:06:00', '2020-11-18', 'Cardiologists', '9874563210'), 74 | (7, 'patient@gmail.com', 'anees', 'Male', 'evening', 'cold', '22:18:00', '2020-11-05', 'Dermatologists', '9874563210'), 75 | (8, 'patient@gmail.com', 'anees', 'Male', 'evening', 'cold', '22:18:00', '2020-11-05', 'Dermatologists', '9874563210'), 76 | (9, 'aneesurrehman423@gmail.com', 'anees', 'Male', 'morning', 'cold', '17:27:00', '2020-11-26', 'Anesthesiologists', '9874563210'), 77 | (10, 'anees@gmail.com', 'anees', 'Male', 'evening', 'fever', '16:25:00', '2020-12-09', 'Cardiologists', '9874589654'), 78 | (15, 'khushi@gmail.com', 'khushi', 'Female', 'morning', 'corona', '20:42:00', '2021-01-23', 'Anesthesiologists', '9874563210'), 79 | (16, 'khushi@gmail.com', 'khushi', 'Female', 'evening', 'fever', '15:46:00', '2021-01-31', 'Endocrinologists', '9874587496'), 80 | (17, 'aneeqah@gmail.com', 'aneeqah', 'Female', 'evening', 'fever', '15:48:00', '2021-01-23', 'Endocrinologists', '9874563210'); 81 | 82 | -- 83 | -- Triggers `patients` 84 | -- 85 | DELIMITER $$ 86 | CREATE TRIGGER `PatientDelete` BEFORE DELETE ON `patients` FOR EACH ROW INSERT INTO trigr VALUES(null,OLD.pid,OLD.email,OLD.name,'PATIENT DELETED',NOW()) 87 | $$ 88 | DELIMITER ; 89 | DELIMITER $$ 90 | CREATE TRIGGER `PatientUpdate` AFTER UPDATE ON `patients` FOR EACH ROW INSERT INTO trigr VALUES(null,NEW.pid,NEW.email,NEW.name,'PATIENT UPDATED',NOW()) 91 | $$ 92 | DELIMITER ; 93 | DELIMITER $$ 94 | CREATE TRIGGER `patientinsertion` AFTER INSERT ON `patients` FOR EACH ROW INSERT INTO trigr VALUES(null,NEW.pid,NEW.email,NEW.name,'PATIENT INSERTED',NOW()) 95 | $$ 96 | DELIMITER ; 97 | 98 | -- -------------------------------------------------------- 99 | 100 | -- 101 | -- Table structure for table `test` 102 | -- 103 | 104 | CREATE TABLE `test` ( 105 | `id` int(11) NOT NULL, 106 | `name` varchar(20) NOT NULL, 107 | `email` varchar(20) NOT NULL 108 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 109 | 110 | -- 111 | -- Dumping data for table `test` 112 | -- 113 | 114 | INSERT INTO `test` (`id`, `name`, `email`) VALUES 115 | (1, 'ANEES', 'ARK@GMAIL.COM'), 116 | (2, 'test', 'test@gmail.com'); 117 | 118 | -- -------------------------------------------------------- 119 | 120 | -- 121 | -- Table structure for table `trigr` 122 | -- 123 | 124 | CREATE TABLE `trigr` ( 125 | `tid` int(11) NOT NULL, 126 | `pid` int(11) NOT NULL, 127 | `email` varchar(50) NOT NULL, 128 | `name` varchar(50) NOT NULL, 129 | `action` varchar(50) NOT NULL, 130 | `timestamp` datetime NOT NULL 131 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 132 | 133 | -- 134 | -- Dumping data for table `trigr` 135 | -- 136 | 137 | INSERT INTO `trigr` (`tid`, `pid`, `email`, `name`, `action`, `timestamp`) VALUES 138 | (1, 12, 'anees@gmail.com', 'ANEES', 'PATIENT INSERTED', '2020-12-02 16:35:10'), 139 | (2, 11, 'anees@gmail.com', 'anees', 'PATIENT INSERTED', '2020-12-02 16:37:34'), 140 | (3, 10, 'anees@gmail.com', 'anees', 'PATIENT UPDATED', '2020-12-02 16:38:27'), 141 | (4, 11, 'anees@gmail.com', 'anees', 'PATIENT UPDATED', '2020-12-02 16:38:33'), 142 | (5, 12, 'anees@gmail.com', 'ANEES', 'Patient Deleted', '2020-12-02 16:40:40'), 143 | (6, 11, 'anees@gmail.com', 'anees', 'PATIENT DELETED', '2020-12-02 16:41:10'), 144 | (7, 13, 'testing@gmail.com', 'testing', 'PATIENT INSERTED', '2020-12-02 16:50:21'), 145 | (8, 13, 'testing@gmail.com', 'testing', 'PATIENT UPDATED', '2020-12-02 16:50:32'), 146 | (9, 13, 'testing@gmail.com', 'testing', 'PATIENT DELETED', '2020-12-02 16:50:57'), 147 | (10, 14, 'aneeqah@gmail.com', 'aneeqah', 'PATIENT INSERTED', '2021-01-22 15:18:09'), 148 | (11, 14, 'aneeqah@gmail.com', 'aneeqah', 'PATIENT UPDATED', '2021-01-22 15:18:29'), 149 | (12, 14, 'aneeqah@gmail.com', 'aneeqah', 'PATIENT DELETED', '2021-01-22 15:41:48'), 150 | (13, 15, 'khushi@gmail.com', 'khushi', 'PATIENT INSERTED', '2021-01-22 15:43:02'), 151 | (14, 15, 'khushi@gmail.com', 'khushi', 'PATIENT UPDATED', '2021-01-22 15:43:11'), 152 | (15, 16, 'khushi@gmail.com', 'khushi', 'PATIENT INSERTED', '2021-01-22 15:43:37'), 153 | (16, 16, 'khushi@gmail.com', 'khushi', 'PATIENT UPDATED', '2021-01-22 15:43:49'), 154 | (17, 17, 'aneeqah@gmail.com', 'aneeqah', 'PATIENT INSERTED', '2021-01-22 15:44:41'), 155 | (18, 17, 'aneeqah@gmail.com', 'aneeqah', 'PATIENT UPDATED', '2021-01-22 15:44:52'), 156 | (19, 17, 'aneeqah@gmail.com', 'aneeqah', 'PATIENT UPDATED', '2021-01-22 15:44:59'); 157 | 158 | -- -------------------------------------------------------- 159 | 160 | -- 161 | -- Table structure for table `user` 162 | -- 163 | 164 | CREATE TABLE `user` ( 165 | `id` int(11) NOT NULL, 166 | `username` varchar(50) NOT NULL, 167 | `usertype` varchar(50) NOT NULL, 168 | `email` varchar(50) NOT NULL, 169 | `password` varchar(1000) NOT NULL 170 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 171 | 172 | -- 173 | -- Dumping data for table `user` 174 | -- 175 | 176 | INSERT INTO `user` (`id`, `username`, `usertype`, `email`, `password`) VALUES 177 | (13, 'anees', 'Doctor', 'anees@gmail.com', 'pbkdf2:sha256:150000$xAKZCiJG$4c7a7e704708f86659d730565ff92e8327b01be5c49a6b1ef8afdf1c531fa5c3'), 178 | (14, 'aneeqah', 'Patient', 'aneeqah@gmail.com', 'pbkdf2:sha256:150000$Yf51ilDC$028cff81a536ed9d477f9e45efcd9e53a9717d0ab5171d75334c397716d581b8'), 179 | (15, 'khushi', 'Patient', 'khushi@gmail.com', 'pbkdf2:sha256:150000$BeSHeRKV$a8b27379ce9b2499d4caef21d9d387260b3e4ba9f7311168b6e180a00db91f22'); 180 | 181 | -- 182 | -- Indexes for dumped tables 183 | -- 184 | 185 | -- 186 | -- Indexes for table `doctors` 187 | -- 188 | ALTER TABLE `doctors` 189 | ADD PRIMARY KEY (`did`); 190 | 191 | -- 192 | -- Indexes for table `patients` 193 | -- 194 | ALTER TABLE `patients` 195 | ADD PRIMARY KEY (`pid`); 196 | 197 | -- 198 | -- Indexes for table `test` 199 | -- 200 | ALTER TABLE `test` 201 | ADD PRIMARY KEY (`id`); 202 | 203 | -- 204 | -- Indexes for table `trigr` 205 | -- 206 | ALTER TABLE `trigr` 207 | ADD PRIMARY KEY (`tid`); 208 | 209 | -- 210 | -- Indexes for table `user` 211 | -- 212 | ALTER TABLE `user` 213 | ADD PRIMARY KEY (`id`), 214 | ADD UNIQUE KEY `email` (`email`); 215 | 216 | -- 217 | -- AUTO_INCREMENT for dumped tables 218 | -- 219 | 220 | -- 221 | -- AUTO_INCREMENT for table `doctors` 222 | -- 223 | ALTER TABLE `doctors` 224 | MODIFY `did` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; 225 | 226 | -- 227 | -- AUTO_INCREMENT for table `patients` 228 | -- 229 | ALTER TABLE `patients` 230 | MODIFY `pid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18; 231 | 232 | -- 233 | -- AUTO_INCREMENT for table `test` 234 | -- 235 | ALTER TABLE `test` 236 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; 237 | 238 | -- 239 | -- AUTO_INCREMENT for table `trigr` 240 | -- 241 | ALTER TABLE `trigr` 242 | MODIFY `tid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20; 243 | 244 | -- 245 | -- AUTO_INCREMENT for table `user` 246 | -- 247 | ALTER TABLE `user` 248 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; 249 | COMMIT; 250 | 251 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 252 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 253 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 254 | -------------------------------------------------------------------------------- /Hospital-Management-System-dbmsminiproject-main/hospital system/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask==1.1.2 2 | Flask-Mail==0.9.1 3 | Flask-SQLAlchemy==2.4.3 4 | future==0.18.2 5 | Jinja2==2.11.2 6 | jmespath==0.9.5 7 | Js2Py==0.70 8 | MarkupPy==1.14 9 | MarkupSafe==1.1.1 10 | mysqlclient==2.0.1 11 | Naked==0.1.31 12 | packaging==20.4 13 | Pillow==7.1.1 14 | pipenv==2018.11.26 15 | pipwin==0.5.0 16 | pyttsx3==2.90 17 | pytz==2020.1 18 | pywin32==228 19 | SQLAlchemy==1.3.17 20 | sqlparse==0.3.1 21 | 22 | --------------------------------------------------------------------------------