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

Hospital Management Documentation

The document outlines a project on a Hospital Management System developed in Python for class XII, session 2024-2025. It includes sections on acknowledgments, system requirements, source code, and outputs, detailing functionalities like adding, searching, and modifying patient records. The project utilizes libraries such as Pandas for data handling and Matplotlib for graphical representation of patient charges.

Uploaded by

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

Hospital Management Documentation

The document outlines a project on a Hospital Management System developed in Python for class XII, session 2024-2025. It includes sections on acknowledgments, system requirements, source code, and outputs, detailing functionalities like adding, searching, and modifying patient records. The project utilizes libraries such as Pandas for data handling and Matplotlib for graphical representation of patient charges.

Uploaded by

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

KIIT WORLD SCHOOL

Project Name: Hospital Management System


CLASS: XII
SESSION: 2024-2025
INFORMATICS PRACTICES PROJECT FILE
INDEX
S Description Page
No. No.
1 Acknowledgement 3
2 Certificates 4
3 About Hospital 5
Management
4 Introduction About 6
Python
5 Software And 7
Hardware
Requirements
6 CSV File 8
7 Source Code 9
8 Outputs 12
9 Bibliography 18
ACKNOWLEDGEMENT

I express my sincere thanks to Mrs. Palak Mam, my information


practices who guided me throughout the project. I am thankful for
the inspiring guidance and invaluably constructive criticism during
the project work. I am sincerely grateful to her for sharing her
truthful views. My project has been completed because of her
guidance.

Name:- Naman
Certificate

This is to certify that Naman of class- 12 th D has


completed her project file under my guidance. She has
taken proper care and shown utmost sincerity in the
completion of this project. I certify that this project is up
to my expectations and as per CBSE guidelines.

Signature
ABOUT HOSPITAL MANAGEMENT
The Project is based on Hospital management which handles all the
Patient’s details in the hospitals. The entire project is done using
IDLE(Python 3.964-bit). For the Data Handling Pandas is used and for
Graphical Representation, Matplotlib interface Pyplot is used. The main
menus of this project are,

1. Add Patient
2. Search Patient
3. List of All Patients
4. Delete Patient
5. Modify Patient's Details
6. Finding Total Charges of All Patients
7. Finding Average Charges of All Patients
8. Finding Highest Charges and Lowest Charges
9. Show Charges Bar Graph
10. Show line chart
11. Show scatter chart
12. Quit
INTRODUCTION ABOUT PYTHON
Python is a high-level general-purpose programming language. Python's design philosophy
emphasizes code readability with its notable use of significant indentation. Its language constructs
as well as its object-oriented approach aim to help programmers write clear, logical code for small
and large- scale projects.

Python is dynamically-typed and garbage-collected.


It supports multiple programming paradigms,including oriented and functional programming.
Python is often described as a "batteries included" language due to its comprehensive standard
library.

Guido van Rossum began working on Python in the late 1980’s, 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 and a garbage collection system
using reference counting. Python 3.0 was released in 2008 and was a major revision of the
language that is not completely backward- compatible and much Python 2 code does not run
unmodified on Python 3. Python 2 was discontinued with version 2.7.18 in 2020.Python
consistently ranks as one of the most popular programming languages.

Since 2003, Python has consistently ranked in the top ten most popular programming languages in
the TIOBE Programming Community Index where, as of February 2021, it is the third most
popular language (behind Java, and C). It was selected Programming Language of the Year in
2007, 2010, 2018, and 2020 .
SYSTEM REQUIREMENTS
Hardware Requirements:
 A Computer / Laptop with

 Operating System – Windows 7 or above

 X86 64-bit CPU (Intel / AMD architecture)

 4 GB RAM

 5 GB free disk space

Software Requirements:
 Python 3.6.x or higher version

 Pandas Library pre-installed

 Matplotlib Library pre-installed


CSV FILE
SOURCE CODE
import pandas as pd

import matplotlib.pyplot as plt

while True:

print("\n\n\n")

