
Healthcare Cdss Patterns
Implement patient-safety CDSS logic—drug interactions, dose checks, and clinical scores—as testable pure functions you can wire into EMR or health-app backends.
Overview
Healthcare CDSS Patterns is an agent skill for the Build phase that guides implementation of clinical decision support modules—interactions, dosing, and scoring—as testable pure functions for EMR-integrated safety workfl
Install
npx skills add https://github.com/affaan-m/everything-claude-code --skill healthcare-cdss-patternsWhat is this skill?
- Three primary modules: checkInteractions, validateDose, and clinical scoring (including NEWS2)
- Pure-function CDSS engine with zero side effects for deterministic unit testing
- Severity-sorted InteractionAlert output and DoseValidationResult against weight, age, and renal rules
- Drug–allergy and drug–drug checks via DrugInteractionPair-style models
- Designed for EMR workflow integration with zero tolerance for false-negative safety gaps
- Three primary CDSS modules: interactions, dose validation, and clinical scoring (e.g. NEWS2)
- CDSS engine described as pure functions with zero side effects
Adoption & trust: 3.3k installs on skills.sh; 210k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need EMR-grade medication and clinical-alert logic but lack a consistent, testable structure for interactions, dosing, and scoring that clinicians can trust.
Who is it for?
Technical founders or small teams building digital-health backends, EMR plugins, or inpatient tooling where CDSS behavior must be deterministic and auditable.
Skip if: Solo builders shipping generic SaaS with no clinical regulatory scope, or teams wanting a turnkey hosted CDSS without writing safety-critical backend code.
When should I use this skill?
Implementing drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA, APACHE, GCS), alert systems for abnormal values, medication order entry safety checks, or lab interpretation with clinical context.
What do I get? / Deliverables
You get a spec-aligned CDSS module layout with typed alerts and validation results you can unit-test exhaustively before connecting to order entry and lab feeds.
- Typed interaction and dose validation APIs returning severity-sorted alerts
- Clinical score calculators with classified alert outputs
- Integration contract for order entry and lab result workflows
Recommended Skills
Journey fit
Clinical decision engines are core backend product logic built before UI and EMR hooks are finalized. Dose validation, interaction graphs, and scoring (NEWS2, qSOFA) belong in backend modules with explicit data models, not in frontend styling.
How it compares
Use as an in-repo pattern library for clinical safety engines—not as a substitute for pharmacist/clinician review, formal validation, or an off-the-shelf CDSS product.
Common Questions / FAQ
Who is healthcare-cdss-patterns for?
Developers and technical leads building health applications that need drug interaction checks, dose validation, clinical scores, and severity-ranked alerts inside EMR or order-entry flows.
When should I use healthcare-cdss-patterns?
Use it during Build when implementing interaction engines, dose rules, NEWS2/qSOFA-style scores, abnormal-value alerts, or medication safety checks that must integrate with clinical workflows.
Is healthcare-cdss-patterns safe to install?
Treat it as engineering guidance only; review the Security Audits panel on this Prism page and run your own clinical, legal, and penetration validation before production patient use.
SKILL.md
READMESKILL.md - Healthcare Cdss Patterns
# 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: 1. **`checkInteractions(newDrug, currentMeds, allergies)`** — Checks a new drug against current medications and known allergies. Returns severity-sorted `InteractionAlert[]`. Uses `DrugInteractionPair` data model. 2. **`validateDose(drug, dose, route, weight, age, renalFunction)`** — Validates a prescribed dose against weight-based, age-adjusted, and renal-adjusted rules. Returns `DoseValidationResult`. 3. **`calculateNEWS2(vitals)`** — National Early Warning Score 2 from `NEWS2Input`. Returns `NEWS2Result` with 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 ```typescript 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 ```typescript 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, mess