{"id":30389299,"url":"https://github.com/aimaster-dev/medical-ai-assistant","last_synced_at":"2026-05-07T01:03:07.233Z","repository":{"id":296376427,"uuid":"993156437","full_name":"aimaster-dev/medical-ai-assistant","owner":"aimaster-dev","description":"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.","archived":false,"fork":false,"pushed_at":"2025-05-30T12:27:26.000Z","size":76,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-14T22:40:25.483Z","etag":null,"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"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aimaster-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-30T10:05:29.000Z","updated_at":"2025-07-30T20:29:19.000Z","dependencies_parsed_at":"2025-05-30T13:13:05.093Z","dependency_job_id":"ca5333e4-305f-4bdc-813b-e8b5595f8229","html_url":"https://github.com/aimaster-dev/medical-ai-assistant","commit_stats":null,"previous_names":["aimaster-dev/medical-ai-assistant"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aimaster-dev/medical-ai-assistant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimaster-dev%2Fmedical-ai-assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimaster-dev%2Fmedical-ai-assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimaster-dev%2Fmedical-ai-assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimaster-dev%2Fmedical-ai-assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aimaster-dev","download_url":"https://codeload.github.com/aimaster-dev/medical-ai-assistant/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimaster-dev%2Fmedical-ai-assistant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32718323,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T00:29:05.620Z","status":"ssl_error","status_checked_at":"2026-05-07T00:28:57.074Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["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"],"created_at":"2025-08-21T08:19:07.684Z","updated_at":"2026-05-07T01:03:07.208Z","avatar_url":"https://github.com/aimaster-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏥 Good Health AI Assistant – Smart Medical Chatbot with LangGraph \u0026 GPT\n\nAn 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.\n\n\u003cimg src=\"image/my_graph.png\" alt=\"Flow Diagram\" width=\"600\"/\u003e\n\n---\n\n## ✨ Key Features\n\n* 🤖 **AI-Powered Appointment Scheduling**\n* 👤 **Patient Profile Management** (history, allergies, treatments)\n* 🚨 **Emergency Detection \u0026 Alert System**\n* 💬 **Multi-turn Memory Conversations**\n* 🧠 **LangGraph-Based Decision Routing**\n\n---\n\n## 🧩 How It Works\n\n### 🔹 `check_condition()`\n\nDetermines the route of conversation:\n\n* Routes to `handle_emergency()` if message contains **\"emergency\"**\n* Otherwise, calls `call_model()` for regular processing\n\n### 🔹 `call_model()`\n\n* Retrieves patient data\n* Generates GPT-based responses contextualized with history\n\n### 🔹 `handle_emergency()`\n\n* Delivers urgent care instructions instantly\n\n### 🔹 `write_memory()`\n\n* Updates and persists medical records securely\n\n---\n\n## ⚙️ Setup \u0026 Installation\n\n### 1️⃣ Clone the Repo\n\n```bash\ngit clone https://github.com/aimaster-dev/medical-ai-assistant\ncd medical-ai-assistant\n```\n\n### 2️⃣ Install Dependencies\n\nMake sure you're using Python 3.8+\n\n```bash\npip install -r requirements.txt\n```\n\n### 3️⃣ Configure Environment Variables\n\nCreate a `.env` file:\n\n```env\nOPENAI_API_KEY=your-api-key-here\n```\n\n---\n\n## 🚀 Running the Assistant\n\nTo launch the chatbot:\n\n```bash\npython main.py\n```\n\n### 💡 Example Interaction\n\nRoutine Check-up:\n\n```\nUser: I need to book a follow-up appointment.\nAssistant: Hello Taher! I can help you schedule a check-up. When are you available?\n```\n\nEmergency:\n\n```\nUser: This is an emergency! I’m having severe chest pain.\nAssistant: We've detected an emergency. Please call emergency services or our 24/7 urgent line: +43 00 00 00.\n```\n\n---\n\n## 🧠 Tech Stack\n\n| Tool              | Purpose                              |\n| ----------------- | ------------------------------------ |\n| **LangGraph**     | Graph-based conversational routing   |\n| **LangChain**     | LLM + Memory integration             |\n| **OpenAI GPT**    | Natural language response generation |\n| **Python**        | Backend implementation               |\n| **InMemoryStore** | Persistent session-based memory      |\n\n---\n\n## 👨‍💻 Maintainer\n\n**Ying Zhou**\n📧 [zying1309@gmail.com](mailto:zying1309@gmail.com)\n\n\u003e Contributions welcome! Fork the repo and submit a pull request 🚀\n\n---\n\n## 📝 License\n\nThis project is licensed under the **MIT License**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faimaster-dev%2Fmedical-ai-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faimaster-dev%2Fmedical-ai-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faimaster-dev%2Fmedical-ai-assistant/lists"}