From 3e02fbc4ab89bf8cba19d2a835e3c0358aa1d8e7 Mon Sep 17 00:00:00 2001 From: Abraham Kalungi <85731451+kalungia@users.noreply.github.com> Date: Fri, 16 Feb 2024 13:21:15 +0200 Subject: [PATCH] fix(Patient): consider middle name in full name --- healthcare/healthcare/doctype/patient/patient.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/healthcare/healthcare/doctype/patient/patient.py b/healthcare/healthcare/doctype/patient/patient.py index d5507dfcd0..3d6f221805 100644 --- a/healthcare/healthcare/doctype/patient/patient.py +++ b/healthcare/healthcare/doctype/patient/patient.py @@ -73,10 +73,9 @@ def load_dashboard_info(self): self.set_onload("dashboard_info", info) def set_full_name(self): - if self.last_name: - self.patient_name = " ".join(filter(None, [self.first_name, self.last_name])) - else: - self.patient_name = self.first_name + self.patient_name = " ".join( + [name for name in [self.first_name, self.middle_name, self.last_name] if name] + ) def set_missing_customer_details(self): if not self.customer_group: