Spaces:
Sleeping
Sleeping
Update appointment_agent.py
Browse files- appointment_agent.py +2 -15
appointment_agent.py
CHANGED
@@ -11,7 +11,7 @@ def book_appointment(doctor: str, date: str, time: str):
|
|
11 |
"time": time,
|
12 |
"status": "Booked"
|
13 |
}
|
14 |
-
return f"Your appointment with {doctor} has been booked for {date} at {time}. Appointment ID: {appointment_id}"
|
15 |
|
16 |
def cancel_appointment(appointment_id: str):
|
17 |
if appointment_id in appointments:
|
@@ -22,18 +22,5 @@ def cancel_appointment(appointment_id: str):
|
|
22 |
def follow_up_appointment(appointment_id: str):
|
23 |
if appointment_id in appointments:
|
24 |
appointment = appointments[appointment_id]
|
25 |
-
return f"Appointment with {appointment['doctor']} is scheduled for {appointment['date']} at {appointment['time']}. Status: {appointment['status']}"
|
26 |
-
return "Appointment not found."
|
27 |
-
|
28 |
-
def reschedule_appointment(appointment_id: str, new_date: str, new_time: str):
|
29 |
-
if appointment_id in appointments:
|
30 |
-
appointments[appointment_id]["date"] = new_date
|
31 |
-
appointments[appointment_id]["time"] = new_time
|
32 |
-
return f"Your appointment with {appointments[appointment_id]['doctor']} has been rescheduled to {new_date} at {new_time}."
|
33 |
-
return "Appointment not found."
|
34 |
-
|
35 |
-
def send_reminder(appointment_id: str):
|
36 |
-
if appointment_id in appointments:
|
37 |
-
appointment = appointments[appointment_id]
|
38 |
-
return f"Reminder: Your appointment with {appointment['doctor']} is scheduled for {appointment['date']} at {appointment['time']}."
|
39 |
return "Appointment not found."
|
|
|
11 |
"time": time,
|
12 |
"status": "Booked"
|
13 |
}
|
14 |
+
return f"Your appointment with Dr. {doctor} has been booked for {date} at {time}. Appointment ID: {appointment_id}"
|
15 |
|
16 |
def cancel_appointment(appointment_id: str):
|
17 |
if appointment_id in appointments:
|
|
|
22 |
def follow_up_appointment(appointment_id: str):
|
23 |
if appointment_id in appointments:
|
24 |
appointment = appointments[appointment_id]
|
25 |
+
return f"Appointment with Dr. {appointment['doctor']} is scheduled for {appointment['date']} at {appointment['time']}. Status: {appointment['status']}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
return "Appointment not found."
|