healthcare-cdss-patterns
What it does
Helps build systems that assist doctors in making decisions. This includes checking if medications interact dangerously, if a drug's dose is correct for the patient, and calculating health risk scores.
When to use it
- βWhen checking if two medications might cause problems together.
- βWhen ensuring the amount of a prescribed medication is safe.
- βWhen calculating a patient's risk of worsening based on their vital signs.
Skill link
https://github.com/affaan-m/ECC/blob/main/skills/healthcare-cdss-patterns/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCheck if medication X interacts with the patient's current medications and if they have any allergies.β
5 new skills a week. 1 minute to read.
How it works
The system receives patient information, like current medications and vital signs. It compares this information with predefined rules to identify risks or calculate scores. The output is an alert or a score that aids the doctor.
Technical content (original SKILL.md)
Original text by the author, straight from 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 };
}
}
β¦
FAQ
What are 'Clinical Decision Support Systems'?
These are tools that help doctors make the best treatment decisions for patients by providing data-driven information and alerts.
Why is 'patient safety' so critical here?
Because errors in medication or assessments can have serious health consequences for patients. Therefore, these systems are built to be highly reliable.
What does 'pure function with zero side effects' mean?
It means the system will always give the same output for the same input information, without changing anything outside of itself. This makes it easier to test and more reliable.
Details
Original description by the author
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
Popularity
- GitHub stars
- 280k
- Ranking position
- #325
- License
- MIT
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
accessibility
280kHelps your agent create interfaces that everyone can use. Ensures websites and apps work well for people with disabilities, like those who are blind or have reduced mobility.
agent-architecture-audit
280kMakes your agent check if everything is working correctly. It finds and fixes problems in AI systems, ensuring they perform as expected.
agent-eval
280kHelps your agent compare different AI coding tools. It measures which one is faster, cheaper, and more reliable for specific tasks.
agent-harness-construction
280kMakes your agent better understand how to perform tasks. It optimizes the tools and instructions the agent uses to increase its chances of success.
Similar skills
shopify
260kLets your agent read and update Shopify store data such as products, inventory, orders and customers through the Shopify GraphQL API.
rest-graphql-debug
260kHelps your agent find why a REST or GraphQL API call fails, checking connection, login, request format and response one layer at a time.
har-derived-api-client
260kHelps your agent record a website's network traffic once, then build a direct API client, so it stops clicking through the page each time.