From 4d9d51d91cbae72b544d12dd48a609868cf647ff Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Mon, 3 Feb 2020 22:29:32 +0530 Subject: [PATCH] fix: get prescribed procedures button not working --- .../doctype/patient_appointment/patient_appointment.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js index 9f28d5dbd0..49de78c21d 100644 --- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js +++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js @@ -292,8 +292,12 @@ var get_procedure_prescribed = function(frm){ frappe.call({ method:"erpnext.healthcare.doctype.patient_appointment.patient_appointment.get_procedure_prescribed", args: {patient: frm.doc.patient}, - callback: function(r){ - show_procedure_templates(frm, r.message); + callback: function(r) { + if (r.message && r.message.length) { + show_procedure_templates(frm, r.message); + } else { + frappe.msgprint(__("No Prescribed Procedures found for the selected patient")); + } } }); }