@extends('layouts.app') @section('title', 'Inspection Glossary & Taxonomy - Healthcare Directory') @section('content')

Inspection Areas Glossary

Explore the structural terminology, classification categories, and audit domains used by the Care Quality Commission (CQC) to assess, inspect, and rate healthcare providers and clinics in England.

@if($error)

Taxonomy System Status

{{ $error }}

@endif @if(!empty($groupedAreas))
@php // Order statuses logically $statusOrder = ['Active' => 'Active Assessment Standards', 'Superseded' => 'Superseded Taxonomy', 'Retired' => 'Retired Terms']; @endphp @foreach($statusOrder as $statusKey => $displayHeader) @if(isset($groupedAreas[$statusKey])) @php $areas = $groupedAreas[$statusKey]; $headerClass = match($statusKey) { 'Active' => 'text-[#00825F] border-[#00825F]/20 bg-[#00825F]/5', 'Superseded' => 'text-[#D47A00] border-[#D47A00]/20 bg-[#D47A00]/5', default => 'text-[#DA291C] border-[#DA291C]/20 bg-[#DA291C]/5' }; @endphp

{{ $displayHeader }} ({{ count($areas) }})

@foreach($areas as $area)
ID: {{ $area['inspectionAreaId'] }} @if(!empty($area['inspectionAreaType'])) {{ $area['inspectionAreaType'] }} @endif

{{ $area['inspectionAreaName'] }}

@if($statusKey === 'Superseded' && !empty($area['supersededBy']))
Superseded By:
@foreach($area['supersededBy'] as $sub) {{ $sub }} @endforeach
@endif @if($statusKey === 'Retired' && !empty($area['endDate']))

Retired on: {{ date('d M Y', strtotime($area['endDate'])) }}

@endif @if(!empty($area['inspectionCategories']))
Scope of Services:
@foreach($area['inspectionCategories'] as $cat)
{{ $cat['code'] }} {{ $cat['inspectionCategoryName'] }} @if(($cat['coreFlag'] ?? 'N') === 'Y') Core @endif
@endforeach
@endif
@endforeach
@endif @endforeach
@endif @endsection