@extends('layouts.app') @section('title', 'Root Cause Analysis') @section('content')
Back to Incident

Root Cause Analysis: {{ $incident->reference_number }}

{!! $rootCauseAnalysis->getStatusBadge() !!} @if($rootCauseAnalysis->status !== 'reviewed') Edit @endif

Analysis Type

{{ ucfirst(str_replace('_', ' ', $rootCauseAnalysis->analysis_type)) }}
@if($rootCauseAnalysis->isFiveWhys())

5 Whys Analysis

@if($rootCauseAnalysis->why_1)

Why 1 (First Level)

{{ $rootCauseAnalysis->why_1 }}

@endif @if($rootCauseAnalysis->why_2)

Why 2 (Second Level)

{{ $rootCauseAnalysis->why_2 }}

@endif @if($rootCauseAnalysis->why_3)

Why 3 (Third Level)

{{ $rootCauseAnalysis->why_3 }}

@endif @if($rootCauseAnalysis->why_4)

Why 4 (Fourth Level)

{{ $rootCauseAnalysis->why_4 }}

@endif @if($rootCauseAnalysis->why_5)

Why 5 (Fifth Level)

{{ $rootCauseAnalysis->why_5 }}

@endif @if($rootCauseAnalysis->root_cause)

Root Cause Identified

{{ $rootCauseAnalysis->root_cause }}

@endif
@endif @if($rootCauseAnalysis->isFishbone())

Fishbone (Ishikawa) Analysis

@if($rootCauseAnalysis->human_factors)

Human Factors

{{ $rootCauseAnalysis->human_factors }}

@endif @if($rootCauseAnalysis->organizational_factors)

Organizational Factors

{{ $rootCauseAnalysis->organizational_factors }}

@endif @if($rootCauseAnalysis->technical_factors)

Technical Factors

{{ $rootCauseAnalysis->technical_factors }}

@endif @if($rootCauseAnalysis->environmental_factors)

Environmental Factors

{{ $rootCauseAnalysis->environmental_factors }}

@endif @if($rootCauseAnalysis->procedural_factors)

Procedural Factors

{{ $rootCauseAnalysis->procedural_factors }}

@endif @if($rootCauseAnalysis->equipment_factors)

Equipment Factors

{{ $rootCauseAnalysis->equipment_factors }}

@endif
@endif

Comprehensive Analysis

@if($rootCauseAnalysis->direct_cause)

Direct Cause

{{ $rootCauseAnalysis->direct_cause }}

@endif @if($rootCauseAnalysis->contributing_causes)

Contributing Causes

{{ $rootCauseAnalysis->contributing_causes }}

@endif @if($rootCauseAnalysis->root_causes)

Root Causes

{{ $rootCauseAnalysis->root_causes }}

@endif @if($rootCauseAnalysis->systemic_failures)

Systemic Failures

{{ $rootCauseAnalysis->systemic_failures }}

@endif @if($rootCauseAnalysis->prevention_possible)

Could This Have Been Prevented?

{{ $rootCauseAnalysis->prevention_possible }}

@endif @if($rootCauseAnalysis->lessons_learned)

Lessons Learned

{{ $rootCauseAnalysis->lessons_learned }}

@endif
@if($rootCauseAnalysis->status === 'draft' || $rootCauseAnalysis->status === 'in_progress')
@csrf
@endif @if($rootCauseAnalysis->isCompleted() && $rootCauseAnalysis->capas->count() == 0) Create CAPAs @endif
@endsection