0% found this document useful (0 votes)
72 views23 pages

Nandini 2bn

Yes

Uploaded by

vivangolden999
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)
72 views23 pages

Nandini 2bn

Yes

Uploaded by

vivangolden999
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/ 23

DARSHAN ACADEMY, MEERUT

Sawan Ashram, West End Road, Meerut

A Project Report File


On the topic

HOSPITAL MANAGEMENT SYSTEM


[submitted for the partial fulfilment of AISSCE Examination 2024-25]
Subject: Informatics Practices (065)
Class: XII

Under the guidance of Gopal Singh (PGT - Computer)

Submitted By: NANDINI GOEL


Roll Number:

1|Page
CERTIFICATE

This is to certify that Nandini Goel of class XII, session 2024-25 has successfully completed
the project on the topic Hospital Management System, in partial fulfilment of the
requirement for the AISSCE Practical Examination of the subject Informatics Practices
(065).

The project work reported here is as per the guidelines of CBSE for AISSCE practical
examination and it is done under the supervision of Mr. Gopal Singh (PGT Computer). The
project work carried out by him/her is not a form of any other project work.

______________ _______________

Internal Examiner External Examiner

2|Page
Table of Contents

S. No. Description Page No.


1 Acknowledgement 4

2 Introduction 5

3 Objective 5

4 Hardware and Software Requirements 7

5 Technology Used 8

6 Proposed System 6

7 Database 13

8 Source Code 14

9 Output 20

10 Bibliography 21

3|Page
ACKNOWLEDGMENT

I would like to express my special thanks of gratitude to my teacher Mr. Gopal Singh
as well as our Principal Mr. Biswajit Dutta who gave me the golden opportunity to do this
wonderful project on the topic 'HOSPITAL MANAGEMENT SYSTEM' which also helped
me in doing a lot of research and I came to know about so many new things.

Secondly, I would also like to thank my parents and friends who helped me a lot in
finishing this project within the time limit. I am making this project not only for marks but to
also increase my knowledge.

I express deep sense of gratitude to almighty God for giving me strength for the
successful completion of the project.

I gratefully acknowledge the contribution of the individuals who contributed in


bringing this project up to this level, who continues to look after me despite my flaws.

The guidance and support received from all the members who contributed and who are
contributing to this project, was vital for the success of the project. I am grateful for their
constant support and help.

NANDINI GOEL

4|Page
PROJECT ON HOSPITAL MANAGEMENT SYSTEM

INTRODUCTION
The Hospital Management System is designed to automate and streamline the administrative and
operational processes of a hospital. It centralizes patient records, doctor details, and appointment scheduling,
making it easier to manage hospital resources efficiently. This project emphasizes database management and real-
time operations for improving healthcare services.

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.

1. Write programs utilizing modern software tools.

2. Apply object oriented programming principles effectively when developing small to

medium sized projects.

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

4. Students will demonstrate a breadth of knowledge in computer science, as exemplified

in the areas of systems, theory and software development.

5. Students will demonstrate ability to conduct a research or applied Computer Science

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

computer science.

5|Page
PROPOSED SYSTEM
Today one cannot afford to rely on the fallible human beings of be really wants to

stand against today’s merciless competition where not to wise saying “to err is human” no

longer valid, it’s outdated to rationalize your mistake. So, to keep pace with time, to bring

about the best result without malfunctioning and greater efficiency so to replace the

unending heaps of flies with a much sophisticated hard disk of the computer.

One has to use the data management software. Software has been an ascent in

atomization various organisations. Many software products working are now in markets,

which have helped in making the organizations work easier and efficiently. Data

management initially had to maintain a lot of ledgers and a lot of paper work has to be done

but now software product on this organization has made their work faster and easier. Now

only this software has to be loaded on the computer and work can be done.

This prevents a lot of time and money. The work becomes fully automated and any

information regarding the organization can be obtained by clicking the button. Moreover,

now it’s an age of computers of and automating such an organization gives the better look.

6|Page
HARDWARE AND SOFTWARE REQUIREMENTS

I. OPERATING SYSTEM : WINDOWS 10 AND ABOVE

II. PROCESSOR : PENTIUM DUAL CORE OR ABOVE

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. PROGRAMMING LANGUAGE : PYTHON 3.3.7 OR ABOVE

V. DATABASE : MySQL 5.5.27 OR ABOVE

7|Page
TECHNOLOGY USED

Python

Python is a high-level, general-purpose

programming language. Its design philosophy

emphasizes code readability with the use of

significant indentation.

Python is dynamically-typed and garbage-collected. It supports multiple programming

paradigms, including structured (particularly procedural), object-oriented and functional

programming.

Guido van Rossum began working on Python in the late 1980s as a successor to the ABC

programming language and first released it in 1991 as

Python 0.9.0.

Python 2.0 was released in 2000 and introduced new

