Skip to main content

Incident

Represents a quality or operational incident requiring tracking and resolution.
id
string
required
Unique incident identifier
code
string
required
Human-readable incident code (e.g., INC-2026-001)
title
string
required
Brief title describing the incident
description
string
required
Detailed description of the incident
priority
IncidentPriority
required
Priority level of the incidentAvailable priorities:
  • Alta - High priority
  • Media - Medium priority
  • Baja - Low priority
type
IncidentType
required
Type/category of the incidentAvailable types:
  • Calidad - Quality issue
  • Seguridad - Safety issue
  • Maquinaria - Machinery/equipment issue
  • Material - Material/supply issue
  • Otro - Other type
status
IncidentStatus
required
Current status of the incidentAvailable statuses:
  • Abierta - Open/newly reported
  • En Análisis - Under analysis
  • Acción Correctiva - Corrective action being taken
  • Cerrada - Closed/resolved
otRef
string
Reference to related work order (OT), if applicable
machineRef
string
Reference to related machine, if applicable
reportedBy
string
required
Name of the user who reported the incident
reportedAt
Date
required
Date and time when the incident was reported
assignedTo
string
required
User assigned to resolve the incident
rootCause
string
Identified root cause of the incident (filled during analysis)
actions
CapaAction[]
required
Array of corrective and preventive actions (CAPA)

CapaAction

Represents a Corrective or Preventive Action within an incident.
id
string
required
Unique action identifier
description
string
required
Detailed description of the action to be taken
type
'Correctiva' | 'Preventiva'
required
Type of action
  • Correctiva - Corrective action (fixes the current issue)
  • Preventiva - Preventive action (prevents future occurrences)
responsible
string
required
User responsible for executing the action
deadline
string
required
Deadline for completing the action (ISO date format)
completed
boolean
required
Whether the action has been completed

IncidentPriority

Type definition for incident priority levels.
type IncidentPriority = 'Alta' | 'Media' | 'Baja';
Alta
string
High priority - requires immediate attention
Media
string
Medium priority - should be addressed soon
Baja
string
Low priority - can be addressed in normal workflow

IncidentType

Type definition for incident categories.
type IncidentType = 'Calidad' | 'Seguridad' | 'Maquinaria' | 'Material' | 'Otro';
Calidad
string
Quality-related incident (defects, non-conformances, etc.)
Seguridad
string
Safety incident (workplace safety, hazards, etc.)
Maquinaria
string
Machinery/equipment incident (breakdowns, malfunctions, etc.)
Material
string
Material/supply incident (defective materials, shortages, etc.)
Otro
string
Other type not covered by standard categories

IncidentStatus

Type definition for incident workflow status.
type IncidentStatus = 'Abierta' | 'En Análisis' | 'Acción Correctiva' | 'Cerrada';
Abierta
string
Incident has been opened and is awaiting initial review
En Análisis
string
Incident is being analyzed to determine root cause
Acción Correctiva
string
Corrective actions are being implemented
Cerrada
string
Incident has been resolved and closed

Usage Example

import { Incident, CapaAction, IncidentPriority, IncidentType, IncidentStatus } from './models/quality.models';

const incident: Incident = {
  id: 'inc-12345',
  code: 'INC-2026-045',
  title: 'Defecto de impresión en etiquetas lote L-2026-150',
  description: 'Se detectaron manchas de tinta en aproximadamente 500 etiquetas del lote L-2026-150. El defecto aparece en la zona superior izquierda.',
  priority: 'Alta',
  type: 'Calidad',
  status: 'En Análisis',
  otRef: 'OT-2026-0150',
  machineRef: 'IMP-01',
  reportedBy: 'Juan Pérez',
  reportedAt: new Date('2026-03-09T14:30:00Z'),
  assignedTo: 'María García',
  rootCause: 'Exceso de presión en cilindro anilox, causando transferencia excesiva de tinta',
  actions: [
    {
      id: 'act-001',
      description: 'Ajustar presión del cilindro anilox a especificaciones del fabricante',
      type: 'Correctiva',
      responsible: 'Carlos Técnico',
      deadline: '2026-03-10',
      completed: false
    },
    {
      id: 'act-002',
      description: 'Implementar checklist de verificación de presiones antes de cada turno',
      type: 'Preventiva',
      responsible: 'Juan Pérez',
      deadline: '2026-03-15',
      completed: false
    },
    {
      id: 'act-003',
      description: 'Capacitar a operadores en ajustes correctos de presión',
      type: 'Preventiva',
      responsible: 'María García',
      deadline: '2026-03-20',
      completed: false
    }
  ]
};

// Creating a new CAPA action
const newAction: CapaAction = {
  id: 'act-004',
  description: 'Realizar mantenimiento preventivo mensual del sistema de entintado',
  type: 'Preventiva',
  responsible: 'Departamento Mantenimiento',
  deadline: '2026-04-01',
  completed: false
};

// Add action to incident
incident.actions.push(newAction);

// Update incident status when actions are implemented
incident.status = 'Acción Correctiva';

// Close incident when all actions are completed
if (incident.actions.every(action => action.completed)) {
  incident.status = 'Cerrada';
}

CAPA Workflow

The typical workflow for handling incidents with CAPA actions:
  1. Report Incident - Create incident with status: 'Abierta'
  2. Analyze - Update to status: 'En Análisis', identify root cause
  3. Plan Actions - Add CAPA actions (both Correctiva and Preventiva)
  4. Execute - Update to status: 'Acción Correctiva', implement actions
  5. Verify - Mark actions as completed: true
  6. Close - Update to status: 'Cerrada' when all actions complete
The CAPA system ensures systematic root cause analysis and prevents recurrence through both corrective (fixing current issues) and preventive (avoiding future issues) actions.

Build docs developers (and LLMs) love