0% found this document useful (0 votes)
30 views33 pages

11 Merged

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

11 Merged

PDF CS CLASS12 PROJECT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

PM SHREE JAWAHAR NAVODAYA

VIDYALAYA MANA CAMP RAIPUR

computer science project


topic:hospital MANAGEMENT
SYSTEM
SESSION 2024-2025

under guidence of: made by:


Shri. Shailendra nagwanshi Aryan Maheshwari
PGT computer science
certificate
It is hereby certify that, the original and
genuine project work has been carried out
to investigate about the subject matter and
the related data collection has been completed
solely, sincerely and satisfactorily by
ARYAN MAHESHWARI of class XII,PM SHRI
JAWAHAR NAVODAYA VIDYALAYA RAIPUR,
regarding his project titled
“Hospital management system”.

Sign of internal examiner sign of external examiner


______________ ______________

sign of principle
_________________
acknowledgement

it would be my outmost pleasure to express


my sincere thanks to My Computer Science
Teacher Shri. Shailendra nagwanshi in guiding
and providing a helping hand in this project.
His valuable advise, support and supervision
all through the project titled “HOSPITAL
MANAGEMENT SYSTEM”, are responsible
for attaining its present form.

ARYAN MAHESHWARI
Class XII Science
OBJECTIVE
Hospitals currently use a manual system for the management and
maintenance of critical information. The current system requires
numerous paper forms, with data stores spread throughout the hospital
management infrastructure. Often information (on forms) is incomplete,
or does not follow management standards. Forms are often lost in transit
between departments requiring a comprehensive auditing process to
ensure that no vital information is lost. Multiple copies of the same
information exist in the hospital and may lead to inconsistencies in data
in various data stores.
A significant part of the operation of any hospital involves the
acquisition, management and timely retrieval of great volumes of
information. This information typically involves; patient personal
information and medical history, staff information, room and ward
scheduling, staff scheduling, operating theater scheduling and various
facilities waiting lists. All of this information must be managed in an
efficient and cost wise fashion so that an institution's resources may be
effectively utilized HMS will automate the management of the hospital
making it more efficient and error free. It aims at standardizing data,
consolidating data ensuring data integrity and reducing inconsistencies.

PROJECT OVERVIEW:HOSPITAL MANAGEMENT SYSTEM


The Hospital Management System (HMS) is designed for Any Hospital
to replace their existing manual, paper based system. The new system is
to control the following information; patient information, room
availability, staff and operating room schedules, and patient invoices.
These services are to be provided in an efficient, cost effective manner,
with the goal of reducing the time and resources currently required for
such tasks.
A significant part of the operation of any hospital involves the
acquisition, management and timely retrieval of great volumes of
information. This information typically involves; patient personal
information and medical history, staff information, room and ward
scheduling, staff scheduling, operating theater scheduling and various
facilities waiting lists. All of this information must be managed in an
efficient and cost wise fashion so that an institution's resources may be
effectively utilized HMS will automate the management of the hospital
making it more efficient and error free. It aims at standardizing data,
consolidating data ensuring data integrity and reducing inconsistencies.

SYSTEM DESIGN: HOSPITAL MANAGEMENT SYSTEM


In this software we have developed some forms. The brief
description about them is as follow:-
Reception:
The reception module handles various enquiries about the patient's
admission and discharge details, bed census, and the patient's
movements within the hospital. The system can also handle fixed-cost
package deals for patients as well as Doctor Consultation and
Scheduling, Doctor Consultancy Fees and Time Allocation.
∙ Doctor visit schedule
∙ Doctor Appointment Scheduling
∙ Enquiry of Patient
∙ Find History of Patient Enquired.

Administration:
This module handles all the master entry details for the hospital
requirement such as consultation detail, doctor specialization,
consultancy fee, and service charges.
Employee
∙ Employee Detail Recording.
∙ Doctor Type
∙ Doctor Master
∙ Referral Doctor

Pharmacy:
This module deals with all medical items. This module helps in
maintaining Item Master, Receipt of Drugs/consumables, issue, handling
of material return, generating retail bills, stock maintenance. It also helps
in fulfilling the requirements of both IPD and OPD Pharmacy.
Laboratory:
This module enables the maintenance of investigation requests by the
patient and generation of test results for the various available services,
such as clinical pathology, X-ray and ultrasound tests. Requests can be
made from various points, including wards, billing, sample collection
and the laboratory receiving point. The laboratory module is integrated
with the in-patient/ outpatient registration, wards and billing modules.