features such as list comprehensions, cycle-detecting

garbage collection, reference counting, and Unicode

support. Python 3.0, released in 2008, was a major revision

that is not completely backward-compatible with earlier versions. Python 2 was discontinued

with version 2.7.18 in 2020.

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.
8|Page
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.

Python is used for:

 web development (server-side),

 software development,

 mathematics,

 system scripting.

What can Python do?

 Python can be used on a server to create web applications.

 Python can be used alongside software to create workflows.

 Python can connect to database systems. It can also read and modify files.

 Python can be used to handle big data and perform complex mathematics.

 Python can be used for rapid prototyping, or for production-ready software

development.

Why Python?

 Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).

 Python has a simple syntax similar to the English language.

 Python has syntax that allows developers to write programs with fewer lines than

some other programming languages.

 Python runs on an interpreter system, meaning that code can be executed as soon as it

is written. This means that prototyping can be very quick.

 Python can be treated in a procedural way, an object-oriented way or a functional way.

9|Page
It is possible to write Python in an Integrated Development Environment, such as Thonny,

Pycharm, Netbeans or Eclipse which are particularly useful when managing larger

collections of Python files.

Python Syntax compared to other programming languages

 Python was designed for readability, and has some similarities to the English language

with influence from mathematics.

 Python uses new lines to complete a command, as opposed to other programming

languages which often use semicolons or parentheses.

 Python relies on indentation, using whitespace, to define scope; such as the scope of

loops, functions and classes. Other programming languages often use curly-brackets

for this purpose.

10 | P a g e
MySQL

MySQL, the most popular Open Source SQL database management system, is

developed, distributed, and supported by Oracle Corporation.

The MySQL website (http://www.mysql.com/) provides the

latest information about MySQL software.

MySQL is a database management system.

A database is a structured collection of data. It may be anything from a simple shopping list

to a picture gallery or the vast amounts of information in a corporate network. To add,

access, and process data stored in a computer database, you need a database management

system such as MySQL Server. Since computers are very good at handling large amounts of

data, database management systems play a central role in computing, as standalone utilities,

or as parts of other applications.

MySQL databases are relational.

A relational database stores data in separate tables rather than putting all the data in one big

storeroom. The database structures are organized into physical files optimized for speed. The

logical model, with objects such as databases, tables, views, rows, and columns, offers a

flexible programming environment. You set up rules governing the relationships between

different data fields, such as one-to-one, one-to-many, unique, required or optional, and

“pointers” between different tables. The database enforces these rules, so that with a well-

designed database, your application never sees inconsistent, duplicate, orphan, out-of-date,

or missing data.

11 | P a g e
The SQL part of “MySQL” stands for “Structured Query Language”. SQL is the most

common standardized language used to access databases. Depending on your programming

environment, you might enter SQL directly (for example, to generate reports), embed SQL

statements into code written in another language, or use a language-specific API that hides

the SQL syntax.

SQL is defined by the ANSI/ISO SQL Standard. The SQL standard has been evolving since

1986 and several versions exist. In this manual, “SQL-92” refers to the standard released in

1992, “SQL:1999” refers to the standard released in 1999, and “SQL:2003” refers to the

current version of the standard. We use the phrase “the SQL standard” to mean the current

version of the SQL Standard at any time.

MySQL software is Open Source.

Open Source means that 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

software uses the GPL (GNU General Public License).

12 | P a g e
DATABASE

Database Name: „HospitalManagement'

1.) PATEINTS TABLE

patient_id PRIMARY KEY


name VARCHAR(30)
age int
gender VARCHAR(5)
phone BigInt
diagnosis VARCHAR(30)
Doctor_id Int

2.) DOCTOR TABLE:

doctor_id PRIMARY KEY


name VARCHAR(30)
specialization VARCHAR(30)
phone BigInt

3.)APPOINTMENTS TABLE:

appointment_id PRIMARY KEY


patient_id int
doctor_id int
date Date
time VARCHAR(15)
status VARCHAR(30)

13 | P a g e
SOURCE CODE

DATABASE CODE

CREATE DATABASE HospitalManagement;

USE HospitalManagement;

CREATE TABLE Patients (

patient_id INT AUTO_INCREMENT PRIMARY KEY,

name VARCHAR(100),

age INT,

gender VARCHAR(10),

phone VARCHAR(15),

diagnosis VARCHAR(255),

doctor_id INT

);

CREATE TABLE Doctors (

doctor_id INT AUTO_INCREMENT PRIMARY KEY,

name VARCHAR(100),

specialization VARCHAR(100),

phone VARCHAR(15)

);

CREATE TABLE Appointments (

14 | P a g e
appointment_id INT AUTO_INCREMENT PRIMARY KEY,

patient_id INT,

doctor_id INT,

date DATE,

time TIME,

status VARCHAR(50),

FOREIGN KEY (patient_id) REFERENCES Patients(patient_id),

FOREIGN KEY (doctor_id) REFERENCES Doctors(doctor_id)

);

