🏥 医疗助理-基于人工智能的健康管理系统
具有人工智能聊天界面、饮食计划和预约功能的现代医疗管理系统。
🚀 快速开始
选项1:简单的一个命令启动(推荐)
./start.sh选项2:使用Python
# Activate virtual environment first
source .venv/bin/activate
# Run the application
python main.py选项3:手动启动
# 1. Activate virtual environment
source .venv/bin/activate
# 2. Install dependencies (first time only)
pip install -r requirements.txt
# 3. Start the server
uvicorn backend.main:app --reload --host 0.0.0.0 --port 8000📱 访问应用程序
- 后端API: http://localhost:8000
- 前端:打开
frontend/index.html在浏览器中 - API文件: http://localhost:8000/docs
✨ 特性
💬 智能聊天界面
- 自然语言理解
- 自动检测您的意图(健康查询、饮食计划或预约)
- 无需手动选择工具!
🥗 饮食计划生成器
自然地问:
- “制定一个2000卡路里的素食计划”
- “给我一个酮餐计划”
- “创建糖尿病友好饮食”
📅 预约
通过对话方式预约:
- “预约明天上午10点进行PAT001全身检查”
- “为PAT123安排下午2点的心脏病学检查”
💊 一般健康助理
问任何健康问题:
- “喝水有什么好处?”
- “我需要多少睡眠?”
- “保持健康的小贴士”
🛠️ 设置(第一次)
# 1. Create virtual environment
python3 -m venv .venv
# 2. Activate it
source .venv/bin/activate # On Mac/Linux
# or
.venv\Scripts\activate # On Windows
# 3. Install dependencies
pip install -r requirements.txt
# 4. Run the application
python main.py📦 项目结构
Healthcare/
├── backend/
│ ├── main.py # FastAPI application
│ ├── mcp.py # MCP server implementation
│ └── tools/ # Tool implementations
│ ├── general.py # Health Q&A
│ ├── diet.py # Diet plan generator
│ └── booking.py # Appointment booking
├── frontend/
│ └── index.html # Chat interface
├── main.py # Application launcher
├── start.sh # Quick start script
├── requirements.txt # Python dependencies
└── bookings.json # Appointment storage🎯 查询示例
在聊天界面中尝试以下操作:
健康问题:
- “冥想有什么好处?”
- “如何提高我的免疫系统?”
- “最佳减肥运动”
饮食计划:
- “制定1800卡路里的素食计划”
- “制定高蛋白膳食计划以增强肌肉”
- “酮饮食计划,不含乳制品”
约会:
- “预约明天下午3点进行PAT001检查”
- “下周一上午10点为PAT456安排心脏病学咨询”
🔧 故障排除
服务器无法启动?
# Make sure virtual environment is activated
source .venv/bin/activate
# Reinstall dependencies
pip install -r requirements.txt
# Try running directly
python main.py端口8000已在使用中?
# Find and kill the process
lsof -ti:8000 | xargs kill -9
# Or use a different port
uvicorn backend.main:app --reload --port 8001前端未连接?
- 确保后端正在运行http://localhost:8000
- 检查浏览器控制台是否有错误
- 尝试在浏览器中直接打开front/index.html
📝 API终点
GET /-API信息GET /mcp/tools-列出可用工具POST /mcp/call-调用特定工具GET /docs-交互式API文档
🤝 贡献
您可以通过以下方式增强系统:
- 更多健康工具
- 更好的NLP用于查询理解
- 其他功能,如药物跟踪
- 与真实的医疗保健API集成
📄 许可证
该项目用于教育和示范目的。
