python code 2
python code 2
import numpy as np
import matplotlib.pyplot as plt
df=pd.read_csv("/Users/saranyarayaprolu/Desktop/2024 hospital.csv")
print(df.head(100))
import os
while True:
print("Welcome to the Hospital Management System")
print("1. Admin")
print("2. Patient")
print("3. Sign Out")
if role == "1":
while True:
print("\nAdmin Options:")
print("1. Add New Patient Record")
print("2. Delete Patient Record")
print("3. Check Monthly Record")
print("4. Back to Main Menu")
if admin_choice == "1":
patient = {
"PatientID": input("Enter Patient ID: "),
"Name": input("Enter Patient Name: "),
"Age": input("Enter Patient Age: "),
"Gender": input("Enter Patient Gender (M/F/Other): "),
"Illness": input("Enter Patient's illness: "),
"Phone": input("Enter Patient Phone Number: "),
"DOA": input("enter the date of Admission: "),
"DoD": input("enter the date of discharge: "),
"doctor": input("Enter the doctors name: ").split(","),
}
if patient_record:
print("Patient Record Found:")
print(patient_record.strip())
else:
print("Patient record not found.")
else:
print("Invalid choice, please try again.")
if patient_choice == "1":
# Open file and read records
file = open('patients.txt', 'r')
records = file.readlines()
file.close()
else:
print("Invalid choice, please try again.")
else:
print("Invalid input, please select a valid option.")