HealthSphere – Salesforce Healthcare Management System
HealthSphere is a comprehensive Healthcare Management System built on Salesforce that enables hospitals to manage appointments, prescriptions, doctor availability, assets, and invoicing across multiple branches from a centralized platform.
📌 Project Overview Objective
Build a modular, scalable hospital management system on Salesforce with automated workflows, reusable LWCs, role-based access, and integrated invoicing.
Scope
Patient appointment booking with real-time doctor availability
Doctor prescription creation and printable PDFs
Automated invoice creation and payment simulation
Asset tracking across hospital branches
Email notifications and custom Salesforce notifications
Reusable LWC components for appointments, prescriptions, and lists
Role-specific views for Doctors and Patients
🧱 Salesforce Objects Used Object Type Description Account Standard Doctor, Patient, Partner records with custom fields Appointment__c Custom Stores patient–doctor appointments Asset Standard Hospital medical equipment tracking Branch__c Custom Hospital branch details with location DoctorAvailability__c Custom Doctor time slots Invoice__c Custom Patient invoices InvoiceLines__c Custom Invoice line items Item__c Custom Services/products used in billing Prescription__c Custom Doctor prescriptions linked to appointments 📌 System Workflow
- Account Creation
Admin creates a Doctor/Patient/Partner using Account checkboxes
Validations ensure correct role selection
Auto-email sent on creation
- Doctor Availability
Doctors add availability slots using DoctorAvailability__c
Slots fetched dynamically on appointment booking
- Appointment Booking
Custom LWC (wrapped in Aura) replaces standard New button
Dynamic selection flow: Branch → Speciality → Doctor → Slots → Patient
Appointment created → Notification sent to doctor → Email sent to patient
- Prescription Generation
Quick Action triggers LWC modal
Auto-filled data from Appointment
Prescription email sent to patient
Printable PDF via Visualforce
- Invoice Processing
Automatically created when Appointment status = Payment
Invoice lines auto-generated
Payment simulated via Postman Mock Server
Printable invoice via Visualforce
🧩 Lightning Web Components
Map Component – Shows branch location on Google Maps
New Appointment – Multi-step booking form
New Prescription – Quick Action form for doctors
Show Prescriptions – Displays patient's prescriptions
Show Appointments – Displays doctor's schedule
📄 Visualforce Pages
PrintInvoice – Printable invoice with line items
PrintPrescription – Printable prescription (PDF format)
⚙️ Apex Logic Triggers
AccountTrigger
AppointmentTrigger
AssetTrigger
InvoiceTrigger
Key Apex Classes
AccountHelper – Validations + account creation emails
AppointmentController – LWC data fetch + appointment creation
AppointmentHelper – Invoice creation + notifications
BranchController – Branch coordinates for map
InvoiceController – Fetch invoice + lines for PDF
InvoiceHelper – Payment flow + invoice line auto-creation
PrescriptionController – Create + fetch prescriptions
SendEmails – Account, appointment, and prescription emails
Notification – Custom notification utility
🧪 Mock Server (Postman)
Simulates external payment gateway
Used for integration testing with async Apex calls (@future)
🚀 Additional Work
Created Git repository for version control
Entire codebase pushed to GitHub
Exploring GitHub Actions for automated Salesforce deployment
🔥 Challenges Faced
Multi-level dynamic LWC flows
Asynchronous payment simulation
GitHub deployment automation
🎯 Learnings
Deep experience in LWC, Aura, Apex, Triggers
Hands-on with Queueable, Future, Batch Apex
Understanding end-to-end Salesforce solution architecture
📈 Future Enhancements
Google/Outlook calendar sync for doctors
Real payment gateway integration (Stripe, Razorpay, PayPal)
Video consultation (Zoom/Twilio APIs)