0% found this document useful (0 votes)
10 views65 pages

documentation cs

The document outlines the development of the 'Pathology Lab Report Management' software, aimed at improving the management of medical reports and patient data in healthcare. It describes the system's features, including patient registration, appointment scheduling, and data security, while utilizing Python and MySQL for its implementation. The project addresses inefficiencies in manual systems and enhances communication and data accuracy in pathology labs.

Uploaded by

shimnia7
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)
10 views65 pages

documentation cs

The document outlines the development of the 'Pathology Lab Report Management' software, aimed at improving the management of medical reports and patient data in healthcare. It describes the system's features, including patient registration, appointment scheduling, and data security, while utilizing Python and MySQL for its implementation. The project addresses inefficiencies in manual systems and enhances communication and data accuracy in pathology labs.

Uploaded by

shimnia7
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/ 65

INTRODUCTION

1 | Page
This software project “Pathology Lab Report Management” is developed
to fine tune medical report management. Efficient pathology lab report
management is a cornerstone of modern healthcare, ensuring the accurate and
timely delivery of diagnostic information to healthcare providers and patients.
Pathology, the study of diseases through the examination of tissues, cells, and
bodily fluids, plays a crucial role in diagnosing, monitoring, and guiding
treatment decisions for a wide range of medical conditions.
In today's fast-paced healthcare environment, efficient management of
patient data and laboratory operations is crucial for delivering high-quality care.
The Life Care Pathology Lab Management System is designed to address these
challenges by providing a comprehensive solution that streamlines processes,
enhances data accuracy, and improves patient engagement.

This system serves as a centralized platform for managing various aspects


of laboratory operations, including patient registration, appointment scheduling,
data modification, and reporting. By leveraging modern technology, the system
not only simplifies administrative tasks but also ensures that healthcare
providers have quick access to vital patient information, enabling them to make
informed decisions.

The user-friendly interface of the Life Care Pathology Lab Management


System is tailored to meet the needs of both healthcare professionals and
patients. It facilitates seamless interactions, allowing users to easily navigate

2 | Page
through functionalities such as viewing test results, modifying patient records,
and scheduling appointments.

Moreover, the system is built with a focus on security and compliance,


ensuring that sensitive patient data is protected in accordance with healthcare
regulations. As the healthcare landscape continues to evolve, the Life Care
Pathology Lab Management System is poised to adapt and grow, incorporating
new features and enhancements that align with the needs of users and the
demands of the industry.

This software, being simple in design and working, does not require much
of training to users, and can be used as a powerful tool for the automating the
medical industry. During coding and design of the software Project, Python-3.7
IDE, a powerful front-end tool is used for getting Graphical User Interface (GUI)
based integrated platform and coding simplicity. As a back-end a powerful, open
source RDBMS, MySQL is used as per requirement of the CBSE curriculum of
Computer Science Course.

3 | Page
REQUIREMENT
ANALYSIS

4 | Page
2.1. PROBLEM DEFINITION

Manual system faces a lot of inefficiencies in the present world. It hinders


smooth flow of work. Data is very less secure as it is maintained manually. It usually
consumes large amount of paper to store and maintain the data. Data is more prone
to errors as it is calculated manually also poor communications may lead to serious
inadvertent errors.

2.2. ADVANTAGES OF THE PROPOSED SYSTEM


Automates routine tasks such as registration, appointment scheduling and
report generation. Reduces duplication and inconsistencies in data. Integrates various
hospital management processes, such as patient registration, doctor assignment, and
report management. Ensures smooth communication between departments like
pathology, administration and patient services. Provides controlled access to sensitive
patient data through user authentication. Ensures compliance with data protection
regulations by storing data securely. Enables real-time access to patient data, doctor
availability, and service details. Facilitates faster decision-making in clinical settings.

2.3. PROJECT DESCRIPTION

The user provides their username and password. New patients register by a
form. Data is validated and saved. Patients provide their Aadhaar number. The system
assigns a doctor randomly and generates a unique appointment number. Admins can
add and view doctors and services. These entries are dynamically updated in the
database. Users can search for patient data They can update existing records

5 | Page
SYSTEM ANALYSIS
AND DESIGN

6 | Page
3.1. THEORETICAL BACKGROUND

 WHAT IS PYTHON?
Python is an interpreted, object-oriented, high-level programming language with
dynamic semantics. Its high-level built in data structures, combined with dynamic
typing and dynamic binding, make it very attractive for Rapid Application
Development, as well as for use as a scripting or glue language to connect existing
components together. Python's simple, easy to learn syntax emphasizes readability
and therefore reduces the cost of program maintenance. Python supports modules
and packages, which encourages program modularity and code reuse. The Python
interpreter and the extensive standard library are available in source or binary form
without charge for all major platforms, and can be freely distributed.

 WHAT IS MySQL?

The management of data in a database system is done by means of a general-


purpose software package called a Database Management System (DBMS). Some
commercially available RDBMS are MS SQL Server, MS ACCESS, INGRES, ORACLE, and
Sybase. MySQL, the most popular Open Source SQL database management system, is
developed, distributed, and supported by Oracle Corporation.
It is possible for anyone to use and modify the software. Anybody can download the
MySQL software from the Internet and use it without paying anything. If you wish, you
may study the source code and change it to suit your needs.
The MySQL Database Server is very fast, reliable, and easy to use. MySQL Server can
handle large databases much faster than existing solutions and is successfully used in

