Communitygithub.com

Healthcare-Eval-Harness

Patientensicherheits-Prüfrahmen für Bereitstellungen von Gesundheitsanwendungen. Automatisierte Test-Suites für CDSS-Genauigkeit, PHI-Exposition, klinische Workflow-Integrität und Integrations-Compliance. Blockiert Bereitstellungen bei Sicherheitsfehlern.

Was ist Healthcare-Eval-Harness?

Der Healthcare Eval Harness ist ein automatisiertes Verifikationssystem für Bereitstellungen von Gesundheitsanwendungen. Er führt fünf Testkategorien in einer festgelegten Reihenfolge aus, wobei die ersten drei (CDSS-Genauigkeit, PHI-Exposition, Datenintegrität) als KRITISCHE Tore mit 100% Durchlaufquote gelten – ein einzelner Fehler blockiert die Bereitstellung. Die verbleibenden zwei Kategorien (Klinischer Workflow, Integration) sind HOHE Tore mit einer erforderlichen Durchlaufquote von 95%+. Das System ist framework-agnostisch (Beispiele in Jest) und lässt sich nahtlos in CI/CD-Pipelines integrieren, z. B. GitHub Actions. Es verhindert Anti-Patterns wie das Überspringen kritischer Tests oder das Senken von Schwellenwerten und stellt sicher, dass die Patientensicherheit bei jeder Bereitstellung oberste Priorität hat.

Funktioniert mit~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/healthcare-eval-harness

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

Healthcare Eval Harness — Patientensicherheits-Verifikation

Automatisiertes Verifikationssystem für Bereitstellungen von Gesundheitsanwendungen. Ein einzelner KRITISCHER Fehler blockiert die Bereitstellung. Patientensicherheit ist nicht verhandelbar.

Hinweis: Die Beispiele verwenden Jest als Referenz-Test-Runner. Passen Sie die Befehle an Ihr Framework an (Vitest, pytest, PHPUnit usw.) – die Testkategorien und Durchlaufschwellen sind framework-unabhängig.

Wann Verwenden

  • Vor jeder Bereitstellung von EMR/EHR-Anwendungen
  • Nach Änderungen an der CDSS-Logik (Arzneimittelwechselwirkungen, Dosisvalidierung, Bewertungen)
  • Nach Änderungen an Datenbankschemata, die Patientendaten betreffen
  • Nach Änderungen an Authentifizierung oder Zugriffskontrolle
  • Während der Konfiguration von CI/CD-Pipelines für Gesundheitsapps
  • Nach Auflösung von Merge-Konflikten in klinischen Modulen

Funktionsweise

Der Eval-Harness führt fünf Testkategorien in der angegebenen Reihenfolge aus. Die ersten drei (CDSS-Genauigkeit, PHI-Exposition, Datenintegrität) sind KRITISCHE Tore mit einer erforderlichen Durchlaufquote von 100% – ein einzelner Fehler blockiert die Bereitstellung. Die verbleibenden zwei (Klinischer Workflow, Integration) sind HOHE Tore mit einer erforderlichen Durchlaufquote von 95%+.

Jede Kategorie ist einem Jest-Testpfadmuster zugeordnet. Die CI-Pipeline führt KRITISCHE Tore mit --bail (Stopp bei erstem Fehler) aus und erzwingt Abdeckungsschwellen mit --coverage --coverageThreshold.

Eval-Kategorien

1. CDSS-Genauigkeit (KRITISCH — 100% erforderlich)

Testet die gesamte klinische Entscheidungsunterstützungslogik: Arzneimittelwechselwirkungspaare (beide Richtungen), Dosisvalidierungsregeln, klinische Bewertungen im Vergleich zu veröffentlichten Spezifikationen, keine falsch negativen Ergebnisse, keine stillen Fehler.

npx jest --testPathPattern='tests/cdss' --bail --ci --coverage

2. PHI-Exposition (KRITISCH — 100% erforderlich)

Testet auf Lecks geschützter Gesundheitsinformationen: API-Fehlermeldungen, Konsolenausgaben, URL-Parameter, Browser-Speicher, standortübergreifende Isolation, nicht authentifizierter Zugriff, Fehlen von Dienstrollenschlüsseln.

npx jest --testPathPattern='tests/security/phi' --bail --ci

3. Datenintegrität (KRITISCH — 100% erforderlich)

Testet die Sicherheit klinischer Daten: gesperrte Behandlungsfälle, Audit-Trail-Einträge, Schutz vor kaskadierenden Löschungen, gleichzeitige Bearbeitung, keine verwaisten Datensätze.

npx jest --testPathPattern='tests/data-integrity' --bail --ci

4. Klinischer Workflow (HOCH — 95%+ erforderlich)

Testet End-to-End-Abläufe: Lebenszyklus von Behandlungsfällen, Vorlagen-Rendering, Medikationssets, Arzneimittel-/Diagnosesuche, Rezept-PDF, Alarmmeldungen.

tmp_json=$(mktemp)
npx jest --testPathPattern='tests/clinical' --ci --json --outputFile="$tmp_json" || true
total=$(jq '.numTotalTests // 0' "$tmp_json")
passed=$(jq '.numPassedTests // 0' "$tmp_json")
if [ "$total" -eq 0 ]; then
  echo "Keine klinischen Tests gefunden" >&2
  exit 1
fi
rate=$(echo "scale=2; $passed * 100 / $total" | bc)
echo "Klinische Durchlaufquote: ${rate}% ($passed/$total)"

5. Integrations-Compliance (HOCH — 95%+ erforderlich)

Testet externe Systeme: HL7-Nachrichtenparsing (v2.x), FHIR-Validierung, Labordatenzuordnung, Verarbeitung fehlerhafter Nachrichten.

