diff --git a/healthcare/healthcare/doctype/patient_history_settings/patient_history_settings.py b/healthcare/healthcare/doctype/patient_history_settings/patient_history_settings.py index 83aac757ce..3e33a42bed 100644 --- a/healthcare/healthcare/doctype/patient_history_settings/patient_history_settings.py +++ b/healthcare/healthcare/doctype/patient_history_settings/patient_history_settings.py @@ -104,7 +104,7 @@ def update_medical_record(doc, method=None): if medical_record_id: subject = set_subject_field(doc) - frappe.db.set_value("Patient Medical Record", medical_record_id[0][0], "subject", subject) + frappe.db.set_value("Patient Medical Record", medical_record_id, "subject", subject) else: create_medical_record(doc)