Skip to content

Commit

Permalink
fix(Patient): consider middle name in full name
Browse files Browse the repository at this point in the history
  • Loading branch information
kalungia authored and akashkrishna619 committed Feb 26, 2024
1 parent 973b2eb commit c8429f2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions healthcare/healthcare/doctype/patient/patient.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c8429f2

Please sign in to comment.