How ishall0506/acentra-forge works
AEGIS turns uploaded hospital discharge PDFs into cited, chronological care plans, tasks, and safety escalations for patients and clinicians. The main workflow runs from PDF parsing through extraction, date normalization, safety review, simplification, persistence, and REST delivery to the web dashboard; separate branches support task tracking, clinician review, and provider lookup. The graph follows the documented workflow and shown call/import relationships. Several frontend views and the provider implementation are unsampled, so their internal connections are limited to documented capabilities.
Main entry points: models Care Database · orchestrator.py Pipeline Orchestrator · api_router.py REST Routes · discharge.py Discharge Endpoint
Components 23
Patient Web App
- PDF Upload
frontend/src/pages/Upload.jsx - Care Dashboard
frontend/src/pages - API Client
frontend/src/services/api.js - Mock Data
frontend/src/data/mockData.js
Discharge Processing
- PDF Parser
backend/app/services/pdf_parser.py - Pipeline Orchestrator
backend/app/services/orchestrator.py - Clinical Extractor
backend/app/agents/extractor_agent.py - Timeline Builder
backend/app/agents/timeline_agent.py - Care Simplifier
backend/app/agents/simplifier_agent.py - Provider Matcher
backend/app/agents/provider_agent.py
API & Coordination
- FastAPI Application
backend/app/main.py - REST Routes
backend/app/api/v1/api_router.py - Discharge Endpoint
backend/app/api/v1/endpoints/discharge.py - Patient Endpoint
backend/app/api/v1/endpoints/patients.py - Task Endpoint
backend/app/api/v1/endpoints/tasks.py - Provider Endpoint
backend/app/api/v1/endpoints/providers.py
Safety & Review
- Review Endpoint
backend/app/api/v1/endpoints/reviews.py - Safety Reviewer
backend/app/agents/reviewer_agent.py - Clinical Guardrails
backend/app/core/guardrails.py
Care Data
- Care Database
backend/app/db/models - Database Session
backend/app/db/session.py
Other components
- Patient / Caregiver
- Clinician
Connections 29
- Patient / Caregiver → PDF Upload: uploads PDF
README.md - PDF Upload → API Client: submits document
- API Client → Discharge Endpoint: calls API
- Discharge Endpoint → PDF Parser: parses PDF
backend/app/api/v1/endpoints/discharge.py - Discharge Endpoint → Pipeline Orchestrator: starts processing
backend/app/api/v1/endpoints/discharge.py - Pipeline Orchestrator → Clinical Extractor: extracts items
backend/app/services/orchestrator.py - Pipeline Orchestrator → Timeline Builder: builds timeline
backend/app/services/orchestrator.py - Pipeline Orchestrator → Safety Reviewer: checks safety
backend/app/services/orchestrator.py - Pipeline Orchestrator → Care Simplifier: simplifies care
backend/app/services/orchestrator.py - Safety Reviewer → Clinical Guardrails: detects ambiguity
backend/app/agents/reviewer_agent.py - Pipeline Orchestrator → Care Database: writes care data
backend/app/services/orchestrator.py - FastAPI Application → REST Routes: mounts routes
backend/app/main.py - REST Routes → Discharge Endpoint: registers route
backend/app/api/v1/api_router.py - REST Routes → Patient Endpoint: registers route
backend/app/api/v1/api_router.py - REST Routes → Task Endpoint: registers route
backend/app/api/v1/api_router.py - REST Routes → Review Endpoint: registers route
backend/app/api/v1/api_router.py - REST Routes → Provider Endpoint: registers route
backend/app/api/v1/api_router.py - Task Endpoint → Care Database: reads and updates tasks
backend/app/api/v1/endpoints/tasks.py - Review Endpoint → Care Database: reads and resolves cases
backend/app/api/v1/endpoints/reviews.py - Patient Endpoint → Care Database: reads patient records
backend/app/api/v1/endpoints/patients.py - Provider Endpoint → Provider Matcher: matches providers
backend/app/api/v1/endpoints/providers.py - Discharge Endpoint → Care Database: stores discharge record
backend/app/api/v1/endpoints/discharge.py - Care Database → Care Dashboard: serves care plan
README.md - Care Dashboard → Patient / Caregiver: shows recovery plan
README.md - Clinician → Review Endpoint: triages cases
README.md - Review Endpoint → Task Endpoint: updates related task
backend/app/api/v1/endpoints/reviews.py - FastAPI Application → Database Session: initializes database
backend/app/main.py - Database Session → Care Database: creates tables
backend/app/db/session.py - Care Dashboard → Mock Data: uses demo content