tmp_json=$(mktemp)
npx jest --testPathPattern='tests/integration' --ci --json --outputFile="$tmp_json" || true
total=$(jq '.numTotalTests // 0' "$tmp_json")
passed=$(jq '.numPassedTests // 0' "$tmp_json")
if [ "$total" -eq 0 ]; then
  echo "Keine Integrationstests gefunden" >&2
  exit 1
fi
rate=$(echo "scale=2; $passed * 100 / $total" | bc)
echo "Integrations-Durchlaufquote: ${rate}% ($passed/$total)"

Bestanden/Fehlgeschlagen-Matrix

KategorieSchwelleBei Fehler
CDSS-Genauigkeit100%Bereitstellung blockieren
PHI-Exposition100%Bereitstellung blockieren
Datenintegrität100%Bereitstellung blockieren
Klinischer Workflow95%+WARNUNG, nach Überprüfung zulassen
Integration95%+WARNUNG, nach Überprüfung zulassen

CI/CD-Integration

name: Healthcare Safety Gate
on: [push, pull_request]

jobs:
  safety-gate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
      - run: npm ci

      # KRITISCHE Tore — 100% erforderlich, bei erstem Fehler abbrechen
      - name: CDSS-Genauigkeit
        run: npx jest --testPathPattern='tests/cdss' --bail --ci --coverage --coverageThreshold='{"global":{"branches":80,"functions":80,"lines":80}}'

      - name: PHI-Expositionsprüfung
        run: npx jest --testPathPattern='tests/security/phi' --bail --ci

      - name: Datenintegrität
        run: npx jest --testPathPattern='tests/data-integrity' --bail --ci

      # HOHE Tore — 95%+ erforderlich, benutzerdefinierte Schwellenprüfung
      # HOHE Tore — 95%+ erforderlich
      - name: Klinische Workflows
        run: |
          TMP_JSON=$(mktemp)
          npx jest --testPathPattern='tests/clinical' --ci --json --outputFile="$TMP_JSON" || true
          TOTAL=$(jq '.numTotalTests // 0' "$TMP_JSON")
          PASSED=$(jq '.numPassedTests // 0' "$TMP_JSON")
          if [ "$TOTAL" -eq 0 ]; then
            echo "::error::Keine klinischen Tests gefunden"; exit 1
          fi
          RATE=$(echo "scale=2; $PASSED * 100 / $TOTAL" | bc)
          echo "Durchlaufquote: ${RATE}% ($PASSED/$TOTAL)"
          if (( $(echo "$RATE < 95" | bc -l) )); then
            echo "::warning::Klinische Durchlaufquote ${RATE}% unter 95%"
          fi

      - name: Integrations-Compliance
        run: |
          TMP_JSON=$(mktemp)
          npx jest --testPathPattern='tests/integration' --ci --json --outputFile="$TMP_JSON" || true
          TOTAL=$(jq '.numTotalTests // 0' "$TMP_JSON")
          PASSED=$(jq '.numPassedTests // 0' "$TMP_JSON")
          if [ "$TOTAL" -eq 0 ]; then
            echo "::error::Keine Integrationstests gefunden"; exit 1
          fi
          RATE=$(echo "scale=2; $PASSED * 100 / $TOTAL" | bc)
          echo "Durchlaufquote: ${RATE}% ($PASSED/$TOTAL)"
          if (( $(echo "$RATE < 95" | bc -l) )); then
            echo "::warning::Integrations-Durchlaufquote ${RATE}% unter 95%"
          fi

Anti-Patterns

  • CDSS-Tests überspringen, „weil sie letztes Mal bestanden haben“
  • KRITISCHE Schwellen unter 100% setzen
  • --no-bail bei KRITISCHEN Test-Suites verwenden
  • Die CDSS-Engine in Integrationstests mocken (echte Logik muss getestet werden)
  • Bereitstellungen zulassen, wenn das Sicherheitstor rot ist
  • Tests ohne --coverage bei CDSS-Suites ausführen

Beispiele

Beispiel 1: Alle Kritischen Tore Lokal Ausführen

npx jest --testPathPattern='tests/cdss' --bail --ci --coverage && \
npx jest --testPathPattern='tests/security/phi' --bail --ci && \
npx jest --testPathPattern='tests/data-integrity' --bail --ci

Beispiel 2: Durchlaufquote der Hohen Tore Prüfen

tmp_json=$(mktemp)
npx jest --testPathPattern='tests/clinical' --ci --json --outputFile="$tmp_json" || true
jq '{
  bestanden: (.numPassedTests // 0),
  gesamt: (.numTotalTests // 0),
  quote: (if (.numTotalTests // 0) == 0 then 0 else ((.numPassedTests // 0) / (.numTotalTests // 1) * 100) end)
}' "$tmp_json"
# Erwartet: { "bestanden": 21, "gesamt": 22, "quote": 95.45 }

Beispiel 3: Eval-Bericht

## Healthcare Eval: 2026-03-27 [Commit abc1234]

### Patientensicherheit: BESTANDEN

| Kategorie | Tests | Bestanden | Fehlgeschlagen | Status |
|-----------|-------|-----------|----------------|--------|
| CDSS-Genauigkeit | 39 | 39 | 0 | BESTANDEN |
| PHI-Exposition | 8 | 8 | 0 | BESTANDEN |
| Datenintegrität | 12 | 12 | 0 | BESTANDEN |
| Klinischer Workflow | 22 | 21 | 1 | 95,5% BESTANDEN |
| Integration | 6 | 6 | 0 | BESTANDEN |

### Abdeckung: 84% (Ziel: 80%+)
### Urteil: SICHER FÜR DIE BEREITSTELLUNG

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

Verwandte Skills