How kavya4615/agentic-ai-intra-iit works
SentinelCare is a clinical deterioration and escalation copilot. Synthetic patient monitors generate live vitals that enter the backend, update patient state, pass through artifact filtering, trend analysis, risk scoring, and alert transitions. Escalations trigger context- and protocol-grounded SBAR reasoning; clinicians review alerts and choose a decision. The dashboard presents the live cohort, charts, explanations, and decision controls. README documents the broad system flow; sampled source and the SOURCE INDEX support several internal calls, while unsampled wiring is not inferred.
Main entry points: agent_service.py Agent service · Dashboard.tsx Live dashboard · pipeline.py Deterministic pipeline · main.py WebSocket gateway
Components 27
Patient Simulation
- Clinical scenarios
backend/simulator/scenarios.py - Patient profiles
backend/simulator/patients.py - Vital generator
backend/simulator/generator.py
Ingestion and State
- WebSocket gateway
backend/ingestion/main.py - Live patient state
backend/state/patient_state.py
Risk and Alerts
- Artifact filter
backend/engine/preprocessor.py - Trend detector
backend/engine/trend_detector.py - Risk scorer
backend/engine/risk_scorer.py - Deterministic pipeline
backend/alerts/pipeline.py - Alert state machine
backend/alerts/state_machine.py
Clinical Reasoning
- Agent service
backend/agent/agent_service.py - Patient context data
backend/simulator/patient_context_data.py - Patient context model
backend/agent/patient_context.py - Clinical protocol RAG
backend/agent/rag.py - SBAR reasoning
backend/agent/reasoning.py
Decisions and Audit
- Clinician decisions
backend/alerts/decisions.py - Audit trail
backend/database/audit.py
Clinician Dashboard
- Live dashboard
frontend/src/components/Dashboard.tsx - Patient cards
frontend/src/components/PatientCard.tsx - Patient detail
frontend/src/components/DetailPanel.tsx - SBAR and decisions
frontend/src/components/ExplanationModal.tsx - Escalation toasts
frontend/src/components/Toast.tsx - Cohort statistics
frontend/src/components/CohortStatsBar.tsx - Vital charts
frontend/src/components/MultiVitalChart.tsx - Patient sparklines
frontend/src/components/SparklineChart.tsx
Other components
- Simulated monitors
- Clinician
Connections 33
- Clinical scenarios → Vital generator: shapes scenarios
backend/simulator/generator.py - Patient profiles → Vital generator: supplies patients
backend/simulator/generator.py - Simulated monitors → WebSocket gateway: stream vitals
README.md - Vital generator → WebSocket gateway: sends readings
README.md - WebSocket gateway → Deterministic pipeline: processes readings
README.md - Deterministic pipeline → Artifact filter: filters readings
backend/alerts/pipeline.py - Deterministic pipeline → Live patient state: updates state
backend/alerts/pipeline.py - Deterministic pipeline → Trend detector: analyses trends
backend/alerts/pipeline.py - Deterministic pipeline → Risk scorer: computes risk
backend/alerts/pipeline.py - Deterministic pipeline → Alert state machine: evaluates risk
backend/alerts/pipeline.py - WebSocket gateway → Live patient state: maintains state
README.md - Alert state machine → Agent service: triggers escalation
README.md - Agent service → Live patient state: reads patient state
backend/agent/agent_service.py - Agent service → Patient context data: loads context
backend/agent/agent_service.py - Patient context data → Patient context model: creates profiles
backend/simulator/patient_context_data.py - Agent service → Clinical protocol RAG: retrieves protocols
backend/agent/agent_service.py - Agent service → SBAR reasoning: generates SBAR
backend/agent/agent_service.py - Agent service → Clinician decisions: provides explanation
README.md - Clinician → Live dashboard: reviews cohort
README.md - WebSocket gateway → Live dashboard: broadcasts updates
README.md - Live dashboard → Patient cards: renders cards
frontend/src/components/Dashboard.tsx - Live dashboard → SBAR and decisions: opens explanation
frontend/src/components/Dashboard.tsx - Live dashboard → Patient detail: renders detail
frontend/src/components/Dashboard.tsx - Live dashboard → Escalation toasts: shows alerts
frontend/src/components/Dashboard.tsx - Live dashboard → Cohort statistics: renders statistics
frontend/src/components/Dashboard.tsx - Patient cards → Patient sparklines: renders trend
frontend/src/components/PatientCard.tsx - Patient detail → Vital charts: renders vitals
frontend/src/components/DetailPanel.tsx - SBAR and decisions → Clinician decisions: submits decisions
README.md - Clinician decisions → Alert state machine: applies decision
README.md - WebSocket gateway → Audit trail: logs observations
backend/ingestion/main.py - Agent service → Audit trail: logs reasoning
README.md - Alert state machine → Audit trail: logs alerts
README.md - Clinician decisions → Audit trail: logs decisions
README.md