print("1 Add Patient\n2 Search Patient\n3 List of All Patients\n4 Delete Patient\n5 Modify Patient's
Details\n6 Finding Total Charges of All Patients\n7 Finding Average Charges of All Patients\n8 Finding
Highest Charges and Lowest Charges\n9 Show Charges Bar Graph\n10 Show line chart\n11 Show scatter
chart\n12 Quit")

ch=int(input("enter your choice: "))

if ch==1:

a=pd.read_csv("hospital.csv")

a.drop("Unnamed: 0",axis=1,inplace=True)

a.set_index("pid",inplace=True)

w=int(input("enter patient id: "))

x=input("enter patient name: ")

y=int(input("enter age: "))

z=input("enter gender: ")

v1=input("enter department: ")

v=int(input("enter charges: "))

a.loc[w]=[x,y,z,v1,v]

a.reset_index(inplace=True)

a.to_csv("hospital.csv")

print("\n\nPatient Added Successfully!")

elif ch==2:

a=pd.read_csv("hospital.csv")
a.drop("Unnamed: 0",axis=1,inplace=True)

a.set_index("pid",inplace=True)

w=int(input("enter patient id: "))

print(a.loc[w,:])

elif ch==3:

a=pd.read_csv("hospital.csv")

a.drop("Unnamed: 0",axis=1,inplace=True)

#a.set_index("pid",inplace=True)

print(a)

elif ch==4:

a=pd.read_csv("hospital.csv")

a.drop("Unnamed: 0",axis=1,inplace=True)

a.set_index("pid",inplace=True)

w=int(input("enter patient id: "))

a.drop(w,axis=0,inplace=True)

a.reset_index(inplace=True)

a.to_csv("hospital.csv")

print("\n\nPatient Deleted Successfully!")

elif ch==5:

a=pd.read_csv("hospital.csv")

a.drop("Unnamed: 0",axis=1,inplace=True)

a.set_index("pid",inplace=True)

w=int(input("enter patient id: "))

v=int(input("enter new charges: "))

a.loc[w,"charges"]=v

a.reset_index(inplace=True)
a.to_csv("hospital.csv")

print("\n\nPatient Modified Successfully!")

elif ch==6:

a=pd.read_csv("hospital.csv")

a.drop("Unnamed: 0",axis=1,inplace=True)

a.set_index("pid",inplace=True)

v=a.loc[:,"charges"].sum()

print("total charges=: ",v)

elif ch==7:

a=pd.read_csv("hospital.csv")

a.drop("Unnamed: 0",axis=1,inplace=True)

a.set_index("pid",inplace=True)

v=a.loc[:,"charges"].mean()

print("Average charges=: ",v)

elif ch==8:

a=pd.read_csv("hospital.csv")

a.drop("Unnamed: 0",axis=1,inplace=True)

a.set_index("pid",inplace=True)

v=a.loc[:,"charges"].max()

m=a.loc[:,"charges"].min()

print("Highest charges=: ",v)

print("Lowest charges=: ",m)

elif ch==9:

a=pd.read_csv("hospital.csv")

a.drop("Unnamed: 0",axis=1,inplace=True)

a.set_index("pid",inplace=True)
x=a.loc[:,"name"]

y=a.loc[:,"charges"]

plt.bar(x,y,width=0.6,edgecolor="black",color="red")

plt.xlabel("Patient's Name")

plt.ylabel("Charges")

plt.title("Patient's Charges Structure Chart")

plt.show()

elif ch==10:

a=pd.read_csv("hospital.csv")

a.drop("Unnamed: 0",axis=1,inplace=True)

a.set_index("pid",inplace=True)

x=a.loc[:,"name"]

y=a.loc[:,"charges"]

plt.plot(x,y,color="red",linestyle="dotted")

plt.xlabel("Patient's Name")

plt.ylabel("Charges")

plt.title("Patient's Charges Structure Chart")

plt.show()

elif ch==11:

a=pd.read_csv("hospital.csv")

a.drop("Unnamed: 0",axis=1,inplace=True)

a.set_index("pid",inplace=True)

x=a.loc[:,"name"]

y=a.loc[:,"charges"]

plt.scatter(x,y)

plt.xlabel("Patient's Name")
plt.ylabel("Charges")

plt.title("Patient's Charges Structure Chart")

plt.show()

elif ch==12:

break

else:

print("invalid choice!")
OUTPUTS

Choice- 1
BIBLIOGRAPHY/REFERENCES

 Class- XII NCERT Text Book


 https://www.python.org/
 https://www.wikipedia.org/
 https://cbse.nic.in/

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy