|
@@ -1,12 +1,17 @@
|
|
|
@extends ('layouts.patient')
|
|
|
@section('inner-content')
|
|
|
- <?
|
|
|
+ <?php
|
|
|
$myName = '-';
|
|
|
if($patient->mcp) {
|
|
|
$myName = implode(' ', array_filter([$patient->mcp->name_first, $patient->mcp->name_last]));
|
|
|
}
|
|
|
- $theirName = ($patient->name_prefix ?? ($patient->sex === 'M' ? 'Mr.' : 'Ms.'))
|
|
|
- .' '.($patient->name_last ?? $patient->name_first);
|
|
|
+ $theirName = [];
|
|
|
+ if(!empty($patient->name_prefix)) $theirName[] = $patient->name_prefix;
|
|
|
+ if(!empty($patient->sex)) {
|
|
|
+ $theirName[] = ($patient->sex === 'M' ? 'Mr.' : 'Ms.');
|
|
|
+ }
|
|
|
+ $theirName[] = $patient->name_last . ', ' . $patient->name_first;
|
|
|
+ $theirName = implode(" ", $theirName);
|
|
|
?>
|
|
|
|
|
|
<section class="intake primary-form">
|