7 | Page
highly demanding production environments for several years. Although under
constant development, MySQL Server today offers a rich and useful set of functions.
Its connectivity, speed, and security make MySQL Server highly suited for accessing
databases on the Internet.
 WHAT IS PYTHON IDLE?

Every Python installation comes with an Integrated Development and Learning


Environment (IDLE or IDE). These are a class of applications that help you write code
more efficiently. While there are many IDEs for you to choose from, Python IDLE is
very bare-bones, which makes it the perfect tool for a beginning programmer. Python
IDLE as an interactive interpreter or as a file editor. The Python shell is an excellent
place to experiment with small code snippets. You can access it through the terminal
or command line app on your machine. You can simplify your workflow with Python
IDLE, which will immediately start a Python shell when you open it. Every programmer
needs to be able to edit and save text files. Python programs are files with the .py
extension that contain lines of Python code. Python IDLE gives you the ability to create
and edit these files with ease. Python IDLE also provides several useful features like
basic syntax highlighting, code completion, and auto-indentation.

 WHAT IS TKINTER?

Tkinter stands for Tk interface is a Python binding to the Tk GUI toolkit. It is the
standard Python interface to the Tk GUI toolkit, and is Python's de facto standard GUI.
Tkinter is included with standard Linux, Microsoft Windows and Mac OS X installs of
Python. The name Tkinter comes from Tk interface.

8 | Page
3.2. TABLE DESIGN:
Database Design:

An important aspect of system design is the design of data storage structure.


To begin with a logical model of data structure is developed first. A database is a
container object which contains tables, queries, reports and data validation policies
enforcement rules or constraints etc. A logical data often represented as a records are
kept in different tables after reducing anomalies and redundancies. The goodness of
data base design lies in the table structure and its relationship. This software project
maintains a database named Hospital which contains the following tables.

Appointment:

9 | Page
Appointment_details:

Docser:

Doctors:

10 | Page
Services:

Users:

11 | Page
SYSTEM REQUIREMENTS

Hardware requirements:

● Intel Core 2 Duo processor or higher


● Hard disk: 32GB or higher
● RAM:3 GB

Software Requirements:

● Operating System: Windows 7 or higher


● Python IDLE with tkinter as frontend
● MySQL as backend

Hardware used:

● Processor : Intel(R) CoreTM i5-8250U CPU @ 1.60GHz 1.8GHz


● RAM : 8.00 GB
● System type : 64-bit Operating System, x64 based processor

Software used:

● Microsoft Windows® 10 as Operating System.


● Python 3.7 with tkinter as Front-end for GUI development
● MySQL as Back-end for data management
● MS-Word 2010 for documentation.

12 | Page
SOURCE CODE

13 | Page
import tkinter.messagebox

from tkinter import *

import mysql.connector as sqlcon

import random as rd

conn=sqlcon.connect(host="localhost",user="root",password="123")

cur = conn.cursor(buffered=True)

cur.execute("create database if not exists Hospital")

cur.execute("use Hospital")

cur.execute("CREATE TABLE if not exists users ("

"id INT AUTO_INCREMENT PRIMARY KEY,"

"username VARCHAR(50) NOT NULL UNIQUE,"

"password VARCHAR(255) NOT NULL)")

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))")

cur.execute('''create table if not exists appointment_details

idno varchar(12) primary key,

doctor varchar(50),

date varchar(20),

14 | Page
time varchar(20),

appointment_no varchar(10))''')

cur.execute('''CREATE TABLE if not exists doctors (

id INT AUTO_INCREMENT PRIMARY KEY,

name VARCHAR(50),

department VARCHAR(50),

room_no INT)''')

def validate_login(username, password):

query = "SELECT * FROM users WHERE username=%s AND password=%s"

cur.execute(query, (username, password))

result = cur.fetchone()

return result is not None

def login():

username = entry_username.get()

password = entry_password.get()

if validate_login(username, password):

