Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🏥 Health Triage & Tracking Agent

Empowering Healthcare Accessibility through Secure AI Orchestration

Overburdened medical facilities often leave patients waiting hours for basic triage, delaying critical care and increasing anxiety. The Health Triage & Tracking Agent is an intelligent, secure personal health assistant designed to perform initial symptom assessments and provide safe, actionable guidance. By filtering non-emergency cases and organizing patient data before they even reach the clinic, this system drastically reduces the load on healthcare infrastructure while ensuring universal, immediate access to reliable health information.


Architecture & Problem Statement

The Problem

Global healthcare systems are experiencing unprecedented strain. Patients struggle to access timely medical advice for preliminary symptoms, while doctors are overwhelmed by administrative data collection. There is a critical need for an automated, secure, and accurate first-line triage system that bridges the gap between patients and professional care.

The Solution

(Insert architecture diagram here: [Architecture Flow Diagram])

Our architecture decouples the conversational AI from the medical knowledge base using a robust Model Context Protocol (MCP) design, ensuring both fluid patient interaction and rigid data security.


Core Technical Implementation

1. Multi-Agent Systems (Intake & Assessment)

The system leverages a sophisticated multi-agent workflow to simulate a real-world clinical triage process:

  • Intake Agent (The Receptionist): Responsible for gathering patient symptoms iteratively. It dynamically asks clarifying questions until sufficient data is collected, enforcing a strict turn limit to prevent conversational loops.
  • Assessment Agent (The Specialist): Once the intake is complete, this agent analyzes the compiled symptoms against medical guidelines and patient history to provide a structured clinical summary and actionable, non-prescriptive advice.
  • Implementation: Found in python-ai-agent/app.py where the state machine dictates the handoff ([HANDOFF]) between workflow_stage == "intake" and workflow_stage == "assessment".

2. MCP (Model Context Protocol) Servers

To prevent the LLM from hallucinating medical facts or accessing unauthorized data, all critical operations are routed through a secure backend acting as an MCP Server.

  • The Java Spring Boot backend provides strict, API-driven Skills: getUserProfile and getMedicalGuidelines.
  • This architecture guarantees that the AI only reasons over verified database records rather than its pre-trained weights.
  • Implementation: The MCP server endpoints are defined in the Spring Boot backend, specifically within backend-mcp-server/src/main/java/com/example/demo/controller/HealthController.java.

3. Security Features & Data Flow Control

For a healthcare application, Data Flow Control is paramount. We implemented strict guardrails to ensure patient privacy and system integrity:

  • Real-time Redaction: Sensitive patient information (e.g., real names, National ID numbers) is proactively anonymized via regex before any prompt is sent to the LLM cloud provider.
  • System-level Guardrails: The model is strictly instructed via system_instruction to refuse medication prescriptions and enforce clinical disclaimers.
  • Environment Isolation: Secrets and database credentials are injected via .env files and environment variables, never hardcoded.
  • Implementation: The anonymization logic (redact_sensitive_info) and AI guardrails are implemented directly in the data pipeline within python-ai-agent/app.py.

Getting Started

Follow these steps to deploy the system locally.

1. Database Setup

Ensure you have PostgreSQL running. Create a database for the application. The Spring Boot backend will automatically run the schema migrations via Hibernate.

2. Run the Backend Java Spring Boot

Navigate to the backend directory, configure your database credentials, and start the MCP Server:

cd backend-mcp-server
# Ensure your database environment variables or application.properties are set
./mvnw spring-boot:run

The backend will run on http://localhost:8080.

3. Run the Frontend Python Agent

Navigate to the AI agent directory, set up your Python environment, and start the Streamlit interface:

cd python-ai-agent
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Create a .env file and add your GEMINI_API_KEY
streamlit run app.py

Future Enhancements

  • Multimodal AI Integration: Incorporating computer vision models (e.g., MobileNetV2) to allow patients to upload images of skin rashes or wounds for visual preliminary analysis.
  • Wearable Device Syncing: Direct integration with Apple Health and Google Fit to stream real-time vitals (heart rate, SpO2) into the Intake Agent's context.
  • Electronic Health Record (EHR) Export: Generating FHIR-compliant triage summaries that can be directly imported into standard hospital management systems.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages