How karthih2/discharge-and-follow-up works
CareBridge is a synthetic discharge-follow-up planner with patient/family, doctor, and management portals. Patients submit a discharge summary; the API ingests and processes it into source-linked plan items, dates, multilingual explanations, tasks, and review flags. Doctors resolve unclear items, while patients and permitted family viewers track plans and use reminders, callbacks, provider suggestions, and sharing features. Management handles staff, assignments, callbacks, and audit. The graph combines excerpted calls and README-documented capabilities; uninspected route and agent internals are represented only where paths and relationships are documented.
Main entry points: pipeline.py Processing orchestrator · main.py HTTP application · models.py SQLite records · documents.py Document intake
Components 30
User portals
- Patient and family app
frontend/src/apps/PatientApp.tsx - Doctor workspace
frontend/src/apps/DoctorApp.tsx - Management console
frontend/src/apps/AdminApp.tsx - Plans and sharing
frontend/src/pages - Review queue
frontend/src/pages/doctor/Queue.tsx - Staff and audit
frontend/src/pages/admin/Pages.tsx
Plan processing
- Document intake
backend/app/routes/documents.py - Text and PDF extraction
backend/app/agents/ingest.py - Processing orchestrator
backend/app/agents/pipeline.py - Clinical extraction
backend/app/agents/extractor.py - Date resolution
backend/app/agents/dates.py - Provider matching
backend/app/agents/matcher.py - Safety triage
backend/app/agents/triage.py - Verification
backend/app/agents/verifier.py - Multilingual explanations
backend/app/agents/simplifier.py - Medicine formatting
backend/app/agents/med_template.py - Tasks and reminders
backend/app/agents/planner.py
Clinical review
- Reviewer assignment
backend/app/routing.py - Patient plan actions
backend/app/routes/clinical.py - Plan and task actions
backend/app/routes/plans.py - Management operations
backend/app/routes/admin.py - Family access and sharing
backend/app/routes/family.py
Shared platform
- API client
frontend/src/lib/api.ts - Portal authentication
frontend/src/lib/auth.tsx - HTTP application
backend/app/main.py - Role and access checks
backend/app/auth.py - SQLite records
backend/app/models.py - Database and audit
backend/app/db.py
Other components
- Patient or staff
- Groq language model
Connections 41
- Patient or staff → Patient and family app: uses
README.md - Patient or staff → Doctor workspace: uses
README.md - Patient or staff → Management console: uses
README.md - Patient and family app → Plans and sharing: routes to
frontend/src/apps/PatientApp.tsx - Doctor workspace → Review queue: routes to
- Management console → Staff and audit: routes to
- Plans and sharing → API client: requests
frontend/src/pages/admin/Pages.tsx - Review queue → API client: requests
frontend/src/pages/doctor/Queue.tsx - Staff and audit → API client: requests
frontend/src/pages/admin/Pages.tsx - Patient and family app → Portal authentication: guards access
frontend/src/apps/PatientApp.tsx - API client → HTTP application: calls API
README.md - HTTP application → Role and access checks: checks roles
backend/app/main.py - HTTP application → Document intake: registers routes
backend/app/main.py - HTTP application → Patient plan actions: registers routes
backend/app/main.py - HTTP application → Plan and task actions: registers routes
backend/app/main.py - HTTP application → Management operations: registers routes
backend/app/main.py - HTTP application → Family access and sharing: registers routes
backend/app/main.py - Document intake → Text and PDF extraction: extracts text
backend/app/routes/documents.py - Document intake → Processing orchestrator: starts processing
backend/app/routes/documents.py - Processing orchestrator → Clinical extraction: extracts items
backend/app/agents/pipeline.py - Processing orchestrator → Date resolution: resolves dates
backend/app/agents/pipeline.py - Processing orchestrator → Provider matching: finds providers
backend/app/agents/pipeline.py - Processing orchestrator → Safety triage: flags risks
backend/app/agents/pipeline.py - Processing orchestrator → Verification: verifies items
backend/app/agents/pipeline.py - Processing orchestrator → Multilingual explanations: creates explanations
backend/app/agents/pipeline.py - Processing orchestrator → Medicine formatting: formats medicines
backend/app/agents/pipeline.py - Processing orchestrator → Tasks and reminders: creates tasks
backend/app/agents/pipeline.py - Processing orchestrator → Reviewer assignment: assigns review
backend/app/agents/pipeline.py - Multilingual explanations → Groq language model: rewrites text
README.md - Safety triage → Groq language model: checks safety
README.md - Document intake → SQLite records: stores documents
backend/app/routes/documents.py - Processing orchestrator → SQLite records: stores plan results
backend/app/agents/pipeline.py - Database and audit → SQLite records: reads and writes
backend/app/db.py - Patient plan actions → Tasks and reminders: updates tasks
backend/app/routes/clinical.py - Plan and task actions → Safety triage: rechecks safety
backend/app/routes/plans.py - Plan and task actions → Medicine formatting: formats medicines
backend/app/routes/plans.py - Plan and task actions → SQLite records: reads and writes
backend/app/routes/plans.py - Patient plan actions → SQLite records: reads and writes
backend/app/routes/clinical.py - Reviewer assignment → SQLite records: assigns and notifies
backend/app/routing.py - Management operations → Reviewer assignment: reassigns doctors
README.md - Family access and sharing → SQLite records: filters shared plans
README.md