Reason Taxonomy
The OEE system uses a two-level group-reason hierarchy for categorizing events. There are four independent taxonomies, each following the same pattern but with type-specific variations.
Shared Pattern
All taxonomies follow this structure:
graph TD Site["Site (oee_sites)"] --> Group["Groups (per site)"] Group --> Reason["Reasons (per group)"]
Group fields: id, site_id, name, sort_order, created_at, updated_at
Reason fields: id, group_id, code (unique per group), name, description, is_active, sort_order, created_at, updated_at
The Four Taxonomies
1. Downtime (Groups + Reasons)
| Table | Extra Fields |
|---|---|
oee_downtime_groups | type: 'unplanned', 'planned', or 'idle' |
oee_downtime_reasons | (none — type inherited from group) |
The type field on the group determines how the downtime affects OEE Availability calculations.
See Downtime Reason for details.
2. Incident (Groups + Reasons)
| Table | Extra Fields |
|---|---|
oee_incident_groups | (none) |
oee_incident_reasons | (none) |
Incidents track non-downtime issues with troubleshooting and resolution workflows.
See Incident Reason for details.
3. Abort (Groups + Reasons)
| Table | Extra Fields |
|---|---|
oee_abort_groups | (none) |
oee_abort_reasons | (none) |
Abort reasons explain why a batch/job was terminated before completion.
4. Scrap (Groups + Reasons)
| Table | Extra Fields |
|---|---|
oee_scrap_groups | (none) |
oee_scrap_reasons | (none) |
Scrap reasons explain why parts were rejected.
See Scrap Reason for details.
Summary Table
| Taxonomy | Group Table | Reason Table | Used By |
|---|---|---|---|
| Downtime | oee_downtime_groups | oee_downtime_reasons | oee_machine_events.downtime_reason_id |
| Incident | oee_incident_groups | oee_incident_reasons | oee_machine_events.incident_reason_id |
| Abort | oee_abort_groups | oee_abort_reasons | ops_jobs.abort_reason_id, oee_batch_details.abort_reason_id |
| Scrap | oee_scrap_groups | oee_scrap_reasons | oee_batch_details.scrap_reason_id |
Codebase Paths
- Tables:
database/sql_scripts/tables/oee_*.sql(one file per group/reason table)