@extends('layouts.app')
@section('title', 'Compliance – ' . $mr->name)
@section('content')
{{ $mr->name }}
Period: {{ $from }} – {{ $to }}
@php $d = $detail; @endphp
Compliance score
{{ $d['score'] }}
Band
@if ($d['band'] === 'high') high
@elseif ($d['band'] === 'medium') medium
@else low
@endif
Total visits
{{ $d['total_visits'] }}
Breakdown
- In primary territory: {{ $d['in_primary'] }}
- In secondary: {{ $d['in_secondary'] }}
- Outside: {{ $d['outside'] }}
- Border ambiguous: {{ $d['border_ambiguous'] }}
- Geo unknown: {{ $d['geo_unknown'] }}
@if (!empty($d['reasons']))
Deviation reasons & evidence
@foreach ($d['reasons'] as $r)
{{ $r['label'] }}
@if (!empty($r['count']))
({{ $r['count'] }}) @endif
@if (!empty($r['evidence']))
@foreach ($r['evidence'] as $e)
- {{ $e['date'] ?? '' }} – {{ $e['doctor'] ?? '–' }} @if(!empty($e['area_resolved'])) ({{ $e['area_resolved'] }}) @endif
@endforeach
@endif
@endforeach
@endif
@endsection