Skip to main content

Overview

GIMA’s maintenance scheduling system allows you to plan and track preventive, predictive, and corrective maintenance activities across all assets in your organization.

Maintenance Types

GIMA supports three types of maintenance activities:
Tipo: preventivo

Scheduled maintenance performed at regular intervals to prevent failures and extend asset life.

Examples:
- Regular filter changes
- Lubrication schedules
- Annual inspections
- Calibration checks

Calendar Model

CalendarioMantenimiento Structure

The maintenance calendar tracks scheduled maintenance events:
class CalendarioMantenimiento extends Model
{
    protected $table = 'calendario_mantenimientos';
    
    protected $fillable = [
        'activo_id',              // Asset being maintained
        'tecnico_asignado_id',    // Assigned technician
        'tipo',                   // Maintenance type (enum)
        'fecha_programada',       // Scheduled date/time
        'descripcion',            // Work description
        'estado',                 // Current status (enum)
    ];
    
    protected $casts = [
        'fecha_programada' => 'datetime',
        'tipo' => TipoMantenimiento::class,
        'estado' => EstadoMantenimiento::class,
    ];
}

Maintenance States

Scheduled maintenance can be in one of four states:
Estado: pendiente
Description: Maintenance is scheduled but not yet started
Label: Pendiente

Typical for:
- Future scheduled work
- Awaiting resource allocation
- Not yet due

Creating Maintenance Schedules

1

Identify the asset

Determine which asset requires scheduled maintenance using its activo_id.
2

Assign a technician

Select a qualified technician using their user_id as tecnico_asignado_id.
3

Set maintenance type

Choose from preventivo, predictivo, or correctivo based on the work nature.
4

Schedule date and time

Set the fecha_programada field with the planned maintenance date.
5

Add description

Provide detailed instructions for the maintenance work to be performed.

Example Schedule Creation

Scheduling maintenance typically requires supervisor or admin roles.

Preventive Maintenance Example

Create Preventive Maintenance
{
  "activo_id": 12,
  "tecnico_asignado_id": 5,
  "tipo": "preventivo",
  "fecha_programada": "2024-04-15 09:00:00",
  "descripcion": "Cambio trimestral de filtros HVAC y limpieza de serpentines",
  "estado": "pendiente"
}

Predictive Maintenance Example

Create Predictive Maintenance
{
  "activo_id": 8,
  "tecnico_asignado_id": 7,
  "tipo": "predictivo",
  "fecha_programada": "2024-04-20 14:00:00",
  "descripcion": "Análisis de vibración en motor eléctrico basado en alertas del sistema de monitoreo",
  "estado": "pendiente"
}

Corrective Maintenance Example

Create Corrective Maintenance
{
  "activo_id": 15,
  "tecnico_asignado_id": 6,
  "tipo": "correctivo",
  "fecha_programada": "2024-04-10 08:00:00",
  "descripcion": "Reparar fuga en válvula de control identificada en inspección rutinaria",
  "estado": "pendiente"
}

Maintenance Relationships

Asset Relationship

Access the asset being maintained:
$calendario = CalendarioMantenimiento::find($id);
$activo = $calendario->activo;

// Get asset details
echo "Asset: {$activo->articulo->marca} {$activo->articulo->modelo}";
echo "Location: {$activo->ubicacion->edificio}, {$activo->ubicacion->salon}";

Technician Relationship

Access the assigned technician:
$calendario = CalendarioMantenimiento::find($id);
$tecnico = $calendario->tecnicoAsignado;

// Get technician info
echo "Assigned to: {$tecnico->name}";
echo "Email: {$tecnico->email}";

Querying Scheduled Maintenance

// Get all pending maintenance tasks
$pendientes = CalendarioMantenimiento::where('estado', 'pendiente')
    ->orderBy('fecha_programada', 'asc')
    ->get();

// Get pending tasks for specific technician
$misTareas = CalendarioMantenimiento::where('estado', 'pendiente')
    ->where('tecnico_asignado_id', $tecnico_id)
    ->with(['activo.articulo', 'activo.ubicacion'])
    ->get();

Updating Maintenance Status

Starting Maintenance Work

When a technician begins work:
Update to In Progress
{
  "estado": "en_proceso"
}
$calendario = CalendarioMantenimiento::find($id);
$calendario->estado = EstadoMantenimiento::EN_PROCESO;
$calendario->save();

// Also update asset status
$calendario->activo->estado = EstadoActivo::MANTENIMiENTO;
$calendario->activo->save();

Completing Maintenance Work

