From f3c4f5a901ab256a7eaf5699ff748b3850927992 Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Mon, 19 Nov 2018 16:29:32 +0530 Subject: [PATCH] fix: Clinical Procedure - copy fields from appointment --- .../doctype/clinical_procedure/clinical_procedure.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.py b/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.py index a21f5acb7e..beffe367d8 100644 --- a/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.py +++ b/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.py @@ -183,13 +183,15 @@ def create_procedure(appointment): procedure.patient_age = appointment.patient_age procedure.patient_sex = appointment.patient_sex procedure.procedure_template = appointment.procedure_template - procedure.procedure_prescription = appointment.procedure_prescription + procedure.prescription = appointment.procedure_prescription + procedure.practitioner = appointment.practitioner procedure.invoiced = appointment.invoiced procedure.medical_department = appointment.department procedure.start_date = appointment.appointment_date procedure.start_time = appointment.appointment_time procedure.notes = appointment.notes procedure.service_unit = appointment.service_unit + procedure.company = appointment.company consume_stock = frappe.db.get_value("Clinical Procedure Template", appointment.procedure_template, "consume_stock") if consume_stock == 1: procedure.consume_stock = True @@ -203,7 +205,9 @@ def create_procedure(appointment): return procedure.as_dict() def insert_clinical_procedure_to_medical_record(doc): - subject = cstr(doc.procedure_template) +" "+ doc.practitioner + subject = cstr(doc.procedure_template) + if doc.practitioner: + subject += " "+doc.practitioner if subject and doc.notes: subject += "
"+doc.notes