openevidence-sdk-patterns

Featured

Sdk Patterns for OpenEvidence. Trigger: "openevidence sdk patterns".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# OpenEvidence SDK Patterns ## Overview Production-ready patterns for the OpenEvidence clinical evidence API. OpenEvidence provides REST endpoints for querying medical literature, retrieving clinical guidelines, and generating evidence-based recommendations. The API authenticates via `OPENEVIDENCE_API_KEY` and returns structured clinical data with citation provenance. A singleton client enforces consistent auth, handles healthcare-specific errors, and preserves citation chains for audit compliance. ## Singleton Client ```typescript const OE_BASE = 'https://api.openevidence.com/v1'; let _client: OpenEvidenceClient | null = null; export function getClient(): OpenEvidenceClient { if (!_client) { const apiKey = process.env.OPENEVIDENCE_API_KEY; if (!apiKey) throw new Error('OPENEVIDENCE_API_KEY must be set — get it from openevidence.com/developer'); _client = new OpenEvidenceClient(apiKey); } return _client; } class OpenEvidenceClient { private headers: Record<string, string>; constructor(apiKey: string) { this.headers = { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' }; } async query(question: string, opts: { specialty?: string; maxResults?: number } = {}): Promise<EvidenceResponse> { const res = await fetch(`${OE_BASE}/query`, { method: 'POST', headers: this.headers, body: JSON.stringify({ question, specialty: opts.specialty, max_results: opts.maxResults ?? 10 }) }); if (!res.ok) throw new OEError(res.status, awa...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category