0% found this document useful (0 votes)
24 views19 pages

Veterinary Hospital Python Project

Uploaded by

geethgowrisharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views19 pages

Veterinary Hospital Python Project

Uploaded by

geethgowrisharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

AMRITA VIDYALAYAM

AISSCE
INFORMATICS PRACTICES
PROJECT
2024-
2025

NAME:-
CLASS:- ROLL NO:-
TABLE OF CONTENTS

 CERTIFICATE
 ACKNOWLEDGEMENT
 INTRODUCTION
 HARDWARE &
SOFTWARE
 CODING
 OUTPUT SCREEN
 BIBLIOGRAPHY
CERTIFICATE

This is to certify that Ms _____________


of Amrita Vidyalayam School(Juinagar),studying in class
XII-A has successfully completed her Informatics
Practices Project/Practical Journal under the guidance of
concerned subject teacher [Link] Awari for the
AISSCE as per the guidelines prescribed by the CBSE in
the year 2024-2025.

Date :
Registration No :

_________________ ______________________
Signature of Internal Signature of External
Examiner Examiner

_________________
Signature of Principal
ACKNOWLEDGEMENT

We express our sincere thanks and


gratitude to Principal Mam and our
Informatics Practices teacher, who guided
us and helped us to complete our
Informatics Practices Project titled:-
“Veterinary Hospital” using Python.
o INTRODUCTION

This project is basically for users who want


to develop Python Driven programs and
building real life application. I assume a
Veterinary Hospital as an example. This
python project helps the hospital to keep the
records of the patients (animals). It makes
easier for them to
manage their records and saves the firm’s
time and energy.
It accepts the details of the patients and
saves it in the MYSQL Database at the back
end. The data entry operator makes it easier
for them to add and search for the records of
the patients which are already saved in the
table.
HARDWARE AND SOFTWARE
 MYSQL COMMAND LINE CLIENT
 SPYDER/PYTHON IDLE
 MICROSOFT WORD 2010
o CODING
import [Link]
from tkinter import *
import random as rd
import datetime
import [Link] as sqltor

con=[Link](host="localhost",user="root",password="root")
cur=[Link]()
cur = [Link](buffered=True)
[Link]("create database if not exists Vet")

[Link]("use Vet")
[Link]("create table if not exists Animal_Records"
"("
"P_ID int primary key,"
"DateofVisit date,"
"Patient_name varchar(25) not null,"
"Owner_name varchar(40) not null,"
"Mobile bigint,"
"Address varchar(40),"
"TypeOfAnimal varchar(40),"
"Breed varchar(40),"
"Age int,"
"Allergy varchar(40),"
"Diagnosis varchar(400),"
"VaccinationOrSterlization_Record varchar(50),"
"Medicines_Prescribed varchar(400),"
"Next_Visit date" ")"
);
def Insert():
global e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14
p1=[Link]()
p2=[Link]()
p3=[Link]()
p4=[Link]()
p5=[Link]()
p6=[Link]()
p7=[Link]()
p8=[Link]()
p9=[Link]()
p10=[Link]()
p11=[Link]()
p12=[Link]()
p13=[Link]()
p14=[Link]()
rec=[p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14]
con=[Link](host="localhost",user="root",password="root",database='Vet')
cur=[Link]()
cmd=

'insert into
Animal_Records(P_ID,DateofVisit,Patient_name,Owner_name,Mobile,Address,TypeOfAnimal,Breed,Age,Allergy,Diag
nosis,VaccinationOrSterlization_Record,Medicines_Prescribed,Next_Visit)values(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,
%s,%s,%s)'
[Link](cmd,rec)
[Link]()
[Link]("DONE", "YOUR RECORD STORED IN TABLE")
def Update():
global e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14
p1=[Link]()
p2=[Link]()
p3=[Link]()
p4=[Link]()
p5=[Link]()
p6=[Link]()
p7=[Link]()
p8=[Link]()
p9=[Link]()
p10=[Link]()
p11=[Link]()
p12=[Link]()
p13=[Link]()
p14=[Link]()
#rec=[p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14]
con=[Link](host="localhost",user="root",password="root",database='Vet')
cur=[Link]()
[Link]("update Animal_Records set
DateofVisit='"+p2+"',Patient_name='"+p3+"',Owner_name='"+p4+"',Mobile='"+p5+"',Address='"+p6+"',TypeOfAnimal
='"+p7+"',Breed='"+p8+"',Age='"+p9+"',Allergy='"+p10+"',Diagnosis='"+p11+"',VaccinationOrSterlization_Record='"+p
12+"',Medicines_Prescribed='"+p13+"',Next_Visit='"+p14+"' where P_ID='"+p1+"'")
#[Link](cmd,rec)
[Link]()
[Link]("DONE", "YOUR RECORD updated IN TABLE")