Registration:
Description: This module helps in registering information about patients
and handling both IPD and OPD patient’s query. A unique ID is
generated for each patient after registration. This helps in implementing
customer relationship management and also maintains medical history of
the patient.

Discharge Summary:
Description: The module helps in generating patient’s discharge
summary, which includes patient’s health at the time of discharge,
medical history, various diagnosis and drug prescriptions, history of
present illness and course in hospital.
IntroDUCTION : HOSPITAL MANAGEMENT SYSTEM
Documenting the assembly, maintenance, use, and troubleshooting of a
system as complex as a voting system is a difficult task. A single system
might combine proprietary hardware, custom operating systems and
software, commodity personal computers, and pen and paper. Describing
these highly varied components is one function of voting system
documentation .But it is not only voting system technology that is
heterogeneous; so are voting systems users, and the environments in
which the systems are used. Election officials, poll workers, and voters
often need guidance from documents in order to administer or use a
voting system. In addition, voting system certification—the process by
which a system is approved for use in state— demands evidence that a
voting system complies with one or more sets of standards or guidelines.

Documentation provides the details that certification bodies need to


evaluate the System. Taken as a whole, voting system documentation
must explain the system in several ways to meet the needs of these
multiple audiences.

As the modern organizations are automated and computers are working


as per the instructions, it becomes essential for the coordination of
human beings, commodity and computers in a modern organization.
Many big cities where the life is busy needs the transaction of the goods
within few minutes of time. So, this online information recorded by the
distributor helps him to complete this task within the time.
The administrators and all the others can communicate with the system
through this project, thus facilitating effective implementation and
monitoring of various activities of the voting Software..
PYTHON
is high-level, interpreted, interactive and object-oriented
scripting language. Python is designed to be highly readable. It
uses English keywords frequently where as other languages use
punctuation, and it has fewer syntactical constructions than
other languages.

*python interpreterd processed at runtime by the interpreter


You do not need to compile your program before executing it.
This is similar to PERL and PHP

* Python is Interactive - You can actually st at a Python prompt


and interact with the interpreter directly to write your
programs.

* Python is Object-Oriented-Oriented style or technique of


programming that encapsulates code within objects.

* Python is a Beginner's Language - Python is a great


language for the beginner-level programmers and supports the
development of a wide range of applications from simple text
processing to WWW browsers to games.

PYTHON HISTORY

Python was developed by Guido van Rossum in the late eighties


and early nineties at the National Research Institute for
Mathematics and Computer Science in the Netherlands.

Python is derived from many other languages, including ABC,


Modula-3, C, C++, Algol-68, Small Talk, and Unix shell and other
scripting languages.

Python is copyrighted. Like Perl, Python source code is now


available under the GNU General Public License (GPL).

Python is now maintained by a core development team at the


institute, although Guido van Rossum still holds a vital role in
directing its progress

Python's features include:

Easy-to-learn:
Python as few keywords, simple structure, and a clearly defined
syntax. This allows the student to pick up the language quickly.

Easy-to-read:
Python code is more clearly defined and visible to the eyes

Easy to maintain:
Python's source code is fairly easy to maintain.

A broad standard library:


Python's bulk of library is very portable and cross-platform
compatible on UNIX, Windows, and Macintosh.

Interactive Mode:
Python as support for an interactive mode which allows
interactive testing and debugging of snippets of code.

Portable:
Python can run on a wide variety of hardware platforms and has
the same interface on all platforms.

Extendable:
You can add low-level modules to the Python interpreter. These
modules enable programmers to add to or customize their tools
to be more efficient

Databases:
Python provides interfaces to all major commercial databases.

* GUI Programming:
Python supports GUI applications that can be created and
ported to many system calls, libraries and windows systems,
such as Windows MFC, Macintosh, and the X Window system of
Unix.

Scalable:
Python provides a better structure and support for large
programs than shell scripting.

Apart from the above-mentioned features, Python has a big list


of good features, few are listed below

It supports functional and structured programming methods as


well as OOP

It can be used as a scripting language or can be compiled to


bytecode for building large applications.
* It provides very high-level dynamic data types and supports
dynamic type checking.

It supports automatic garbage collection.

It can be easily integrated with C, C++, COM, ActiveX, CORBA,


