Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- README.md +57 -15
- __pycache__/app.cpython-312.pyc +3 -0
- app.py +0 -0
- requirements.txt +0 -4
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
__pycache__/app.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -15,6 +15,8 @@ tags:
|
|
| 15 |
- drug-interactions
|
| 16 |
- medication-safety
|
| 17 |
- hackathon
|
|
|
|
|
|
|
| 18 |
---
|
| 19 |
|
| 20 |
# π₯ MedGuard
|
|
@@ -23,29 +25,69 @@ tags:
|
|
| 23 |
|
| 24 |
## MCP 1st Birthday Hackathon Submission
|
| 25 |
|
| 26 |
-
MedGuard is a healthcare multi-agent system that
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
-
### π€ Agent Architecture
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
### π οΈ Technology Stack
|
| 37 |
|
| 38 |
-
|
| 39 |
-
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
### π Links
|
| 45 |
|
| 46 |
-
- **GitHub**: [
|
| 47 |
-
- **Claude Desktop Integration**: Works via MCP stdio transport
|
|
|
|
| 48 |
|
| 49 |
---
|
| 50 |
|
| 51 |
-
*Built for the MCP 1st Birthday Hackathon*
|
|
|
|
| 15 |
- drug-interactions
|
| 16 |
- medication-safety
|
| 17 |
- hackathon
|
| 18 |
+
- pharmacogenomics
|
| 19 |
+
- clinical-decision-support
|
| 20 |
---
|
| 21 |
|
| 22 |
# π₯ MedGuard
|
|
|
|
| 25 |
|
| 26 |
## MCP 1st Birthday Hackathon Submission
|
| 27 |
|
| 28 |
+
MedGuard is a production-grade healthcare multi-agent system that:
|
| 29 |
+
- Detects dangerous drug interactions (25+ known DDIs + CYP metabolic conflicts)
|
| 30 |
+
- Personalizes recommendations based on pharmacogenomics (CYP2D6, CYP2C9, CYP2C19)
|
| 31 |
+
- Applies Beers Criteria for elderly patients (AGS 2023 complete list)
|
| 32 |
+
- Ensures clinical guideline compliance (AHA/ACC, ADA, ESC)
|
| 33 |
+
- Optimizes medication costs with generic alternatives
|
| 34 |
|
| 35 |
+
### π€ Agent Architecture (5 Specialized Agents)
|
| 36 |
|
| 37 |
+
| Agent | Role |
|
| 38 |
+
|-------|------|
|
| 39 |
+
| **DrugInteractionAgentEnhanced** | DDI detection, CYP enzyme conflicts, ML prediction, PubMed enhancement |
|
| 40 |
+
| **PersonalizationAgent** | Renal/hepatic adjustments, pharmacogenomics, Beers Criteria, polypharmacy |
|
| 41 |
+
| **GuidelineComplianceAgent** | Evidence-based guideline checking, polypharmacy detection |
|
| 42 |
+
| **CostOptimizationAgent** | Generic substitution, therapeutic alternatives, formulary optimization |
|
| 43 |
+
| **ExplanationAgent** | Clinical synthesis, prioritization, patient-friendly summaries |
|
| 44 |
+
|
| 45 |
+
### π LangGraph Orchestration
|
| 46 |
+
|
| 47 |
+
```
|
| 48 |
+
START β interaction_check β [conditional_route]
|
| 49 |
+
ββ "critical" β human_review_node β explanation β END
|
| 50 |
+
ββ "parallel_analysis" β [personalization, guideline, cost] β explanation β END
|
| 51 |
+
ββ "low_risk" β streamlined_analysis β explanation β END
|
| 52 |
+
```
|
| 53 |
|
| 54 |
### π οΈ Technology Stack
|
| 55 |
|
| 56 |
+
| Component | Technology |
|
| 57 |
+
|-----------|------------|
|
| 58 |
+
| **MCP Server** | Python `mcp` SDK with stdio transport (10 tools, 3 resources) |
|
| 59 |
+
| **Orchestration** | LangGraph StateGraph with conditional severity routing |
|
| 60 |
+
| **LLM** | Google Gemini 1.5 Flash (production) / Rule-based (demo) |
|
| 61 |
+
| **Knowledge Graph** | Neo4j for drug interaction network |
|
| 62 |
+
| **Vector Search** | Qdrant + BioBERT embeddings |
|
| 63 |
+
| **API** | FastAPI with HIPAA-compliant audit logging |
|
| 64 |
+
| **Databases** | PostgreSQL, Redis for session management |
|
| 65 |
+
|
| 66 |
+
### 𧬠Key Features
|
| 67 |
+
|
| 68 |
+
- **25+ Known Drug Interactions** with mechanisms and management strategies
|
| 69 |
+
- **CYP Enzyme Analysis** (2D6, 2C9, 2C19, 3A4, 1A2 substrates and inhibitors)
|
| 70 |
+
- **Pharmacogenomics** (poor/intermediate/ultrarapid metabolizer phenotypes)
|
| 71 |
+
- **Complete Beers Criteria** (30+ medications inappropriate in elderly)
|
| 72 |
+
- **Polypharmacy Detection** (5+ and 10+ medication thresholds)
|
| 73 |
+
- **Clinical Guidelines** (6 major conditions with AHA/ACC/ADA recommendations)
|
| 74 |
+
|
| 75 |
+
### π Demo Patients
|
| 76 |
+
|
| 77 |
+
| Patient | Demonstrates |
|
| 78 |
+
|---------|--------------|
|
| 79 |
+
| P001 - John Smith | Warfarin + Aspirin DDI, CKD, CYP2C9 variant |
|
| 80 |
+
| P002 - Maria Garcia | Serotonin syndrome risk (SSRI + Tramadol) |
|
| 81 |
+
| P003 - Robert Chen | 8 medications, hyperkalemia risk, HF management |
|
| 82 |
+
| P004 - Sarah Johnson | Statin + CCB interaction (CYP3A4) |
|
| 83 |
+
| P005 - James Wilson | Beers Criteria violations, CYP2D6 poor metabolizer |
|
| 84 |
|
| 85 |
### π Links
|
| 86 |
|
| 87 |
+
- **GitHub**: [mcp1stbirthday_hack](https://github.com/SmartGridsML/mcp1stbirthday_hack)
|
| 88 |
+
- **Claude Desktop Integration**: β
Works via MCP stdio transport
|
| 89 |
+
- **Hackathon Track**: Track 1 (Building MCP) + Track 2 (Consumer Use)
|
| 90 |
|
| 91 |
---
|
| 92 |
|
| 93 |
+
*Built for the MCP 1st Birthday Hackathon ($50,000 Prize Pool)*
|
__pycache__/app.cpython-312.pyc
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a4d5a629e7fe3a3e8ba5f1d264c4e7c91a1a73394939ae6dc9be8afad56c2d15
|
| 3 |
+
size 133206
|
app.py
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
requirements.txt
CHANGED
|
@@ -1,5 +1 @@
|
|
| 1 |
gradio
|
| 2 |
-
langchain
|
| 3 |
-
langchain-google-genai
|
| 4 |
-
langchain-anthropic
|
| 5 |
-
langchain-core
|
|
|
|
| 1 |
gradio
|
|
|
|
|
|
|
|
|
|
|
|