@php use App\models\Mongo; $user_list = []; $attentdant = []; if (isset($casedata->user_in_case)) { $arr = []; foreach ($casedata->user_in_case as $data) { $arr[] = (int) $data; } $user_list = Mongo::table('users') ->whereIn('id', $arr) ->get(); foreach ($user_list as $data) { if($data['user_type'] == 'nurse'){ $attentdant[] = $data['user_prefix'] . $data['user_firstname'] . ' ' . $data['user_lastname'] . ' (N) '; } if($data['user_type'] == 'anesthesia'){ $attentdant[] = $data['user_prefix'] . $data['user_firstname'] . ' ' . $data['user_lastname'] . ' (ANES) '; } if($data['user_type'] == 'doctor'){ $attentdant[] = $data['user_prefix'] . $data['user_firstname'] . ' ' . $data['user_lastname'] . ''; } if($data['user_type'] == 'nurse_anas'){ $attentdant[] = $data['user_prefix'] . $data['user_firstname'] . ' ' . $data['user_lastname'] . ' (NA) '; } if($data['user_type'] == 'viewer'){ $attentdant[] = $data['user_prefix'] . $data['user_firstname'] . ' ' . $data['user_lastname'] . ' (V) '; } if($data['user_type'] == 'register'){ $attentdant[] = $data['user_prefix'] . $data['user_firstname'] . ' ' . $data['user_lastname'] . ' (G) '; } if($data['user_type'] == 'nurse_assistant'){ $attentdant[] = $data['user_prefix'] . $data['user_firstname'] . ' ' . $data['user_lastname'] . ' (P) '; } if($data['user_type'] == 'scientific'){ $attentdant[] = $data['user_prefix'] . $data['user_firstname'] . ' ' . $data['user_lastname'] . ' (U) '; } } } $no_doctor = true; $no_nurse = true; $no_anes = true; @endphp {{--
--}} {{-- @dd($attentdant); --}} {{-- @dd($casedata); --}}
ENDOSCOPIST ASSISTANTS ATTENDENT {{ @$attentdant[2] }} {{ @$attentdant[5] }}
{{ @$casedata->doctorname }} @if (isset($casedata->assistant)) {{ @$casedata->assistant }} @else N/A @endif {{-- ercp advance --}} {{-- @if (isset($casedata->consultantname)) @foreach ($casedata->consultantname as $data) {{ $data }}
@endforeach @else N/A @endif --}}
{{ @$attentdant[0] }} {{ @$attentdant[3] }} {{ @$attentdant[6] }}
{{ @$attentdant[1] }} {{ @$attentdant[4] }} {{ @$attentdant[7] }}