fix: Clinical Procedure - copy fields from appointment

This commit is contained in:
Jamsheer 2018-11-19 16:29:32 +05:30
parent f4d0fcb836
commit f3c4f5a901

View File

@ -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 += "<br/>"+doc.notes