Cs Investigatory Project
Cs Investigatory Project
(2024-25)
COMPUTER SCIENCE
INVESTIGATORY PROJECT
Submitted To:
Ms. Priyanka Singh
Submitted By:
Kirti Chauhan
XII-B
BONAFIDE CERTIFICATE
____________
Teacher’s Signature
_____________
Principal’s Signature
_____________
Invigilator’s Signature
ACKNOWLEDGEMENT
This project would not have been possible without the support
and contributions of all the aforementioned individuals.
INDEX
1 BONAFIDE CERTIFICATE 1
2 ACKNOWLEDGEMENT 2
3 INTRODUCTION 3
4 HARDWARE/SOFTWARE REQUIRED 4
5 IMPORTANCE OF HMS 5
9 SOURCE CODE 9
10 OUTPUT 22
11 BIBLIOGRAPHY 23
INTRODUCTION
A hospital management system is an integrated software
solution that manages administrative, financial, and medical
aspects of a hospital. It supports decision-making in patient
care, administration, and financial accounting, handling
inpatients, outpatients, records, treatment status, billing,
and hospital information like ward IDs, doctors, and
departments.
OBJECTIVE
The objective of this project is to let the students apply the
programming knowledge into a real world situation/problem
and expose students how programming skills help
developing a good software.
HARDWARE REQUIRED
● Operating system:- Windows 10 or above
● Processor :- Pentium (any) or AMD Athlon (3800-
4200+Dual core)
● RAM:- 512 MB +
● Hard disk:- SATA 40 GB or above
SOFTWARE REQUIRED
● Windows OS
● Python Programming Language
● MySQL Database Management System
IMPORTANCE OF
HMS
1. Minimised documentation and no duplication of
records
2. Reduced paperwork
3. Faster information flow between various departments
4. Smart revenue management
5. Exact stock information
6. Improved patient care
7. Better administration control
8. Effective billing of various services
THE EXISTING SYSTEM
In today's world if we want to book an appointment we
need to contact the clinic or have to personally visit it
which consumes a lot of time. Also if the appointment
is cancelled we do not get any information until we
reach the clinic and check , which can be hazardous for
someone.
DISADVANTAGES OF EXISTING
SYSTEM
SIMILAR SOFTWARE
THE FUTURE
SCOPE OF THE PROJECT
SOURCE CODE
(python)
while (True):
print("""
================================
Welcome To SK hospital
================================
""")
# creating database connectivity
import mysql.connector
mysql = mysql.connector.connect(
host="localhost", user="root", passwd=passwd)
mycursor = mysql.cursor()
mycursor.execute("create database if not exists
city_hospitals")
mycursor.execute("use city_hospitals")
# creating the tables we need
mycursor.execute(
"create table if not exists patient_detail(name varchar(30)
primary key,sex varchar(15),age int(3),address
varchar(50),contact varchar(15))")
mycursor.execute("create table if not exists
doctor_details(name varchar(30) primary key,specialisation
varchar(40),age int(2),address varchar(30),contact varchar(15),fees
int(10),monthly_salary int(10))")
mycursor.execute(
"create table if not exists nurse_details(name varchar(30)
primary key,age int(2),address varchar(30),contact
varchar(15),monthly_salary int(10))")
mycursor.execute(
"create table if not exists other_workers_details(name
varchar(30) primary key,age int(2),address varchar(30),contact
varchar(15),monthly_salary int(10))")
# creating table for storing the username and password of the
user
mycursor.execute(
"create table if not exists user_data(username varchar(30)
primary key,password varchar(30) default'000')")
while (True):
print("""
1. Sign In
2. Registration
""")
=======================================
!!!!!!!!!!Register Yourself!!!!!!!!
=======================================
""")
u = input("Input your username!!:")
p = input("Input the password (Password must be strong)
:")
mycursor.execute(
"insert into user_data values('" + u + "','" + p + "')")
mysql.commit()
print("""
============================================
!!Well Done!!Registration Done Successfully!!
============================================
""")
x = input("enter any key to continue:")
# IF USER WANTS TO LOGIN
elif r == 1:
print("""
==================================
!!!!!!!! {{Sign In}} !!!!!!!!!!
==================================
""")
un = input("Enter Username!!:")
ps = input("Enter Password!!:")
mycursor.execute(
"select password from user_data where username='" +
un + "'")
row = mycursor.fetchall()
for i in row:
a = list(i)
if a[0] == str(ps):
while (True):
print("""
1.Administration
2.Patient(Details)
3.Sign Out
""")
1. Doctor Details
2. Nurse Details
3. Others
""")
c = int(input("ENTER YOUR CHOICE:"))
# enter doctor details
if c == 1:
# ASKING THE DETAILS
name = input("Enter the doctor's name")
spe = input("Enter the specilization:")
age = input("Enter the age:")
add = input("Enter the address:")
cont = input("Enter Contact Details:")
fees = input("Enter the fees:")
ms = input("Enter Monthly Salary:")
# Inserting values in doctors details
mycursor.execute("insert into doctor_details
values('" + name + "','" + spe +
"','" + age + "','" + add + "','" + cont
+ "','" + fees + "','" + ms + "')")
mysql.commit()
print("SUCCESSFULLY ADDED")
# for nurse details
elif c == 2:
# ASKING THE DETAILS
name = input("Enter Nurse name:")
age = input("Enter age:")
add = input("Enter address:")
cont = input("Enter Contact No:")
ms = int(input("Enter Monthly Salary"))
# INSERTING VALUES ENTERED TO
THE TABLE
mycursor.execute("insert into nurse_details
values('" + name + "','" + age + "','" + add + "','" + cont + "','" + str(
ms) + "')")
mysql.commit()
print("SUCCESSFULLY ADDED")
# for entering workers details
elif c == 3:
# ASKING THE DETAILS
name = input("Enter worker name:")
age = input("Enter age:")
add = input("Enter address:")
cont = input("Enter Contact No.:")
ms = input("Enter Monthly Salary:")
# INSERTING VALUES ENTERED TO
THE TABLE
mycursor.execute("insert into
other_workers_details values('" +
name + "','" + age + "','" + add + "','"
+ cont + "','" + ms + "')")
mysql.commit()
print("SUCCESSFULLY ADDED")
# to delete data
elif b == 3:
print("""
1. Doctor Details
2. Nurse Details
3. Others
""")
c = int(input("Enter your Choice:"))
# deleting doctor's details
if c == 1:
name = input("Enter Doctor's Name:")
mycursor.execute(
"select * from doctor_details where
name='" + name + "'")
row = mycursor.fetchall()
print(row)
p = input(
"you really wanna delete this data? (y/n):")
if p == "y":
mycursor.execute(
"delete from doctor_details where
name='" + name + "'")
mysql.commit()
print("SUCCESSFULLY DELETED!!")
else:
print("NOT DELETED")
print("""
1. Show Patients Info
2. Add New Patient
3. Discharge Summary
4. Exit
""")
b = int(input("Enter your Choice:"))
# showing the existing details
# if user wants to see the details of PATIENT
if b == 1:
mycursor.execute(
"select * from patient_detail")
row = mycursor.fetchall()
for i in row:
b=0
v = list(i)
k = ["NAME", "SEX", "AGE",
"ADDRESS", "CONTACT"]
d = dict(zip(k, v))
print(d)
====================================
!!!!!!!Registered Successfully!!!!!!
====================================
""")
# dischare process
elif b == 3:
name = input("Enter the Patient Name:")
mycursor.execute(
"select * from patient_detail where name='"
+ name + "'")
row = mycursor.fetchall()
print(row)
bill = input(
"Has he paid all the bills? (y/n):")
if bill == "y":
mycursor.execute(
"delete from patient_detail where name='"
+ name + "'")
mysql.commit()
# if user wants to exit
elif b == 4:
break
# SIGN OUT
elif a == 3:
break
● WWW.STUDOC.COM
● WWW.ACADEMIA.COM
● WWW.SLIDESHARE.NET
● WWW.SCRIBD.COM