0% found this document useful (0 votes)
40 views

IP Project File

This document summarizes a student project for a Hospital Management System. It includes an index listing sections on a certificate, acknowledgements, introduction, and source code. The source code section provides Python code to create a login system and menu options to register and view patient, doctor, and worker details stored in a MySQL database. It also shows output screens from the login and main menu.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

IP Project File

This document summarizes a student project for a Hospital Management System. It includes an index listing sections on a certificate, acknowledgements, introduction, and source code. The source code section provides Python code to create a login system and menu options to register and view patient, doctor, and worker details stored in a MySQL database. It also shows output screens from the login and main menu.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Hospital Management System

TERM - II

Informatics Practices Project

Developed By

Divyansh Chaudhary

Darbari Lal DAV Model School


Shalimar Bagh,Delhi
Index

Sno Description
1 Certificate
2 Acknowledgement
3 Introduction
4 Source Code
5 Output Screen
Certificate
This is to certify that Hotel Management System is
developed by Divyansh Chaudhary under my
supervision in the session 2021-2022 for Informatics
Practices. The work done by them is original.

Mrs Ritu Jain


Computer Science Teacher
Date: ____________
Acknowledgement
We would like to express my sincere gratitude to my IP
teacher Ms Ritu Jain for her vital support, guidance and
encouragement without which this project would not
come forth from my side who has helped me in
completing the project by giving ideas, thoughts and
made this project easy and accurate.
We wish to thank my parents for their undivided support
and interest who inspired me and encouraged me to go
my own way, without which I would be unable to
complete my project.
Introduction

The Hospital Management System (HMS) is designed for Any


Hospital to replace their existing manual, paper based system.
This System targets to provide complete solutions for Hospital
and Health care services. This System can be used in any
Hospital, Clinic, Diagnostics or Pathology labs for maintaining
patient details and their test results. It Integrates the entire
Resources of a Hospital into One Integrated Software Application.

Today one cannot afford to rely on the fallible human beings who
really want to stand against today’s merciless competition where
not to wise saying “to err is human” is no longer valid, it’s
outdated to rationalize your mistake. So, to keep pace with time,
to bring about the best result without malfunctioning and greater
efficiency so to replace the unending heaps of flies with a much
sophisticated hard disk of the computer.

This prevents a lot of time and money. The work becomes fully
automated and any information regarding the organization can be
obtained by clicking the button. Moreover, now it’s an age of
computers and automating such an organization gives a better
look.
SOURCE CODE
from sys import exit

import mysql.connector as sql

conn=sql.connect(host='localhost',user='root',passwd='',database

='project')

if conn.is_connected():

print('successfully connected')

c1=conn.cursor()

print('---------------------------------------------')

print("HOSPITAL MANAGEMENT SYSTEM")

print('---------------------------------------------')

print('"GOD WISHES YOU"')

print("1.LOGIN")

print("2.EXIT")

choice=int(input("ENTER YOUR CHOICE:"))

if choice==1:

u1=input("enter user name:")

pwd1=input("enter the password:")

while u1=='vasu'and pwd1=='vasu6072':

print('connected')

print("WELCOME TO HOSPITAL")

print("successfully connected")

print('1.RegisteringPatient details')
print('2.RegisteringDoctor details')

print('3.RegisteringWorker details')

print("4.total patient details")

print("5.total doctor details")

print("6.total worker details")

print('7.Patient detail')

print('8.Doctor detail')

print('9.Worker detail')

print('10.Exit')

choice=int(input('ENTER YOUR CHOICE:'))

if choice==1:

p_name=input('Enter Patient Name:')

p_age=int(input('Enter Age:'))

p_problems=input('Enter the Problem/Disease:')

p_phono=int(input('Enter Phone number:'))

sql_insert="insert into patient_details

values(""'"+p_name+"',"+str(p_age)+",'"+p_problems+"',"+str(p_ph

ono)+")"

c1.execute(sql_insert)

print('SUCCESSFULLY REGISTERED')

conn.commit()

elif choice==2:

d_name=input('Enter Doctor Name:')


d_age=int(input('Enter Age:'))

d_department=input('Enter the Department:')

d_phono=int(input('Enter Phone number:'))

sql_insert="insert into doctor_details

values(""'"+d_name+"',"+str(d_age)+",'"+d_department+"',"+str(d_

phono)+")"

c1.execute(sql_insert)

print('successfully registered')

conn.commit()

elif choice==3:

w_name=input('Enter Worker Name:')

w_age=int(input('Enter Age:'))

w_workname=input('Enter type of work:')

w_phono=int(input('Enter Phone number:'))

sql_insert="insert into worker_details

values(""'"+w_name+"',"+str(w_age)+",'"+w_workname+"',"+str(w_ph

ono)+")"

c1.execute(sql_insert)

print('successfully registered')

conn.commit()

elif choice==4:

sql_w='select*from patient_details '


c1.execute(sql_w)

r = c1.fetchall()

for i in r :

print(i)

elif choice==5:

sql_x="select*from doctor_details"

c1.execute(sql_x)

s=c1.fetchall()

for i in s:

print(i)

elif choice==6:

sql_y="select*from worker_details"

c1.execute(sql_y)

t=c1.fetchall()

for i in t:

print(i)

elif choice==7:

h=input("Enter the name:")

sql_w='select*from patient_details where

p_name=("{}")'.format(h)

c1.execute(sql_w)
u = c1.fetchall()

for i in u:

print(i)

elif choice==8:

d=input("Enter the name:")

sql_d='select*from doctor_details where

p_name=("{}")'.format(d)

c1.execute(sql_d)

v=c1.fetchall()

for i in v:

print(i)

elif choice==9:

f=input("Enter the name:")

sql_f='select*from worker_details where

p_name=("{}")'.format(f)

c1.execute(sql_f)

w=c1.fetchall()

for i in w:

print(i)

elif choice==10:

exit()
break

else:

print('wrong username&password')

if choice==2:

exit()
Output Screens
(with all main screens)

Login output:
After login:

After choosing choice:

You might also like