Skip to content

Reporting

This page covers what the printed report looks like, the snapshot guarantees that make reprints surveyor-defensible, and what to put in front of an HA Thailand surveyor on the day of the visit.

How to print

Open the report form → click the standard Print menu → select HA Annual PM Report. The print action is bound to the hemms.ha.report model so it appears for any user with read access.

The default filename is HA-<reference>.pdf (e.g. HA-HA/2569/00001.pdf).

PDF anatomy

The QWeb template produces a 7-section A4-portrait PDF rendered in TH Sarabun New:

Section 1 — ปก (Cover)

A boxed table with:

  • หน่วยงาน (Department)
  • ปีงบประมาณ พ.ศ. (Fiscal Year)
  • ระยะเวลา (Period — 1 Oct → 30 Sep)
  • เลขที่ (Reference number — HA/YYYY/NNNNN)
  • วันที่เอกสาร (Document Date)
  • ผู้จัดทำ (Author)
  • สถานะ (Status)

The title รายงานการบำรุงรักษาเชิงป้องกันประจำปี is centred above with the English subtitle Annual Preventive Maintenance Report (HA Thailand).

Section 2 — บทสรุปผู้บริหาร (Executive Summary)

A KPI table:

  • ครุภัณฑ์ทั้งหมด (Total equipment)
  • ความเสี่ยงสูง / กลาง / ต่ำ (Per-tier counts, colour-coded)
  • PM ตามแผน (Planned)
  • ทำจริง (Actual)
  • เป็นไปตามแผน (Compliance %)

For a submitted report, these read from the snapshot — frozen at submit time, immune to later equipment edits.

Section 3 — ตารางครุภัณฑ์และผลการบำรุงรักษา

The main detail table, 11 columns:

Column Description
# Row number
ชื่อเครื่อง Equipment name (live or snapshotted)
รุ่น Model
S/N Serial number
เลขครุภัณฑ์ Government asset ref
ความเสี่ยง Risk tier (badge-coloured)
ความถี่ (เดือน) PM frequency in months
แผน Planned PM count
จริง Actual PM count
% Compliance
ผล Result enum (pass / conditional / fail / not_done)

Section 4 — รายการครุภัณฑ์ที่ไม่ได้ทำตามแผน (Exceptions)

Filtered list of lines with result in (fail, not_done). Renders only when at least one such line exists. Columns: equipment name, ref, result, exception reason, responsible user.

This is what the surveyor scans first — the explanation for any gaps in PM compliance.

Section 5 — ภาคผนวก ก — MoPH Device Class Table

Reproduces the MoPH 82-device classification table verbatim from the trusted source. For submitted reports, this is the snapshot copy — edits to the live table after submit don't change appendix A on existing reports.

This appendix exists specifically as surveyor evidence — it shows exactly which tier and frequency the report applied to each device type.

Section 6 — ภาคผนวก ข — EM Score Worksheet

Renders only when at least one equipment was classified via the EM-score path (i.e. risk_tier_source == 'em_score'). Shows equipment name, ref, computed tier, and computed frequency.

Cites the WHO Fennigkoh-Smith methodology and the MoPH boundary resolution.

Section 7 — หน้าลงนาม (Signature Page)

Two modes:

  • Unsigned — three paper-style signature boxes for BME Head / Engineering Head / Hospital Director. Named below the dashed line with date placeholders. Use when printing for wet signatures or when sign_oca isn't yet configured.
  • Signed — a single 🟢 ลงนามครบ banner pointing the reader to the signed PDF attached in chatter. No empty boxes (the signed PDF is the source of truth).

Snapshot-driven reprint guarantees

For any report in submitted or archived state, the QWeb template reads from doc.snapshot_id.data instead of live fields for sections 2–6.

What this guarantees:

Scenario Live data Snapshot data Reprint result
Add a PM event to the underlying equipment after submit More actual PM events visible Unchanged Reprint = original
Edit a MoPH device class's frequency after submit Class shows new freq Class shows old freq Reprint = original
Rename an equipment after submit Equipment shows new name Snapshot shows old name Reprint = original
Edit paperformat margins after submit New margins paperformat_hash mismatch (Future Q6: warning banner)

This is the audit-defensibility property — a surveyor reprint requested next year will be byte-identical to today's print.

Paperformat fingerprint

The snapshot stores a SHA-256 hash of (format, orientation, margin_top, margin_bottom, margin_left, margin_right, dpi).

The QWeb template (in a future Q6 enhancement) will compare this hash against the live paperformat at reprint time and surface a warning if they diverge — silent layout drift is the biggest risk to a "byte-identical" guarantee and we want it visible.

What to hand the HA surveyor

On the day of the HA Thailand visit, prepare a printout of each Submitted or Archived annual report for the years under review (typically the last 2 years).

The surveyor will typically:

  1. Verify the executive summary compliance % — anything > 95% is green; 80–95% is questioned; < 80% triggers deep questions.
  2. Cross-reference exceptions with reasons. Vague reasons ("not done") will be questioned; specific reasons ("waiting on spare part PO #4521", "equipment on loan to Surin hospital") satisfy.
  3. Spot-check two or three lines by asking to see the underlying maintenance.request records in the system. The Q1 PM data is the evidence — the report just aggregates.
  4. Verify the MoPH appendix A matches what they remember of the official guideline. Hospital-added local entries should be flagged as such — the system marks them by their presence in the snapshot regardless of upstream upgrades.
  5. Verify signatures — either wet signatures on the printout or the attached signed PDF if the report was e-signed.

Multi-year comparison

V1 of the module does NOT include a multi-year comparison report. Each annual report stands alone.

For year-over-year analysis, use the list view's group-by Fiscal Year axis to see trends — but the comparison is engineer-led, not machine-generated.

Multi-year comparison reports are tagged Q6+ in the roadmap.

Next steps