Skip to content

Commit

Permalink
fix: Patient Appointment - Scheduler event update
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajinsr authored and akashkrishna619 committed Apr 16, 2023
1 parent c2c1d27 commit a928536
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit a928536

Please sign in to comment.