11 KiB
XYZ Hospital AMS — Role-Based User Guide
Welcome to the XYZ Hospital Asset Management & Maintenance System. This quick-start guide details the day-to-day operations, permissions, and typical workflows for each user role.
All demo accounts share the password: Demo@123
1. System Administrator (admin@xyz.demo)
The System Administrator oversees system security, reference masters, user access, and global configuration.
Key Capabilities
- Master Data Management (
/masters): Maintain active Departments, Physical Locations, Equipment Categories, Vendors/Suppliers, and System Users. Masters use soft deletion to preserve historical linkage.- Admin Password Reset: Admins can click "Reset password" on any user row on the Users tab to set a new password directly from the UI. Resetting invalidates all existing active sessions of that user immediately via token versioning.
- Universal Password Policy: Passwords must be 8–128 characters, contain at least one letter and one number, have no leading/trailing spaces, avoid common blocklisted passwords, and cannot contain the user's email username.
- System Settings (
/settings): Configure hospital-wide business rules:- SLA thresholds (
critical_complaint_sla_hours,non_critical_complaint_sla_hours) - Alert lead times for Contracts, PM, Calibration, Insurance, and Demo Equipment
- Mandatory closure remarks toggle (
require_closure_remarks) - Downtime calculation milestone (
attendance,restoration, orclosure) - Demo Clock (
demo_as_of_date) to simulate future dates for testing alerts
- SLA thresholds (
- Audit Logs (
/audit-logs): Search, filter, and inspect detailed JSON diffs of all system mutations and user actions. - Bulk Imports & Duplicate Prevention:
- Download official templates for Assets, Contracts, Calibration Plans, and Insurance Policies (templates include empty headers on Sheet 1 and example rows on Sheet 2).
- Exact duplicates in file uploads or direct creations (duplicate contracts with matching asset/type/dates, duplicate insurance policy numbers, or duplicate calibration plans per asset) are rejected with clear line-item error messages or HTTP 409 status.
- Database Backup & Recovery: Execute
python scripts/backup.pyto create a safe online snapshot (.tar.gz or .zip) of the database and uploaded attachments.
2. Biomedical Engineer (bio@xyz.demo)
Biomedical Engineers handle physical medical assets, breakdown repairs, preventative maintenance schedules, and rounds.
Key Workflows
- Asset Registration & Maintenance (
/assets):- Register new medical equipment with full technical, procurement, warranty, and vendor details.
- View comprehensive 8-tab overview for any asset (PM, Calibration, Contracts, Insurance, History).
- Breakdown Complaint Management (
/complaints):- Attend assigned complaints and log attendance timestamps.
- Document technical actions: Company Engineer (CE) details, action taken, spare parts required, root cause, and corrective action.
- Mark equipment as Restored when functioning (automatically returning asset to
in_service). - Close complaints with mandatory closure remarks.
- Preventive Maintenance (
/pm):- View planned PM in Table or 7-column Calendar views.
- Execute PM records, attach vendor service reports/job sheets, and automatically advance next planned cycle.
- Department Rounds (
/visits):- Conduct daily/weekly rounds, inspect equipment by department, log observations, note new equipment requirements, and link or spawn breakdown complaints directly from the visit sheet.
3. Department User (dept@xyz.demo — ICU)
Department Users (Nurses, In-charges, Technicians) raise and monitor breakdown calls for their own department.
Key Workflows
- Scoped View: Automatically restricted to seeing only assets and complaints belonging to their assigned department (e.g., ICU).
- If a department user account is created without an assigned department (
department_id=None), the user is scoped to an empty dataset by default (seeing zero assets, zero complaints, and zero dashboard metrics) to prevent unintended access to hospital-wide data.
- If a department user account is created without an assigned department (
- Raising Complaints (
/complaints):- Click Raise Complaint, search for the faulty equipment using
AssetPicker(which highlights warranty and condemnation status), choose Priority (CriticalorNon-Critical), and enter the problem description. - Attach photos or fault screenshots directly.
- Click Raise Complaint, search for the faulty equipment using
- Tracking Progress:
- Monitor real-time status chips (
Open,In Progress,Closed). - View assignment details and attendance timestamps.
- Technical engineering fields, spare parts costs, and master configurations are safely locked (read-only).
- Monitor real-time status chips (
4. Management (mgmt@xyz.demo)
Hospital Management (Medical Superintendent, Directors, Quality Heads) review operational performance, KPIs, and reports.
Key Capabilities
- Hospital Operations Dashboard (
/):- High-level KPI summary: Total Assets, Equipment Under Repair, Open Complaints, Critical Breakdown Calls, and PM Compliance rate.
- Interactive charts: Complaints by Status, Complaints by Department, 6-Month Downtime Trend, and PM Performance.
- Clickable "Needs Attention" list highlighting urgent overdue items.
- Calibration Plan Approvals (
/calibration):- Review and approve calibration frequencies set on critical biomedical equipment (gated specifically to Management and Administration).
- 8 Operational Reports (
/reports):- Monthly Maintenance Summary with downtime minutes and Uptime % calculations.
- Monthly Department Performance, PM Compliance, Calibration Due, AMC/CMC Validity, and Breakdown Analytics.
- One-click Excel spreadsheet (
.xlsx) export and print-ready A4 landscape layouts.
5. Clinical Coordinator (coord@xyz.demo)
Coordinators manage legal contracts, equipment warranties, insurance coverage, and loaner/demo devices.
Key Workflows
- Contracts & Warranties (
/contracts):- Register AMC and CMC service agreements, coverage periods, and vendor contacts.
- Upload signed contract PDFs or warranty certificates.
- Renew expiring contracts with automatic superseding of prior contracts and full history chain retention.
- Asset Insurance (
/insurance):- Record policy numbers, insurance companies, coverage sums in INR, and effective dates.
- Quick-access Insurance Drawer lets users inspect policy details directly from any asset or breakdown record.
- Demo & Trial Equipment (
/demo-equipment):- Track evaluation and trial machines on loan from vendors.
- Record serial numbers, trial durations, expected return dates, and log official returns.
- Notifications & Expiry Alerts (
/notifications):- Receive automated 30-day advance alerts for expiring contracts, warranties, and insurance policies.
6. Cost Inputs, AMC/CMC Auto-Tagging & AI Report
Cost Fields & Role Visibility
- Assets support
acquisition_mode(purchasedorrented),monthly_rent(INR/month),useful_life_years,salvage_pct(0–50%), anddepreciation_method(straight_lineorwritten_down). Categories supportdefault_useful_life_years, Contracts storecontract_value(INR), PM schedules storecost_per_visit(INR), and Breakdown Complaints storerepair_cost(INR, restricted to Biomedical and System Admin alongside technical fields). - Role Access: Cost fields are visible to
system_admin,biomedical,management, andcoordinator, and are automatically stripped from all API responses fordepartment_user. Editing cost fields is restricted tosystem_adminandbiomedical(coordinatormay editcontract_valueon contracts only).
AMC / CMC Auto-Tagging
- Every asset, breakdown complaint, and PM schedule automatically displays a color-coded Coverage Badge (
Under Warrantyblue,Under CMCgreen,Under AMCteal,Other Contractgrey,Out of Contractred) with a hover tooltip showing"Call: <vendor>, <contact>". - Precedence is strictly: Active Warranty > Active CMC > Active AMC > Active OTHER Contract > Out of Contract.
- When a breakdown complaint is registered, the live coverage tag, contract, and provider are snapshotted onto the complaint and logged to its event timeline. Creating an outsourced PM schedule auto-fills the active AMC/CMC contract and service provider (or surfaces a
"No active contract"warning if none exists).
AI Report & Cost Analysis (/reports/ai)
- Available via the "Simple reports | AI report" toggle on
/reportsforsystem_admin,biomedical,management, andcoordinator(department_usergets HTTP403and sees no toggle). - All numbers are computed deterministically by Python code; any connected language model only writes narrative words about pre-computed evidence and is strictly checked against the underlying numbers and banned decision words.
- Includes a top Suggestions panel (rules
S1–S8with red/yellow/info severity and"Needs a human decision.") and four numbered sections:- Comparison: in-house vs outsourced vs rent (latest equipment cost table, grouped bar chart, grey
"Insufficient data: ..."cells). - Depreciated price and cost analysis (book value, accumulated depreciation, maintenance ratio highlighted red above threshold, lifetime cost, interactive book-value curve).
- Efficiency (uptime %, MTTR, MTBF, PM compliance %, composite 0–100 score, stacked department chart).
- Breakdown frequency and average breakdowns (total breakdowns, average per equipment, repeat-failure count, top-10 table, monthly trend & department/category bar chart).
- Comparison: in-house vs outsourced vs rent (latest equipment cost table, grouped bar chart, grey
- Every section includes a narrative card (
Rule-based summaryorAI summary), an Evidence accordion, a How this is calculated formula popover, styled 3-sheet Excel (.xlsx) & CSV exports (main sheet,Evidence,How calculated), and A4 Print support.system_adminalso sees a Regenerate summary button.
Enabling an Optional Local AI Model
- By default (
AI_PROVIDER=none), the application uses fast, deterministic rule-based summaries with zero external dependencies. - To enable local AI narratives on hospital-controlled infrastructure:
- Run a local model server such as Ollama (
ollama pull llama3.2) or a local OpenAI-compatible endpoint. - Set
AI_PROVIDER=ollama(oropenai_compatible),AI_BASE_URL=http://localhost:11434, andAI_MODEL=<installed-model>in.env(ordocker-compose.yml) and restart the backend. - Log in as
system_admin, open/settings, scroll to AI and cost analysis, confirm Provider Reachable showsYes, toggle Enable AI Narrative (ai_enabled) on, and save. - If the local server stops, times out, or produces an ungrounded number, the app automatically falls back to the rule-based summary and displays a small rejection warning without failing the page.
- Run a local model server such as Ollama (