Hospital Management System Code
Hospital Management System Code
import time
# Main menu
def main():
while True:
print("\nHospital Management System")
print("1. Add Patient")
print("2. View Patients")
print("3. Discharge Patient")
print("4. Add Doctor")
print("5. View Doctors")
print("6. Generate Bill")
print("7. View Bills")
print("8. Exit")
choice = input("Enter your choice: ")
if choice == "1":
add_patient()
elif choice == "2":
view_patients()
elif choice == "3":
discharge_patient()
elif choice == "4":
add_doctor()
elif choice == "5":
view_doctors()
elif choice == "6":
generate_bill()
elif choice == "7":
view_bills()
elif choice == "8":
print("Exiting system... Saving data.")
time.sleep(1)
break
else:
print("Invalid choice! Please try again.")