@auth @role('ls')

Requests

@php $patients = []; try { $user = Auth::user()->uuids; $mdID = \App\Models\ClinicStaff::where(['user_id' => $user])->select('clinic_id')->firstOrFail()->toArray(); $patients = getPatientCheckRequest($mdID['clinic_id']); } catch (\Throwable $th) { //throw $th; echo ''.$th->getMessage().''; } @endphp

Total Request: @if($patients) {{ count($patients) }} @else {{ __(0) }} @endif

@role('ls') @endrole @if($patients) {{ __('No Action') }} @foreach ($patients as $key => $Dataitems ) @php $checking_lists = displayPatientsRequestToLabSpecialist($Dataitems['id']); @endphp @endforeach @endif
S/No Name TB Test Type Reason Sputum test type Other checks Date TimeAction
{{ $key+1 }} {{ $Dataitems['Fname']. ' '.$Dataitems['Lname'] }} @foreach ($checking_lists as $items) @endforeach
{{ $items['sample_name'] }}
@foreach ($checking_lists as $items) @endforeach
{{ $items['reason_name'] }}
@foreach ($checking_lists as $items) @if($items['sputum_test_type']) @php $sputum_test_type = getSputumTestTypeIfExist($items['sputum_test_type']); @endphp @foreach ($sputum_test_type as $sputum_test_item) @endforeach @else @endif @endforeach
{{ $sputum_test_item['test_name'] }}
----
@foreach ($checking_lists as $items) @endforeach
@if($items['hiv_testing']) HIV, @endif {{ $items['comment_on_checking_reason'] }}
@foreach ($checking_lists as $items) @endforeach
{{ \Carbon\Carbon::parse($items['date_requested'])->format("d M Y") }}
@foreach ($checking_lists as $items) @endforeach
{{ \Carbon\Carbon::parse($items['date_requested'])->format('h:i A') }}
@if(auth()->user()->hasRole('ls')) @foreach ($checking_lists as $items) @if($items['sample_name'] !== "Chest x-ray") @if($items['status'] == false) @else @endif @else @endif @endforeach @else @endif
{{ __('Next') }} {{ __('No Action') }} No Access!
No acces!
@endrole @role('xt')

Requests

@php $patients = []; try { $user = Auth::user()->uuids; $mdID = \App\Models\ClinicStaff::where(['user_id' => $user])->select('clinic_id')->firstOrFail()->toArray(); $patients = getPatientCheckRequest($mdID['clinic_id']); } catch (\Throwable $th) { //throw $th; echo ''.$th->getMessage().''; } @endphp

Total Request: @if($patients) {{ count($patients) }} @else {{ __(0) }} @endif

@role('xt') @endrole @if($patients) {{ __('No Action') }} @foreach ($patients as $key => $Dataitems ) @php $checking_lists = displayPatientsRequestToLabSpecialist($Dataitems['id']); @endphp @endforeach @endif
S/No Name TB Test Type Reason Sputum test type Other checks Date TimeAction
{{ $key+1 }} {{ $Dataitems['Fname']. ' '.$Dataitems['Lname'] }} @foreach ($checking_lists as $items) @endforeach
{{ $items['sample_name'] }}
@foreach ($checking_lists as $items) @endforeach
{{ $items['reason_name'] }}
@foreach ($checking_lists as $items) @if($items['sputum_test_type']) @php $sputum_test_type = getSputumTestTypeIfExist($items['sputum_test_type']); @endphp @foreach ($sputum_test_type as $sputum_test_item) @endforeach @else @endif @endforeach
{{ $sputum_test_item['test_name'] }}
----
@foreach ($checking_lists as $items) @endforeach
@if($items['hiv_testing']) HIV, @endif {{ $items['comment_on_checking_reason'] }}
@foreach ($checking_lists as $items) @endforeach
{{ \Carbon\Carbon::parse($items['date_requested'])->format("d M Y") }}
@foreach ($checking_lists as $items) @endforeach
{{ \Carbon\Carbon::parse($items['date_requested'])->format('h:i A') }}
@if(auth()->user()->hasRole('xt')) @foreach ($checking_lists as $items) @if($items['sample_name'] === "Chest x-ray") @if($items['status'] == false) @else @endif @else @endif @endforeach @else @endif
{{ __('Next') }} {{ __('No Action') }} No Access!
No acces!
@endrole @role('md')

TB checking requests

@php $patients = []; try { $user = Auth::user()->uuids; $mdID = \App\Models\ClinicStaff::where(['user_id' => $user])->select('clinic_id')->firstOrFail()->toArray(); $patients = displayPatientsRequestToMD($mdID['clinic_id']); } catch (\Throwable $th) { //throw $th; echo ''.$th->getMessage().''; } @endphp
@if($patients) @foreach ($patients as $key => $Dataitems ) @if($Dataitems['recorder'] == $user) @php $checking_list_data = getCheckingListsData($Dataitems['id']); @endphp {{-- @dd($checking_list_data) --}} @endif @endforeach @endif
S/No Name Request Testing Information
TB Test Type Sputum Test Type Other checks Date Action
{{ $key+1 }} {{ $Dataitems['Fname']. ' '.$Dataitems['Lname'] }} @foreach ($checking_list_data as $items) @endforeach
{{ $items['sample_name_to_checked'] }}
@foreach ($checking_list_data as $items) @if($items['sputum_test_type']) @php $sputum_test_type =getSputumTestTypeIfExist($items['sputum_test_type']); @endphp @foreach ($sputum_test_type as $sputum_test_item) @endforeach @else @endif @endforeach
{{ $sputum_test_item['test_name'] }}
----
@foreach ($checking_list_data as $items) @endforeach
@if($items['hiv_testing']) HIV, @endif {{ $items['comment_on_checking_reason'] }}
@foreach ($checking_list_data as $items) @endforeach
{{ \Carbon\Carbon::parse($items['date_requested'])->toFormattedDateString() }}
@foreach ($checking_list_data as $items) @if($items['status'] == false) @elseif($items['status'] == true) @endif @endforeach
{{ __('Re-request') }}
@endrole @endauth