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

Computer Project Ziddan

Jusiiisbs
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)
18 views19 pages

Computer Project Ziddan

Jusiiisbs
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/ 19

(ACADEMIC YEAR – 2023-25)

SUBJECT – COMPUTER SCIENCE (083)

PROJECT REPORT ON
Hospital Management System

Submitted by – ZIDDAN RATH


MOTHER’S PUBLIC SCHOOL, UNIT-I, BHUBANESWAR

CERTIFICATE

This is to certify that Master Ziddan rath Roll No: _____________ has

successfully completed the project Work entitled Hospital Management System in the

subject Computer Science (083) laid down in the regulations of CBSE for the purpose of

Practical Examination in Class XII.

FULL SIGNATURE OF THE TEACHER PRINCIPAL

SIGNATURE OF THE EXTERNAL EXAMINER


TABLE OF CONTENTS

S.NO. DESCRIPTION PAGE NO.

01 ACKNOWLEDGEMENT 1

02 INTRODUCTION 2

03 OBJECTIVES OF THE PROJECT 2

04 PYTHON LANGUAGE 3

05 SYNOPSIS 4

06 SOURCE CODE 6

07 OUTPUT 12

08 HARDWARE AND SOFTWARE REQUIREMENTS 15

09 BIBLIOGRAPHY 16
ACKNOWLEDGEMENT

I take this opportunity to express my gratitude to the people who have been instrumental
in the successful completion of this project.

I express my heartfelt gratitude to my parents for constant encouragement while carrying


out this project.

I express my deep sense of gratitude to The Principal, Mother’s Public School who has
been continuously motivating to complete the project in time.

My sincere thanks to Santosh Baliarsingh, Computer Teacher, for guiding me by


reviewing my project and helped in solving each and every problem, occurred during
implementation of the project

ZIDDAN RATH

1
Hospital Management System

INTRODUCTION

The Hospital Management system is basically a database-based project done with


help of python language. This project is used in a hospital to maintain the patient records
in a database and manage the organization.

OBJECTIVES OF THE PROJECT

The objective of this project is to let the students apply the programming
knowledge into a real- world situation/problem and exposed the students how
programming skills helps in developing a good software.

• Write programs utilizing modern software tools.

• Apply object-oriented programming principles effectively when developing small to

medium sized projects.

• Write effective procedural code to solve small to medium sized problems.

• Students will demonstrate a breadth of knowledge in computer science, as

exemplified in the areas of systems, theory and software development.

• Students will demonstrate ability to conduct research or applied Computer Science

project, requiring writing and presentation skills which exemplify scholarly style in

computer science.

2
About the language – Python

A robust application needs a powerful programming language that is easy to read, update
and maintain. Python incorporates all these qualities. It offers everything (including a set
of huge libraries and utilities) that is needed to build amazing applications.

Some major benefits that Python offers to the developers and the organization
• Python has a clean and structured code base, making the updation and maintenance
tasks of the software easier for developers. They don’t require developers to write
additional code, and this, in turn, saves them effort and valuable time.

• The syntax rule of Python is composed mainly of English keywords, emphasizing the
code readability. Code readability plays a major role while building the application.
Customers' requirements can change when the software gets to employed in the real-
world.

• Python is compatible with all major platforms and operating system. Python code can be
run on any platforms.

• Being an interpreted programming language, Python’s code is executed line-by-line


directly without a prerequisite to compile the human-written code into machine
instructions first.

• It is easier to run the same Python program on multiple platforms, including Windows,
Linux, mac OS, etc. You just need to make sure that Python is installed on the computer
where you are running the code.

• Python is an open-source programming language, meaning no licensing fees are


required to use it. This makes Python the most reasonable and affordable choice for
enterprises.

3
SYNOPSIS

The Hospital Management system is basically a database-based project done with


help of python language. This project is used in a Hospital to maintain the patient records
in a database and manage the organisation.
ABOUT THE PROJECT

This project “Hospital Management System” consists of 5 modules:

• Appointments.

• Admit patient.

• Discharge.

• Display.

• Modify Details.

Database used is

• Patients – containing information

Patient_id

Name

Age

Gender

Phone

Disease

Admitted

Appointdoc

4
Appointments

This module is used to schedule an appoint with the doctor related to the disease

