Computer Science Project
Computer Science Project
1 ABSTRACT 01
5 ADVANTAGES 10
6 SOURCE CODE 11
7 OUTPUT 23
8 CONCLUSION 29
9 BIBLIOGRAPHY 30
ABSTRACT
HARDWARE:
1. Processor : 12th Gen Intel(R) Core (TM) i5-1235U 1.30 GHz
2. Installed RAM : 8.00 GB (7.69 GB usable)
3. System type : 64-bit operating system, x64-based processor
4. Edition : Windows 11 Home Single Language
SOFTWARE:
1. IDLE(Python 3.12 64-bit)
2. Mysql 8.0 Command line client
DEVELOPMENT TOOLS AND TECHNOLOGIES:
WHY MySQL?
• Data security
• On-Demand Scalability
• High Performance
• Round the clock uptime
• Comprehensive transactional support
• Complete workflow control
• Reduced total cost of ownership
• The flexibility of open source
MODULE USED:
• Mysql.connector –
<cursor object>=<connectionobject>.cursor()Eg:
Cursor=con.cursor()
2.commit() method
The method fetches all (or all remaining) rows of a query result
set and returns a list of tuples. if no more rows are available, it returns
an empty list.
4. fetchone() method
This method retrieves the next row of a query result set and
returns a single sequence, or None if no more rows are available. By
default, the returned tuple consists of data returned by the MySQL
server, converted to Python objects.
5. execute() method
6. connect() method
while (True):
print("""
================================
Welcome To Our Hospital
================================
""")
# creating database connectivity
import mysql.connector
passwd = str(input("Enter the Password Please!!:"))
=======================================
!!!!!!!!!!Register Yourself!!!!!!!!
=======================================
""")
u = input("Input your username!!:")
p = input("Input the password (Password must be strong!!!:")
mycursor.execute("insert into user_data values('" + u + "','" + p + "')")
mysql.commit()
print("""
============================================
!!Well Done!!Registration Done Successfully!!
============================================
""")
x = input("enter any key to continue:")
# IF USER WANTS TO LOGIN
elif r == 1:
print("""
==================================
!!!!!!!! {{Sign In}} !!!!!!!!!!
==================================
""")
un = input("Enter Username!!:")
ps = input("Enter Password!!:")
""")
a = int(input("ENTER YOUR CHOICE:"))
if a == 1:
print("""
1. Display the details
2. Add a new member
3. Delete a member
4. Make an exit
""")
b = int(input("Enter your Choice:"))
# details
if b == 1:
print("""
1. Doctors Details
2. Nurse Details
3. Others
""")
print("""
1. Show Patients Info
2. Add New Patient
3. Discharge Summary
4. Exit """)
b = int(input("Enter your Choice:"))
# showing the existing details
# if user wants to see the details of PATIENT
if b == 1:
mycursor.execute("select * from patient_detail")
row = mycursor.fetchall()
for i in row:
b=0
v = list(i)
k = ["NAME", "SEX", "AGE","ADDRESS",
"CONTACT"]
d = dict(zip(k, v))
print(d)
elif a == 3:
break
3.https://www.w3schools.com/python/python_mysql_getstarted.asp
4.https://dev.mysql.com/doc/connector-python/en/connector-python-
connecting.html
HOSPITAL
MANAGEMENT
SYSTEM
DONE BY:
GOWSHIYA R
VISHALI A
YUVASHREE B