Skip to content

feat: add AI clinical alert worker and frontend alert listener#154

Merged
inteee merged 1 commit intoCIVRA-INC:mainfrom
phertyameen:feat/AI_Clinical_Alert
Mar 9, 2026
Merged

feat: add AI clinical alert worker and frontend alert listener#154
inteee merged 1 commit intoCIVRA-INC:mainfrom
phertyameen:feat/AI_Clinical_Alert

Conversation

@phertyameen
Copy link
Contributor

Closes #122

This pr Implements a background AI alert system triggered by the VitalsCreated event.

  • Added EventEmitter listener and async worker to process vitals without blocking API responses
  • Sends encounter context to Gemini with strict JSON response enforcement
  • Persists alerts to ClinicalAlertModel when red flags are detected
  • Added frontend polling/WebSocket listener for encounter alerts
  • Displays non-intrusive, dismissible toast/sidebar alert in the encounter UI

Includes a manual test trigger for the worker while the Vitals API is still in progress.

Copy link
Contributor

@inteee inteee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on this. I’ve reviewed the changes and everything looks good. Approved.

@inteee inteee merged commit 2a5febe into CIVRA-INC:main Mar 9, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proactive Clinical Decision Support (CDS) Agent

2 participants