7.5 KiB
7.5 KiB
XYZ Hospital AMS — 10-Minute End-to-End Demo Script
Prerequisites:
- Run
python -m app.seed.seedinsidebackend/to load realistic hospital demo data (60 assets, 30 complaints, 45 PM schedules, 20 calibration plans, 35 contracts, 20 warranties, 25 insurance policies, 3 demo items, 12 department visits, and 26 alerts). - Start backend (
uvicorn app.main:app --port 8000) and frontend (npm run devonhttp://localhost:5173), or rundocker compose up --build. - All demo accounts use password
Demo@123:- System Admin:
admin@xyz.demo - Biomedical Engineer:
bio@xyz.demo - Department User (ICU):
dept@xyz.demo - Management:
mgmt@xyz.demo - Coordinator:
coord@xyz.demo
- System Admin:
Step 1 — Login, Role Overview & Calibration Pop-up (1 min)
- Open
http://localhost:5173/login. Use Quick Demo Login or sign in as Biomedical (bio@xyz.demo/Demo@123). - Observe the Calibration Reminder Pop-up (
CalibrationReminderModal) surfacing upcoming/due/overdue calibrations once per login. Click Go to Calibration or dismiss it. - Point out the role-filtered sidebar (no Masters/Settings/Audit Log for Biomedical).
Step 2 — Hospital Operations Dashboard & Global Quick Search (1 min)
- On
/(DashboardPage), review the 7 clickable KPI cards, the 4 Recharts visualizations (Complaints by Status, Complaints by Department, 6-Month Downtime Trend, PM Planned vs Completed), Needs Attention, and Recent Complaints. - In the TopBar search box, type
PHRCorVentilator. Observe the grouped Assets and Complaints dropdown; click an asset to jump directly to/assets/:id.
Step 3 — Asset Register, 8-Tab Detail & Insurance Drawer (1 min)
- Navigate to
/assetsand open an ICU asset (/assets/:id). - Walk through the tabs (Overview, Contracts, Warranty, Insurance, PM, Calibration, Complaints, Documents).
- Click View Insurance to slide open
InsuranceDrawershowing policy coverage in INR and attached policy PDF.
Step 4 — Breakdown Complaint Lifecycle & Department Scoping (1.5 min)
- Sign out and log in as Department User (ICU) (
dept@xyz.demo/Demo@123).- Notice the ICU-scoped dashboard banner and asset/complaint lists limited to ICU.
- Click Raise Complaint (
/complaints), select an ICU asset usingAssetPicker(note warranty/coverage badge), enter a breakdown description, attach an image/PDF, and submit. - Open a complaint detail (
/complaints/:id) and point out the read-only lock banner on the Technical / CE / Spares section (FORBIDDEN_TECHNICAL_FIELDSfor non-biomedical/admin roles).
- Switch to Biomedical (
bio@xyz.demo), open the newly raised complaint, assign/attend/restore it, enter technical action & spares, and close it with closure remarks—confirmAsset.statussyncs back toin_serviceand downtime is calculated in IST.
Step 5 — Preventive Maintenance Table & Calendar Views (1 min)
- Open
/pm(PMPage). Review the KPI strip and toggle between Table View and the 7-column Mon–Sun Month Calendar View. - Complete a due PM item (auto-advances next cycle using clamped
add_months) or reschedule an upcoming PM item.
Step 6 — Calibration Plan Approval Gate (1 min)
- Open
/calibration(CalibrationPage) as Biomedical (bio@xyz.demo). Note that creating/completing calibrations (with certificate PDF upload) is enabled, whereas frequency approval controls are gated (FORBIDDEN_CALIBRATION_APPROVAL). - Switch to Management (
mgmt@xyz.demo) or Coordinator (coord@xyz.demo) to approve a calibration plan's frequency.
Step 7 — Contracts Renewal Chain, Warranties, Demo Equipment & Visits (1 min)
- Open
/contracts(/contracts) and renew an expiring AMC/CMC contract—observe the superseded badge on the prior contract and the intact renewal history chain. - Open
/demo-equipmentto view active vs overdue trial equipment and log a return. - Open
/visitsas Biomedical (bio@xyz.demo) to review/log a department round linked to multiple assets and complaints; verifydept@xyz.demo/coord@xyz.democannot access/visits.
Step 8 — Demo Clock ("As of Date") & Live Alert Engine (1 min)
- Log in as System Admin (
admin@xyz.demo). - Use the TopBar "As of Date" Demo Clock to advance the date by +20 days.
- Click Run alert check now in
/settings(or/notifications), watch new deduplicated notifications appear in the TopBar bell counter and/notificationsinbox, then reset Demo Date back to real time.
Step 9 — 8 Operational Reports, Formula Transparency & Excel/CSV/Print (1 min)
- Open
/reports(ReportsPage) and click Monthly Maintenance Summary (/reports/monthly-maintenance). - Inspect the "How this is calculated" formula popover (
scheduled_hours_per_day,downtime_end_milestone,clip_downtime_to_month), Recharts BarChart/PieChart, export.xlsxand.csv, and trigger Print (A4) preview.
Step 10 — Audit Log Viewer & Rate-Limit Protection (0.5 min)
- As System Admin (
admin@xyz.demo), open/audit-logs(AuditLogsPage) to filter historical entity mutations by Entity Type, User, Action, Date Range, and search query, and inspect the JSON diff modal. - Confirm
/audit-logsis restricted tosystem_adminonly (403for other roles) andPOST /api/auth/loginenforces sliding-window rate limiting (429 RATE_LIMITED).
Step 11 — AI Report, Cost Analysis & AMC/CMC Auto-Tagging (2 min)
- Coverage Tag on a New Complaint (25 sec):
- Open
/complaints, click Raise Complaint, and pick an ICU asset inAssetPicker(e.g.PHRC-ICU-0001). - Point out the live Coverage Badge (
Under Warranty,Under CMC,Under AMC, orOut of Contract) and hover to show"Call: <vendor>, <contact>". Submit the complaint and show that the coverage tag is snapshotted on the complaint detail page and timeline.
- Open
- Switch to AI Report (15 sec):
- Open
/reportsas Management (mgmt@xyz.demo) or System Admin (admin@xyz.demo) and click the "AI report" side of the"Simple reports | AI report"segmented toggle (note thatdept@xyz.demodoes not see this toggle). - Point out the top status chip (
Rule-based summaryby default, orAI: local model <name>when Ollama is active).
- Open
- Repeat-Failure & Replacement Suggestions (25 sec):
- Scroll to the top Suggestions panel. Highlight a red S1 Repeat Failure card and an S4 Replacement Review card, expand Supporting evidence to show the exact metric IDs and values, click an asset code link, and note that every suggestion ends with
"Needs a human decision.".
- Scroll to the top Suggestions panel. Highlight a red S1 Repeat Failure card and an S4 Replacement Review card, expand Supporting evidence to show the exact metric IDs and values, click an asset code link, and note that every suggestion ends with
- Comparison Table (25 sec):
- Scroll to 1. Comparison: in-house vs outsourced vs rent. Show the 10 latest equipment rows comparing 5-year In-House vs Outsourced (AMC/CMC) vs Rent costs in INR, the highlighted lowest-cost option, difference vs next option, and any grey
"Insufficient data: <input>"cells.
- Scroll to 1. Comparison: in-house vs outsourced vs rent. Show the 10 latest equipment rows comparing 5-year In-House vs Outsourced (AMC/CMC) vs Rent costs in INR, the highlighted lowest-cost option, difference vs next option, and any grey
- Depreciation Example & Rule-Based vs AI Summary (30 sec):
- Scroll to 2. Depreciated price and cost analysis. Click an asset row to display its Book Value curve over useful life and point out red maintenance-ratio flags (≥ 40%).
- Open Evidence and How this is calculated on any section, and demonstrate the Rule-based summary badge (plus Regenerate summary as
admin@xyz.demo, and if Ollama is enabled in/settings, show anAI summarybadge or automatic fallback). Export Excel (.xlsx) to show the 3 sheets: main report,Evidence, andHow calculated.