IP INVESTIGATORY PROJECT
IP INVESTIGATORY PROJECT
dATA
mAnAgemenT”
(PATIenTS, dOcTOrS &
APPOInTmenT deTAILS)
CONTENT
1.1 Title
1.2 Introduction
2.1 Choice of Language
2.2 Choice of Database
3. Prerequisites
5. Sample Data
6. User Documentation
7. Conclusion
8. Bibliography
1. BRIEF REVIEW OF PROJECT
1. 2 Introduction:
This new technique will certainly introduce in various hospitals for maintaining
the hospital data.
I have tried my level best to make this project more and more efficient for
practical use.
2.1 CHOICE OF LANGUAGE
1. Software Development
2. Web Development
3. System Scripting
4. Mathematics
1. Python Language
2. Mysql 8
3. PIP
host : localhost
user : root
password : abcd
database : jnv
tables : patients, doctors,
appointments(with following details)
def displaypatients():
mycon=mysql.connector.connect(host="localhost",user="root",password="abcd",
database="jnv",auth_plugin="mysql_native_password")
cursor=mycon.cursor() sql = "SELECT * FROM patients"
cursor.execute(sql)
results = cursor.fetchall()
for c in results: pid =
c[0] pname= c[1]
pcell=c[2]
print ("Patient ID: ",pid," Patient Name= ",pname," Patient Cell= ",pcell)
mycon.close()
def displaydoctors():
mycon=mysql.connector.connect(host="localhost",user="root",password="abcd",
database="jnv",auth_plugin="mysql_native_password") cursor=mycon.cursor()
sql = "SELECT * FROM doctors"
cursor.execute(sql)
results = cursor.fetchall()
for c in results: did =
c[0] dname= c[1]
dcell=c[2]
print ("Doctor Id: ",did," Doctor Name= ",dname," Dorctor Cell= ",dcell)
mycon.close()
def displayappointments():
mycon=mysql.connector.connect(host="localhost",user="root",password="abcd",
database="jnv",auth_plugin="mysql_native_password") cursor=mycon.cursor()
sql = "SELECT * FROM appointments"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
tid = c[0]
pid= c[1]
did=c[2]
fees=c[3]
Adate=c[4]
print ("Transaction ID: ",tid," Patient ID= ",pid," Doctor ID= ",did, " Fees = ",fees,
" Appointment Date= ",Adate)
mycon.close()
def addpatient():
mycon=mysql.connector.connect(host="localhost",user="root",password="abcd",
database="jnv",auth_plugin="mysql_native_password") cursor=mycon.cursor()
pid=int(input("Enter Patient ID : ")) pname=input("Enter Patient Name : ")
pcell=input("Enter Patient Cell Number : ")
sql="INSERT INTO patients(pid,pname,pcell) VALUES ({},'{}','{}')".format(pid,pname,pcell)
cursor.execute(sql) mycon.commit()
mycon.close()
def adddoctor():
mycon=mysql.connector.connect(host="localhost",user="root",password="abcd",
database="jnv",auth_plugin="mysql_native_password") cursor=mycon.cursor()
did=int(input("Enter Doctor ID: ")) dname=input("Enter Doctor Name : ")
dcell=input("Enter Doctor Cell Number : ")
sql="INSERT INTO doctors(did,dname,dcell) VALUES ({},'{}','{}')".format(did,dname,dcell)
cursor.execute(sql) mycon.commit()
mycon.close()
def appointments():
mycon=mysql.connector.connect(host="localhost",user="root",password="abcd",
database="jnv",auth_plugin="mysql_native_password") cursor=mycon.cursor()
print("Previous Appointments....") displayappointments()
tid=int(input("Enter New Transaction ID : "))
pid=int(input("Enter Patient ID : ")) did=int(input("Enter
Doctor ID : ")) fees=float(input("Enter Fees : "))
Adate=input("Enter Appointment Date : ") sql="INSERT
INTO appointments(tid,pid,did,fees,Adate) VALUES
({},{},{},{},'{}')".format(tid,pid,did,fees,Adate)
cursor.execute(sql) mycon.commit()
mycon.close()
choice='Y'
while choice not in ['n','N']:
print('WELCOME TO HOSPITAL MANAGEMENT SYSTEM\n')
print('1.DISPLAY ALL PATIENTS DETAILS')
print('2.DISPLAY ALL DOCTORS DETAILS')
print('3.DISPLAY ALL APPOINTMENT DETAILS')
print('4.ADD PATIENT DETAILS')
print('5.ADD DOCTOR DETAILS')
print('6.APPOINTMENT DETAILS')
c=int(input("Enter ur choice (1-6) : "))
if c==1:
displaypatients()
elif c==2:
displaydoctors()
elif c==3:
displayappointments()
elif c==4:
addpatient()
elif c==5:
adddoctor()
elif c==6:
appointments()
choice=input("Do you want to continue.....Y/N")
5. Sample Data
WELCOME TO HOSPITAL MANAGEMENT SYSTEM
Previous Appointments....
Transaction ID: 1 Patient ID= 2001 Doctor ID= 101 Fees = 500.0 Appointment
Date= 2022-02-15
Enter New Transaction ID : 2
Enter Patient ID : 2002
Enter Doctor ID : 102
Enter Fees : 700
Enter Appointment Date : 2022-02-16
Do you want to continue.....Y/NY
This project is very easy to manage patients and doctors data in hospitals. This
project is mainly used for the purpose of hospitals. It handless huge data very
efficiently with 100% accuracy and saves time.
The main - menu is displayed on the screen. On the main menu the
following options is displayed on the screen.
WELCOME TO LIBRARY MANAGEMENT SYSTEM
DATA IMPLEMENTATION
For this project, the sample input data is collected from the user. It is very tedious
and time consuming process. Though a man have a very intelligent mind but he
should not solve heavy calculations fast and accurate and he makes errors.
A hospital can use one computer for the implementation of the project. It processes
automatically important hospital related data without time waste and without any
errors. This process gives accurate result with 100% accuracy than manual system.
7. CONCLUSION
This project can be extended to all other modules of Hospital like employees salary
module, etc.
9. BIBLIOGRAPHY