5.6 KiB
5.6 KiB
Assumptions Log — Poona Hospital AMS
Items marked "to be confirmed" or left flexible in the proposal are recorded here along with the configurable defaults implemented in Phase 1.
- Contract Expiry Alert Thresholds: Default alert lead time is
30days (contract_expiry_alert_days), with critical (red) escalation at7days (contract_critical_alert_days). Both are admin-editable in Settings. - Warranty & Insurance Expiry Lead Days: Default alert window is
30days prior to end date (warranty_expiry_alert_days,insurance_expiry_alert_days), configurable by System Admin. - PM & Calibration Due Windows: Planned PM and Calibration items transition from
upcomingtodueat15days beforedue_date/planned_date(calibration_due_window_days,pm_due_window_days), and becomeoverdueonce past the due date. Onlycompleted(andrescheduledfor PM) are persisted in the DB;upcoming/due/overdueare computed at read time againsteffective_today(). - Complaint SLA & Escalation Thresholds: Default target response/restoration SLA is
4hours forcriticalpriority (critical_complaint_sla_hours) and24hours fornon_critical(non_critical_complaint_sla_hours), with unclosed critical complaints escalating after24hours (escalation_open_complaint_hours). - Complaint Closure Remarks:
require_closure_remarksdefaults totrueso engineers must document closure notes before closing a breakdown call; configurable in Settings. - Asset Code Format: Asset codes follow
<asset_code_prefix>-<DEPT_CODE>-<0001>with default prefixPHRC(asset_code_prefix), e.g.PHRC-ICU-0001. - Default PM Service Mode: New PM schedules default to
in_house(default_pm_mode, enumin_house|outsourced). - Demo Equipment Return Alert: Expected return alerts trigger
3days beforeexpected_return_date(demo_return_alert_days), configurable in Settings. - Demo Clock (
demo_as_of_date): System-wideeffective_today()readsdemo_as_of_date(YYYY-MM-DD) from Settings if non-empty; otherwise uses the real current date inAsia/Kolkata. - Soft Deletion for Masters & Users: Deleting departments, locations, categories, vendors, or users sets
is_active = Falserather than hard-deleting rows so historical asset/complaint/maintenance foreign keys remain intact. - Password Hashing on Python 3.13:
passlib==1.7.4is incompatible withbcrypt>=4.1on Python 3.13 (__about__attribute removed / 72-byte wrap-check error), soapp/core/security.pyusesbcrypt(bcrypt==5.0.0) directly.
Assumptions added post-Phase-8
- Permission Specifics:
system_adminandbiomedicalcan create and edit full asset records (coordinatoris restricted to updatingrequires_calibration,insurance_applicable, andremarks). Calibration frequency edits and plan approvals are restricted tosystem_admin,management, andcoordinator(biomedicalreceives HTTP403).department_useris scoped to their assigned department (ICUin demo data) across assets, complaints, PM, calibration, contracts, notifications, dashboard, reports, and global search, whereassystem_admin,biomedical,management, andcoordinatorview all departments hospital-wide.managementandcoordinatorcannot raise complaints (enforced server-side with HTTP403). - Critical Complaint Escalation & SLA Evaluation: APScheduler runs
alerts.pydaily (default06:00in configuredTIMEZONE) and raisescritical_complaintnotifications when open critical complaint age exceedsescalation_open_complaint_hours(default24h) or breachescompute_sla_statusagainstcritical_complaint_sla_hours(default4h) /non_critical_complaint_sla_hours(default24h). - Insurance Drawer: Insurance summary is surfaced via a read-only slide-over panel (
InsuranceDrawer) fromAssetDetailPage,AssetPicker, andComplaintDetailPage; creating and editing policies is handled via modal dialogs on/insuranceand the Asset Insurance tab. - Demo-Only Features: The TopBar Demo Clock (
demo_as_of_date, admin-only date override for demonstrating expiry/overdue alerts and dynamic schedule transitions) and the deterministic seed loader (python -m app.seed.seed) exist specifically for demonstration and verification. - Reopen Clears
restored_at: Reopening a closed breakdown complaint clears bothclosed_atandrestored_at(None) on the complaint row so downtime resumes as ongoing until re-restored. - Immediate Asset Return to Service: When a breakdown complaint is restored or closed (and no other unrestored critical complaints exist on the asset),
Asset.statustransitions immediately toin_servicerather than requiring an extra post-repair sign-off step. - Code Prefixes (
complaint_no_prefix&asset_code_prefix): Complaint numbers are auto-generated usingcomplaint_no_prefix(defaultCMP, e.g.CMP-2026-0001;BD-or another prefix can be configured in Settings). Asset codes are entered manually to match physical hospital asset tags rather than auto-generated, soasset_code_prefix(defaultPHRC) acts as a configurable hospital label prefix shown in Settings and used for the bulk-import template sample code. - Monthly Maintenance
Uptime %Display: Themonthly-maintenancebackend report aggregates uptime/downtime in minutes per department rather than returning per-assetuptime_seconds/downtime_seconds, soUptime %(uptime / (uptime + downtime) * 100, 1 decimal place) is computed on the frontend inReportDetailPage.tsx(falling back to100 - downtime_pct) and highlighted in the summary strip and table.