and stored in the database. The new patient is allotted a new id.

Admit Patient

This module is used whenever a new patient take is admitted in the hospital with all the

required data of the patient is taken input and store it in the database. The new patient

is allotted a new id.

Deletion

Whenever a patient is discharged, the information of the patient is deleted from the

database.

Display

This module displays the information related to the patient by searching the database

using patient id.

Modify Details

Whenever a patient information or data has to be changed or updated, this module

searches the database using patient id and the required data is updated.

5
Source code
import random
import mysql.connector
p=input("enter password:")
con=mysql.connector.connect(host='localhost',user='root',pa
ssword='{}'.format(p))
cr=con.cursor()
cr.execute("create database hospital")
con.commit()
con.close()
con=mysql.connector.connect(host='localhost',user='root',pa
ssword='{}'.format(p),database='HOSPITAL')
cr=con.cursor()
cr.execute("create table patients(patient_id int primary
key, name varchar(100),age int , gender varchar(100),phone
bigint(15),disease varchar(100),admit
varchar(10),appointdoc varchar(100))")
con.commit()

print("====================HOSPITAL MANAGEMENT
SYSTEM====================")

def menu():
print("===========================================
==============")
print("1. Appointment\n2. Admit Patient\n3. Discharge
Patient\n4. Search Patient by ID\n5. Update Patient
Details\n6. Exit")
ch=int(input("Enter your choice:"))
if ch==1:
appoint()
elif ch==2:
admit()
elif ch==3:
discharge()
elif ch==4:
search()
elif ch==5:
update()
elif ch==6:

6
print("==========================THANK YOU
==========================")
else:
print("PLEASE TRY AGAIN!!!")
menu()

def appoint():

print("================================================
=========")
print("1.High fever and Bodyache")
print("2.Diarrhea")
print("3.Fatigue")
print("4.Nausea and vomiting")
print("5.Muscle ache and Fracture")
print("6.Skin disease")
print("7.Related to ENT")
print("8.Chest pain and problem in breathing")
ch=int(input("Enter your symptom:"))
if ch==1:
d="High fever and Bodyache"
s='DR. PRATYUSH TRIPATHY'
if ch==2:
d="Diarrhea"
s='DR. RADHIKA BHONSLE'
if ch==3:
d="FATIGUE"
s='DR. SACHIN SEKHAR BISWAL'
if ch==4:
d="NAUSEA AND VOMITING"
s='DR. GAYATRI SATAPATHY'
if ch==5:
d="MUSCLE ACHE AND FRACTURE"
s='DR. AUROBINDA DAS'
if ch==6:
d="DERMATOLOGY"
s='DR. CHINMAYEE RAJ'
if ch==7:
d="ENT"
s='DR. SAMARENDRA BEHERA'
if ch==8:
d="CARDIOLOGY"
s='DR. PARTHA MOHAPATRA'
while True:
7
i=random.randint(10000,99999)
query="select patient_id from patients where
patient_id={}".format(i)
cr.execute(query)
l=cr.fetchone()
if l==None:
p=i
break
n=input("Enter Name: ").upper()
a=input("Enter Age: ")
g=input("Enter Gender: ").upper()
ph=int(input("Enter phone no.:"))
query = "INSERT INTO patients (patient_id, name,age,
gender,phone,disease,admit,appointdoc) VALUES
({},'{}',{},'{}',{},'{}','{}','{}')".format(p,n,a,g
,ph,d,'NO',s)
cr.execute(query)
con.commit()
print("YOUR APPOINTMENT WITH",s,"HAS BEEN SCHEDULED.")
print("YOUR ID IS:",i)
menu()

def admit():
print("============================================
=============")
while True:
i=random.randint(100000,999999)
s="select patient_id from patients where
patient_id={}".format(i)
cr.execute(s)
l=cr.fetchone()
if l==None:
p=i
break
n=input("Enter Name: ").upper()
a=input("Enter Age: ")
g=input("Enter Gender: ").upper()
ph=int(input("Enter phone no.:"))
d=input("Enter Disease: ").upper()
z=input("Enter doctor's name:").upper()
query = "INSERT INTO patients (patient_id, name,
age, gender,phone,disease,admit,appointdoc) VALUES
({},'{}',{},'{}',{},'{}','{}','{}')".format(p,n,a,
,ph,d,'YES',z)
8
cr.execute(query)
con.commit()
print("PATIENT ID IS:",p)
print("PATIENT ADMITTED SUCCESSFULLY")
menu()

def discharge():
print("============================================
=============")
i=input("Enter Patient ID to discharge:")
s="select patient_id from patients where
patient_id={}".format(i)
cr.execute(s)
l=cr.fetchone()
if len(l)==1:
query="DELETE FROM patients WHERE patient_id =
{}".format(i)
cr.execute(query)
con.commit()
print("PATIENT DISCHARGED SUCCESSFULLY")
menu()
else:
print("ACCOUNT NOT AVAILABLE")
menu()

def search():
print("============================================
=============")
i=input("Enter Patient ID to search:")
s="select patient_id from patients where
patient_id={}".format(i)
cr.execute(s)
l=cr.fetchone()
if len(l)==1:
query = "select * from patients where
patient_id={}".format(i)
cr.execute(query)
d=cr.fetchone()
print("====================================
=====================")
print("PATIENT ID:",d[0],"\nPATIENT
NAME:",d[1],"\nPATIENT AGE:",d[2],"\nPATIENT
9
GENDER:",d[3],"\nPATIENT PHONE:",d[4],"\nPATIENT
DISEASE:",d[5],"\nPATIENT ADMITTED:",d[6],
"\nAPPOINTED DOCTOR:",d[7])
menu()
else:
print("ACCOUNT NOT AVAILABLE")
menu()

def update():
print("============================================
=============")
i=input("Enter Patient ID:")
s="select patient_id from patients where
patient_id={}".format(i)
cr.execute(s)
l=cr.fetchone()
if len(l)==1:
print("1. Update Name")
print("2. Update Age")
print("3. Update Gender")
print("4. Update phone no.")
print("5. Back")
ch=int(input("Enter your choice:"))
if ch==1:
uname(i)
elif ch==2:
uage(i)
elif ch==3:
ugender(i)
elif ch==4:
uph(i)
elif ch==5:
menu()
else:
print("PLEASE TRY AGAIN!!!")
update()
def uname(a):
n=input("Enter new Name: ").upper()
query="UPDATE patients SET name = '{}' WHERE
patient_id = {}".format(n,a)
cr.execute(query)
con.commit()
print("NAME CHANGED SUCCESSFULLY.")
10
menu()
def uage(a):
n=input("Enter new Age: ")
query="UPDATE patients SET age = {} WHERE
patient_id = {}".format(n,a)
cr.execute(query)
con.commit()
print("AGE CHANGED SUCCESSFULLY.")
menu()
def ugender(a):
n=input("Enter new Gender: ").upper()
query="UPDATE patients SET gender = '{}' WHERE
patient_id = {}".format(n,a)
cr.execute(query)
con.commit()
print("GENDER CHANGED SUCCESSFULLY.")
menu()

def uph(a):
n=input("Enter new Phone no.: ")
query="UPDATE patients SET phone = {} WHERE
patient_id = {}".format(n,a)
cr.execute(query)
con.commit()
print("PHONE NO. CHANGED SUCCESSFULLY.")
menu()

menu()
con.close()

11
Output

12
13
14
HARDWARE AND SOFTWARE REQUIREMENTS

I.OPERATING SYSTEM : WINDOWS 7 AND ABOVE

II. PROCESSOR : PENTIUM(ANY) OR AMD

ATHALON(3800+- 4200+ DUAL CORE)

III. MOTHERBOARD : 1.845 OR 915,995 FOR PENTIUM 0R MSI

K9MM-V VIA K8M800+8237R PLUS CHIPSET

FOR AMD ATHALON

IV. RAM : 512MB+

V. Hard disk : 40 GB OR ABOVE

VI. CD/DVD r/w multi drive combo: (If back up required)

VII. MONITOR : 14.1 or 15 -17 inch

SOFTWARE REQUIREMENTS:

• Windows OS
• Python
• mysql connector module

15
BIBLIOGRAPHY

• Computer science With Python - Class XI & XII by Sumita Arora


• Websites:
https://www.w3resource.com
https://www.w3schools.com/python/
***

16

You might also like