15 | P a g e
PYTHON CODE

import mysql.connector

from datetime import datetime

# MySQL connection

db = mysql.connector.connect(

host="localhost",

user="root",

password="your_password",

database="HospitalManagement"

cursor = db.cursor()

# Display Menu

def display_menu():

print("\n--- Hospital Management System ---")

print("1. Add Patient")

print("2. Add Doctor")


16 | P a g e
print("3. Schedule Appointment")

print("4. View All Patients")

print("5. View All Doctors")

print("6. View All Appointments")

print("7. Exit")

print("-----------------------------------")

# Add Patient

def add_patient():

name = input("Enter patient name: ")

age = int(input("Enter patient age: "))

gender = input("Enter patient gender: ")

phone = input("Enter patient phone number: ")

diagnosis = input("Enter diagnosis: ")

doctor_id = int(input("Enter Doctor ID for treatment: "))

cursor.execute("INSERT INTO Patients (name, age, gender, phone, diagnosis,


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

(name, age, gender, phone, diagnosis, doctor_id))

db.commit()

print("Patient added successfully!")

17 | P a g e
# Add Doctor

def add_doctor():

name = input("Enter doctor name: ")

specialization = input("Enter specialization: ")

phone = input("Enter doctor phone number: ")

cursor.execute("INSERT INTO Doctors (name, specialization, phone)


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

(name, specialization, phone))

db.commit()

print("Doctor added successfully!")

# Schedule Appointment

def schedule_appointment():

patient_id = int(input("Enter Patient ID: "))

doctor_id = int(input("Enter Doctor ID: "))

date = input("Enter appointment date (YYYY-MM-DD): ")

time = input("Enter appointment time (HH:MM): ")

status = "Scheduled"

cursor.execute("INSERT INTO Appointments (patient_id, doctor_id, date,


time, status) VALUES (%s, %s, %s, %s, %s)",

(patient_id, doctor_id, date, time, status))

18 | P a g e
db.commit()

print("Appointment scheduled successfully!")

# View All Patients

def view_patients():

cursor.execute("SELECT * FROM Patients")

patients = cursor.fetchall()

print("\n--- Patient List ---")

for patient in patients:

print(f"ID: {patient[0]}, Name: {patient[1]}, Age: {patient[2]}, Gender:


{patient[3]}, Phone: {patient[4]}, Diagnosis: {patient[5]}")

# View All Doctors

def view_doctors():

cursor.execute("SELECT * FROM Doctors")

doctors = cursor.fetchall()

print("\n--- Doctor List ---")

for doctor in doctors:

print(f"ID: {doctor[0]}, Name: {doctor[1]}, Specialization: {doctor[2]},


Phone: {doctor[3]}")

19 | P a g e
# View All Appointments

def view_appointments():

cursor.execute("SELECT * FROM Appointments")

appointments = cursor.fetchall()

print("\n--- Appointment List ---")

for appt in appointments:

print(f"ID: {appt[0]}, Patient ID: {appt[1]}, Doctor ID: {appt[2]}, Date:


{appt[3]}, Time: {appt[4]}, Status: {appt[5]}")

# Main Program

while True:

display_menu()

choice = input("Enter your choice: ")

if choice == "1":

add_patient()

elif choice == "2":

add_doctor()

elif choice == "3":

schedule_appointment()

elif choice == "4":

20 | P a g e
view_patients()

elif choice == "5":

view_doctors()

elif choice == "6":

view_appointments()

elif choice == "7":

print("Exiting program. Goodbye!")

break

else:

print("Invalid choice. Please try again.")

cursor.close()

db.close()

21 | P a g e
OUTPUT

1.)ADD PATIENTS

Enter patient name: Alice


Enter patient age: 30
Enter patient gender: Female
Enter patient phone number: 9876543210
Enter diagnosis: Fever
Enter Doctor ID for treatment: 1
Patient added successfully!

2.)VIEW ALL DOCTORS

ID: 1, Name: Dr. Smith, Specialization: Cardiologist, Phone: 1234567890

3.)SHEDULE APPOINTEMENT:

Enter Patient ID: 1

Enter Doctor ID: 1

Enter appointment date (YYYY-MM-DD): 2024-12-26

Enter appointment time (HH:MM): 10:30

Appointment scheduled successfully!

22 | P a g e
BIBLIOGRAPHY

Books
• Informatics Practices With Python - Class XI By : SumitaArora
• Informatics Practices With Python - Class XII By : SumitaArora
• Informatics Practices With Python - Class XII By : Preeti Arora

Websites
• https://www.dev.mysql.com
• https://www.python.org
• https://www.w3resource.com

***

23 | P a g e

You might also like