From 3e01891e229b966401d46050ffdf10779f57d228 Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Mon, 19 Nov 2018 17:02:48 +0530 Subject: [PATCH] fix: Traverse note from procedure prescription to appointment --- .../doctype/patient_appointment/patient_appointment.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py index 7ac44b6cc2d..117608234ec 100755 --- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py +++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py @@ -27,6 +27,10 @@ class PatientAppointment(Document): def after_insert(self): if self.procedure_prescription: frappe.db.set_value("Procedure Prescription", self.procedure_prescription, "appointment_booked", True) + if self.procedure_template: + comments = frappe.db.get_value("Procedure Prescription", self.procedure_prescription, "comments") + if comments: + frappe.db.set_value("Patient Appointment", self.name, "notes", comments) # Check fee validity exists appointment = self validity_exist = validity_exists(appointment.practitioner, appointment.patient)