messagebox.showinfo("Login Successful", f"Welcome


{username}!")

home()

window.withdraw()

else:

messagebox.showerror("Login Failed", "Invalid username or


password. Please try again.")

def get_reg(window):

window.withdraw()

15 | Page
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()

query='insert into appointment values("{}", "{}", "{}", "{}",


"{}", "{}")'.format(p1,p2,p3,p4,p5,p6)

cur.execute(query)

conn.commit()

tkinter.messagebox.showinfo("DONE", "YOU HAVE BEEN REGISTERED")

def register():

global e1,e2,e3,e4,e5,e6

root1=Tk()

root1.title("Registration")

root1.configure(bg="#556B2F")

label=Label(root1,text="REGISTER YOURSELF",font='arial 50
bold',fg="white")

label.configure(bg="#556B2F")

label.config(font=("Courier", 14))

label.pack()

frame=Frame(root1,height=500,width=500)

frame.pack()

frame.config(bg="#556B2F")

l1=Label(root1,text="AADHAR CARD NO.",bg="#556B2F", fg="white")

16 | Page
l1.config(font=("Courier", 14))

l1.place(x=10,y=130)

e1=tkinter.Entry(root1)

e1.place(x=200,y=130)

l2=Label(root1,text="NAME",bg="#556B2F", fg="white")

l2.config(font=("Courier", 14))

l2.place(x=10,y=170)

e2=tkinter.Entry(root1)

e2.place(x=200,y=170)

l3=Label(root1,text="AGE",bg="#556B2F", fg="white")

l3.config(font=("Courier", 14))

l3.place(x=10,y=210)

e3=tkinter.Entry(root1)

e3.place(x=200,y=210)

l4=Label(root1,text="GENDER M\F",bg="#556B2F", fg="white")

l4.config(font=("Courier", 14))

l4.place(x=10,y=250)

e4=tkinter.Entry(root1)

e4.place(x=200,y=250)

l5=Label(root1,text="PHONE",bg="#556B2F", fg="white")

l5.config(font=("Courier", 14))

l5.place(x=10,y=290)

e5=tkinter.Entry(root1)

e5.place(x=200,y=290)

l6=Label(root1,text="BLOOD GROUP",bg="#556B2F", fg="white")

17 | Page
l6.config(font=("Courier", 14))

l6.place(x=10,y=330)

e6=tkinter.Entry(root1)

e6.place(x=200,y=330)

b1=Button(root1,text="SUBMIT",command=lambda:get_reg(root1))

b1.place(x=150,y=370)

root1.mainloop()

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)

query='insert into appointment_details values("{}", "{}",


"{}", "{}", "{}")'.format(p1,h,p2,p3,o)

cur.execute(query)

18 | Page
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)

query='insert into appointment_details values("{}", "{}",


"{}", "{}", "{}")'.format(p1,h,p2,p3,o)

cur.execute(query)

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,

19 | Page
'\nappointment no:-',o)

query='insert into appointment_details values("{}", "{}",


"{}", "{}", "{}")'.format(p1,h,p2,p3,o)

cur.execute(query)

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)

query='insert into appointment_details values("{}", "{}",


"{}", "{}", "{}")'.format(p1,h,p2,p3,o)

cur.execute(query)

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)

20 | Page
o=rd.choice(u)

det=("Your appointment is fixed with",h,

"\nDate:-",p2,

"\nTime:-",p3,

'\nappointment no:-',o)

query='insert into appointment_details values("{}", "{}",


"{}", "{}", "{}")'.format(p1,h,p2,p3,o)

cur.execute(query)

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)

query='insert into appointment_details values("{}", "{}",


"{}", "{}", "{}")'.format(p1,h,p2,p3,o)

cur.execute(query)

tkinter.messagebox.showinfo("APPOINTMENT DETAILS",det)

21 | Page
else:

