Dashboard
@include('layouts.error')
@php
$patientSafetyReportCount = $savedReports->where('dashboard', 'patient_safety_incidents')->count();
$patientSafetyGraphCount = $savedGraphs->filter(function ($graph) {
$sections = $graph->dashboard_section;
return is_array($sections) && in_array('patient_safety_incidents', $sections);
})->count();
@endphp
@if ($patientSafetyReportCount > 0 || $patientSafetyGraphCount > 0)
@php
$sections = $savedReports
->where('dashboard', 'MDSCF')
->pluck('section')
->unique();
@endphp
@foreach ($sections as $section)
@php
$mdsReportCount = $savedReports->where('dashboard', 'MDS')->count();
$mdsGraphCount = $savedGraphs->filter(function ($graph) {
$sections = $graph->dashboard_section;
return is_array($sections) && in_array('MDS', $sections);
})->count();
@endphp
@if ($mdsReportCount > 0 || $mdsGraphCount > 0)
@php
$sections = $savedReports
->where('dashboard', 'MDS')
->pluck('section')
->unique();
@endphp
@foreach ($sections as $section)
@endif
@php
$centralFulfillmentReportCount = $savedReports->where('dashboard', 'central_fulfillment')->count();
$centralFulfillmentGraphCount = $savedGraphs->filter(function ($graph) {
$sections = $graph->dashboard_section;
return is_array($sections) && in_array('central_fulfillment', $sections);
})->count();
@endphp
@if ($centralFulfillmentReportCount > 0 || $centralFulfillmentGraphCount > 0)
{{--
@php
$sections = $savedReports
->where('dashboard', 'patient_safety_incidents')
->pluck('section')
->unique();
@endphp
@foreach ($sections as $section)
@endif
@php
$controlledDrugReportCount = $savedReports->where('dashboard', 'controlled_drug_management')->count();
$controlledDrugGraphCount = $savedGraphs->filter(function ($graph) {
$sections = $graph->dashboard_section;
return is_array($sections) && in_array('controlled_drug_management', $sections);
})->count();
@endphp
@if ($controlledDrugReportCount > 0 || $controlledDrugGraphCount > 0)
--}}
{{--
--}}
Near Miss
Near Miss By Type
Dispensed Items
{{ $section }} Reports
@include('head_office.reports', [ 'reports' => $savedReports, 'dashboard' => 'patient_safety_incidents', 'section' => $section, ]) @endforeach
@php
$sections = $savedReports
->where('dashboard', 'controlled_drug_management')
->pluck('section')
->unique();
@endphp
@foreach ($sections as $section)
@endif
{{ $section }}
@include('head_office.reports', [ 'reports' => $savedReports, 'dashboard' => 'controlled_drug_management', 'section' => $section, ]) @endforeach{{ $section }}
@include('head_office.reports', [ 'reports' => $savedReports, 'dashboard' => 'MDSCF', 'section' => $section, ]) @endforeach{{ $section }}
@include('head_office.reports', [ 'reports' => $savedReports, 'dashboard' => 'MDS', 'section' => $section, ]) @endforeach
@php
$sections = $savedReports
->where('dashboard', 'central_fulfillment')
->pluck('section')
->unique();
@endphp
@foreach ($sections as $section)
@endif
@php
$freedomToSpeakUpReportCount = $savedReports->where('dashboard', 'freedom_to_speak_up')->count();
$freedomToSpeakUpGraphCount = $savedGraphs->filter(function ($graph) {
$sections = $graph->dashboard_section;
return is_array($sections) && in_array('freedom_to_speak_up', $sections);
})->count();
@endphp
@if ($freedomToSpeakUpReportCount > 0 || $freedomToSpeakUpGraphCount > 0)
{{ $section }}
@include('head_office.reports', [ 'reports' => $savedReports, 'dashboard' => 'central_fulfillment', 'section' => $section, ]) @endforeach
@php
$sections = $savedReports
->where('dashboard', 'freedom_to_speak_up')
->pluck('section')
->unique();
@endphp
@foreach ($sections as $section)
@endif
@php
$pharmacyPremisesReportCount = $savedReports->where('dashboard', 'pharmacy_premises_inspection')->count();
$pharmacyPremisesGraphCount = $savedGraphs->filter(function ($graph) {
$sections = $graph->dashboard_section;
return is_array($sections) && in_array('pharmacy_premises_inspection', $sections);
})->count();
@endphp
@if ($pharmacyPremisesReportCount > 0 || $pharmacyPremisesGraphCount > 0)
{{ $section }}
@include('head_office.reports', [ 'reports' => $savedReports, 'dashboard' => 'freedom_to_speak_up', 'section' => $section, ]) @endforeach
@php
$sections = $savedReports
->where('dashboard', 'pharmacy_premises_inspection')
->pluck('section')
->unique();
@endphp
@foreach ($sections as $section)
@endif
@php
$nhsAndIgReportCount = $savedReports->where('dashboard', 'nhs_and_iG')->count();
$nhsAndIgGraphCount = $savedGraphs->filter(function ($graph) {
$sections = $graph->dashboard_section;
return is_array($sections) && in_array('nhs_and_iG', $sections);
})->count();
@endphp
@if ($nhsAndIgReportCount > 0 || $nhsAndIgGraphCount > 0)
{{ $section }}
@include('head_office.reports', [ 'reports' => $savedReports, 'dashboard' => 'pharmacy_premises_inspection', 'section' => $section, ]) @endforeach
@php
$sections = $savedReports->where('dashboard', 'nhs_and_iG')->pluck('section')->unique();
@endphp
@foreach ($sections as $section)
@endif
@php
$fieldManagersReportCount = $savedReports->where('dashboard', 'Field_Managers')->count();
$fieldManagersGraphCount = $savedGraphs->filter(function ($graph) {
$sections = $graph->dashboard_section;
return is_array($sections) && in_array('Field_Managers', $sections);
})->count();
@endphp
@if ($fieldManagersReportCount > 0 || $fieldManagersGraphCount > 0)
{{ $section }}
@include('head_office.reports', [ 'reports' => $savedReports, 'dashboard' => 'nhs_and_iG', 'section' => $section, ]) @endforeach
@php
$sections = $savedReports->where('dashboard', 'Field_Managers')->pluck('section')->unique();
@endphp
@foreach ($sections as $section)
@endif