fix: Patient Appointment Calendar (#15684)
diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py
index 7d948b8..5364031 100755
--- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py
+++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py
@@ -339,13 +339,13 @@
data = frappe.db.sql("""select name, patient, practitioner, status,
duration, timestamp(appointment_date, appointment_time) as
- 'appointment_date' from `tabPatient Appointment` where
+ 'start' from `tabPatient Appointment` where
(appointment_date between %(start)s and %(end)s)
and docstatus < 2 {conditions}""".format(conditions=conditions),
{"start": start, "end": end}, as_dict=True, update={"allDay": 0})
for item in data:
- item.appointment_datetime = item.appointment_date + datetime.timedelta(minutes = item.duration)
+ item.end = item.start + datetime.timedelta(minutes = item.duration)
return data
diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment_calendar.js b/erpnext/healthcare/doctype/patient_appointment/patient_appointment_calendar.js
index fc674a8..2249d2a 100644
--- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment_calendar.js
+++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment_calendar.js
@@ -10,37 +10,5 @@
},
order_by: "appointment_date",
gantt: true,
- get_events_method: "erpnext.healthcare.doctype.patient_appointment.patient_appointment.get_events",
- filters: [
- {
- 'fieldtype': 'Link',
- 'fieldname': 'practitioner',
- 'options': 'Healthcare Practitioner',
- 'label': __('Healthcare Practitioner')
- },
- {
- 'fieldtype': 'Link',
- 'fieldname': 'patient',
- 'options': 'Patient',
- 'label': __('Patient')
- },
- {
- 'fieldtype': 'Link',
- 'fieldname': 'appointment_type',
- 'options': 'Appointment Type',
- 'label': __('Appointment Type')
- },
- {
- 'fieldtype': 'Link',
- 'fieldname': 'department',
- 'options': 'Medical Department',
- 'label': __('Department')
- },
- {
- 'fieldtype': 'Select',
- 'fieldname': 'status',
- 'options': 'Scheduled\nOpen\nClosed\nPending',
- 'label': __('Status')
- }
- ]
+ get_events_method: "erpnext.healthcare.doctype.patient_appointment.patient_appointment.get_events"
};