Communitygithub.com

医疗EMR开发模式

用于医疗应用的EMR/EHR开发模式。关注临床安全、就诊工作流程、处方生成、临床决策支持系统集成,以及优先考虑无障碍性的医疗数据录入UI。在构建EMR或EHR功能(如就诊工作流程、处方生成或临床数据录入UI)时使用。

医疗EMR开发模式 是什么?

该技能提供了一整套用于构建电子医疗记录(EMR)和电子健康记录(EHR)系统的开发模式和最佳实践。它强调以患者安全为首要原则,确保每个设计决策都经过“是否会伤害患者?”的严格评估。该模式涵盖单页面就诊工作流程、智能模板系统、药物安全交互检查、锁定病例模式以及医疗数据UI设计,支持ICD-10/SNOMED诊断搜索、临床决策支持系统(CDSS)集成和处方PDF生成。适用于Claude Code、Cursor等AI代理平台,帮助开发者构建安全、高效且符合无障碍标准的医疗应用,避免常见反模式如浏览器localStorage存储、静默失败的药物交互检查和对关键临床警报使用可忽略的提示框。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/healthcare-emr-patterns

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

医疗 EMR 开发模式

用于构建电子医疗记录(EMR)和电子健康记录(EHR)系统的模式。优先考虑患者安全、临床准确性和执业医师效率。

何时使用

  • 构建患者就诊工作流程(主诉、检查、诊断、处方)
  • 实现临床笔记记录(结构化 + 自由文本 + 语音转文本)
  • 设计带药物交互检查的处方/用药模块
  • 集成临床决策支持系统(CDSS)
  • 构建带参考范围高亮的实验室结果展示
  • 实现临床数据审计追踪
  • 为临床数据录入设计医疗无障碍UI

工作原理

患者安全第一

每个设计决策都必须根据以下问题进行评估:“这会不会伤害患者?”

  • 药物交互 必须 发出警报,不能静默通过
  • 异常实验室值 必须 在视觉上标记
  • 关键生命体征 必须 触发升级工作流程
  • 无审计追踪不得修改临床数据

单页面就诊流程

临床就诊应在单个页面上垂直流动 —— 无标签切换:

患者头部(固定,始终可见)
├── 人口统计、过敏史、当前用药
│
就诊流程(垂直滚动)
├── 1. 主诉(结构化模板 + 自由文本)
├── 2. 现病史
├── 3. 体格检查(按系统)
├── 4. 生命体征(自动触发临床评分)
├── 5. 诊断(ICD-10/SNOMED 搜索)
├── 6. 用药(药物数据库 + 交互检查)
├── 7. 检查(实验室/放射学医嘱)
├── 8. 计划和随访
└── 9. 签署 / 锁定 / 打印

智能模板系统

interface ClinicalTemplate {
  id: string;
  name: string;             // 例如:“胸痛”
  chips: string[];          // 可点击的症状标签
  requiredFields: string[]; // 必填数据点
  redFlags: string[];       // 触发不可关闭的警报
  icdSuggestions: string[]; // 预映射的诊断代码
}

任何模板中的红灯标记必须触发可见且不可关闭的警报 —— 不能是提示通知。

用药安全模式

用户选择药物
  → 检查当前用药中的交互
  → 检查就诊用药中的交互
  → 检查患者过敏史
  → 根据体重/年龄/肾功能验证剂量
  → 如果是关键交互:完全阻止开处方
  → 临床医生必须记录覆盖原因才能继续
  → 如果重大交互:显示警告,要求确认
  → 将所有警报和覆盖原因记录在审计追踪中

关键交互默认阻止开处方。临床医生必须明确覆盖,并在审计追踪中记录原因。系统绝不能静默允许关键交互。

锁定就诊模式

一旦临床就诊被签署:

  • 不允许编辑 —— 仅允许补充记录(一个独立的链接记录)
  • 原始记录和补充记录都会出现在患者时间线上
  • 审计追踪捕获签署人、签署时间以及任何补充记录

临床数据的UI模式

生命体征显示: 当前值加正常范围高亮(绿色/黄色/红色)、与之前对比的趋势箭头、自动计算的临床评分(NEWS2、qSOFA)、内联的升级指导。

实验室结果展示: 正常范围高亮、与之前值对比、不可关闭的关键值警报、采集/分析时间戳、待处理的医嘱及其预期周转时间。

处方PDF: 一键生成,包含患者人口统计、过敏史、诊断、药物详情(通用名和品牌名、剂量、途径、频率、持续时间)、临床医生签名块。

医疗无障碍设计

医疗UI的要求比典型Web应用更严格:

  • 4.5:1 最小对比度(WCAG AA)—— 临床医生在多变的光线下工作
  • 大触摸目标(44x44px 最小)—— 适应戴手套或匆忙的操作
  • 键盘导航 —— 适用于快速录入数据的熟练用户
  • 不能仅依赖颜色指示 —— 必须配合文字/图标(色盲临床医生)
  • 所有表单字段要有屏幕阅读器标签
  • 临床警报不能自动消失 —— 临床医生必须主动确认

反模式

  • 在浏览器 localStorage 中存储临床数据
  • 药物交互检查静默失败
  • 对关键临床警报使用可忽略的提示
  • 基于标签页的就诊UI,碎片化临床工作流程
  • 允许编辑已签署/锁定的就诊记录
  • 显示无审计追踪的临床数据
  • 对临床数据结构使用 any 类型

示例

示例1:患者就诊流程

医生打开患者 #4521 的就诊
  → 固定头部显示:“Rajesh M,58岁男,过敏:青霉素,当前用药:二甲双胍500mg”
  → 主诉:选择“胸痛”模板
    → 点击标签:“胸骨后”、“向左臂放射”、“压榨性”
    → 红灯标记“压榨性胸骨后胸痛”触发不可关闭的警报
  → 体检:心血管系统 —— “S1 S2正常,无杂音”
  → 生命体征:心率110,血压90/60,血氧94%
    → NEWS2自动计算:评分8,风险高,显示升级警报
  → 诊断:搜索“ACS”→ 选择ICD-10 I21.9
  → 用药:选择阿司匹林300mg
    → CDSS与二甲双胍检查:无交互
  → 签署就诊 → 锁定,从此只能补充记录

示例2:用药安全工作流程

医生为患者 #4521 开具华法林
  → CDSS检测到:华法林 + 阿司匹林 = 关键交互
  → UI:红色不可关闭的模态框阻止开药
  → 医生点击“覆盖原因”
  → 输入:“收益大于风险 —— 监督INR协议”
  → 覆盖原因 + 警报存储在审计追踪中
  → 开药继续,附带文档化的覆盖原因

示例3:锁定就诊 + 补充记录

就诊 #E-2024-0891 由 Dr. Shah 于14:30签署
  → 所有字段锁定 —— 无编辑按钮可见
  → “添加补充记录”按钮可用
  → Dr. Shah 点击补充记录,添加:“实验室结果已收到 —— 肌钙蛋白升高”
  → 新记录 E-2024-0891-A1 链接到原始记录
  → 时间线上显示两者:原始就诊 + 补充记录及时间戳

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/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

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.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

相关技能