Skip to content

Preventive Maintenance: Get Started

This walkthrough enables PM scheduling on the demo instance and creates a first plan for a piece of equipment. It takes about 5 minutes.

Prerequisites

  • HEMMS is installed and you can log in as an admin
  • At least one equipment record exists in :menuselection:Maintenance --> Equipment
  • The companion modules are installed:
    • maintenance_plan (OCA)
    • roots_hemms_workflow
    • roots_hemms_asset_master

Step 1 — Install the module

  1. Open :menuselection:Apps
  2. Click :guilabel:Update Apps List (top action menu)
  3. Search for "Roots HEMMS — Preventive Maintenance for Hospitals"
  4. Click :guilabel:Activate

After installation:

  • 3 maintenance kinds are seeded under :menuselection:Maintenance --> Configuration --> Maintenance Kinds
  • 1 new stage "PM Scheduled (ตามแผนบำรุงรักษา)" appears in the kanban as the leftmost column

Step 2 — Verify the seed data

Go to :menuselection:Maintenance --> Configuration --> Maintenance Kinds

You should see three kinds (and possibly two demo kinds from OCA — "Weekly" and "Monthly" — which you can archive if not needed):

English name Thai name
Calibration การสอบเทียบ
Safety Inspection ตรวจสอบความปลอดภัย
General Preventive Maintenance บำรุงรักษาเชิงป้องกันทั่วไป

Step 3 — Create your first PM plan

  1. Open :menuselection:Maintenance --> Equipment and click an equipment record (e.g., a Vital Signs Monitor)
  2. Click the Preventive Maintenance tab (or click the :guilabel:Maintenance Plans smart button if shown)
  3. Click :guilabel:Add a line (or :guilabel:Create)
  4. Fill in:
    • Description — e.g., "Quarterly calibration"
    • Maintenance Kind — pick "Calibration"
    • Frequency3
    • RecurrenceMonth(s)
    • Start Maintenance Date — today
    • Planning Horizon period6 months (how far ahead requests are auto-created)
  5. Save

You've defined: "Run a Calibration on this equipment every 3 months, generate requests up to 6 months in advance."

Step 4 — Generate the first PM request manually

The cron job auto-runs daily, but you can trigger it once for testing:

  1. Open :menuselection:Settings --> Technical --> Scheduled Actions
  2. Find "Maintenance: generate preventive maintenance requests"
  3. Click :guilabel:Run Manually

Step 5 — See the new PM request

  1. Open :menuselection:Maintenance --> Maintenance Requests
  2. Switch to kanban view (default)
  3. Your new PM request appears in the leftmost column "PM Scheduled (ตามแผนบำรุงรักษา)"

Visual indicators on the kanban card

  • Red dot — Equipment criticality = Critical (red)
  • Yellow dot — Watch (yellow)
  • Green dot — Normal (green)
  • Red flag — Request has breached its SLA hours

Step 6 — Move the PM request through the workflow

The PM request now follows the standard 5-stage repair workflow, starting from PM Scheduled instead of Submitted:

PM Scheduled  →  Pending Review  →  In Repair  →  Awaiting Pickup  →  Received
   (72hr)         (8hr)             (24hr)         (8hr)
  1. Open the PM request
  2. Click the next-stage button at the top
  3. Each stage transition is recorded in the Stage Transition Log (see the "Audit Trail" tab on the request form)

What just happened

When you ran the cron in Step 4:

  1. Layer 2 (maintenance_plan) — walked the plan's interval forward and created a maintenance.request with maintenance_plan_id set to your plan
  2. Layer 3 (roots_hemms_pm) — the create() override saw maintenance_plan_id was set, so it routed the request to the "PM Scheduled" stage instead of the default
  3. Layer 3 (roots_hemms_workflow) — the workflow's create() hook logged the initial stage entry to hemms.stage.transition.log
  4. Layer 3 (roots_hemms_criticality) — the related field roots_equipment_criticality_color populated the kanban card's dot color

Next steps

  • Configuration — add your own custom maintenance kinds
  • Workflows — full PM lifecycle including SLA breach handling
  • Reporting — track PM coverage and overdue PMs