When maintenance is finished:
Update to Completed
{
  "estado": "completado"
}
$calendario = CalendarioMantenimiento::find($id);
$calendario->estado = EstadoMantenimiento::COMPLETADO;
$calendario->save();

// Return asset to operational status
$calendario->activo->estado = EstadoActivo::OPERATIVO;
$calendario->activo->save();

Cancelling Maintenance

When scheduled work needs to be cancelled:
Update to Cancelled
{
  "estado": "cancelado"
}
$calendario = CalendarioMantenimiento::find($id);
$calendario->estado = EstadoMantenimiento::CANCELADO;
$calendario->save();

Recurring Maintenance Schedules

For recurring preventive maintenance, implement a scheduling pattern:
// Create monthly preventive maintenance for 12 months
$activo_id = 12;
$tecnico_id = 5;

for ($i = 1; $i <= 12; $i++) {
    CalendarioMantenimiento::create([
        'activo_id' => $activo_id,
        'tecnico_asignado_id' => $tecnico_id,
        'tipo' => TipoMantenimiento::PREVENTIVO,
        'fecha_programada' => now()->addMonths($i)->startOfMonth()->setTime(9, 0),
        'descripcion' => 'Mantenimiento preventivo mensual - Inspección y limpieza',
        'estado' => EstadoMantenimiento::PENDIENTE,
    ]);
}

Technician Workload Management

View Technician Schedule

// Get technician's upcoming schedule
$tecnico_id = 5;
$schedule = CalendarioMantenimiento::where('tecnico_asignado_id', $tecnico_id)
    ->whereIn('estado', ['pendiente', 'en_proceso'])
    ->orderBy('fecha_programada', 'asc')
    ->with(['activo.articulo', 'activo.ubicacion'])
    ->get();

// Calculate workload
$tasksThisWeek = CalendarioMantenimiento::where('tecnico_asignado_id', $tecnico_id)
    ->whereBetween('fecha_programada', [now()->startOfWeek(), now()->endOfWeek()])
    ->count();

Reassign Maintenance Tasks

// Reassign task to different technician
$calendario = CalendarioMantenimiento::find($id);
$calendario->tecnico_asignado_id = $nuevo_tecnico_id;
$calendario->save();

// Bulk reassignment
CalendarioMantenimiento::where('tecnico_asignado_id', $tecnico_antiguo_id)
    ->where('estado', 'pendiente')
    ->update(['tecnico_asignado_id' => $nuevo_tecnico_id]);

Notifications and Reminders

Implement automated notifications to alert technicians of upcoming maintenance tasks. Consider notifications at 7 days, 1 day, and 1 hour before scheduled time.

Notification Triggers

  • 7 days before scheduled date - Initial reminder
  • 24 hours before scheduled date - Day-before reminder
  • 1 hour before scheduled time - Immediate reminder
  • When maintenance becomes overdue
  • When maintenance status changes

Best Practices

1

Plan ahead

Schedule preventive maintenance well in advance to ensure resource availability and minimize conflicts.
2

Balance workloads

Distribute maintenance tasks evenly across technicians to prevent burnout and ensure quality work.
3

Use descriptive titles

Write clear, specific descriptions that help technicians understand the work scope without additional research.
4

Track completion rates

Monitor the ratio of completed to scheduled maintenance to identify bottlenecks and resource constraints.
5

Review and adjust schedules

Regularly review maintenance schedules and adjust frequencies based on asset performance and failure patterns.
6

Document cancellations

Always document the reason when cancelling scheduled maintenance for audit and analysis purposes.

Common Workflows

Weekly Maintenance Planning

  1. Query upcoming maintenance for the next 7 days
  2. Verify technician availability and assignments
  3. Confirm spare parts availability for scheduled work
  4. Send reminder notifications to assigned technicians
  5. Review and address any overdue maintenance tasks

Daily Technician Assignment

  1. Check today’s scheduled maintenance tasks
  2. Verify each task has an assigned technician
  3. Ensure technicians have access to work descriptions
  4. Monitor task progress throughout the day
  5. Update statuses as work is completed

Asset-Based Scheduling

  1. Review asset maintenance history
  2. Determine next maintenance interval based on type
  3. Check technician availability for proposed dates
  4. Create calendar entry with appropriate details
  5. Set up recurring schedule if applicable
  6. Notify assigned technician of new schedule
Integration with the Mantenimiento (work order) system ensures that completed calendar items automatically generate detailed maintenance records with costs, parts used, and work performed.

Build docs developers (and LLMs) love