https://github.com/aimaster-dev/medical-ai-assistant
A smart AI assistant for clinics using LangGraph, LangChain, and OpenAI GPT. It handles patient queries, schedules appointments, detects emergencies, and updates medical records through multi-turn, memory-aware conversations.
https://github.com/aimaster-dev/medical-ai-assistant
ai-assistant appointment chatbot decision-router emergency gpt healthcare healthcare-automation langchain langgraph llm medical-ai memory multi-turn openai patient-record python smart-clinic-software triage-bot virtual-assistant
Last synced: 29 days ago
JSON representation
A smart AI assistant for clinics using LangGraph, LangChain, and OpenAI GPT. It handles patient queries, schedules appointments, detects emergencies, and updates medical records through multi-turn, memory-aware conversations.
- Host: GitHub
- URL: https://github.com/aimaster-dev/medical-ai-assistant
- Owner: aimaster-dev
- License: mit
- Created: 2025-05-30T10:05:29.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2025-05-30T12:27:26.000Z (5 months ago)
- Last Synced: 2025-05-30T13:13:01.382Z (5 months ago)
- Topics: ai-assistant, appointment, chatbot, decision-router, emergency, gpt, healthcare, healthcare-automation, langchain, langgraph, llm, medical-ai, memory, multi-turn, openai, patient-record, python, smart-clinic-software, triage-bot, virtual-assistant
- Language: Python
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# š„ Good Health AI Assistant ā Smart Medical Chatbot with LangGraph & GPT
An intelligent, memory-aware conversational assistant for **Good Health Clinic**, built with **LangGraph**, **LangChain**, and **OpenAI GPT**. This system routes patient queries, detects emergencies, manages appointments, and updates medical records ā all through natural multi-turn conversations.
---
## ⨠Key Features
* š¤ **AI-Powered Appointment Scheduling**
* š¤ **Patient Profile Management** (history, allergies, treatments)
* šØ **Emergency Detection & Alert System**
* š¬ **Multi-turn Memory Conversations**
* š§ **LangGraph-Based Decision Routing**---
## š§© How It Works
### š¹ `check_condition()`
Determines the route of conversation:
* Routes to `handle_emergency()` if message contains **"emergency"**
* Otherwise, calls `call_model()` for regular processing### š¹ `call_model()`
* Retrieves patient data
* Generates GPT-based responses contextualized with history### š¹ `handle_emergency()`
* Delivers urgent care instructions instantly
### š¹ `write_memory()`
* Updates and persists medical records securely
---
## āļø Setup & Installation
### 1ļøā£ Clone the Repo
```bash
git clone https://github.com/aimaster-dev/medical-ai-assistant
cd medical-ai-assistant
```### 2ļøā£ Install Dependencies
Make sure you're using Python 3.8+
```bash
pip install -r requirements.txt
```### 3ļøā£ Configure Environment Variables
Create a `.env` file:
```env
OPENAI_API_KEY=your-api-key-here
```---
## š Running the Assistant
To launch the chatbot:
```bash
python main.py
```### š” Example Interaction
Routine Check-up:
```
User: I need to book a follow-up appointment.
Assistant: Hello Taher! I can help you schedule a check-up. When are you available?
```Emergency:
```
User: This is an emergency! Iām having severe chest pain.
Assistant: We've detected an emergency. Please call emergency services or our 24/7 urgent line: +43 00 00 00.
```---
## š§ Tech Stack
| Tool | Purpose |
| ----------------- | ------------------------------------ |
| **LangGraph** | Graph-based conversational routing |
| **LangChain** | LLM + Memory integration |
| **OpenAI GPT** | Natural language response generation |
| **Python** | Backend implementation |
| **InMemoryStore** | Persistent session-based memory |---
## šØāš» Maintainer
**Ying Zhou**
š§ [zying1309@gmail.com](mailto:zying1309@gmail.com)> Contributions welcome! Fork the repo and submit a pull request š
---
## š License
This project is licensed under the **MIT License**.