From e282289227ca162c98ed0ea21de54831efc2be58 Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Thu, 2 Apr 2026 17:49:45 +0530 Subject: [PATCH] Default new patient blood group to Not Define --- app/Controllers/Patient.php | 7 ++++++- app/Views/billing/Patient_V.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Controllers/Patient.php b/app/Controllers/Patient.php index a40ff50..4ed0051 100644 --- a/app/Controllers/Patient.php +++ b/app/Controllers/Patient.php @@ -75,6 +75,11 @@ class Patient extends BaseController ->with('error', $errorText); } + $bloodGroup = trim((string) $this->request->getPost('input_blood_group')); + if ($bloodGroup === '') { + $bloodGroup = 'Not Define'; + } + $data = [ 'mphone1' => $this->request->getPost('input_mphone1'), 'p_fname' => strtoupper((string) $this->request->getPost('input_name')), @@ -87,7 +92,7 @@ class Patient extends BaseController 'title' => $this->request->getPost('cbo_title'), 'p_relative' => $this->request->getPost('cbo_relation'), 'p_rname' => strtoupper((string) $this->request->getPost('input_relative_name')), - 'blood_group' => strtoupper((string) $this->request->getPost('input_blood_group')), + 'blood_group' => strtoupper($bloodGroup), 'udai' => strtoupper((string) $this->request->getPost('input_udai')), 'estimate_dob' => $estimate_dob, ]; diff --git a/app/Views/billing/Patient_V.php b/app/Views/billing/Patient_V.php index e3f1805..a15a82c 100644 --- a/app/Views/billing/Patient_V.php +++ b/app/Views/billing/Patient_V.php @@ -169,7 +169,7 @@