How mahmoodbamatraf/strokeaegis-ai-platform works
StrokeAegis is a clinical decision-support platform for clinicians and patients, combining patient risk scoring, safety-gated CT diagnosis, multi-agent clinical guidance, and reports. The principal workflow is coordinated by the clinical flow and exposed through pipeline management; separate API capabilities support accounts, care teams, assessment history, and chatbot consultations. Edges are limited to relationships documented in the README or visible in the supplied source index and excerpts; unsampled subsystem internals are not inferred.
Main entry points: flow.py Clinical flow · app.py Application API · router.py Clinical and care routes · llm.py Gemini LLM setup
Components 29
Clinical assessment
- Stroke risk scoring
backend/ml_engine.py - Risk model worker
backend/ml_worker.py - CT safety gate
backend/gate_engine.py - Stroke CT classifier
backend/stroke_cls_engine.py - Clinical flow
backend/crew/flow.py - Flow state
backend/crew/state.py - PDF report generator
backend/reports/pdf_generator.py
Agent guidance
- Safety validation
backend/agents/validation_agent.py - Prevention guidance
backend/agents/prevention_agent.py - Emergency support
backend/agents/emergency_agent.py - Agent report synthesis
backend/agents/report_agent.py - Clinical schemas
backend/agents/schemas.py - Gemini LLM setup
backend/crew/llm.py - Guideline retrieval tools
backend/rag/tools.py - Medical RAG adapter
backend/rag/rag_client.py - Clinical chatbot
backend/chatbot/service.py
Application platform
- Application API
backend/app.py - Pipeline manager
backend/orchestration/pipeline_manager.py - Clinical data models
backend/database/models.py - Database sessions
backend/database/database.py - Web interface
frontend/app.js
Care coordination
- Authentication routes
backend/auth/router.py - Password and JWT security
backend/auth/security.py - Authenticated-user dependencies
backend/auth/dependencies.py - Clinical and care routes
backend/clinical/router.py
Other components
- Clinician / patient
- Guideline retrieval service
- Google Gemini
- PostgreSQL database
Connections 46
- Clinician / patient → Web interface: uses
- Web interface → Application API: requests
- Application API → Pipeline manager: starts pipeline
backend/app.py - Pipeline manager → Clinical flow: constructs
backend/orchestration/pipeline_manager.py - Clinical flow → Stroke risk scoring: scores risk
backend/crew/flow.py - Stroke risk scoring → Risk model worker: runs model
backend/ml_engine.py - Clinical flow → CT safety gate: checks scan
backend/crew/flow.py - Clinical flow → Stroke CT classifier: classifies scan
backend/crew/flow.py - Clinical flow → Flow state: updates
backend/crew/flow.py - Clinical flow → Safety validation: invokes
backend/crew/flow.py - Clinical flow → Prevention guidance: invokes
backend/crew/flow.py - Clinical flow → Emergency support: invokes
backend/crew/flow.py - Clinical flow → Agent report synthesis: invokes
backend/crew/flow.py - Clinical flow → PDF report generator: generates report
backend/crew/flow.py - Safety validation → Clinical schemas: uses schemas
backend/agents/validation_agent.py - Prevention guidance → Clinical schemas: uses schemas
backend/agents/prevention_agent.py - Emergency support → Clinical schemas: uses schemas
backend/agents/emergency_agent.py - Agent report synthesis → Clinical schemas: uses schemas
backend/agents/report_agent.py - Safety validation → Gemini LLM setup: uses model
backend/agents/validation_agent.py - Prevention guidance → Gemini LLM setup: uses model
backend/agents/prevention_agent.py - Emergency support → Gemini LLM setup: uses model
backend/agents/emergency_agent.py - Agent report synthesis → Gemini LLM setup: uses model
backend/agents/report_agent.py - Gemini LLM setup → Google Gemini: configures
backend/crew/llm.py - Prevention guidance → Guideline retrieval tools: uses retrieval
backend/agents/prevention_agent.py - Emergency support → Guideline retrieval tools: uses retrieval
backend/agents/emergency_agent.py - Guideline retrieval tools → Medical RAG adapter: queries
backend/rag/tools.py - Medical RAG adapter → Guideline retrieval service: retrieves evidence
backend/rag/rag_client.py - Clinical chatbot → Medical RAG adapter: queries
backend/chatbot/service.py - Application API → Clinical chatbot: exposes consultation
backend/app.py - Application API → Clinical and care routes: mounts routes
backend/app.py - Application API → Authentication routes: mounts routes
backend/app.py - Authentication routes → Password and JWT security: authenticates
backend/auth/router.py - Authentication routes → Database sessions: opens sessions
backend/auth/router.py - Authentication routes → Clinical data models: queries models
backend/auth/router.py - Authenticated-user dependencies → Password and JWT security: validates tokens
backend/auth/dependencies.py - Authenticated-user dependencies → Database sessions: opens sessions
backend/auth/dependencies.py - Authenticated-user dependencies → Clinical data models: loads users
backend/auth/dependencies.py - Clinical and care routes → Authenticated-user dependencies: requires identity
backend/clinical/router.py - Clinical and care routes → Database sessions: opens sessions
backend/clinical/router.py - Clinical and care routes → Clinical data models: queries records
backend/clinical/router.py - Clinical and care routes → Stroke risk scoring: uses risk engine
backend/clinical/router.py - Clinical and care routes → PDF report generator: uses report generator
backend/clinical/router.py - Database sessions → PostgreSQL database: connects
backend/database/database.py - Application API → Stroke risk scoring: configures engine
backend/app.py - Application API → CT safety gate: configures engine
backend/app.py - Application API → Stroke CT classifier: configures engine
backend/app.py