AGENT SKILL

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-03-20
Stars
★ 4
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

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

micsapp
micsapp/micstec-skills

azure-apim-architecture

Analyzes and explains Azure API Management architecture decisions for enterprise API marketplace implementations using VNet Internal mode, Front Door, hybrid authentication, and multi-environment strategies. Use when discussing APIM component selection, network topology, cost optimization, or comparing alternatives like workspaces vs instances, VNet Internal vs External mode, or Front Door vs Application Gateway.

★ 4
micsapp
micsapp/micstec-skills

apiops-deployment

Guides deployment of Azure API Management infrastructure using Infrastructure as Code (Bicep/Terraform), CI/CD pipelines (GitHub Actions/Azure DevOps), and APIOps workflows. Use when deploying APIM, creating pipelines, or implementing dev→test→prod promotion strategies.

★ 4
micsapp
micsapp/micstec-skills

apim-policy-authoring

Creates production-ready Azure API Management policy XML for authentication (OAuth 2.0, JWT validation, subscription keys), rate limiting, CORS configuration, error handling, and API transformations. Use when implementing API security, access control, or request/response processing logic.

★ 4
micsapp
micsapp/micstec-skills

api-security-review

Reviews Azure API Management configurations for security vulnerabilities, OWASP API Security Top 10 compliance, VNet Internal mode validation, Private Link verification, and Azure Security Benchmark alignment. Use when performing security audits, pre-deployment validation, or compliance reviews.

★ 4
micsapp
micsapp/micstec-skills

jira-cli

Interact with Jira from the command line to create, list, view, edit, and transition issues, manage sprints and epics, and perform common Jira workflows. Use when the user asks about Jira tasks, tickets, issues, sprints, or needs to manage project work items.

★ 4
micsapp
micsapp/micstec-skills

calculator

Performs arbitrary-precision arithmetic calculations including addition, subtraction, multiplication, division, and exponents. Use when the user asks to calculate, compute, or evaluate math expressions, or when precise decimal arithmetic is needed to avoid floating-point errors.

★ 4