feat(ofsted): add Report Card system support alongside legacy OEIF grades
All checks were successful
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 47s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 1m11s
Build and Push Docker Images / Build Integrator (push) Successful in 58s
Build and Push Docker Images / Build Kestra Init (push) Successful in 32s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s

Ofsted replaced single overall grades with Report Cards from Nov 2025.
Both systems are retained during the transition period.

- DB: new framework + 9 RC columns on ofsted_inspections (schema v4)
- Integrator: auto-detect OEIF vs Report Card from CSV column headers;
  parse 5-level RC grades and safeguarding met/not-met
- API: expose all new fields in the ofsted response dict
- Frontend: branch on framework='ReportCard' to show safeguarding badge
  + 8-category grid; fall back to legacy OEIF layout otherwise;
  always show inspection date in both layouts
- CSS: rcGrade1–5 and safeguardingMet/NotMet classes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-25 13:03:04 +00:00
parent f5aceb1b54
commit 1c49a135c4
9 changed files with 325 additions and 69 deletions

View File

@@ -65,6 +65,10 @@ export interface School {
// ============================================================================
export interface OfstedInspection {
framework: 'OEIF' | 'ReportCard' | null;
inspection_date: string | null;
inspection_type: string | null;
// OEIF fields (old framework, pre-Nov 2025)
overall_effectiveness: 1 | 2 | 3 | 4 | null;
quality_of_education: number | null;
behaviour_attitudes: number | null;
@@ -72,8 +76,17 @@ export interface OfstedInspection {
leadership_management: number | null;
early_years_provision: number | null;
previous_overall: number | null;
inspection_date: string | null;
inspection_type: string | null;
// Report Card fields (new framework, from Nov 2025)
// 1=Exceptional 2=Strong 3=Expected standard 4=Needs attention 5=Urgent improvement
rc_safeguarding_met: boolean | null;
rc_inclusion: number | null;
rc_curriculum_teaching: number | null;
rc_achievement: number | null;
rc_attendance_behaviour: number | null;
rc_personal_development: number | null;
rc_leadership_governance: number | null;
rc_early_years: number | null;
rc_sixth_form: number | null;
}
export interface OfstedParentView {