SOURCE CODE
SOURCE CODE
connector
# Main menu
def main():
connection = connect_db()
while True:
print("\n1. Add Patient\n2. View Patients\n3. Add
Doctor\n4. View Doctors\n5. Exit")
choice = input("Enter your choice: ")
if choice == '1':
add_patient(connection)
elif choice == '2':
view_patients(connection)
elif choice == '3':
add_doctor(connection)
elif choice == '4':
view_doctors(connection)
elif choice == '5':
connection.close()
print("Exiting...")
break
else:
print("Invalid choice. Please try again.")
if __name__ == "__main__":
main()