From ae3a655e2d6e60b323b0f3b98c68d5291478de87 Mon Sep 17 00:00:00 2001 From: Arturo Date: Tue, 14 May 2024 12:21:09 +0200 Subject: [PATCH] fix(Patient History Settings): retrieve right medical_record_id in update_medical_record fix(Patient History Settings): retrieve right medical_record_id in update_medical_record method --- .../patient_history_settings/patient_history_settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)