and Java.

MYSQL

MySQL MySQL is a Relational Database Management System


(RDBMS) developed by Oracle that is based on Structured
Query Language (SQL). MySQL is one of the most recognizable
technologies in the modern big data ecosystem. Often called
the most popular database and currently enjoying widespread,
effective use regardless of industry, it's clear that anyone
involved with enterprise data or general IT should at least aim
for a basic familiarity of MySQL, With MySQL, even those new
to relational systems can immediately build fast, powerful, and
secure data storage systems. MySQL's programmatic syntax
and interfaces are also perfect gateways into the wide world of
other popular query languages and structured data stores. A
database is a structured collection of data. It may be anything
from a simple shopping list to a picture gallery or a place to hold
the vast amounts of information in a corporate network. In
particular, a relational database is a digital store collecting data
and organizing it according to the relational model. In this
model, tables consist of rows and columns, and relationships
between data elements all follow a strict logical structure. An
RDBMS is simply the set of software tools used to actually
implement, manage, and query such a database. MySQL is
integral to many of the most popular software stacks for
building and maintaining everything from customer-facing web
applications to powerful, datadriven B2B services. Its open-
source nature, stability, and rich feature set, paired with
ongoing development and support from Oracle, have meant that
internet-critical organizations such as Facebook, Twitter,
Wikipedia, and YouTube all employ MySQL backends

ANALYSIS: HOSPITAL MANAGEMENT SYSTEM PROJECT

1. Existing System:

Hospitals currently use a manual system for the management


and maintenance of critical information. The current system
requires numerous paper forms, with data stores spread
throughout the hospital management infrastructure. Often
information (on forms) is incomplete, or does not follow
management standards. Forms are often lost in transit between
departments requiring a comprehensive auditing process to
ensure that no vital information is lost. Multiple copies of the
same information exist in the hospital and may lead to
inconsistencies in data in various data stores.

2. Proposed System:

The Hospital Management System (HMS) is designed for Any


Hospital to replace their existing manual, paper based system.
The new system is to control the following information, patient
information, room availability, staff and operating room
schedules, and patient invoices. These services are to be
provided in an efficient, cost effective manner, with the goal of
reducing the time and resources currently required for such
tasks.

8. Objective of the System:

Hospitals currently use a manual system for the management


and. maintenance of critical information. The current system
requires numerous paper forms, with data stores spread
throughout the hospital management infrastructure. Often
information (on forms) is incomplete, or does not follow

management standards. Forms are often lost in transit between


departments requiring a comprehensive auditing process to
ensure that no vital information is lost. Multiple copies of the
same information exist in the hospital and may lead to
inconsistencies in data in various data stores.

A significant part of the operation of any hospital involves the


acquisition, management and timely retrieval of great volumes
of information. This information typically involves, patient
personal information and medical history,
staff information, room and ward scheduling, staff scheduling,
operating theater scheduling and various facilities waiting lists.
All of this information must be managed in an efficient and cost
wise fashion so that an institution's resources may be
effectively utilized HMS will automate the management of the
hospital making it more efficient and error free. It aims at
standardizing data, consolidating data ensuring data integrity
and reducing inconsistencies.
SYSTEM SPECIFICATIONS HOSPITAL MANAGEMENT SYSTEM

Hardware Requirements:-

->Pentium-IV(Processor).

->256 MB Ram

->512 KB Cache Memory

->Hard disk 10 GB

Microsoft Compatible 101 or more Key Board

MODULE DESCRIPTION

Name of the module-1: Reception

Description: The reception module handles various enquiries


about the patient's admission and discharge details, bed census,
and the patient's movements within the hospital. The system
can also handle fixed-cost package deals for patients as well as
Doctor Consultation and Scheduling. Doctor Consultancy Fees
and Time Allocation

Sub modules:
Doctor visit schedule

*Doctor Appointment Scheduling


*Enquiry of Patient

*Find History of Patient Enquired

name of module -2:Administration

Description: This module handles all the master entry details for
the hospital requirement such as consultation detail, doctor
specialization, consultancy fee. and service charges.

*Employee

*Sub modules:

*Employee Detail Recording.

*Doctor Type.

*Doctor Master

*Referral Doctor

Name of the module-s: Pharmacy

Description: This module deals with all medical items. This


