# Phase 5: IPM & Plant Health - Implementation Plan ## Goal Implement a robust Integrated Pest Management (IPM) system to track plant health, schedule preventative treatments, and visualize pest pressure over time. ## 🏃 Sprint 1: IPM Scheduling Engine **Objective**: Automate preventative care. - **Backend**: - `IPMSchedulesController`: operationalize the `IPMSchedule` model. - Logic to auto-generate `Tasks` based on the schedule (e.g. "Spray Pyganic" every 3 days). - **Frontend**: - **IPM Manager**: View to set up treatment plans for Batches (Product, Dosage, Interval). - **Schedule Visualization**: Calendar view specifically for Spray/IPM events. ## 🏃 Sprint 2: Scouting & Health Tracking **Objective**: Record detailed observations. - **Backend**: - Enhance `PlantTouchPoint` or create dedicated `scouting` endpoints. - Track `severity` (Low/Med/High) and `pestType` (Mites, Thrips, PM, etc.). - **Frontend**: - **Scouting Form**: specialized modal for logging health checks (separate from generic "Touch Points"). - **Photo Upload**: seamless photo attachment for evidence. ## 🏃 Sprint 3: Health History & Analysis **Objective**: Visualizing the data. - **Frontend**: - **Batch Health History**: A timeline or chart on the Batch Detail view showing health events. - **Pest Pressure Heatmap**: (Stretch goal) Visual indicator of rooms with high pest activity. --- ## Technical Dependencies - `IPMSchedule` model exists in Prisma. - `PlantTouchPoint` model exists but might need refinement for "Scouting" specific fields if not already covered. - Need to integrate with the Task system created in Phase 4 (Scouting/Spraying should be Tasks).