Files
poona-ams/docs/ACCEPTANCE_CHECKLIST.md
T

4.8 KiB

Poona Hospital AMS — Acceptance Checklist (Proposal §10 Mapping)

# Acceptance Criterion Automated Test Coverage Manual Verification Steps
1 Auth, 5-Role RBAC, Masters & Settings (system_admin, biomedical, department_user, management, coordinator, JWT auth, login rate limiting, configurable settings, audit logs) backend/tests/test_auth_and_permissions.py
backend/tests/test_phase8_polish.py (test_audit_logs_rbac_and_filters, test_login_rate_limiter_429_and_reset)
frontend/src/test/login.test.tsx
frontend/src/test/permissions.test.ts
frontend/src/test/smoke.test.tsx
frontend/src/test/phase8-polish.test.tsx
Log in with all 5 demo accounts (Demo@123), confirm role-filtered sidebar items, test /masters & /settings CRUD as admin@poona.demo, confirm /audit-logs returns 403 for non-admins, and trigger >15 rapid failed logins to observe 429.
2 Asset Register, Global Quick Search & Secure Attachments (unique asset_code, department scoping, coordinator edit restrictions, AssetPicker, /api/search, JPG/PNG/PDF magic-byte + 10 MB checks) backend/tests/test_assets_and_attachments.py
backend/tests/test_phase8_polish.py (test_global_search_grouped_and_department_scoped)
frontend/src/test/asset-picker.test.tsx
frontend/src/test/attachments.test.tsx
frontend/src/test/phase8-polish.test.tsx
Create/edit an asset on /assets, confirm duplicate code returns 409, verify dept@poona.demo sees ICU assets only, search in TopBar to jump to asset/complaint detail, and upload/preview/delete attachments on /assets/:id.
3 Breakdown & Complaint Workflow + Ist Downtime Calculation (sequential complaint_no, response time, clip_downtime_to_month, assign/attend/restore/close/reopen syncing Asset.status, role-gated technical fields) backend/tests/test_complaints.py
backend/tests/test_time_utils.py
frontend/src/test/complaint-detail.test.tsx
Raise a complaint via AssetPicker, verify dept@poona.demo sees the Technical/CE/Spares read-only lock, complete the repair workflow as bio@poona.demo, and verify Asset.status returns to in_service.
4 Preventive Maintenance & Calibration Schedules (in-house & outsourced PM, dynamic upcoming/due/overdue vs effective_today(), clamped add_months, calibration approval gate, certificate upload) backend/tests/test_pm_and_calibration.py
frontend/src/test/pm-page.test.tsx
frontend/src/test/calibration-page.test.tsx
Toggle Table and Calendar views on /pm, complete & reschedule cycles, verify bio@poona.demo receives 403 on calibration approval while mgmt@poona.demo/coord@poona.demo can approve, and upload calibration certificates.
5 Contracts, Warranties, Insurance, Demo Equipment & Department Visits (contract renewal superseding & history, warranty/insurance expiry chips, InsuranceDrawer, demo return tracking, visit 403 for department_user/coordinator) backend/tests/test_phase5_modules.py
frontend/src/test/phase5-modules.test.tsx
Renew a contract on /contracts and check history chain, open InsuranceDrawer from AssetDetailPage, mark a demo equipment returned on /demo-equipment, and log a multi-asset visit on /visits as bio@poona.demo.
6 Automated Alert Engine, 06:00 Asia/Kolkata Scheduler & Notifications (7 alert types, dedupe keys, per-user read state, TopBar bell polling, CalibrationReminderModal, Demo Clock demo_as_of_date) backend/tests/test_notifications_and_dashboard.py
frontend/src/test/phase6-modules.test.tsx
Advance TopBar Demo Clock (+20 days) as admin@poona.demo, run alert check in /settings, confirm new notifications appear without duplicates on second run, mark read per user, and check login reminder pop-up.
7 Hospital Operations Dashboard (role-aware department scope banner, 7 clickable KPI cards, 4 Recharts charts, Needs Attention & Recent Complaints) backend/tests/test_notifications_and_dashboard.py (test_dashboard_summary_role_scoping_and_charts)
frontend/src/test/phase6-modules.test.tsx
Compare / as mgmt@poona.demo (hospital-wide) vs dept@poona.demo (ICU-scoped) and verify KPI navigation and chart tooltips.
8 8 Operational Reports, Excel/CSV Exports & A4 Print (8 report keys, 3-complaint downtime reconciliation, daily-visit RBAC 403, openpyxl .xlsx & UTF-8 BOM .csv exports, @media print) backend/tests/test_reports.py
frontend/src/test/reports.test.tsx
Open /reports, verify daily-visit is hidden/403 for dept@poona.demo & coord@poona.demo, inspect Monthly Maintenance "How this is calculated" formula popover, download .xlsx/.csv, and open Print Preview (A4 landscape).