From a928536e80d96f182d8a8af0e56c5f925285dd8a Mon Sep 17 00:00:00 2001 From: Sajin SR Date: Thu, 13 Apr 2023 17:08:37 +0530 Subject: [PATCH] fix: Patient Appointment - Scheduler event update --- .../doctype/patient_appointment/patient_appointment.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/healthcare/healthcare/doctype/patient_appointment/patient_appointment.py b/healthcare/healthcare/doctype/patient_appointment/patient_appointment.py index ff66e3e5dc..75b217ded1 100755 --- a/healthcare/healthcare/doctype/patient_appointment/patient_appointment.py +++ b/healthcare/healthcare/doctype/patient_appointment/patient_appointment.py @@ -750,8 +750,10 @@ def get_prescribed_therapies(patient): def update_appointment_status(): # update the status of appointments daily appointments = frappe.get_all( - "Patient Appointment", {"status": ("not in", ["Closed", "Cancelled"])}, as_dict=1 + "Patient Appointment", {"status": ("not in", ["Closed", "Cancelled"])} ) for appointment in appointments: - frappe.get_doc("Patient Appointment", appointment.name).set_status() + appointment_doc = frappe.get_doc("Patient Appointment", appointment.name) + appointment_doc.set_status() + appointment_doc.save()