healthcare-cdss-patterns
できること
医師の意思決定を支援するシステムの構築方法を解説します。薬の飲み合わせに危険がないか、薬の用量が患者に適切か、健康リスクのスコアを計算することなどが含まれます。
使う場面
- ✓2種類の薬を一緒に使うと問題が起きる可能性があるかを確認するとき。
- ✓処方された薬の量が安全かどうかを確かめるとき。
- ✓バイタルサインに基づいて、患者の症状が悪化するリスクを計算するとき。
スキルのリンク
https://github.com/affaan-m/ECC/blob/main/skills/healthcare-cdss-patterns/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“薬Xが患者の現在の服用薬と相互作用しないか、また患者にアレルギーがないかを確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
システムは、現在の服用薬やバイタルサインなどの患者情報を受け取ります。その情報を事前に定めたルールと照らし合わせて、リスクを特定したりスコアを計算したりします。出力は、医師の判断を助けるアラートやスコアです。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Healthcare CDSS Development Patterns
Patterns for building Clinical Decision Support Systems that integrate into EMR workflows. CDSS modules are patient safety critical — zero tolerance for false negatives.
When to Use
- Implementing drug interaction checking
- Building dose validation engines
- Implementing clinical scoring systems (NEWS2, qSOFA, APACHE, GCS)
- Designing alert systems for abnormal clinical values
- Building medication order entry with safety checks
- Integrating lab result interpretation with clinical context
How It Works
The CDSS engine is a pure function library with zero side effects. Input clinical data, output alerts. This makes it fully testable.
Three primary modules:
checkInteractions(newDrug, currentMeds, allergies)— Checks a new drug against current medications and known allergies. Returns severity-sortedInteractionAlert[]. UsesDrugInteractionPairdata model.validateDose(drug, dose, route, weight, age, renalFunction)— Validates a prescribed dose against weight-based, age-adjusted, and renal-adjusted rules. ReturnsDoseValidationResult.calculateNEWS2(vitals)— National Early Warning Score 2 fromNEWS2Input. ReturnsNEWS2Resultwith total score, risk level, and escalation guidance.
EMR UI
↓ (user enters data)
CDSS Engine (pure functions, no side effects)
├── Drug Interaction Checker
├── Dose Validator
├── Clinical Scoring (NEWS2, qSOFA, etc.)
└── Alert Classifier
↓ (returns alerts)
EMR UI (displays alerts inline, blocks if critical)
Drug Interaction Checking
interface DrugInteractionPair {
drugA: string; // generic name
drugB: string; // generic name
severity: 'critical' | 'major' | 'minor';
mechanism: string;
clinicalEffect: string;
recommendation: string;
}
function checkInteractions(
newDrug: string,
currentMedications: string[],
allergyList: string[]
): InteractionAlert[] {
if (!newDrug) return [];
const alerts: InteractionAlert[] = [];
for (const current of currentMedications) {
const interaction = findInteraction(newDrug, current);
if (interaction) {
alerts.push({ severity: interaction.severity, pair: [newDrug, current],
message: interaction.clinicalEffect, recommendation: interaction.recommendation });
}
}
for (const allergy of allergyList) {
if (isCrossReactive(newDrug, allergy)) {
alerts.push({ severity: 'critical', pair: [newDrug, allergy],
message: `Cross-reactivity with documented allergy: ${allergy}`,
recommendation: 'Do not prescribe without allergy consultation' });
}
}
return alerts.sort((a, b) => severityOrder(a.severity) - severityOrder(b.severity));
}
Interaction pairs must be bidirectional: if Drug A interacts with Drug B, then Drug B interacts with Drug A.
Dose Validation
interface DoseValidationResult {
valid: boolean;
message: string;
suggestedRange: { min: number; max: number; unit: string } | null;
factors: string[];
}
function validateDose(
drug: string,
dose: number,
route: 'oral' | 'iv' | 'im' | 'sc' | 'topical',
patientWeight?: number,
patientAge?: number,
renalFunction?: number
): DoseValidationResult {
const rules = getDoseRules(drug, route);
if (!rules) return { valid: true, message: 'No validation rules available', suggestedRange: null, factors: [] };
const factors: string[] = [];
// SAFETY: if rules require weight but weight missing, BLOCK (not pass)
if (rules.weightBased) {
if (!patientWeight || patientWeight <= 0) {
return { valid: false, message: `Weight required for ${drug} (mg/kg drug)`,
suggestedRange: null, factors: ['weight_missing'] };
}
factors.push('weight');
const maxDose = rules.maxPerKg * patientWeight;
if (dose > maxDose) {
return { valid: false, message: `Dose exceeds max for ${patientWeight}kg`,
suggestedRange: { min: rules.minPerKg * patientWeight, max: maxDose, unit: rules.unit }, factors };
}
}
// Age-based adjustment (when rules define age brackets and age is provided)
if (rules.ageAdjusted && patientAge !== undefined) {
factors.push('age');
const ageMax = rules.getAgeAdjustedMax(patientAge);
if (dose > ageMax) {
return { valid: false, message: `Exceeds age-adjusted max for ${patientAge}yr`,
suggestedRange: { min: rules.typicalMin, max: ageMax, unit: rules.unit }, factors };
}
}
…
よくある質問
「臨床意思決定支援システム(CDSS)」とは何ですか?
データに基づく情報やアラートを提供することで、医師が患者にとって最善の治療方針を決められるよう支援するツールです。
ここで「患者の安全」がとくに重要なのはなぜですか?
薬の処方や評価に誤りがあると、患者の健康に重大な影響が及ぶ可能性があるからです。そのため、このようなシステムは高い信頼性を持つように作られます。
「副作用のない純粋関数」とはどういう意味ですか?
同じ入力に対して、常に同じ出力を返し、外部の状態を変更しないという意味です。テストがしやすくなり、信頼性も高まります。
詳細
作者による元の説明
Clinical Decision Support System (CDSS) development patterns. Drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), alert severity classification, and integration into EMR workflows. Use when building clinical decision support — drug interaction checks, dose validation, clinical scoring, or alert severity.
repo: affaan-m/ECC
人気
- GitHubのスター
- 280k
- ランキング
- #325
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
accessibility
280kエージェントが誰にとっても使いやすいインターフェースを作れるように手助けします。目が見えない方や身体の動きに制限のある方など、障害のある人にとってもWebサイトやアプリが正しく動くようにします。
agent-architecture-audit
280kエージェントがすべて正しく動いているかを確認できるようにします。AIシステムの問題を見つけて修正し、期待どおりに動くようにします。
agent-eval
280kエージェントが異なるAIコーディングツールを比較できるようにします。特定のタスクにおいて、どれがより速く、安く、信頼性が高いかを測定します。
agent-harness-construction
280kエージェントがタスクの進め方をよりよく理解できるようにします。エージェントが使うツールや指示を最適化し、成功する可能性を高めます。
似ているスキル
shopify
260kShopify GraphQL APIを使い、商品、在庫、注文、顧客などのShopifyストアのデータを読み取り、更新するのをエージェントが支援します。
rest-graphql-debug
260k接続、ログイン、リクエストの形式、レスポンスを一層ずつ確認して、RESTまたはGraphQLのAPI呼び出しが失敗する理由を、エージェントが見つけるのを支援します。
har-derived-api-client
260kウェブサイトのネットワークトラフィックを一度記録し、直接のAPIクライアントを作ることで、毎回ページをクリックして操作しなくて済むようにエージェントを助けます。