How asithalkonara/sl-mediflow-frontend works
SL MediFlow is a role-based healthcare operations frontend. Its principal documented flow spans reception and queues, clinical consultation, lab and pharmacy fulfillment, and centralized cashier billing; separate branches cover administration, patient-facing records, and hardware/printing. The sampled source confirms authentication and hardware integration details, but most role-page interactions and their backend calls were not sampled, so those links are shown only where the README or excerpts establish them.
Main entry points: cashier/page.tsx Central billing · [patientId]/page.tsx Consultation · AuthProvider.tsx Session provider · receptionist/page.tsx Reception & queues
Components 31
Access & Navigation
- Sign-in & registration
src/app/(auth)/login/page.tsx - Session provider
src/components/providers/AuthProvider.tsx - Role dashboards
src/app/(dashboard)/layout.tsx
Clinical Operations
- Reception & queues
src/app/(dashboard)/receptionist/page.tsx - Arrival scheduling
src/app/frontdesk/arrivals/page.tsx - Consultation
src/app/(dashboard)/doctor/consultation/[patientId]/page.tsx - Prescription builder
src/app/(dashboard)/doctor/prescriptions/page.tsx - Laboratory workflow
src/app/(dashboard)/labtech/requests/page.tsx - Results entry
src/app/(dashboard)/labtech/results/[requestId]/page.tsx - Pharmacy POS
src/app/(dashboard)/pharmacist/prescriptions/page.tsx - Extra services
src/components/doctor/ExtraServiceOrderModal.tsx
Billing & Administration
- Central billing
src/app/(dashboard)/cashier/page.tsx - Payment processing
src/app/(dashboard)/cashier/process/[paymentId]/page.tsx - Refunds
src/app/(dashboard)/billing/refunds/page.tsx - Hospital administration
src/app/(dashboard)/superadmin/page.tsx - Inventory management
src/app/(dashboard)/superadmin/inventory/page.tsx - Finance engine
src/app/(dashboard)/superadmin/finance/page.tsx
Patient Services
- Patient portal
src/app/patient-portal/dashboard/page.tsx - Public reports
src/app/reports/[referenceNo]/page.tsx
Hardware & Output
- Customer display
src/app/customer-display/page.tsx - Cart synchronization
src/app/frontdesk/hooks/useCartSync.ts - Display sync hook
src/hooks/useCustomerDisplaySync.ts - Hardware controls
src/hooks/useHardware.ts - Hardware facade
src/services/hardware.service.ts - Pole display engine
src/services/pole-display.service.ts - Thermal printing
src/components/printing/PrescriptionPrintTemplate.tsx - Printer auto-cut
src/lib/printerAutoCut.ts - Printer cut endpoint
src/app/api/printer/cut/route.ts
Other components
- Hospital staff
- MediFlow API
- Local print bridge
Connections 29
- Hospital staff → Sign-in & registration: signs in
README.md - Sign-in & registration → Session provider: establishes session
- Session provider → MediFlow API: refreshes session
src/components/providers/AuthProvider.tsx - Session provider → Role dashboards: gates access
- Role dashboards → Reception & queues: routes staff
- Reception & queues → Consultation: queues patients
README.md - Consultation → Prescription builder: builds prescriptions
README.md - Consultation → Laboratory workflow: requests tests
README.md - Laboratory workflow → Results entry: enters results
README.md - Prescription builder → Pharmacy POS: sends prescription
README.md - Consultation → Extra services: orders services
- Reception & queues → Central billing: aggregates charges
README.md - Laboratory workflow → Central billing: aggregates charges
README.md - Pharmacy POS → Central billing: pushes charges
README.md - Central billing → Payment processing: processes payment
- Central billing → Refunds: manages refunds
- Hospital administration → Inventory management: manages stock
README.md - Hospital administration → Finance engine: tracks finances
README.md - Hospital staff → Patient portal: views records
- Hospital staff → Public reports: opens report
- Cart synchronization → Display sync hook: provides cart state
src/hooks/useCustomerDisplaySync.ts - Display sync hook → Customer display: supplies display state
- Hardware controls → Hardware facade: controls devices
src/hooks/useHardware.ts - Hardware controls → Pole display engine: loads configuration
src/hooks/useHardware.ts - Hardware facade → Pole display engine: sends display data
src/services/hardware.service.ts - Hardware facade → Local print bridge: calls bridge
src/services/hardware.service.ts - Printer auto-cut → Printer cut endpoint: requests cut
src/lib/printerAutoCut.ts - Printer auto-cut → Local print bridge: fallback print
src/lib/printerAutoCut.ts - Thermal printing → Printer auto-cut: triggers cut