Default new patient blood group to Not Define
This commit is contained in:
parent
fc0a2c62d8
commit
e282289227
|
|
@ -75,6 +75,11 @@ class Patient extends BaseController
|
||||||
->with('error', $errorText);
|
->with('error', $errorText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$bloodGroup = trim((string) $this->request->getPost('input_blood_group'));
|
||||||
|
if ($bloodGroup === '') {
|
||||||
|
$bloodGroup = 'Not Define';
|
||||||
|
}
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'mphone1' => $this->request->getPost('input_mphone1'),
|
'mphone1' => $this->request->getPost('input_mphone1'),
|
||||||
'p_fname' => strtoupper((string) $this->request->getPost('input_name')),
|
'p_fname' => strtoupper((string) $this->request->getPost('input_name')),
|
||||||
|
|
@ -87,7 +92,7 @@ class Patient extends BaseController
|
||||||
'title' => $this->request->getPost('cbo_title'),
|
'title' => $this->request->getPost('cbo_title'),
|
||||||
'p_relative' => $this->request->getPost('cbo_relation'),
|
'p_relative' => $this->request->getPost('cbo_relation'),
|
||||||
'p_rname' => strtoupper((string) $this->request->getPost('input_relative_name')),
|
'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')),
|
'udai' => strtoupper((string) $this->request->getPost('input_udai')),
|
||||||
'estimate_dob' => $estimate_dob,
|
'estimate_dob' => $estimate_dob,
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@
|
||||||
|
|
||||||
<select class="form-select" name="input_blood_group" id="input_blood_group">
|
<select class="form-select" name="input_blood_group" id="input_blood_group">
|
||||||
<?php foreach ($blood_group as $row) { ?>
|
<?php foreach ($blood_group as $row) { ?>
|
||||||
<option value="<?= $row->blood_group ?>"><?= $row->blood_group ?></option>
|
<option value="<?= $row->blood_group ?>" <?= strcasecmp((string) $row->blood_group, 'Not Define') === 0 ? 'selected' : '' ?>><?= $row->blood_group ?></option>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user