Dr. Ralph Plugin
A Claude Code plugin for AI-assisted medical diagnostics with comprehensive symptom analysis and research-backed treatment plans.
Disclaimer: This software is for informational and educational purposes only. It is NOT a substitute for professional medical advice. See full disclaimer.
Table of Contents
Overview
Dr. Ralph provides a structured 5-phase diagnostic workflow:
Interview → Research → Differential Diagnosis → Treatment Plan → SOAP Report
It uses Claude Code's Stop hook system to iterate through phases until reaching a convincing diagnosis with research-backed treatment recommendations.
Quick Start
/dr-ralph:diagnose "Persistent fatigue and joint pain" --patient "John Doe"
Installation
Option 1: From GitHub (Recommended)
claude plugin marketplace add blencorp/dr-ralph
claude plugin install dr-ralph
Option 2: Local Directory (Development)
git clone git@github.com:blencorp/dr-ralph.git
claude --plugin-dir /path/to/dr-ralph
Option 3: Configure in settings.json
Add to .claude/settings.json:
{
"marketplaces": ["blencorp/dr-ralph"],
"plugins": {
"dr-ralph@blencorp": "enabled"
}
}
Verify Installation
/dr-ralph:help
See the Claude Code plugins documentation for more details.
Commands
/dr-ralph:diagnose
Full diagnostic workflow with 5 phases.
/dr-ralph:diagnose "I've been having back pain for 3 months" --patient "John Doe"
/dr-ralph:diagnose "Headaches and dizziness" --questions 20
Options:
| Flag | Default | Description |
|---|
--patient <name> | anonymous | Patient name for case file |
--questions <n> | 15 | Maximum interview questions |
--output <dir> | @notes/ | Directory for case files |
--max-iterations <n> | unlimited | Max iterations before auto-stop |
--completion-promise <text> | none | Phrase that signals completion |
Output Files:
@notes/[patient].md - Running notes (persists across sessions)
@notes/[patient]-report-[timestamp].md - Final SOAP report
/dr-ralph:cancel
Cancel an active diagnostic session.
/dr-ralph:cancel
Diagnostic Workflow
5-Phase Process
| Phase | Description |
|---|
| 1. Interview | Medical records intake first, then comprehensive symptom questions |
| 2. Research | Web search for literature, iterative refinement |
| 3. Differential | Confidence-based diagnosis (>80% = single, else top 3-5) |
| 4. Treatment | Action plan with urgency levels and follow-up schedule |
| 5. Report | SOAP format with executive summary |
Medical Records Handling:
- Records requested FIRST, before symptom questions
- Files processed one-by-one (never all at once)
- Size check before reading - files >3MB trigger warning
- Tip: Use Adobe Acrobat to split large PDFs into sections <3MB
Diagnosis Output:
- >80% confident: Single most likely diagnosis
- Uncertain: Top 3-5 differential diagnoses ranked by likelihood
- Transparency: States uncertainty, distinguishing features, recommended tests
Patient Case Management
@notes/
├── john-doe.md # Patient notes (grows over time)
├── john-doe-report-20240105.md # SOAP report
├── jane-smith.md
└── anonymous.md # Default if no --patient specified
- Persistence: Notes are regular markdown files, persist across sessions
- Continuity: Previous notes auto-read at session start
- Multiple patients: Switch cases with
--patient flag
SOAP Report Format
# Patient Report: John Doe
## Date: 2024-01-05
## Executive Summary
[2-3 paragraph overview]
## Subjective
[Patient's reported symptoms]
## Objective
[Research findings with citations]
## Assessment
[Diagnosis or differential with confidence]
## Plan
[Treatment plan with urgency levels]
## Detailed Findings
[Full interview, research, reasoning]
## References
[Cited sources]
Usage Tips
Safety Limits
Use --max-iterations as a safety net:
/dr-ralph:diagnose "Symptoms" --max-iterations 10 --completion-promise DONE
Patient Tracking
Use --patient to maintain continuity across sessions: