Hospital Management Documentation
Hospital Management Documentation
Name:- Naman
Certificate
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.
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
4 GB RAM
Software Requirements:
Python 3.6.x or higher version
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")
if ch==1:
a=pd.read_csv("hospital.csv")
a.drop("Unnamed: 0",axis=1,inplace=True)
a.set_index("pid",inplace=True)
a.loc[w]=[x,y,z,v1,v]
a.reset_index(inplace=True)
a.to_csv("hospital.csv")
elif ch==2:
a=pd.read_csv("hospital.csv")
a.drop("Unnamed: 0",axis=1,inplace=True)
a.set_index("pid",inplace=True)
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)
a.drop(w,axis=0,inplace=True)
a.reset_index(inplace=True)
a.to_csv("hospital.csv")
elif ch==5:
a=pd.read_csv("hospital.csv")
a.drop("Unnamed: 0",axis=1,inplace=True)
a.set_index("pid",inplace=True)
a.loc[w,"charges"]=v
a.reset_index(inplace=True)
a.to_csv("hospital.csv")
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()
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()
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()
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.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.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.show()
elif ch==12:
break
else:
print("invalid choice!")
OUTPUTS
Choice- 1
BIBLIOGRAPHY/REFERENCES