def Delete_menu():
global e1
win=Tk()
[Link]("650x500")
[Link]('Delete Record')
[Link](bg='teal')
l=Label(win,text="DELETE PATIENT RECORD",font='arial 40 bold',fg='cyan',bg='teal')
[Link](x=2,y=2)
l1=Label(win,text="P_ID",font="arial 10 bold")
[Link](x=2,y=190)
e1=Entry(win,width=25)
[Link](x=200,y=190)
b1=Button(win,text="DELETE",font='arial 10 bold',bg='grey',fg='white',command=delete)
[Link](x=2,y=260)
[Link](False,False)
[Link]()
def delete():
global e1
p1=e1
con=[Link](host="localhost",user="root",password="root",database='Vet')
cur=[Link]()
[Link]("DELETE FROM Animal_Records WHERE P_ID='"+[Link]()+"' ")

[Link]()
[Link]("DONE", "YOUR RECORD Deleted from TABLE")
def Delete_menu():
global e1
win=Tk()
[Link]("700x500")
[Link]('Delete Record')
[Link](bg='teal')
l=Label(win,text="DELETE PATIENT RECORD",font='arial 40 bold',fg='cyan',bg='teal')
[Link](x=2,y=2)
l1=Label(win,text="Enter P_ID",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=190)
e1=Entry(win,width=25)
[Link](x=200,y=190)
b1=Button(win,text="SUBMIT",font='arial 10 bold',bg='grey',fg='white',command=delete)
[Link](x=2,y=260)
[Link](False,False)
[Link]()

def Retrive_menu():
global e1
root4=Tk()
[Link]("730x600")
[Link]('Retrive One value')
[Link](bg='teal')
l=Label(root4,text="RETRIVE PATIENT RECORD",font='arial 40 bold',fg='cyan',bg='teal')
[Link](x=2,y=2)
l1=Label(root4,text="Enter P_ID",font='arial 10 bold',bg='teal',fg='white')
[Link](x=2,y=190)
e1=Entry(root4,width=25,font=(10))
[Link](x=200,y=190)

button1=Button(root4,text="SUBMIT",font="arial 10 bold",bg='grey',fg='white',command=Retrive)
[Link](x=2,y=260)
[Link](False,False)
[Link]()
def Retrive():
global e1
root3=Tk()
p1=[Link]()
t1=Text(root3,width=110,height=20)
[Link](row=8,column=1)
con=[Link](host="localhost",user="root",password="root",database='Vet')
cur=[Link]()
[Link]("select * from Animal_Records where P_ID='"+[Link]()+"' ")

data=[Link]()
[Link]()
for i in data:
[Link](END,str(i)+"\n")

[Link]()

def Update_menu():
global e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14
win=Tk()
[Link]('900x800')
[Link]('Update Record')
[Link](bg='teal')
l=Label(win,text="UPDATE PATIENT RECORD",font='arial 40 bold',fg='cyan',bg='teal')
[Link](x=2,y=2)
#label
pid=Label(win,text="Patient ID",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=90)
dov=Label(win,text="Date of Visit",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=120)
pname=Label(win,text="Patient name",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=150)
oname=Label(win,text="Owner name",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=180)
mob=Label(win,text="Mobile",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=210)
addr=Label(win,text="Address",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=240)
toa=Label(win,text="Type Of Animal",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=270)
breed=Label(win,text="Breed",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=300)
age=Label(win,text="Age",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=330)
allergy=Label(win,text="Allergy",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=360)
diag=Label(win,text="Diagnosis",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=390)
vacc=Label(win,text="Vaccination/Sterlization Record",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=420)
med=Label(win,text="Medicines Prescribed",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=450)
nvd=Label(win,text="Next Visit",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=480)

#Get value from user


e1=Entry(win,width=25,font=(10))
[Link](x=250,y=90)
e2=Entry(win,width=25,font=(10))
[Link](x=250,y=120)
e3=Entry(win,width=25,font=(10))
[Link](x=250,y=150)
e4=Entry(win,width=25,font=(10))
[Link](x=250,y=180)
e5=Entry(win,width=25,font=(10))
[Link](x=250,y=210)
e6=Entry(win,width=25,font=(10))
[Link](x=250,y=240)
e7=Entry(win,width=25,font=(10))
[Link](x=250,y=270)
e8=Entry(win,width=25,font=(10))
[Link](x=250,y=300)
e9=Entry(win,width=25,font=(10))
[Link](x=250,y=330)
e10=Entry(win,width=25,font=(10))
[Link](x=250,y=360)
e11=Entry(win,width=25,font=(10))
[Link](x=250,y=390)
e12=Entry(win,width=25,font=(10))
[Link](x=250,y=420)
e13=Entry(win,width=25,font=(10))
[Link](x=250,y=450)
e14=Entry(win,width=25,font=(10))
[Link](x=250,y=480)

