BilalS96 commited on
Commit
cf9241f
Β·
verified Β·
1 Parent(s): 92c803c

Upload folder using huggingface_hub

Browse files
Files changed (5) hide show
  1. .gitattributes +1 -0
  2. README.md +57 -15
  3. __pycache__/app.cpython-312.pyc +3 -0
  4. app.py +0 -0
  5. 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 detects dangerous drug interactions, personalizes recommendations based on patient factors, and ensures clinical guideline compliance.
 
 
 
 
 
27
 
28
- ### πŸ€– Agent Architecture
29
 
30
- 1. **Drug Interaction Agent** - Detects harmful drug combinations using Neo4j knowledge graph
31
- 2. **Personalization Agent** - Adjusts recommendations for age, renal function, allergies
32
- 3. **Guideline Compliance Agent** - Validates against clinical practice guidelines
33
- 4. **Cost Optimization Agent** - Suggests cost-effective alternatives
34
- 5. **Explanation Agent** - Generates human-readable clinical summaries
 
 
 
 
 
 
 
 
 
 
 
35
 
36
  ### πŸ› οΈ Technology Stack
37
 
38
- - **MCP Server**: Python `mcp` SDK with stdio transport (10 tools, 3 resources)
39
- - **Orchestration**: LangGraph with conditional severity-based routing
40
- - **LLM**: Google Gemini 1.5 Flash
41
- - **Databases**: PostgreSQL, Neo4j, Qdrant (vector search)
42
- - **Embeddings**: BioBERT for clinical text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
 
44
  ### πŸ”— Links
45
 
46
- - **GitHub**: [SmartGridsML/mcp1stbirthday_hack](https://github.com/SmartGridsML/mcp1stbirthday_hack)
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