Hosptal Management Program
Hosptal Management Program
# Main menu
def main_menu():
initialize_file()
while True:
print("====== Hospital Management System ======")
print("1. Add Patient")
print("2. Search Patient")
print("3. Update Patient Details")
print("4. Delete Patient")
print("5. View All Patients")
print("6. Exit")
choice = input("Enter your choice: ")
if choice == '1':
add_patient()
elif choice == '2':
search_patient()
elif choice == '3':
update_patient()
elif choice == '4':
delete_patient()
elif choice == '5':
view_all_patients()
elif choice == '6':
print("Exiting the program. Goodbye!")
break
else:
print("Invalid choice. Please try again.\n")
if __name__ == "__main__":
main_menu()