Communitygithub.com

醫療EMR開發模式

用於醫療應用程式的EMR/EHR開發模式,涵蓋臨床安全、看診流程、處方開立、臨床決策支援整合,以及以可及性為優先的醫療資料輸入UI。在建置EMR或EHR功能(如看診流程、處方開立或臨床資料輸入介面)時使用。

醫療EMR開發模式 是什麼?

此技能提供一套結構化的開發模式,專為建置電子病歷(EMR)與電子健康紀錄(EHR)系統而設計。其核心目標是將「病人安全」置於首要考量,確保每一項設計決策都經過「是否可能傷害病人?」的嚴格評估。技能詳細說明了單頁式看診流程、智慧模板系統、藥物安全模式以及已鎖定看診記錄的凍結與增補機制。支援的UI模式包含生命徵象、檢驗結果與處方PDF的顯示,並強調醫療場景下更嚴苛的可及性要求,如更高的對比度、更大的觸控目標及無色彩提示。此外,技能明確列出了常見的反模式,例如將臨床資料儲存於瀏覽器的localStorage、無聲地失敗在藥物交互檢查中,或允許修改已簽署的看診記錄。透過具體的案例,技能展示了從看診流程、藥物安全檢查到鎖定記錄增補的完整實作方式,協助開發者打造安全、有效率且符合法規的醫療資訊系統。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/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[]; // 預先對應的診斷碼
}

任何模板中的紅旗標記都必須觸發可見且不可關閉的警示——而非使用Toast通知。

藥物安全模式

使用者選擇藥物
  → 檢查目前用藥是否有交互作用
  → 檢查看診中的藥物是否有交互作用
  → 檢查病人過敏史
  → 根據體重/年齡/腎功能驗證劑量
  → 若為**重大**交互作用:**封鎖**開藥程序
  → 臨床醫師必須記錄排除原因才能越過封鎖
  → 若為**主要**交互作用:顯示警告,要求確認
  → 將所有警示與排除原因記錄於稽核軌跡

重大交互作用預設封鎖開藥。臨床醫師必須明確地以已記錄的原因覆寫,該原因會儲存在稽核軌跡中。系統絕不允許重大交互作用默默通過。

已鎖定看診記錄模式

臨床看診記錄一旦被簽署:

  • 不允許編輯——僅能新增增補記錄(一個獨立但連結的記錄)
  • 原始記錄與增補記錄都會呈現在病人時間軸上
  • 稽核軌跡會記錄誰簽署、何時簽署,以及任何增補記錄

臨床資料的UI模式

生命徵象顯示: 目前數值加上正常範圍標示(綠/黃/紅)、與前次比較的趨勢箭頭、自動計算的臨床評分(NEWS2、qSOFA)、內嵌的升級指引。

檢驗結果顯示: 正常範圍標示、前次數值比較、關鍵值以不可關閉的警示顯示、採集/檢驗時間戳記、待處理醫囑及其預計完成時間。

處方PDF: 一鍵產生,包含病人基本資料、過敏史、診斷、藥物細節(學名+商品名、劑量、途徑、頻率、療程)、臨床醫師簽名區塊。

醫療領域的可及性

醫療UI有比一般網頁應用程式更嚴格的要求:

  • 最低對比度4.5:1(WCAG AA)——臨床醫師在多種光線環境下工作
  • 大型觸控目標(最小44x44像素)——適用於戴手套或匆忙操作
  • 鍵盤導航——適用於快速輸入資料的專業使用者
  • 無純色彩指示——務必將顏色與文字/圖示搭配(提供給色盲臨床醫師)
  • 所有表單欄位皆須有螢幕閱讀器標籤
  • 臨床警示不得使用自動消失的Toast——臨床醫師必須主動確認

反模式

  • 將臨床資料儲存在瀏覽器的localStorage中
  • 藥物交互作用檢查時無聲地失敗
  • 對關鍵臨床警示使用可關閉的Toast
  • 以分頁為基礎的看診UI,會中斷臨床工作流程
  • 允許編輯已簽署/鎖定的看診記錄
  • 顯示臨床資料但沒有稽核軌跡
  • 對臨床資料結構使用 any 型別

範例

範例1:病人看診流程

醫師開啟病人#4521的看診記錄
  → 固定標題列顯示:「Rajesh M, 58M, 過敏:Penicillin, 目前用藥:Metformin 500mg」
  → 主訴:選擇「胸痛」模板
    → 點選標籤:「胸骨下」、「輻射至左臂」、「壓迫性」
    → 紅旗標記「壓迫性胸骨下胸痛」觸發不可關閉的警示
  → 檢查:心血管系統 ——「S1 S2正常,無心雜音」
  → 生命徵象:HR 110, BP 90/60, SpO2 94%
    → NEWS2自動計算:分數8,風險高,顯示升級警示
  → 診斷:搜尋「ACS」→ 選擇ICD-10 I21.9
  → 藥物:選擇Aspirin 300mg
    → CDSS比對Metformin:無交互作用
  → 簽署看診記錄 → 已鎖定,從此僅能新增增補記錄

範例2:藥物安全工作流程

醫師為病人#4521開立Warfarin
  → CDSS發現:Warfarin + Aspirin = 重大交互作用
  → UI:紅色不可關閉的模態框封鎖開藥
  → 醫師點選「以理由覆寫」
  → 輸入:「效益大於風險——遵循監控INR協定」
  → 覆寫原因 + 警示儲存在稽核軌跡中
  → 在有記錄的覆寫情況下,處方程序繼續進行

範例3:已鎖定看診記錄 + 增補記錄

看診記錄 #E-2024-0891 於14:30由Dr. Shah簽署
  → 所有欄位已鎖定——無任何編輯按鈕可見
  → 「新增增補記錄」按鈕可用
  → Dr. Shah點選增補記錄,新增:「檢驗結果回報——Troponin升高」
  → 新記錄 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/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.

相關技能