End-to-End Operating Manual & System Specs
Complete guide covering SaaS platform administration (hospital.ssteckservices.com), hospital tenant clinical management (Vamana Speciality Care), doctor rosters, receptionist workflows, patient booking, AI report analysis, and API/MCP specifications.
1. Platform Architecture Overview
Smart Hospital Management is engineered as an enterprise-grade multi-tenant digital healthcare platform. The system operates on a modular monolith foundation designed for ultra-lean single-server execution (consuming only ~115 MB RAM in production) while enabling individual domains to be partitioned cleanly by tenantId.
SuperAdmin suite, global tenant directory, subscription billing, and platform monitoring.
Vamana Speciality Care (Tirunelveli): Full hospital public website, doctor rosters, online booking, EMR, and CRM.
Key Architectural Pillars:
- Next.js 14 App Router: Server components, edge middleware host detection, and optimized static rendering across 28 routes.
- Three.js Anatomy Engine: High-performance 3D spine visualization with automatic reduced-motion accessibility fallbacks.
- Deterministic Slot Generator: Dynamic schedule math computing doctor capacity, working shifts, and double-booking locks.
- Zero-External-S3 Disk Vault: Encrypted local disk file storage using signed, time-expiring streaming URLs.
2. SaaS SuperAdmin Manual
The SaaS SuperAdmin controls cross-tenant operations from hospital.ssteckservices.com.
Tenant Provisioning Workflow:
- Create a new hospital tenant record with unique
slug(e.g.vamana). - Specify primary brand domain (e.g.
www.vamanahospital.com) and secondary aliases (vamanahospital.com). - Set hospital brand identity tokens (Primary Blue
#0A3D62and Secondary Orange#F97316). - Initialize default administrative user (
admin@vamanahospital.com).
Domain Routing & DNS Verification:
The platform resolves tenants via incoming HTTP Host headers. When a client visits www.vamanahospital.com, the Next.js edge middleware resolves Tenant #1 and injects x-tenant-id: vamana-tenant-001.
3. Hospital / Tenant Admin Manual (/admin)
Hospital administrators manage daily clinical operations, doctors, schedules, CRM leads, and SEO directly via /admin.
Appointment Queue Management (/admin/appointments):
- Status Transitions: Progress patients through
CONFIRMED→ARRIVED→COMPLETED. - Walk-in Appointments: Click "Add Walk-in Appointment" to instantly reserve an emergency or walk-in slot with deterministic conflict prevention.
- Filtering: Filter by doctor (Dr. D. Balamurugan vs Dr. P. Seetha), date range, or appointment status.
Patient EMR Records (/admin/patients):
- Unique Medical Record Number (MRN) assigned to every patient (e.g.
MRN-VSC-10001). - Access historical consultations, symptoms, documented allergies, and private medical attachments.
CRM Lead Pipeline (/admin/crm):
- Kanban view across 5 stages:
NEW,CONTACTED,QUALIFIED,APPOINTMENT_BOOKED,CONVERTED. - Tracks inquiry sources: Website form, direct phone calls (
7200767066), Google Maps, or walk-ins.
Domain Redirect Manager (/admin/settings/domains):
Manage 301/302 redirects (e.g. vamanahospital.com/* → https://www.vamanahospital.com) without touching Nginx configuration files.
4. Doctor & Clinical Staff Guide
Specialist doctors (Dr. D. Balamurugan and Dr. P. Seetha) have dedicated roster schedules configured:
Surgeons can view patient history, review past MRI/X-ray summaries, and schedule recommended follow-up visits.
5. Receptionist & Front Desk Workflow
- Patient Arrival: Search appointment by phone number or Booking Reference (e.g.
VSC-20260903-101) on /admin/appointments. - Check In: Click Arrived button to notify the doctor.
- Walk-in Consultation: Click "Add Walk-in", enter patient name & mobile, select attending doctor, and print/convey the reference number.
- Fee Collection: Collect consultation fee at reception desk (₹500 for Ortho/Spine, ₹400 for General Surgery).
6. Patient Online Booking Guide
Patients visit /appointments or click "Book an Appointment":
Instant confirmation details and SMS/WhatsApp notifications are triggered automatically with hospital address and driving instructions.
7. Clinical AI & MCP Server Integration
The platform includes an OpenAI-compatible AI gateway and a Model Context Protocol (MCP) server running on port 5001.
MCP Tool Tiers:
search_doctors, get_doctor_profile, get_departments, check_appointment_slots, get_blog_posts
create_appointment (Patient appointment booking with atomic slot reservation)
get_patient_profile, create_blog_draft, analyze_report (Protected by RBAC)
8. REST API & Production Runbook
REST API Endpoints (/api/v1):
Disaster Recovery & Backup:
Daily database dumps are automatically generated at 2:00 AM by /opt/smart-hospital/scripts/backup-database.sh, compressed with gzip, and stored in /var/backups/smart-hospital with automatic 7-day retention.