Overview
The Waste (Merma) model tracks production losses, shrinkage, and waste during the manufacturing process. Each waste record is associated with a specific production batch and categorized by type.TypeScript Definition
Fields
Unique identifier for the waste record. Auto-generated UUID.Database: Primary key, UUID format
Type/category of waste or loss.Enum Values:
Natural- Natural losses (evaporation, moisture loss, fermentation)Tecnica- Technical losses (equipment malfunction, process errors)Administrativa- Administrative losses (inventory adjustments, miscounts)Danio- Damage losses (spoilage, contamination, physical damage)
Optional notes or description of the waste incident.Nullable: Can be null or emptyUsage: Provides context for waste analysis and improvementExamples:
- “Evaporación durante proceso de maduración”
- “Falla en equipo de refrigeración”
- “Producto dañado durante transporte interno”
Quantity of product lost or wasted.Type: Decimal number for precise measurementsUnit: Uses the same unit as the parent production batch (kg or litros)Example: 5.25, 12.50, 0.75
Timestamp when the waste record was created.Default: Current timestampFormat: ISO 8601 datetime stringUsage: Tracks when losses were identified or occurred
Foreign key reference to the production batch affected by this waste.Database: Foreign key to LoteProduccion(idLote)Relation: Many-to-One with ProductionBatch
Relationships
Example Response
Example: Multiple Waste Records
Example: Minimal Response
Waste Types Explained
Natural (Natural)
Natural production losses that are expected and inherent to the manufacturing process. Common Examples:- Evaporation during heating processes
- Moisture loss during aging/maturation
- Whey separation in cheese production
- Natural fermentation losses
- Predictable and recurring
- Can be estimated based on historical data
- Typically unavoidable but can be minimized
Technical (Técnica)
Losses caused by technical issues, equipment failures, or process problems. Common Examples:- Equipment malfunction or breakdown
- Temperature control failures
- Mixing or blending errors
- Pasteurization issues
- Timing errors in production process
- Often preventable with proper maintenance
- May indicate need for equipment upgrades
- Requires root cause analysis
Administrative (Administrativa)
Losses due to administrative errors, inventory discrepancies, or documentation issues. Common Examples:- Inventory counting errors
- Incorrect batch recording
- Mislabeling corrections
- Data entry mistakes
- Stock reconciliation adjustments
- Usually non-physical losses
- Indicates need for process improvement
- Can be reduced with better systems
Damage (Daño)
Losses due to spoilage, contamination, or physical damage to the product. Common Examples:- Microbial contamination
- Spoilage due to temperature abuse
- Physical damage during handling
- Packaging failures
- Foreign object contamination
- Product defects requiring disposal
- Often requires immediate action
- May have food safety implications
- Should be documented for regulatory compliance
Usage Notes
Waste Tracking Workflow
- Production batch is created
- During or after production, losses are identified
- Waste record created with appropriate type and quantity
- Observations document the cause and context
- Data used for cost analysis and process improvement
Cost Impact Analysis
- Waste reduces effective yield from production batch
- Total waste per batch: sum of all
cantidadvalues - Net production = batch
cantidad- total waste - Per-unit cost increases with higher waste percentages
Process Improvement
- Analyze waste by type to identify improvement areas
- Track waste trends over time
- Natural waste may indicate need for process optimization
- Technical waste suggests maintenance or equipment issues
- Administrative waste points to documentation improvements
- Damage waste may require quality control enhancements
Reporting and Analytics
- Calculate waste percentage: (total waste / batch quantity) × 100
- Compare waste rates across products, establishments, time periods
- Identify high-waste batches for investigation
- Track effectiveness of waste reduction initiatives
Best Practices
- Record waste as soon as it’s identified
- Always include detailed observations for non-natural waste
- Use consistent measurement units (matching parent batch)
- Review waste records during batch finalization
- Regularly analyze waste patterns for continuous improvement