module helps in maintaining Item Master, Receipt of
Drugs/consumables, issue, handling of material return,
generating retail bills, stock maintenance. It also helps in
fulfilling the requirements of both IPD and OPD Pharmacy.

Name of the module-4: Laboratory.


Description: This module enables the maintenance of
investigation requests by the patient and generation of test
results for the various available services, such as clinical
pathology, X-ray and ultrasound tests. Requests can be made
from various points, including wards, billing, sample collection
and the laboratory

receiving point. The laboratory module is integrated with the


in-patient/ outpatient registration, wards and billing modules.

Name of the module-5: Registration.

Description: This module helps in registering information about


patients and handling both IPD and OPD patient's query. A
unique ID is generated for each patient after registration. This
helps in implementing customer relationship management and
also maintains medical history y of the patient.

Name of the module-6: Discharge Summary.

Description: The module helps in generating patient's discharge


summary, which includes patient's health at the time of
discharge, medical history, various diagnosis and drug
prescriptions, history of present illness and course in hospital.
programming
'''enter password in line-> sql'''
import tkinter.messagebox
from tkinter import *
import mysql.connector as sqlcon
import random as rd

a="Pulkit03@"

con=sqlcon.connect(host="localhost",user="root",password
="sql")#connection to mysql
cur=con.cursor()
cur = con.cursor(buffered=True)
cur.execute("create database if not exists hopital")
cur.execute("use hopital")
cur.execute("create table if not exists appointment"
"("
"idno varchar(12) primary key,"
"name char(50),"
"age char(3),"
"gender char(1),"
"phone varchar(10),"
"bg varchar(3))")

# Message for registration


def entry():
global e1,e2,e3,e4,e5,e6
p1=e1.get()
p2=e2.get()
p3=e3.get()
p4=e4.get()
p5=e5.get()
p6=e6.get()

