openevidence-reference-architecture
Implement OpenEvidence reference architecture with best-practice project layout. Use when designing new clinical AI integrations, reviewing project structure, or establishing architecture standards for healthcare applications. Trigger with phrases like "openevidence architecture", "openevidence best practices", "openevidence project structure", "clinical ai architecture".
- License 许可
- MIT
- 最近更新
- 2026-05-26
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- openevidence-reference-architecture
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- Implement OpenEvidence reference architecture with best-practice project layout. Use when designing new clinical AI integrations, reviewing project structure, or establishing architecture standards for healthcare applications. Trigger with phrases like "openevidence architecture", "openevidence best practices", "openevidence project structure", "clinical ai architecture".
- allowed-tools
- Read, Grep
- compatible-with
- claude-code, codex, openclaw
02 资源文件 1
- 参考文档references/implementation.md2.1 KB
03 SKILL.md 正文
OpenEvidence Reference Architecture
Table of Contents
Overview
Production-ready layered architecture for OpenEvidence clinical AI integrations. Covers project structure, client wrapper with caching/monitoring, service facade with PHI handling, EHR integration (FHIR/CDS Hooks), and configuration management.
Prerequisites
- Understanding of layered architecture
- OpenEvidence SDK knowledge
- Healthcare compliance requirements (HIPAA)
- TypeScript/Node.js project setup
Layer Architecture
API Layer -> Controllers, Routes, Webhooks, Middleware
Service Layer -> Business Logic, Orchestration, Validation
OpenEvidence Layer -> Client, Types, Caching, Error Handling
Compliance Layer -> HIPAA Audit, PHI Handling, Encryption
Integration Layer -> EHR/FHIR, Notifications, External Services
Infrastructure -> Database, Cache, Queue, Monitoring
Instructions
Step 1: Set Up Project Structure
Organize into src/openevidence/ (client, config, types, errors, cache), src/services/clinical/ (query, deepconsult, drug-info), src/api/ (routes, middleware), src/compliance/ (HIPAA audit, PHI, encryption), and src/integrations/ (EHR, notifications).
Step 2: Build Client Wrapper
Create OpenEvidenceService with caching, metrics collection, HIPAA audit logging, and health check. Use singleton pattern with cache-first strategy.
Step 3: Create Service Facade
Build ClinicalEvidenceService that sanitizes PHI before queries, formats responses for clinical use, and handles drug interaction checks.
Step 4: Implement EHR Integration
Add FHIR CDS Hooks endpoints for patient-view and medication-prescribe hooks. Extract conditions and medications from FHIR prefetch data.
Step 5: Configure Management
Use convict for typed configuration with environment-specific JSON files. Mark sensitive fields (apiKey) and validate strictly.
Output
- Layered architecture with separation of concerns
- Client wrapper with caching, metrics, and audit logging
- Service facade with PHI sanitization
- EHR integration (FHIR CDS Hooks)
- Typed configuration management (convict)
Error Handling
| Architecture Issue | Detection | Resolution |
|---|---|---|
| Layer violation | Code review | Enforce import boundaries |
| PHI leak | Audit log review | Add PHI detection middleware |
| Cache stale data | Clinical complaint | Review TTL strategy |
| EHR integration fails | CDS Hook errors | Check FHIR endpoint config |
Examples
Data Flow
User -> API Gateway -> PHI Sanitizer -> Cache Check -> OpenEvidence API -> Cache Store -> Response
| |
HIPAA Audit Log Audit Log
See detailed implementation for advanced patterns.
Resources
04 同仓库更多 Skills
zustand-store-ts
Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state/action separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.
zustand-store-creator
Zustand Store Creator - Auto-activating skill for Frontend Development. Triggers on: zustand store creator, zustand store creator Part of the Frontend Development skill category.
zero-trust-config-helper
Zero Trust Config Helper - Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category.
zapier-integration-helper
Zapier Integration Helper - Auto-activating skill for Business Automation. Triggers on: zapier integration helper, zapier integration helper Part of the Business Automation skill category.
zai-cli
Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP. Use when user needs image/video analysis, OCR, UI-to-code conversion, error diagnosis, real-time web search, web page to markdown extraction, or GitHub code exploration. Trigger with phrases like "analyze this image", "search the web for", "read this page", "explore this repo", or "use zai". Requires Z_AI_API_KEY.
yt-research
Research competitor YouTube channels, niches, and trending topics for your content strategy. Use this skill whenever the user says "research channels", "analyze competitors", "find trending topics", "niche analysis", "competitive research", "what are other creators doing", "scrape YouTube channels", or wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.