Overview
The RCA (Root Cause Analysis) module provides structured investigation tools including 5 Whys, Logic Tree, and Fishbone (Ishikawa) diagram templates. All RCA data is stored in browser localStorage.
The RCA module stores data locally in the browser, not via the backend API. This means RCA records are device-specific and not synchronized across users.
RcaRecord
Main type representing a complete Root Cause Analysis investigation.
export interface RcaRecord {
id : string ;
rcaId ?: string ;
title : string ;
template ?: RcaTemplateType ;
problemStatement ?: string ;
nodes : RcaChartNode [];
edges : RcaChartEdge [];
status ?: RcaStatus ;
statusHistory ?: RcaStatusHistoryItem [];
// Header fields
assetId ?: string ;
assetName ?: string ;
departmentId ?: string ;
departmentName ?: string ;
eventDate ?: string ;
initiatedAt ?: string ;
initiatedById ?: string ;
initiatedByName ?: string ;
rcaLeaderId ?: string ;
rcaLeaderName ?: string ;
severityLevel ?: RcaActionPriority ;
productionImpactHours ?: number ;
estimatedCostImpact ?: number ;
// Failure modes and root causes
failureModeIds ?: string [];
failureModes ?: RcaFailureModeRef [];
rootCauseIds ?: string [];
rootCauses ?: RcaRootCauseRef [];
// Template-specific data
rca5WhysEntries ?: Rca5WhysEntry [];
fishboneEntries ?: RcaFishboneEntry [];
// Actions and solutions
actions ?: RcaAction [];
solutions ?: RcaSolutionItem [];
// Additional details
evidence ?: RcaEvidenceItem [];
problemStatementDetails ?: RcaProblemStatement ;
finalReport ?: RcaFinalReport ;
// Legacy fields
mapLocation ?: string ;
severity ?: string ;
groups ?: string ;
notes ?: string ;
types ?: string ;
tags ?: string ;
owner ?: string ;
facilitator ?: string ;
teamMembers ?: string [];
createdAt : string ;
updatedAt : string ;
}
Core Fields
Unique identifier for the RCA record
Display ID in format RCA-YYYY-XXXX (e.g., “RCA-2024-0001”)
Title of the investigation
Investigation method: "5whys", "logic-tree", or "fishbone"
Array of nodes in the RCA diagram (see RcaChartNode type below)
Array of edges connecting nodes (see RcaChartEdge type below)
Current status: "Draft", "Investigation", "Review", "Actions Open", "Verification", or "Closed"
Array of corrective/preventive actions (see RcaAction type below)
RcaTemplateType
Investigation methodology used for the RCA.
export type RcaTemplateType = "5whys" | "logic-tree" | "fishbone" | "sologic" ;
5 Whys
Logic Tree
Fishbone
5 Whys Method Iteratively ask “Why?” to drill down to root causes:
Why did the problem occur?
Why did that happen?
Why did that happen?
Why did that happen?
Why did that happen?
Typically reaches root cause within 5 iterations. Logic Tree / Fault Tree Analysis Systematic breakdown using logical gates:
Hypothesis-driven investigation
Evidence-based validation
Status tracking: Confirmed, Rejected, Pending
Supports complex multi-causal problems
Fishbone / Ishikawa Diagram Categorizes causes using the 6M framework:
Man : Human factors
Machine : Equipment issues
Method : Process problems
Material : Material defects
Measurement : Inspection/measurement errors
Environment : Environmental factors
RcaStatus
Lifecycle status of an RCA investigation.
export type RcaStatus =
| "Draft"
| "Investigation"
| "Review"
| "Actions Open"
| "Verification"
| "Closed" ;
Status Workflow
Draft
Initial creation, problem statement being defined
Investigation
Active investigation, building cause-and-effect diagram
Review
Investigation complete, findings under review
Actions Open
Corrective actions identified and assigned
Verification
Actions completed, effectiveness being verified
Closed
RCA complete, actions verified, lessons learned documented
RcaChartNode
Represents a node (cause, effect, or problem) in the RCA diagram.
export interface RcaChartNode {
id : string ;
type ?: string ;
position : { x : number ; y : number };
data : RcaNodeData ;
}
Node type for rendering (implementation-specific)
X/Y coordinates for diagram layout
Node content and metadata (see RcaNodeData below)
RcaNodeData
Data stored in an RCA diagram node.
export interface RcaNodeData extends Record < string , unknown > {
label : string ;
type ?: RcaNodeType ;
color ?: string ;
solutions ?: RcaNodeSolution [];
hypothesis ?: string ;
evidenceStatus ?: "Confirmed" | "Rejected" | "Pending" ;
supportingEvidence ?: string ;
}
Node label text (the cause, effect, or problem description)
Node classification: "problem", "why", "cause", or "effect"
Display color for the node
Solutions attached to this cause node
Logic Tree: hypothesis statement for this branch
evidenceStatus
'Confirmed' | 'Rejected' | 'Pending'
Logic Tree: validation status of this hypothesis
Logic Tree: evidence supporting or refuting the hypothesis
RcaChartEdge
Represents a connection between two nodes in the RCA diagram.
export interface RcaChartEdge {
id : string ;
source : string ;
target : string ;
}
RcaAction
Corrective, preventive, or systemic action to address root causes.
export interface RcaAction {
id : string ;
actionType : RcaActionType ;
description : string ;
ownerId ?: string ;
ownerName ?: string ;
departmentId ?: string ;
departmentName ?: string ;
dueDate ?: string ;
priority : RcaActionPriority ;
status : RcaActionStatus ;
verificationRequired : boolean ;
verifiedById ?: string ;
verifiedByName ?: string ;
verificationDate ?: string ;
effectivenessReviewDate ?: string ;
createdAt : string ;
}
Fields
Type of action: "Corrective", "Preventive", or "Systemic"
Corrective : Fixes the immediate problem
Preventive : Prevents recurrence
Systemic : Addresses underlying system/process issues
Detailed description of the action to be taken
ID of the person responsible for completing the action
ID of the department responsible
Name of the responsible department
Target completion date (ISO 8601 format)
priority
RcaActionPriority
required
Priority level: "Low", "Medium", "High", or "Critical"
Current status: "Open", "In Progress", "Completed", "Verified", or "Overdue"
Whether this action requires verification after completion
ID of the person who verified the action
Date when action was verified
Date for reviewing action effectiveness
Rca5WhysEntry
Table row entry for 5 Whys analysis.
export interface Rca5WhysEntry {
id : string ;
level : number ;
statement : string ;
evidenceReference ?: string ;
}
The answer to “Why?” at this level
Reference to supporting evidence
RcaFishboneEntry
Entry in a Fishbone diagram categorized by 6M framework.
export interface RcaFishboneEntry {
id : string ;
category : RcaFishboneCategory ;
causeDescription : string ;
evidence ?: string ;
}
category
RcaFishboneCategory
required
6M category: "Man", "Machine", "Method", "Material", "Measurement", or "Environment"
Description of the contributing cause
Supporting evidence for this cause
RcaFailureModeRef
Reference to a failure mode from a master table.
export interface RcaFailureModeRef {
id : string ;
category : string ;
name : string ;
}
Category of failure (e.g., “Mechanical”, “Electrical”, “Operational”)
Failure mode name (e.g., “Bearing Failure”, “Seal Leak”, “Overheating”)
RcaRootCauseRef
Reference to a root cause from a master table.
export interface RcaRootCauseRef {
id : string ;
category : string ;
description : string ;
}
Category (e.g., “Design”, “Maintenance”, “Operation”, “Environment”)
Description of the root cause
RcaProblemStatement
Structured problem statement following the 5W2H framework.
export interface RcaProblemStatement {
focalPoint ?: string ;
startDate ?: string ;
endDate ?: string ;
startTime ?: string ;
endTime ?: string ;
uniqueTiming ?: string ;
mapLocation ?: string ;
businessUnit ?: string ;
location ?: string ;
productClass ?: string ;
resourceType ?: string ;
actualImpact ?: { category : string ; description ?: string ; cost ?: string }[];
potentialImpact ?: { category : string ; description ?: string ; cost ?: string }[];
investigationCosts ?: string ;
actualImpactTotal ?: string ;
potentialImpactTotal ?: string ;
frequency ?: string ;
frequencyUnit ?: string ;
frequencyNotes ?: string ;
}
This structured format captures:
What : Focal point, product/resource affected
When : Start/end dates and times, frequency
Where : Location, business unit, map location
Who : (Captured in main RcaRecord fields)
How : (Captured in investigation diagram)
How Much : Actual and potential impact costs
Usage Example
import type {
RcaRecord ,
RcaAction ,
Rca5WhysEntry ,
RcaChartNode
} from '@/types' ;
// Create a new 5 Whys RCA
const rca : RcaRecord = {
id: crypto . randomUUID (),
rcaId: 'RCA-2024-0001' ,
title: 'Pump Bearing Failure - Asset P-101' ,
template: '5whys' ,
status: 'Investigation' ,
assetName: 'Centrifugal Pump P-101' ,
assetId: 'asset_456' ,
eventDate: '2024-03-01' ,
initiatedByName: 'John Smith' ,
severityLevel: 'High' ,
problemStatement: 'Main bearing on pump P-101 failed after 6 months in service' ,
// 5 Whys entries
rca5WhysEntries: [
{
id: '1' ,
level: 1 ,
statement: 'Why did the bearing fail? - Excessive copper wear detected in oil sample' ,
evidenceReference: 'Sample S-2024-001: 85 ppm Cu'
},
{
id: '2' ,
level: 2 ,
statement: 'Why was copper wear excessive? - Bearing running hot (>80°C)' ,
evidenceReference: 'Thermal inspection report'
},
{
id: '3' ,
level: 3 ,
statement: 'Why was bearing running hot? - Insufficient lubrication flow' ,
evidenceReference: 'Lubrication system pressure log'
},
{
id: '4' ,
level: 4 ,
statement: 'Why was lubrication flow insufficient? - Wrong oil grade used' ,
evidenceReference: 'Oil grade: ISO 46 (should be ISO 68)'
},
{
id: '5' ,
level: 5 ,
statement: 'Why was wrong oil used? - Incorrect specification in maintenance procedure' ,
evidenceReference: 'Maintenance SOP rev 2.1'
}
],
// Nodes for diagram visualization
nodes: [
{
id: 'problem' ,
position: { x: 100 , y: 100 },
data: {
label: 'Bearing Failure' ,
type: 'problem' ,
color: '#ef4444'
}
},
// ... additional nodes for each "Why"
],
edges: [
{ id: 'e1' , source: 'problem' , target: 'why1' },
// ... additional edges
],
// Corrective actions
actions: [
{
id: 'action_1' ,
actionType: 'Corrective' ,
description: 'Update maintenance SOP with correct oil grade (ISO 68)' ,
priority: 'High' ,
status: 'Open' ,
verificationRequired: true ,
dueDate: '2024-03-15' ,
createdAt: new Date (). toISOString ()
},
{
id: 'action_2' ,
actionType: 'Preventive' ,
description: 'Implement lubrication verification checklist for all pumps' ,
priority: 'Medium' ,
status: 'Open' ,
verificationRequired: true ,
dueDate: '2024-03-30' ,
createdAt: new Date (). toISOString ()
}
],
createdAt: new Date (). toISOString (),
updatedAt: new Date (). toISOString ()
};
// Save to localStorage
localStorage . setItem ( `rca_ ${ rca . id } ` , JSON . stringify ( rca ));
Recommendation Types RCA findings generate recommendations
Inventory Types RCA records reference specific assets