Drug Safety Review
AI-powered medication safety review system for healthcare providers, pharmacists, and patients. Provides comprehensive drug safety analysis including interactions, contraindications, allergies, and dosing optimization.
Features
- Drug-Drug Interaction Detection - 200,000+ documented interaction pairs
- Contraindication Analysis - Absolute and relative contraindications
- Allergy Detection - Drug and excipient allergy screening
- Dosing Optimization - Renal, hepatic, and age-based adjustments
- Monitoring Recommendations - Lab tests and clinical monitoring
- Alternative Therapy Suggestions - Safer medication alternatives
Quick Start
Review medication safety:
from scripts.safety_review import review_medications
import os
# Set environment variables
os.environ["SKILL_BILLING_API_KEY"] = "your-api-key"
os.environ["SKILL_ID"] = "your-skill-id"
# Review patient medications
result = review_medications(
medications=[
{"drug": "warfarin", "dose": "5mg", "frequency": "daily"},
{"drug": "amoxicillin", "dose": "500mg", "frequency": "q8h"}
],
allergies=[
{"allergen": "penicillin", "reaction": "anaphylaxis"}
],
patient_data={
"age": 65,
"weight": 75,
"renal_function": {"egfr": 45}
},
user_id="user_123"
)
# Check result
if result["success"]:
print("安全状态:", result["safety_status"])
print("警报数量:", len(result["alerts"]))
for alert in result["alerts"]:
print(f"- [{alert['severity']}] {alert['title']}")
else:
print("错误:", result["error"])
if "paymentUrl" in result:
print("充值链接:", result["paymentUrl"])
API Usage:
# Set environment variables
export SKILL_BILLING_API_KEY="your-api-key"
export SKILL_ID="your-skill-id"
# Run safety review
python scripts/safety_review.py \
--medications '[{"drug":"warfarin","dose":"5mg"}]' \
--allergies '[{"allergen":"penicillin"}]' \
--patient '{"age":65}' \
--user-id "user_123"
Configuration
- Provider: skillpay.me
- Pricing: 1 token per call (~0.001 USDT)
- Minimum deposit: 8 USDT
- API Key:
SKILL_BILLING_API_KEY environment variable
- Skill ID:
SKILL_ID environment variable
Alert Severity Levels
| Level |
Name |
Description |
Action |
| 1 |
Critical |
Life-threatening, immediate action required |
Avoid combination |
| 2 |
Major |
Significant risk, strong recommendation |
Consider alternatives |
| 3 |
Moderate |
Potential risk, monitoring required |
Monitor closely |
| 4 |
Minor |
Limited clinical significance |
Routine monitoring |
Supported Drug Classes
- Cardiovascular: Anticoagulants, antiarrhythmics, antihypertensives
- CNS Drugs: Antidepressants, antipsychotics, antiepileptics, opioids
- Infectious Disease: Antibiotics, antifungals, antiretrovirals
- Oncology: Chemotherapeutic agents, targeted therapies
- Endocrine: Diabetes medications, thyroid hormones
- GI Drugs: PPIs, H2 blockers, laxatives
- Respiratory: Bronchodilators, corticosteroids
- Pain Management: NSAIDs, acetaminophen, muscle relaxants
References
- Drug database: references/drug-database.md
- Interaction criteria: references/interaction-criteria.md
- Billing API: references/skillpay-billing.md
Disclaimer
This tool is for clinical decision support only and does not replace professional pharmacist or physician judgment. Always verify recommendations with qualified healthcare providers.
System Limitations:
- Not a substitute for clinical judgment
- Accuracy depends on complete medication and allergy data
- Rare interactions may have limited data
- Patient-specific factors may affect actual risk
1---2name: drug-safety-review3description: Comprehensive medication safety review system providing real-time analysis of drug-drug interactions, contraindications, allergy risks, and dosing optimization. Supports 20,000+ FDA-approved medications with 200,000+ documented interactions. Features evidence-based recommendations to prevent adverse drug events and optimize therapeutic outcomes.4---56# Drug Safety Review78AI-powered medication safety review system for healthcare providers, pharmacists, and patients. Provides comprehensive drug safety analysis including interactions, contraindications, allergies, and dosing optimization.910## Features11121. **Drug-Drug Interaction Detection** - 200,000+ documented interaction pairs132. **Contraindication Analysis** - Absolute and relative contraindications143. **Allergy Detection** - Drug and excipient allergy screening154. **Dosing Optimization** - Renal, hepatic, and age-based adjustments165. **Monitoring Recommendations** - Lab tests and clinical monitoring176. **Alternative Therapy Suggestions** - Safer medication alternatives1819## Quick Start2021### Review medication safety:2223```python24from scripts.safety_review import review_medications25import os2627# Set environment variables28os.environ["SKILL_BILLING_API_KEY"] = "your-api-key"29os.environ["SKILL_ID"] = "your-skill-id"3031# Review patient medications32result = review_medications(33 medications=[34 {"drug": "warfarin", "dose": "5mg", "frequency": "daily"},35 {"drug": "amoxicillin", "dose": "500mg", "frequency": "q8h"}36 ],37 allergies=[38 {"allergen": "penicillin", "reaction": "anaphylaxis"}39 ],40 patient_data={41 "age": 65,42 "weight": 75,43 "renal_function": {"egfr": 45}44 },45 user_id="user_123"46)4748# Check result49if result["success"]:50 print("安全状态:", result["safety_status"])51 print("警报数量:", len(result["alerts"]))52 for alert in result["alerts"]:53 print(f"- [{alert['severity']}] {alert['title']}")54else:55 print("错误:", result["error"])56 if "paymentUrl" in result:57 print("充值链接:", result["paymentUrl"])58```5960### API Usage:6162```bash63# Set environment variables64export SKILL_BILLING_API_KEY="your-api-key"65export SKILL_ID="your-skill-id"6667# Run safety review68python scripts/safety_review.py \69 --medications '[{"drug":"warfarin","dose":"5mg"}]' \70 --allergies '[{"allergen":"penicillin"}]' \71 --patient '{"age":65}' \72 --user-id "user_123"73```7475## Configuration7677- Provider: skillpay.me78- Pricing: 1 token per call (~0.001 USDT)79- Minimum deposit: 8 USDT80- API Key: `SKILL_BILLING_API_KEY` environment variable81- Skill ID: `SKILL_ID` environment variable8283## Alert Severity Levels8485| Level | Name | Description | Action |86|-------|------|-------------|--------|87| 1 | Critical | Life-threatening, immediate action required | Avoid combination |88| 2 | Major | Significant risk, strong recommendation | Consider alternatives |89| 3 | Moderate | Potential risk, monitoring required | Monitor closely |90| 4 | Minor | Limited clinical significance | Routine monitoring |9192## Supported Drug Classes9394- **Cardiovascular**: Anticoagulants, antiarrhythmics, antihypertensives95- **CNS Drugs**: Antidepressants, antipsychotics, antiepileptics, opioids96- **Infectious Disease**: Antibiotics, antifungals, antiretrovirals97- **Oncology**: Chemotherapeutic agents, targeted therapies98- **Endocrine**: Diabetes medications, thyroid hormones99- **GI Drugs**: PPIs, H2 blockers, laxatives100- **Respiratory**: Bronchodilators, corticosteroids101- **Pain Management**: NSAIDs, acetaminophen, muscle relaxants102103## References104105- Drug database: [references/drug-database.md](references/drug-database.md)106- Interaction criteria: [references/interaction-criteria.md](references/interaction-criteria.md)107- Billing API: [references/skillpay-billing.md](references/skillpay-billing.md)108109## Disclaimer110111This tool is for clinical decision support only and does not replace professional pharmacist or physician judgment. Always verify recommendations with qualified healthcare providers.112113**System Limitations**:114- Not a substitute for clinical judgment115- Accuracy depends on complete medication and allergy data116- Rare interactions may have limited data117- Patient-specific factors may affect actual risk