button1=Button(win,text="SUBMIT",font="arial 10 bold",bg='grey',fg='white',command=Update)
[Link](x=70,y=530)
[Link](False,False)
[Link]()

def Insert_menu():
global e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14
win=Tk()
[Link]('900x800')
[Link]('Insert Record')
[Link](bg='teal')

l=Label(win,text="INSERT CUSTOMER RECORD",font='arial 40 bold',fg='cyan',bg='teal')


[Link]()
#label
pid=Label(win,text="Patient ID",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=90)
dov=Label(win,text="Date of Visit",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=120)
pname=Label(win,text="Patient name",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=150)
oname=Label(win,text="Owner name",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=180)
mob=Label(win,text="Mobile",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=210)
addr=Label(win,text="Address",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=240)
toa=Label(win,text="Type Of Animal",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=270)
breed=Label(win,text="Breed",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=300)
age=Label(win,text="Age",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=330)
allergy=Label(win,text="Allergy",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=360)
diag=Label(win,text="Diagnosis",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=390)
vacc=Label(win,text="Vaccination/Sterlization Record",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=420)
med=Label(win,text="Medicines Prescribed",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=450)
nvd=Label(win,text="Next Visit",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=480)

#Get value from user


e1=Entry(win,width=25,font=(10))
[Link](x=250,y=90)
e2=Entry(win,width=25,font=(10))
[Link](x=250,y=120)
e3=Entry(win,width=25,font=(10))
[Link](x=250,y=150)
e4=Entry(win,width=25,font=(10))
[Link](x=250,y=180)
e5=Entry(win,width=25,font=(10))
[Link](x=250,y=210)
e6=Entry(win,width=25,font=(10))
[Link](x=250,y=240)
e7=Entry(win,width=25,font=(10))
[Link](x=250,y=270)
e8=Entry(win,width=25,font=(10))
[Link](x=250,y=300)
e9=Entry(win,width=25,font=(10))
[Link](x=250,y=330)
e10=Entry(win,width=25,font=(10))
[Link](x=250,y=360)
e11=Entry(win,width=25,font=(10))
[Link](x=250,y=390)
e12=Entry(win,width=25,font=(10))
[Link](x=250,y=420)
e13=Entry(win,width=25,font=(10))
[Link](x=250,y=450)
e14=Entry(win,width=25,font=(10))
[Link](x=250,y=480)

button1=Button(win,text="SUBMIT",font="arial 10 bold",bg='grey',fg='white',command=Insert)
[Link](x=70,y=530)
[Link](False,False)
[Link]()
def show():
if([Link]()!=[Link]()):
[Link]()
Main_menu()
#label=Label(root,text="welcome "+[Link](),font="arial 20 bold")
#[Link](x=150,y=180)

def Main_menu():
main_win=Tk()
main_win.geometry('700x700')
main_win.configure(bg='teal')
Insert=Button(main_win,text="INSERT",font="arial 30 bold",bg='grey',fg='white',command=Insert_menu)
[Link](x=140,y=190)
retrive=Button(main_win,text="RETRIVE",font="arial 30 bold",bg='grey',fg='white',command=Retrive_menu)
[Link](x=350,y=190)
upd=Button(main_win,text="UPDATE",font="arial 30 bold",bg='grey',fg='white',command=Update_menu)
[Link](x=140,y=370)

dele=Button(main_win,text="DELETE",font="arial 30 bold",bg='grey',fg='white',command=Delete_menu)
[Link](x=350,y=370)
main_win.resizable(False,False)
main_win.mainloop()
root=Tk()
[Link](bg='teal')
l=Label(root,text="Veterinary Hospital",font="Papyrus 40 bold",bg='teal',fg='cyan')
[Link](x=10,y=20)
l1=Label(root,text="NAME",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=120)
l2=Label(root,text="PASSWORD",font="arial 10 bold",bg='teal',fg='white')
[Link](x=2,y=150)
e1=Entry(root,width=25,font=(10))
[Link](x=200,y=120)
e2=Entry(root,width=25,font=(10),show='*')
[Link](x=200,y=150)
button1=Button(root,text="CLICK",font="arial 10 bold",bg='grey',fg='white',command=show)
[Link](x=70,y=190)
[Link]("500x500")
[Link](False,False)
[Link]()
o LOGIN PAGE

o BUTTON PAGE
o INSERT

 Output
o RETRIVE

 Output
o UPDATE

 Output
o DELETE MENU

 Output
BIBLIOGRAPHY

 IP Textbook by Sumita Arora.


 NCERT Book of Informatics Practices.
 [Link]
-gui-tkinter/

You might also like