Skip to content

AI-assisted emergency triage system using retrieval-augmented reasoning and real-time computer vision to prioritize high-risk patients.

Notifications You must be signed in to change notification settings

DevangBanda/SentinelCare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SentinelCare — AI-Assisted Emergency Triage System

SentinelCare is an AI-assisted emergency triage and monitoring system designed to improve patient prioritization and response time in clinical waiting-room or emergency-department settings.

The system combines natural language triage, retrieval-augmented reasoning (RAG), and real-time computer vision to assist healthcare staff in identifying high-risk cases earlier and more reliably.


Key Features

Self Check-In Triage

  • Patients enter free-text symptoms through a kiosk-style intake form
  • The system assigns an ESI-like priority level (1–5)
  • Generates a concise, nurse-facing clinical summary using retrieval-augmented reasoning

Knowledge-Grounded Decision Support

  • Medical guideline text is embedded and stored in a vector database (ChromaDB)
  • Relevant guideline snippets are retrieved at inference time
  • Triage decisions are explainable and grounded, not based on brittle hard-coded rules

Live Visual Sentinel (Computer Vision)

  • Real-time monitoring using MediaPipe Pose
  • Detects clinically relevant gestures and events, including:
    • Choking / airway distress
    • Chest pain (Levine-like gesture)
    • Falls or collapse
    • Headache / head pain gestures

Nurse Dashboard

  • Live-updating priority queue sorted by urgency and arrival time
  • Visual alerts for detected emergencies
  • Code Black override automatically inserts a top-priority case when a critical visual event is detected

Quick Start (Windows, macOS, Linux)

1. Create a virtual environment and install dependencies

python -m venv .venv
# Windows:
.venv\Scripts\activate
# macOS / Linux:
source .venv/bin/activate

pip install -r requirements.txt

### B. Ingest demo knowledge base
```bash
python ingest.py

C. Run the app

python app.py

Open:


2) Using your own guideline PDF (optional)

If you have permission to use a PDF:

  1. Put it under data/your_guidelines.pdf
  2. Run:
python ingest.py --pdf data/your_guidelines.pdf

3) Camera / pose monitoring

This app supports:

  • A webcam attached to your computer

Dashboard page shows two camera streams by default:

  • /video/0
  • /video/1

If you only have one camera, device 1 may fail; that's okay.


4) How the RAG works here

This implementation uses:

  • sentence-transformers embeddings (local) + ChromaDB vector store.
  • A simple template-based reasoning that produces:
    • triage level 1..5
    • short summary + suggested next steps

You can replace the rag.py logic with an LLM call if you want. There is a hook for OpenAI-compatible APIs (see RAG_USE_LLM and OPENAI_BASE_URL env vars in .env.example).


5) Project structure

_like/
  app.py              Flask server (intake + dashboard + APIs)
  ingest.py           Builds Chroma vector DB from demo txt or a PDF
  rag.py              Retrieval + triage summary
  vision.py           MediaPipe Pose + event detection + streaming frames
  services.py         In-memory store (queue + alerts) + background workers
  templates/
  static/
  data/

Security notes (important)

This is a demo. Do not deploy as-is for real medical use.

  • No PHI compliance
  • No hardening
  • Demo login only

About

AI-assisted emergency triage system using retrieval-augmented reasoning and real-time computer vision to prioritize high-risk patients.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors