How umamaheshmindaguditi9/enterprise-app-sparsa works
Sparsa Homeoclinic is a two-tier clinic-management application. Reception creates patients and cases; doctors record clinical notes and prescriptions, pharmacy handles dispensing, and PRO staff bill and record payments. The React client calls a FastAPI service backed by MongoDB, with optional object storage and messaging integrations. The graph preserves AI assistance, reminders, analytics, exports, and package billing. Some subsystem details are documented but their source was not excerpted, so those links are shown only where supported by the README or source index.
Main entry points: server.py FastAPI service · core.py Access and audit · ai.py AI assistance · admin.py Administration
Components 29
Web client
- React application
frontend/src/App.js - API client
frontend/src/lib/api.js
Patient workflow
- Patient records
backend/routers/patients.py - Case workflow
backend/routers/cases.py - Pharmacy workflow
backend/routers/pharmacy.py
Clinical services
- AI assistance
backend/routers/ai.py - Clinical context
backend/clinical_context.py - FIR parsing
backend/fir_parsing.py - AI prompts
backend/prompts.py
Clinic operations
- Visit payments
backend/routers/payments.py - Package billing
backend/package_service.py - Package endpoints
backend/routers/packages.py - Package payments
backend/routers/package_billing.py - Attachment endpoints
backend/routers/attachments.py - Object storage
backend/storage.py - Reminders
backend/routers/reminders.py - Messaging integrations
backend/messaging.py - Dashboards and analytics
backend/routers/dashboards.py - Financial reporting
backend/financial_reporting.py - Administration
backend/routers/admin.py - Data exports
backend/routers/exports.py
Shared infrastructure
- FastAPI service
backend/server.py - Authentication
backend/routers/auth.py - Access and audit
backend/core.py - MongoDB
Other components
- Clinic staff
- Emergent object storage
- Twilio / WhatsApp
- Background reminders
Connections 42
- Clinic staff → React application: uses
README.md - React application → API client: makes requests
README.md - API client → FastAPI service: calls API
README.md - FastAPI service → Authentication: mounts router
backend/server.py - FastAPI service → Patient records: mounts router
backend/server.py - FastAPI service → Case workflow: mounts router
backend/server.py - FastAPI service → Pharmacy workflow: mounts router
backend/server.py - FastAPI service → Visit payments: mounts router
backend/server.py - FastAPI service → Reminders: mounts router
backend/server.py - FastAPI service → Attachment endpoints: mounts router
backend/server.py - FastAPI service → AI assistance: mounts router
backend/server.py - FastAPI service → Dashboards and analytics: mounts router
backend/server.py - FastAPI service → Package endpoints: mounts router
backend/server.py - FastAPI service → Package payments: mounts router
backend/server.py - FastAPI service → Administration: mounts router
backend/server.py - FastAPI service → Data exports: mounts router
backend/server.py - Authentication → Access and audit: uses security helpers
backend/routers/auth.py - Authentication → MongoDB: reads and updates users
backend/routers/auth.py - Patient records → MongoDB: stores patient records
backend/routers/patients.py - Case workflow → Access and audit: uses access helpers
backend/routers/cases.py - Case workflow → MongoDB: manages cases
- Pharmacy workflow → MongoDB: manages dispensing
- Visit payments → MongoDB: records payments
- Package endpoints → Package billing: uses package service
backend/routers/packages.py - Package payments → Package billing: uses package service
backend/routers/package_billing.py - Package billing → MongoDB: updates package ledger
backend/package_service.py - AI assistance → Clinical context: builds context
backend/routers/ai.py - AI assistance → AI prompts: selects prompts
backend/routers/ai.py - AI assistance → FIR parsing: parses clinical notes
backend/routers/ai.py - AI prompts → FIR parsing: references parsing
backend/prompts.py - Attachment endpoints → Object storage: uses storage helper
backend/routers/attachments.py - Object storage → Emergent object storage: uploads and downloads
backend/storage.py - Reminders → Messaging integrations: sends notifications
backend/routers/reminders.py - Messaging integrations → Twilio / WhatsApp: integrates with
README.md - FastAPI service → Background reminders: runs reminder tasks
README.md - Dashboards and analytics → Financial reporting: uses reporting
backend/routers/dashboards.py - Financial reporting → Access and audit: uses shared infrastructure
backend/financial_reporting.py - Dashboards and analytics → MongoDB: aggregates clinic data
backend/routers/dashboards.py - Administration → Access and audit: uses shared infrastructure
backend/routers/admin.py - Administration → Messaging integrations: configures messaging
backend/routers/admin.py - Administration → MongoDB: manages clinic data
- Data exports → Access and audit: uses shared infrastructure
backend/routers/exports.py