cur.execute('insert into appointment values(%s,%s,%s,%s,


%s,%s)',(p1,p2,p3,p4,p5,p6,))
con.commit()
tkinter.messagebox.showinfo("DONE", "YOU HAVE BEEN
REGISTERED")

# For registration
def register():
global e1,e2,e3,e4,e5,e6
root1=Tk()
label=Label(root1,text="REGISTER YOURSELF",font='arial
25 bold')
label.pack()
frame=Frame(root1,height=500,width=200)
frame.pack()
l1=Label(root1,text="AADHAR CARD NO.")
l1.place(x=10,y=130)
e1=tkinter.Entry(root1)
e1.place(x=100,y=130)
l2=Label(root1,text="NAME")
l2.place(x=10,y=170)
e2=tkinter.Entry(root1)
e2.place(x=100,y=170)
l3=Label(root1,text="AGE")
l3.place(x=10,y=210)
e3=tkinter.Entry(root1)
e3.place(x=100,y=210)
l4=Label(root1,text="GENDER M\F")
l4.place(x=10,y=250)
e4=tkinter.Entry(root1)
e4.place(x=100,y=250)
l5=Label(root1,text="PHONE")
l5.place(x=10,y=290)
e5=tkinter.Entry(root1)
e5.place(x=100,y=290)
l6=Label(root1,text="BLOOD GROUP")
l6.place(x=10,y=330)
e6=tkinter.Entry(root1)
e6.place(x=100,y=330)
b1=Button(root1,text="SUBMIT",command=entry)
b1.place(x=150,y=370)

root.resizable(False,False)
root1.mainloop()

# Message for appointment


def apo_details():
global x1,x2,h,p1,p2,p3,o,x4,x3
p1=x2.get()
p2=x3.get()
p3=x4.get()
if int(p1)==1:
i=("Dr. sharma \nRoom no:- 10")
j=("Dr. Verma \nRoom no:- 11")
q=(i,j)
h=rd.choice(q)
u=(23,34,12,67,53,72)
o=rd.choice(u)
det=("Your appointment is fixed with",h,
"\nDate:-",p2,
"\nTime:-",p3,
'\nappointment no:-',o)
tkinter.messagebox.showinfo("APPOINTMENT
DETAILS",det)

elif int(p1)==2:
i=("Dr. Sidharth \nRoom no. 16")
j=("Dr. Tendulkar \nRoom no. 17")
q=(i,j)
h=rd.choice(q)
u=(23,34,12,67,53,72)
o=rd.choice(u)
det=("Your appointment is fixed with",h,
"\nDate:-",p2,
"\nTime:-",p3,
'\nappointment no:-',o)
tkinter.messagebox.showinfo("APPOINTMENT
DETAILS",det)

elif int(p1)==3:
i=("Dr. Kumar \nRoom no. 12")
j=("Dr. Khan \nRoom no. 13")
q=(i,j)
h=rd.choice(q)
u=(23,34,12,67,53,72)
o=rd.choice(u)
det=("Your appointment is fixed with",h,
"\nDate:-",p2,
"\nTime:-",p3,
'\nappointment no:-',o)
tkinter.messagebox.showinfo("APPOINTMENT
DETAILS",det)

elif int(p1)==4:
i=("Dr. Virat, \nRoom no. 18")
j=("Dr. Leo \nRoom no. 19")
q=(i,j)
h=rd.choice(q)
u=(23,34,12,67,53,72)
o=rd.choice(u)
det=("Your appointment is fixed with",h,
"\nDate:-",p2,
"\nTime:-",p3,
'\nappointment no:-',o)
tkinter.messagebox.showinfo("APPOINTMENT
DETAILS",det)

elif int(p1)==5:
i=("Dr. Kohli \nRoom no. 14")
j=("Dr. singh \nRoom no. 15")
q=(i,j)
h=rd.choice(q)
u=(23,34,12,67,53,72)
o=rd.choice(u)
det=("Your appointment is fixed with",h,
"\nDate:-",p2,
"\nTime:-",p3,
'\nappointment no:-',o)
tkinter.messagebox.showinfo("APPOINTMENT
DETAILS",det)

elif int(p1)==6:
i=("Dr. Irfan \nRoom no. 001")
j=("Dr. John \nRoom no. 002")
k=("Dr. Sanjay \nRoom no. 003")
l=("Dr. Shahid \nRoom no. 004")
q=(i,j,k,l)
h=rd.choice(q)
u=(23,34,12,67,53,72)
o=rd.choice(u)
det=("Your appointment is fixed with",h,
"\nDate:-",p2,
"\nTime:-",p3,
'\nappointment no:-',o)
tkinter.messagebox.showinfo("APPOINTMENT
DETAILS",det)

else:
tkinter.messagebox.showwarning('WRONG
INPUT','PLEASE ENTER VALID VALUE')

# For appointment
def get_apoint():
global x1,x2,x3,x4
p1=x1.get()
cur.execute('select * from appointment where
idno=(%s)',(p1,))
dat=cur.fetchall()
a=[]
for i in dat:
a.append(i)
if len(a)==0:
tkinter.messagebox.showwarning("ERROR", "NO DATA
FOUND!!")
else:
root3=Tk()
label=Label(root3,text="APPOINTMENT",font='arial 25
bold')
label.pack()
frame=Frame(root3,height=500,width=300)
frame.pack()
if i[3]=='M' or i[3]=='m':
x="Mr."
name2=Label(root3,text=i[1])
name2.place(x=140,y=80)
else:
x="Mrs\Ms."
name2=Label(root3,text=i[1])
name2.place(x=170,y=80)
for i in dat:
name=Label(root3,text='WELCOME')
name.place(x=50,y=80)
name1=Label(root3,text=x)
name1.place(x=120,y=80)
age=Label(root3,text='AGE:-')
age.place(x=50,y=100)
age1=Label(root3,text=i[2])
age1.place(x=100,y=100)
phone=Label(root3,text='PHONE:-')
phone.place(x=50,y=120)
phone1=Label(root3,text=i[4])
phone1.place(x=100,y=120)
bg=Label(root3,text='BLOOD GROUP:-')
bg.place(x=50,y=140)
bg1=Label(root3,text=i[5])
bg1.place(x=150,y=140)

L=Label(root3,text='DEPARTMENTS')
L.place(x=50,y=220)
L1=Label(root3,text="1.Orthopaedic surgeon ")
L1.place(x=50,y=250)
L2=Label(root3,text='2.Physician')
L2.place(x=50,y=270)
L3=Label(root3,text='3.Nephrologist')
L3.place(x=50,y=290)
L4=Label(root3,text='4.Neurologist')
L4.place(x=50,y=310)
L5=Label(root3,text='5.Gynaecologist')
L5.place(x=50,y=330)
L6=Label(root3,text='6.X-ray')
L6.place(x=50,y=350)
L7=Label(root3,text='Enter your choice')
L7.place(x=100,y=370)
x2=tkinter.Entry(root3)
x2.place(x=200,y=370)

L7=Label(root3,text=('enter
date')).place(x=100,y=400)
x3=tkinter.Entry(root3)
x3.place(x=200,y=400)
L8=Label(root3,text=('enter time in 24 hour
format')).place(x=48,y=430)
x4=tkinter.Entry(root3)
x4.place(x=200,y=430)

B1=Button(root3,text='Submit',command=apo_details)
B1.place(x=120,y=480)
root3.resizable(False,False)
root3.mainloop()

# For AADHAAR no input


def apoint():
global x1
root2=Tk()
label=Label(root2,text="APPOINTMENT",font='arial 25
bold')
label.pack()
frame=Frame(root2,height=200,width=200)
frame.pack()
l1=Label(root2,text="AADHAAR NO.")
l1.place(x=10,y=130)
x1=tkinter.Entry(root2)
x1.place(x=100,y=130)
b1=Button(root2,text='Submit',command=get_apoint)
b1.place(x=100,y=160)
root2.resizable(False,False)
root2.mainloop()
# List of doctors
def lst_doc():
root4=Tk()

l=["Dr. sharma","Dr. Verma","Dr. Kumar","Dr. Khan","Dr.


Kohli","Dr. singh","Dr. Sidharth","Dr. tendulkar","Dr.
Virat","Dr. Leo",'Dr. Irfan','Dr. John',
'Dr. Sanjay','Dr. Shahid']
m=["Orthopaedic surgeon","Orthopaedic
surgeon","Nephrologist","Nephrologist","Gynaecologist","
Gynaecologist","Physician","Physician","Neurologist",
"Neurologist",'X-ray','X-ray','X-ray','X-ray']
n=[10,11,12,13,14,15,16,17,18,19,20,21,22,23]

frame=Frame(root4,height=500,width=500)
frame.pack()

l1=Label(root4,text='NAME OF DOCTORS')
l1.place(x=20,y=10)
count=20
for i in l:
count=count+20
l=Label(root4,text=i)
l.place(x=20,y=count)

l2=Label(root4,text='DEPARTMENT')
l2.place(x=140,y=10)
count1=20
for i in m:
count1=count1+20
l3=Label(root4,text=i)
l3.place(x=140,y=count1)

l4=Label(root4,text='ROOM NO')
l4.place(x=260,y=10)
count2=20
for i in n:
count2=count2+20
l5=Label(root4,text=i)
l5.place(x=260,y=count2)
root.resizable(False,False)
root4.mainloop()

def ser_avail():

root5=Tk()
frame=Frame(root5,height=500,width=500)
frame.pack()
l1=Label(root5,text='SERVICES AVAILABLE')
l1.place(x=20,y=10)
f=["ULTRASOUND","X-RAY","CT Scan","MRI","BLOOD
COLLECTION","DIALYSIS","ECG","CHEMIST","LAB"]
count1=20
for i in f:
count1=count1+20
l3=Label(root5,text=i)
l3.place(x=20,y=count1)
l2=Label(root5,text='ROOM NO.')
l2.place(x=140,y=10)
g=[1,2,3,4,5,6,7,8,9]
count2=20
for i in g:
count2=count2+20
l4=Label(root5,text=i)
l4.place(x=140,y=count2)
l5=Label(root5,text='To avail any of these please contact
on our no.:- 7042****55')
l5.place(x=20,y=240)
root5.resizable(False,False)
root5.mainloop()

def modify():
global x3,x4,choice,new,x5,root6
p1=x3.get()
cur.execute('select * from appointment where
idno=(%s)',(p1,))

dat=cur.fetchall()
a=[]
for i in dat:
a.append(i)
if len(a)==0:
tkinter.messagebox.showwarning("ERROR", "NO DATA
FOUND!!")
else:
root6=Tk()
frame=Frame(root6,height=500,width=500)
frame.pack()
l1=Label(root6,text='DATA MODIFICATION',font="arial
15 bold")
l1.place(x=75,y=10)
l2=Label(root6,text='WHAT YOU WANT TO CHANGE')
l2.place(x=50,y=200)
l3=Label(root6,text='1.NAME')
l3.place(x=50,y=220)
l4=Label(root6,text='2.AGE')
l4.place(x=50,y=240)
l5=Label(root6,text='3.GENDER')
l5.place(x=50,y=260)
l6=Label(root6,text='4.PHONE')
l6.place(x=50,y=280)
l7=Label(root6,text='5.BLOOD GROUP')
l7.place(x=50,y=300)
x2=Label(root6,text='Enter')
x2.place(x=50,y=330)
x4=tkinter.Entry(root6)
choice=x4.get()
x4.place(x=100,y=330)
for i in dat:
name=Label(root6,text='NAME:-')
name.place(x=50,y=80)
name1=Label(root6,text=i[1])
name1.place(x=150,y=80)
age=Label(root6,text='AGE:-')
age.place(x=50,y=100)
age1=Label(root6,text=i[2])
age1.place(x=150,y=100)
gen=Label(root6,text='GENDER:-')
gen.place(x=50,y=120)
gen1=Label(root6,text=i[3])
gen1.place(x=150,y=120)
pho=Label(root6,text='PHONE:-')
pho.place(x=50,y=140)
pho1=Label(root6,text=i[4])
pho1.place(x=150,y=140)
bg=Label(root6,text='BLOOD GROUP:-')
bg.place(x=50,y=160)
bg1=Label(root6,text=i[5])
bg1.place(x=150,y=160)
b=Button(root6,text='Submit',command=do_modify)
b.place(x=50,y=400)
L1=Label(root6,text='OLD DETAILS')
L1.place(x=50,y=50)
L2=Label(root6,text='ENTER NEW DETAIL')
L2.place(x=50,y=360)
x5=tkinter.Entry(root6)
new=x5.get()
x5.place(x=160,y=360)

root6.resizable(False,False)
root6.mainloop()

def do_modify():
global x3,x4,x5
ad=x3.get()
choice=x4.get()
new=x5.get()
if choice=='1':
cur.execute('update appointment set name={}
where idno={}'.format(new,ad))
elif choice=='2':
cur.execute('update appointment set age={} where
idno={}'.format(new,ad))
elif choice=='3':
cur.execute('update appointment set gender={}
where idno={}'.format(new,ad))
elif choice=='4':
cur.execute('update appointment set phone={}
where idno={}'.format(new,ad))
elif choice=='5':
cur.execute('update appointment set bg={} where
idno={}'.format(new,ad))
else:
pass
root6.destroy()
tkinter.messagebox.showinfo("DONE", "YOUR DATA
HAS BEEN MODIFIED")

choice=None
new=None
ad=None
def mod_sub():
global x3,ad
root7=Tk()
label=Label(root7,text="MODIFICATION",font='arial 25
bold')
label.pack()
frame=Frame(root7,height=200,width=200)
frame.pack()
l1=Label(root7,text="AADHAAR NO.")
l1.place(x=10,y=130)
x3=tkinter.Entry(root7)
x3.place(x=100,y=130)
ad=x3.get()
b1=Button(root7,text='Submit',command=modify)
b1.place(x=100,y=160)
root7.resizable(False,False)
root7.mainloop()

root=Tk()
label=Label(root,text="KARAMCHAND
HOSPITAL",font="arial 40 bold",bg='light blue')
b1=Button(text="Registration",font="arial 20
bold",bg='yellow',command=register)
b2=Button(text="Appointment",font="arial 20
bold",bg='yellow',command=apoint)
b3=Button(text="List of Doctors",font="arial 20
bold",bg='yellow',command=lst_doc)
b4=Button(text="Services available",font='arial 20
bold',bg='yellow',command=ser_avail)
b5=Button(text="Modify existing data",font='arial 20
bold',bg='yellow',command=mod_sub)
b6=Button(text="Exit",font='arial 20
bold',command=root.destroy,bg='violet')
label.pack()
b1.pack(side=LEFT,padx=10)
b3.pack(side=LEFT,padx=10)
b4.pack(side=LEFT,padx=10)
b2.pack(side=LEFT,padx=10)
b5.pack(side=LEFT,padx=10)
b6.pack(side=LEFT,padx=10)
frame=Frame(root,height=600,width=50)
frame.pack()
root.resizable(False,False)
root.mainloop()
BIBLIOGRAPHY

->CLASS XI AND XII TEXTBOOK COMPUTER


SCIENCE BY: SUMITA ARORA.

->W3SCHOOLS: (w3schools.com)

->GEEKFORGEEK: (geekforgeek.com)

->WIKIPEDIA: (wikipedia.com)

You might also like