Evidence-Based Clinical Reasoning for AI Agents — deterministic calculators, clinical guidelines, and MCP tools backed by DOI-traceable evidence.
Project description
Open Medicine
Evidence-Based Clinical Reasoning for AI Agents
Open Medicine is an open-source Python library that provides deterministic, DOI-traceable clinical reasoning for AI agents. Every calculator, score, and guideline returns its scientific source — eliminating hallucinated clinical advice.
Install
pip install open-medicine
Quick Start
Clinical Calculators
from open_medicine.mcp.calculators.chadsvasc import calculate_chadsvasc, CHADSVAScParams
result = calculate_chadsvasc(CHADSVAScParams(
age=72,
hypertension=True,
diabetes=False,
congestive_heart_failure=False,
stroke_tia_thromboembolism=True,
vascular_disease=False,
female_sex=False
))
print(result.value) # 4
print(result.interpretation) # "CHA2DS2-VASc score is 4. High risk..."
print(result.evidence.source_doi) # "10.1161/CIR.0000000000001193"
Guideline Retrieval
from open_medicine.mcp.guideline_engine import search_guidelines, retrieve_guideline
# Search by topic
matches = search_guidelines("atrial fibrillation anticoagulation")
# → [{"guideline_id": "acc_aha_af_2023", "title": "...", "doi": "...", ...}]
# Retrieve specific section
result = retrieve_guideline("acc_aha_af_2023", "anticoagulation")
print(result.interpretation) # Full curated guideline text
print(result.evidence.source_doi) # "10.1161/CIR.0000000000001193"
MCP Server (for AI Agents)
open-medicine-mcp
Exposes 4 meta-tools via the Model Context Protocol:
| Tool | Purpose |
|---|---|
search_clinical_calculators |
Find calculators by keyword |
execute_clinical_calculator |
Run a calculator with validated parameters |
search_guidelines |
Find guideline sections by topic |
retrieve_guideline |
Retrieve curated guideline content |
Available Calculators
| Calculator | Clinical Use | Evidence |
|---|---|---|
| CHA₂DS₂-VASc | AF stroke risk | ACC/AHA 2023 |
| HAS-BLED | AF bleeding risk | Pisters 2010 |
| ASCVD | 10-year CV risk | ACC/AHA 2013 |
| SOFA | Organ failure (ICU) | Vincent 1996 |
| CURB-65 | Pneumonia severity | Lim 2003 |
| GCS | Brain injury severity | Teasdale 1974 |
| CKD-EPI | Kidney function (eGFR) | NEJM 2021 |
| Cockcroft-Gault | Creatinine clearance | Cockcroft 1976 |
| Rivaroxaban Dosing | Renal dose adjustment | FDA Label |
| Enoxaparin Dosing | Renal dose adjustment | FDA Label |
Available Guidelines
| Guideline | Sections | DOI |
|---|---|---|
| ACC/AHA AF 2023 | anticoagulation, rate_control, rhythm_control | 10.1161/CIR.0000000000001193 |
| KDIGO CKD 2024 | evaluation, staging, referral | 10.1016/j.kint.2023.10.018 |
| BTS CAP 2009 | severity_assessment, antibiotic_therapy, discharge | 10.1136/thx.2009.121434 |
Design Principles
- Deterministic: Same input → same output. No LLM calls, no randomness.
- Evidence-Backed: Every
ClinicalResultincludes asource_doiand evidence level. - FHIR-Compatible: Outputs include LOINC codes for direct integration with EHR systems.
- Strictly Typed: Pydantic models validate all clinical inputs at the boundary.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file open_medicine-0.2.0.tar.gz.
File metadata
- Download URL: open_medicine-0.2.0.tar.gz
- Upload date:
- Size: 169.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88a0b7d96c057524efa59750f0b5d2fa68d464549953bf84c87996d69f383b8c
|
|
| MD5 |
fa8c78b106c2db3b65514c7d2f91d7d4
|
|
| BLAKE2b-256 |
b9e6c202853b34e08d12f76e3c953bacefbbe4be425e9118f4e91960762278d3
|
File details
Details for the file open_medicine-0.2.0-py3-none-any.whl.
File metadata
- Download URL: open_medicine-0.2.0-py3-none-any.whl
- Upload date:
- Size: 143.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b80d31a9a183d18215061ac4c331f937d724d1efa75d705317affa145c7360d
|
|
| MD5 |
a269e661f68f9f400cc6c4557ee69d34
|
|
| BLAKE2b-256 |
42c06be813dc306ac20dc99bd0d15bdee6fd59a1657c6c45408ec62f120880f8
|