tkinter.messagebox.showwarning('WRONG INPUT','PLEASE ENTER


VALID VALUE')

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()

root3.title("appointment")

root3.geometry("600x700")

root3.configure(bg="#556B2F")

label=Label(root3,text="APPOINTMENT" ,font="courier
25",bg="#556B2F",fg="white")

label.pack()

frame=Frame(root3,height=500,width=300)

frame.configure(bg="#556B2F")

frame.pack()

22 | Page
if i[3]=='M' or i[3]=='m':

x="Mr."

name2=Label(root3,text=i[1], font="courier
15",bg="#556B2F",fg="white")

name2.place(x=240,y=80)

else:

x="Mrs\Ms."

name2=Label(root3,text=i[1], font="courier
15",bg="#556B2F",fg="white")

name2.place(x=240,y=80)

for i in dat:

name=Label(root3,text='WELCOME' ,font="courier
15",bg="#556B2F",fg="white")

name.place(x=50,y=80)

name1=Label(root3,text=x ,font="courier
15",bg="#556B2F",fg="white")

name1.place(x=140,y=80)

age=Label(root3,text='AGE:-', font="courier
15",bg="#556B2F",fg="white")

age.place(x=50,y=100)

age1=Label(root3,text=i[2] ,font="courier
15",bg="#556B2F",fg="white")

age1.place(x=240,y=100)

phone=Label(root3,text='PHONE:-' ,font="courier
15",bg="#556B2F",fg="white")

phone.place(x=50,y=120)

phone1=Label(root3,text=i[4] ,font="courier
15",bg="#556B2F",fg="white")

phone1.place(x=240,y=120)

23 | Page
bg=Label(root3,text='BLOOD GROUP:-' ,font="courier
15",bg="#556B2F",fg="white")

bg.place(x=50,y=140)

bg1=Label(root3,text=i[5] ,font="courier
15",bg="#556B2F",fg="white")

bg1.place(x=240,y=140)

L=Label(root3,text='DEPARTMENTS' ,font="courier
15",bg="#556B2F",fg="white")

L.place(x=50,y=220)

L1=Label(root3,text="1.Orthopaedic surgeon " ,font="courier


15",bg="#556B2F",fg="white")

L1.place(x=50,y=250)

L2=Label(root3,text='2.Physician' ,font="courier
15",bg="#556B2F",fg="white")

L2.place(x=50,y=270)

L3=Label(root3,text='3.Nephrologist' ,font="courier
15",bg="#556B2F",fg="white")

L3.place(x=50,y=290)

L4=Label(root3,text='4.Neurologist' ,font="courier
15",bg="#556B2F",fg="white")

L4.place(x=50,y=310)

L5=Label(root3,text='5.Gynaecologist' ,font="courier
15",bg="#556B2F",fg="white")

L5.place(x=50,y=330)

L6=Label(root3,text='6.X-ray' ,font="courier
15",bg="#556B2F",fg="white")

L6.place(x=50,y=350)

L7=Label(root3,text='Enter your choice' ,font="courier


15",bg="#556B2F",fg="white")

L7.place(x=50,y=400)

24 | Page
x2=tkinter.Entry(root3,font="courier 15")

x2.place(x=330,y=400)

L7=Label(root3,text=('Enter date') ,font="courier


15",bg="#556B2F",fg="white").place(x=50,y=430)

x3=tkinter.Entry(root3,font="courier 15")

x3.place(x=330,y=430)

L8=Label(root3,text='Enter time(24:00)',font="courier
15",bg="#556B2F",fg="white").place(x=50,y=460)

x4=tkinter.Entry(root3,font="courier 15")

x4.place(x=330,y=460)

B1=Button(root3,text='Submit',font="courier
15",bg="#556B2F",fg="white",command=apo_details)

B1.place(x=460,y=550)

root3.resizable(False,False)

root3.mainloop()

def apoint():

global x1

root2=Tk()

root2.title("Appointment")

root2.geometry("490x350")

root2.configure(bg="#556B2F")

label=Label(root2,text="APPOINTMENT",font="courier
25",bg="#556B2F",fg="white")

label.configure(bg="#556B2F")

label.config(font=("Courier", 25))

label.pack()

frame=Frame(root2,height=200,width=200)

25 | Page
frame.configure(bg="#556B2F")

l1=Label(root2,text="AADHAAR NO.")

l1.configure(bg="#556B2F",fg="white")

l1.config(font=("Courier", 18))

l1.place(x=30,y=100)

x1=tkinter.Entry(root2,font="Courier, 17")

x1.place(x=200,y=100)

b1=Button(root2,text='Submit',command=get_apoint)

b1.configure(bg="#556B2F",fg="white")

b1.config(font=("Courier", 15))

b1.place(x=200,y=200)

root2.resizable(False,False)

root2.mainloop()

# List of doctors

def lst_doc():

def add_doctor():

name = name_entry.get()

department = department_entry.get()

room_no = room_no_entry.get()

query = "INSERT INTO doctors (name, department, room_no)


VALUES (%s, %s, %s)"

cur.execute(query, (name, department, room_no))

conn.commit()

tkinter.messagebox.showinfo("Doctor Added", "Doctor added


successfully")

26 | Page
def view_doctors():

root2 = Tk()

root2.title("View Doctors")

root2.configure(bg="#556B2F")

frame = Frame(root2, height=500, width=500)

frame.configure(bg="#556B2F")

frame.pack()

cur.execute("SELECT * FROM doctors")

doctors = cur.fetchall()

for i, doctor in enumerate(doctors):

name = Label(root2, text=doctor[1],font="courier


15",bg="#556B2F",fg="white")

name.place(x=20, y=20 + i * 30)

department = Label(root2, text=doctor[2],font="courier


15",bg="#556B2F",fg="white")

department.place(x=150, y=20 + i * 30)

room_no = Label(root2, text=doctor[3],font="courier


15",bg="#556B2F",fg="white")

room_no.place(x=300, y=20 + i * 30)

root2.resizable(False, False)

root2.mainloop()

root = Tk()

root.title("List of Doctors")

root.configure(bg="#556B2F")

frame = Frame(root, height=500, width=500)

27 | Page
frame.pack()

frame.configure(bg="#556B2F")

label = Label(root, text="List of Doctors" ,font="courier


20",bg="#556B2F",fg="white")

blah=label.place(x=80,y=0)

name_label = Label(root, text="Name" ,font="courier


15",bg="#556B2F",fg="white")

name_label.place(x=50, y=100)

name_entry = Entry(root)

name_entry.place(x=200, y=100)

department_label = Label(root, text="Department" ,font="courier


15",bg="#556B2F",fg="white")

department_label.place(x=50, y=150)

department_entry = Entry(root)

department_entry.place(x=200, y=150)

room_no_label = Label(root, text="Room No" ,font="courier


15",bg="#556B2F",fg="white")

room_no_label.place(x=50, y=200)

room_no_entry = Entry(root)

room_no_entry.place(x=200, y=200)

add_button = Button(root, text="Add Doctor" ,font="courier


15",bg="#556B2F",fg="white", command=add_doctor)

add_button.place(x=100, y=250)

view_button = Button(root, text="View Doctors" ,font="courier


15",bg="#556B2F",fg="white", command=view_doctors)

view_button.place(x=250, y=250)

root.resizable(False, False)

28 | Page
root.mainloop()

def ser_avail():

def add_service():

name1 = name_entryn.get()

department = department_entryn.get()

room_no = room_no_entryn.get()

ask=cur.execute("create table if not exists docser (name


varchar(200),department varchar(100),room_no varchar(5))")

query = "INSERT INTO docser (name, department, room_no)


VALUES (%s, %s, %s)"

cur.execute(query, (name1, department, room_no))

conn.commit()

tkinter.messagebox.showinfo("Service Added", "Service added


successfully")

def view_service():

root5 = Tk()

root5.title("Services")

root5.configure(bg="#556B2F")

frame = Frame(root5, height=500, width=500)

frame.configure(bg="#556B2F")

frame.pack()

cur.execute("SELECT * FROM docser")

doctorss = cur.fetchall()

for i, docser in enumerate(doctorss):

name = Label(root5, text=docser[0], font="courier


15",bg="#556B2F",fg="white")

29 | Page
name.place(x=20, y=20 + i * 30)

department = Label(root5, text=docser[1], font="courier


15",bg="#556B2F",fg="white")

department.place(x=150, y=20 + i * 30)

room_no = Label(root5, text=docser[2], font="courier


15",bg="#556B2F",fg="white")

room_no.place(x=300, y=20 + i * 30)

root5.resizable(False, False)

root5.mainloop()

root5= Tk()

root5.title("List of Services")

root5.configure(bg="#556B2F")

frame = Frame(root5, height=400, width=500)

frame.pack()

frame.configure(bg="#556B2F")

label = Label(root5, text="List of Services", font="courier


25",bg="#556B2F",fg="white")

blah=label.place(x=100,y=0)

name_labeln = Label(root5, text="Name", font="courier


15",bg="#556B2F",fg="white")

name_labeln.place(x=10, y=100)

name_entryn = Entry(root5, font="courier 15")

name_entryn.place(x=150, y=100)

department_labeln = Label(root5, text="Department",


font="courier 15",bg="#556B2F",fg="white")

department_labeln.place(x=10, y=150)

department_entryn = Entry(root5, font="courier 15")

department_entryn.place(x=150, y=150)

30 | Page
room_no_labeln = Label(root5, text="Room No", font="courier
15",bg="#556B2F",fg="white")

room_no_labeln.place(x=10, y=200)

room_no_entryn = Entry(root5, font="courier 15")

room_no_entryn.place(x=150, y=200)

add_buttonn = Button(root5, text="Add service",


command=add_service, font="courier 15")

add_buttonn.place(x=50, y=300)

view_buttonn = Button(root5, text="View services",


command=view_service, font="courier 15")

view_buttonn.place(x=300, y=300)

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()

root6.geometry("600x500")

root6.title("Modification")

31 | Page
root6.configure(bg="#556B2F")

frame=Frame(root6,height=500,width=500)

frame.configure(bg="#556B2F")

frame.pack()

l1=Label(root6,text='DATA MODIFICATION' ,font="courier


15",bg="#556B2F",fg="white")

l1.place(x=75,y=10)

l2=Label(root6,text='WHAT YOU WANT TO CHANGE' ,font="courier


15",bg="#556B2F",fg="white")

l2.place(x=50,y=200)

l3=Label(root6,text='1.NAME' ,font="courier
15",bg="#556B2F",fg="white")

l3.place(x=50,y=220)

l4=Label(root6,text='2.AGE' ,font="courier
15",bg="#556B2F",fg="white")

l4.place(x=50,y=240)

l5=Label(root6,text='3.GENDER' ,font="courier
15",bg="#556B2F",fg="white")

l5.place(x=50,y=260)

l6=Label(root6,text='4.PHONE' ,font="courier
15",bg="#556B2F",fg="white")

l6.place(x=50,y=280)

l7=Label(root6,text='5.BLOOD GROUP' ,font="courier


15",bg="#556B2F",fg="white")

l7.place(x=50,y=300)

x2=Label(root6,text='ENTER' ,font="courier
15",bg="#556B2F",fg="white")

x2.place(x=50,y=360)

x4=tkinter.Entry(root6,font="courier 15")

32 | Page
choice=x4.get()

x4.place(x=280,y=360)

for i in dat:

name=Label(root6,text='NAME:-' ,font="courier
15",bg="#556B2F",fg="white")

name.place(x=50,y=80)

name1=Label(root6,text=i[1] ,font="courier
15",bg="#556B2F",fg="white")

name1.place(x=200,y=80)

age=Label(root6,text='AGE:-' ,font="courier
15",bg="#556B2F",fg="white")

age.place(x=50,y=100)

age1=Label(root6,text=i[2] ,font="courier
15",bg="#556B2F",fg="white")

age1.place(x=200,y=100)

gen=Label(root6,text='GENDER:-' ,font="courier
15",bg="#556B2F",fg="white")

gen.place(x=50,y=120)

gen1=Label(root6,text=i[3] ,font="courier
15",bg="#556B2F",fg="white")

gen1.place(x=200,y=120)

pho=Label(root6,text='PHONE:-' ,font="courier
15",bg="#556B2F",fg="white")

pho.place(x=50,y=140)

pho1=Label(root6,text=i[4] ,font="courier
15",bg="#556B2F",fg="white")

pho1.place(x=200,y=140)

bg=Label(root6,text='BLOOD GROUP:-' ,font="courier


15",bg="#556B2F",fg="white")

bg.place(x=50,y=160)
33 | Page
bg1=Label(root6,text=i[5] ,font="courier
15",bg="#556B2F",fg="white")

bg1.place(x=200,y=160)

b=Button(root6,text='Submit' ,font="courier
15",command=do_modify)

b.place(x=380,y=400)

L1=Label(root6,text='OLD DETAILS' ,font="courier


15",bg="#556B2F",fg="white")

L1.place(x=50,y=50)

L2=Label(root6,text='ENTER COLUMN' ,font="courier


15",bg="#556B2F",fg="white")

L2.place(x=50,y=330)

x5=tkinter.Entry(root6,font="courier 15")

new=x5.get()

x5.place(x=280,y=330)

root6.resizable(False,False)

root6.mainloop()

def do_modify():

global ad,x3,x4,x5

ad=x3.get()

new=x4.get()

choice=x5.get()

print(ad,choice,new)

if choice=='1':

print("update appointment set name='{}' where


idno='{}'".format(new,ad))

cur.execute("update appointment set name='{}' where


idno='{}'".format(new,ad))

34 | Page
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()

root7.title("Modification")

root7.configure(bg="#556B2F")

root7.geometry("490x350")

35 | Page
label=Label(root7,text="MODIFICATION" ,font="courier
25",bg="#556B2F",fg="white")

label.pack()

frame=Frame(root7,height=200,width=200)

frame.configure(bg="#556B2F")

frame.pack()

l1=Label(root7,text="AADHAAR NO." ,font="courier


15",bg="#556B2F",fg="white")

l1.place(x=30,y=100)

x3=tkinter.Entry(root7,font="courier 15")

x3.place(x=200,y=100)

ad=x3.get()

b1=Button(root7,text='Submit' ,font="courier
15",bg="#556B2F",fg="white",command=modify)

b1.place(x=200,y=200)

root7.resizable(False,False)

root7.mainloop()

def search_data():

global x3,ad

root7=Tk()

root7.configure(bg="#556B2F")

label=Label(root7,text="SEARCH DATA",font='courier
25',bg="#556B2F",fg="white")

label.pack()

frame=Frame(root7,height=300,width=500)

frame.configure(bg="#556B2F")

frame.pack()

36 | Page
l1=Label(root7,text="AADHAAR NO.",font=("Courier",
15),bg="#556B2F",fg="white")

l1.place(x=60,y=130)

x3=tkinter.Entry(root7,font=("Courier", 14))

x3.place(x=230,y=130)

ad=x3.get()

b1=Button(root7,text='Submit',font=("Courier",
15),bg="#556B2F",fg="white",command=view_data)

b1.place(x=350,y=250)

root7.resizable(False,False)

root7.mainloop()

def view_data():

global p1

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:

det=a

root8 = Tk()

37 | Page
root8.configure(bg="#556B2F")

root8.title("View Data")

root8.geometry("480x400")

label = Label(root8, text="Appointment Details",


font="courier 20",bg="#556B2F",fg="white")

label.pack()

frame = Frame(root8, height=150, width=200)

frame.pack()

frame.configure(bg="#556B2F")

name = Label(root8, text="Name: " + a[0][1],font="courier


20",bg="#556B2F",fg="white")

name.place(x=50, y=50)

age = Label(root8, text="Age: " + a[0][2],font="courier


20",bg="#556B2F",fg="white")

age.place(x=50, y=80)

gender = Label(root8, text="Gender: " +


a[0][3],font="courier 20",bg="#556B2F",fg="white")

gender.place(x=50, y=110)

phone = Label(root8, text="Phone: " + a[0][4],font="courier


20",bg="#556B2F",fg="white")

phone.place(x=50, y=140)

38 | Page
bg = Label(root8, text="Blood Group: " +
a[0][5],font="courier 20",bg="#556B2F",fg="white")

bg.place(x=50, y=170)

button = Button(root8, text="Close",font="courier 15",


command=root8.destroy)

button.place(x=200, y=220)

root8.resizable(False, False)

root8.mainloop()

def home():

root=Tk()

root.title("Home page")

root.configure(bg="#06402b")

root.geometry("900x700")

label=Label(root,text="LIFE CARE PATHOLOGY LAB",font="alice 40


bold",bg='#556B2F',fg="#faf0be")

b1=Button(root,text="Registration",font="arial 20
bold",bg="#F3DFB8",command=register,fg='#556B2F')

b2=Button(root,text="Appointment",font="arial 20
bold",bg="#F3DFB8",command=apoint,fg='#556B2F')

b3=Button(root,text="List of Doctors",font="arial 20
bold",bg="#F3DFB8",command=lst_doc,fg='#556B2F')

b4=Button(root,text="Services available",font='arial 20
bold',bg="#F3DFB8",command=ser_avail,fg='#556B2F')

b7=Button(root,text="View data",font='arial 20
bold',bg="#F3DFB8",command=search_data,fg='#556B2F')

b5=Button(root,text="Modify existing data",font='arial 20


bold',bg="#F3DFB8",command=mod_sub,fg='#556B2F')

39 | Page
b6=Button(root,text="Exit",font='arial 20
bold',command=root.destroy,bg='#811331',fg="white")

label.pack()

b1.pack(side=LEFT,padx=10)

b3.pack(side=LEFT,padx=10)

b4.pack(side=LEFT,padx=10)

b2.place(x=25,y=500)

b7.pack(side=LEFT,padx=10)

b5.place(x=350,y=500)

b6.place(x=800,y=500)

root.resizable(False,False)

window = tkinter.Tk()

window.title("Login Page")

window.geometry("1200x500")

window.configure(bg="light blue")

bg=PhotoImage(file="login3.png")

l1=Label(window,image=bg)

l1.image=bg

l1.pack(fill=BOTH,expand=True)

def close():

window.destroy()

label_username = tkinter.Label(window, text="Username",font="alice


24 italic",bg="#556B2F",fg="white")

label_username.place(x=200,y=130)

entry_username = tkinter.Entry(window,font="Merriweather 24 italic")

40 | Page
entry_username.place(x=650,y=130)

label_password = tkinter.Label(window, text="Password",font="Alice


24 italic",bg="#556B2F",fg="white")

label_password.place(x=200,y=200)

entry_password = tkinter.Entry(window,font="Merriweather 24
italic",show="*")

entry_password.place(x=650,y=200)

login_button = tkinter.Button(window,
text="Login",font="Merriweather 20 italic",
command=login)login_button.place(x=300,y=320)

close_button = tkinter.Button(window,
text="Close",font="Merriweather 20 italic", command=close)

close_button.place(x=400,y=320)

window.mainloop()

41 | Page
I\O FORMS AND
DESIGNS

42 | Page
Login page:

If credentials are correct:

If credentials are not correct:

43 | Page
Home Page:

44 | Page
Registration:

After the user register:

45 | Page
List of doctors:

After doctor is added successfully:

46 | Page
To view list of doctors:

47 | Page
To add a service:

To view a service:

48 | Page
To search and view data:

49 | Page
To set an appointment:

50 | Page
After appointment is fixed:

To modify existing data:

51 | Page
USER MANUAL

52 | Page
53 | Page
Login Page
The Login Page serves as the entry point for users to access the system. It includes the
following elements:
● Background: The page features a light blue background with a welcoming design,

enhancing user experience.


● Username Field: A labeled entry box where users input their username. The label is

styled in a clear, readable font to ensure visibility.


● Password Field: A secure entry box for the password, which masks the input for

privacy. The label is similarly styled for consistency.


● Login Button: A prominent button that users click to authenticate their credentials. It is

designed to stand out, encouraging users to proceed.


● Close Button: An option to exit the application

Home Page
Upon successful login, users are directed to the Home Page, which serves as the main
dashboard of the application. Key features include:
● Title Bar: Displays "LIFE CARE PATHOLOGY LAB" in a large, bold font, establishing the

identity of the application.


● Background Color: The page is designed with a soothing color scheme (dark green)

that is easy on the eyes, promoting a calm atmosphere.


● Navigation Buttons:

● Registration: A button that opens the registration interface for new patients. It is

labeled clearly and is easily accessible.

54 | Page
● Appointment: This button allows users to manage appointments, including scheduling

and viewing existing appointments.


● List of Doctors: A button that opens a list of available doctors, providing users with

information about their specialties and availability.


● Services Available: This button leads to a section detailing the various services offered

by the lab, ensuring users are informed about their options.


● View Data: A button that enables users to search for and view patient data using the

Aadhaar number.
● Modify Existing Data: This button opens the modification interface, allowing users to

update patient records as needed.


● Exit: A button that closes the application, providing a clear exit strategy for users.

Registration Interface
The Registration interface is designed for new patients to enter their details. It
includes:
● Title: A clear heading indicating that this is the registration section.

● Input Fields:

● Aadhaar Card Number: A field for entering the unique identification number.

● Name: A field for entering the patient's name.

● Age: A field for entering the patient's age.

● Gender: A field for specifying gender (M/F).

● Phone Number: A field for entering the patient's contact number.

● Blood Group: A field for entering the patient's blood group.

● Submit Button: A button that, when clicked, submits the entered information to the

database and registers the patient.


55 | Page
Appointment Management Interface
This interface allows users to manage appointments effectively. It features:
● Title: Clearly indicates that this section is for managing appointments.

● Input Fields:

● Aadhaar Number: A field for entering the patient's Aadhaar number to retrieve

appointment details.
● Submit Button: A button that retrieves the appointment information based on the

entered Aadhaar number.

List of Doctors Interface


This section provides users with a comprehensive list of doctors available in the lab. It
includes:
● Title: A heading that indicates this is the list of doctors.

● Doctor Information Display: Each doctor's name, department, and room number are

displayed in a structured format, making it easy for users to find the information they
need.
● Add Doctor Button: An option for authorized users to add new doctors to the system.

Services Available Interface


This interface outlines the services offered by the pathology lab. It includes:
● Title: Clearly states that this section lists available services.

● Service Information Display: Each service is listed with relevant details, ensuring users

are well-informed about what is available.

56 | Page
View Data Interface
The View Data interface allows users to search for patient records. It features:
● Title: Indicates that this section is for viewing patient data.

● Aadhaar Number: A field for entering the Aadhaar number to search for patient

records.
● Submit Button: A button that retrieves and displays the patient's details if found.

Modify Data Interface:


Below the displayed patient details, the interface provides fields for users to enter new
information:
● New Name Field:
 Label: "New Name" to indicate where users can input a new name for the
patient.
 Input Box: A text entry field for entering the updated name.
● New Age Field:
 Label: "New Age" to indicate where users can input a new age for the patient.
 Input Box: A text entry field for entering the updated age.
● New Gender Field:
 Label: "New Gender" to indicate where users can specify the updated gender
(M/F).
 Input Box: A text entry field for entering the updated gender.
● New Phone Number Field:
 Label: "New Phone Number" to indicate where users can input a new contact
number for the patient.
 Input Box: A text entry field for entering the updated phone number.
● New Blood Group Field:
 Label: "New Blood Group" to indicate where users can specify the updated blood
group.
 Input Box: A text entry field for entering the updated blood group.

57 | Page
FURTHER
ENHANCEMENT

58 | Page
To further enhance the Life Care Pathology Lab Management System, consider
implementing the following features:

1. User Role Management:

● Feature: Introduce a role-based access control system that allows different levels of

access for users (e.g., admin, lab staff, and patients).


● Benefit: This ensures that sensitive data is protected and that users can only access

functionalities relevant to their roles, enhancing security and data integrity.

2. Data Analytics and Reporting:

● Feature: Implement a data analytics module that generates reports on patient

demographics, appointment trends, and lab performance metrics.


● Benefit: This feature can help management make informed decisions based on data

insights, improving operational efficiency and service delivery.

3. Appointment Reminders and Notifications:

● Feature: Integrate an automated notification system that sends reminders to patients

about upcoming appointments via SMS or email.


● Benefit: This reduces no-show rates and improves patient engagement, leading to

better utilization of lab resources.

59 | Page
4. Enhanced Search Functionality:

● Feature: Develop an advanced search feature that allows users to filter patient records

by multiple criteria (e.g., name, age, appointment date).


● Benefit: This makes it easier for staff to locate specific patient information quickly,

improving workflow efficiency.

5. Mobile Application:

● Feature: Create a mobile application version of the system that allows patients to book

appointments, view test results, and receive notifications on their smartphones.


● Benefit: This increases accessibility for patients, allowing them to manage their

healthcare on-the-go.

6. Integration with Laboratory Equipment:

● Feature: Integrate the system with laboratory equipment to automatically update test

results in real-time.
● Benefit: This reduces manual data entry errors and speeds up the process of getting

results to patients and doctors.

7. Patient Portal:

● Feature: Develop a secure patient portal where patients can log in to view their

medical history, test results, and appointment details.


● Benefit: This empowers patients to take an active role in their healthcare and

improves communication between patients and healthcare providers.

60 | Page
8. Feedback and Rating System:

● Feature: Implement a feedback mechanism where patients can rate their experience

and provide comments on services received.


● Benefit: This helps the lab identify areas for improvement and enhances patient

satisfaction.

9. Data Backup and Recovery:

● Feature: Establish a robust data backup and recovery system to protect patient data

from loss due to system failures or cyberattacks.


● Benefit: This ensures data integrity and availability, which is critical for maintaining

trust and compliance with healthcare regulations.

10. Compliance and Security Enhancements:

● Feature: Regularly update the system to comply with healthcare regulations (e.g.,

HIPAA) and implement advanced security measures (e.g., encryption, two-factor


authentication).
● Benefit: This protects sensitive patient information and ensures the system meets

legal requirements, enhancing overall trust in the system.

61 | Page
CONCLUSION

62 | Page
The Life Care Pathology Lab Management System represents a significant
advancement in the management of patient data and laboratory operations. By
integrating user-friendly interfaces, robust data management capabilities, and
essential functionalities such as appointment scheduling and patient record
modification, the system enhances the efficiency and effectiveness of healthcare
delivery.

The proposed enhancements, including user role management, data analytics,


automated notifications, and mobile accessibility, further position the system to
meet the evolving needs of both healthcare providers and patients. These
improvements not only streamline operations but also foster better
communication, engagement, and satisfaction among users.

In an era where data security and patient privacy are paramount, the
implementation of compliance measures and advanced security features ensures
that sensitive information is protected. By continuously evolving and adapting to
technological advancements and user feedback, the Life Care Pathology Lab
Management System can maintain its relevance and effectiveness in providing
high-quality healthcare services.

Ultimately, this system not only aims to improve operational efficiency but
also strives to enhance the overall patient experience, making healthcare more
accessible, transparent, and responsive to individual needs. As the healthcare
landscape continues to change, the Life Care Pathology Lab Management System
stands ready to support healthcare professionals in delivering exceptional care
and improving patient outcomes.
63 | Page
BIBLIOGRAPHY

64 | Page
BOOKS :

Computer science with python textbook for class XII -Sumitha arora -Published by :
DHANPAT RAI & CO. (Pvt.) Ltd.

Computer science with python textbook for class XI -Sumitha arora -Published by :
DHANPAT RAI & CO. (Pvt.) Ltd.

WEBSITES :
https://www.youtube.com/
https://www.slideshare.net/
https://www.quora.com/
https://www.google.com/
https://www.computerscience.org/resources/python/

LINKS :

https://docs.python.org/3/library/tkinter.ttk.html
https://www.javatpoint.com/python-tkinter https://www.w3schools.com/python/

65 | Page

You might also like