CareConnect: AI-Driven Hospital Environment Monitoring System

CareConnect is an AI-driven system for hospital environment monitoring. Clinical staff can query sensor data using plain natural language, receive real-time visualisations, and trigger automated responses โ€” all through a conversational interface powered by LangChain and large language models.

Motivation

Hospital environments generate continuous streams of sensor data (temperature, humidity, COโ‚‚, occupancy) from wards, operating theatres, and ICUs. Extracting actionable insights from this data typically requires querying databases or reading dashboards. CareConnect replaces these interfaces with a natural-language chat that understands clinical context.

Architecture

  • Sensor layer: MQTT broker receives real-time telemetry from environmental IoT devices deployed in hospital rooms.
  • LangChain agent: an LLM-powered agent with tool access โ€” it can query the sensor database, request time-series plots, and issue MQTT commands to actuators (e.g., HVAC adjustments, alert notifications).
  • Chat interface: staff interact via a simple chat UI; the agent interprets queries, fetches relevant data, and responds with text + charts.
  • Automated actions: threshold violations trigger pre-configured actions (notifications, device commands) without human intervention.

Example Interactions

  • โ€œWhat was the average temperature in Ward 3 yesterday?โ€ โ†’ agent queries DB and returns summary + plot.
  • โ€œAlert me if COโ‚‚ in Operating Theatre 2 exceeds 1000 ppm.โ€ โ†’ agent registers a live trigger.
  • โ€œTurn on ventilation in Room 14.โ€ โ†’ agent publishes an MQTT command.

Technology

Python, LangChain, OpenAI API, MQTT (Paho), Matplotlib, Robot Framework for integration testing.