PluginBench
Skill
Pass
Audit score 90

healthcare-emr-patterns

affaan-m/ecc

EMR/EHR development patterns with clinical safety, encounter workflows, and accessibility-first design.

What is healthcare-emr-patterns?

Patterns for building Electronic Medical Record systems that prioritize patient safety, clinical accuracy, and practitioner efficiency. Use this when designing encounter workflows, prescription modules with drug interaction checking, clinical decision support integration, and healthcare-accessible UIs for medical data entry.

  • Single-page vertical encounter flow (complaint → exam → diagnosis → prescription → plan)
  • Medication safety with drug interaction checking, critical-interaction blocking, and documented override audit trails
  • Smart clinical templates with red-flag alerts, required fields, and ICD-10/SNOMED diagnosis suggestions
  • Locked encounter pattern: signed encounters are immutable; changes only via linked addenda with full audit trail
  • Vitals display with auto-calculated clinical scoring (NEWS2, qSOFA), trend arrows, and escalation guidance
  • Lab results display with normal-range highlighting, critical-value alerts, and pending-order tracking

How to install healthcare-emr-patterns

npx skills add null --skill healthcare-emr-patterns
Claude Code
Cursor
Windsurf
Cline

How to use healthcare-emr-patterns

  1. 1.Review the single-page encounter flow structure and adapt to your clinical workflow (chief complaint → exam → vitals → diagnosis → medications → plan)
  2. 2.Implement the smart template system with required fields and red-flag triggers; ensure red flags display as non-dismissable alerts, not toasts
  3. 3.Build medication safety checks: validate against current medications, encounter medications, allergies, and patient factors (weight/age/renal function); block critical interactions by default and require documented override
  4. 4.Design vitals and lab displays with normal-range highlighting, trend indicators, and auto-calculated clinical scores (NEWS2, qSOFA)
  5. 5.Implement the locked-encounter pattern: once signed, encounters are immutable; addenda are separate linked records with full audit trail
  6. 6.Apply accessibility standards: 4.5:1 contrast minimum, 44×44px touch targets, keyboard navigation, text+icon for all indicators, screen-reader labels on form fields
  7. 7.Avoid anti-patterns: never store clinical data in localStorage, never silently fail drug checks, never use dismissable toasts for clinical alerts, never allow edits to signed encounters without audit trail

Use cases

Good for
  • Building patient encounter workflows for primary care, emergency, or specialty clinics
  • Implementing medication prescribing with real-time drug interaction and allergy checking
  • Designing clinical note-taking with structured templates and free-text entry
  • Integrating Clinical Decision Support Systems (CDSS) for diagnosis and treatment guidance
  • Creating audit-compliant medical record systems with immutable signed encounters and addenda
Who it's for
  • Healthcare software engineers building EMR/EHR systems
  • Clinical informatics teams designing encounter workflows
  • Healthcare product managers prioritizing patient safety and clinician efficiency
  • Accessibility specialists working on medical applications
  • Teams integrating Clinical Decision Support Systems

healthcare-emr-patterns FAQ

What is a 'red flag' in a clinical template?

A red flag is a symptom or finding that triggers a non-dismissable alert (e.g., 'crushing substernal chest pain' in a chest-pain template). It must be visually prominent and require active acknowledgment from the clinician — never a silent toast notification.

How should critical drug interactions be handled?

Critical interactions must block prescribing entirely by default. The clinician can override only by explicitly documenting a reason (e.g., 'Benefits outweigh risks — monitored INR protocol'). The override reason and alert are stored in the audit trail for compliance and safety review.

Can a signed encounter be edited?

No. Once signed, an encounter is locked and immutable. Any changes must be made via a linked addendum record, which appears separately in the patient timeline. Both original and addendum are visible with timestamps and audit trails.

What accessibility standards apply to healthcare UIs?

Healthcare UIs require 4.5:1 contrast minimum (WCAG AA), 44×44px touch targets for gloved interaction, full keyboard navigation, no color-only indicators (pair with text/icon), and screen-reader labels on all form fields. Clinical alerts must never auto-dismiss.

Why is a single-page encounter flow preferred over tabs?

Tabs fragment the clinical workflow and force clinicians to switch context. A vertical single-page flow (complaint → exam → vitals → diagnosis → medications → plan) keeps all encounter data visible and reduces cognitive load during time-pressured clinical work.

Full instructions (SKILL.md)

Source of truth, from affaan-m/ecc.


name: healthcare-emr-patterns description: EMR/EHR development patterns for healthcare applications. Clinical safety, encounter workflows, prescription generation, clinical decision support integration, and accessibility-first UI for medical data entry. metadata: origin: Health1 Super Speciality Hospitals — contributed by Dr. Keyur Patel version: "1.0.0"

Healthcare EMR Development Patterns

Patterns for building Electronic Medical Record (EMR) and Electronic Health Record (EHR) systems. Prioritizes patient safety, clinical accuracy, and practitioner efficiency.

When to Use

  • Building patient encounter workflows (complaint, exam, diagnosis, prescription)
  • Implementing clinical note-taking (structured + free text + voice-to-text)
  • Designing prescription/medication modules with drug interaction checking
  • Integrating Clinical Decision Support Systems (CDSS)
  • Building lab result displays with reference range highlighting
  • Implementing audit trails for clinical data
  • Designing healthcare-accessible UIs for clinical data entry

How It Works

Patient Safety First

Every design decision must be evaluated against: "Could this harm a patient?"

  • Drug interactions MUST alert, not silently pass
  • Abnormal lab values MUST be visually flagged
  • Critical vitals MUST trigger escalation workflows
  • No clinical data modification without audit trail

Single-Page Encounter Flow

Clinical encounters should flow vertically on a single page — no tab switching:

Patient Header (sticky — always visible)
├── Demographics, allergies, active medications
│
Encounter Flow (vertical scroll)
├── 1. Chief Complaint (structured templates + free text)
├── 2. History of Present Illness
├── 3. Physical Examination (system-wise)
├── 4. Vitals (auto-trigger clinical scoring)
├── 5. Diagnosis (ICD-10/SNOMED search)
├── 6. Medications (drug DB + interaction check)
├── 7. Investigations (lab/radiology orders)
├── 8. Plan & Follow-up
└── 9. Sign / Lock / Print

Smart Template System

interface ClinicalTemplate {
  id: string;
  name: string;             // e.g., "Chest Pain"
  chips: string[];          // clickable symptom chips
  requiredFields: string[]; // mandatory data points
  redFlags: string[];       // triggers non-dismissable alert
  icdSuggestions: string[]; // pre-mapped diagnosis codes
}

Red flags in any template must trigger a visible, non-dismissable alert — NOT a toast notification.

Medication Safety Pattern

User selects drug
  → Check current medications for interactions
  → Check encounter medications for interactions
  → Check patient allergies
  → Validate dose against weight/age/renal function
  → If CRITICAL interaction: BLOCK prescribing entirely
  → Clinician must document override reason to proceed past a block
  → If MAJOR interaction: display warning, require acknowledgment
  → Log all alerts and override reasons in audit trail

Critical interactions block prescribing by default. The clinician must explicitly override with a documented reason stored in the audit trail. The system never silently allows a critical interaction.

Locked Encounter Pattern

Once a clinical encounter is signed:

  • No edits allowed — only an addendum (a separate linked record)
  • Both original and addendum appear in the patient timeline
  • Audit trail captures who signed, when, and any addendum records

UI Patterns for Clinical Data

Vitals Display: Current values with normal range highlighting (green/yellow/red), trend arrows vs previous, clinical scoring auto-calculated (NEWS2, qSOFA), escalation guidance inline.

Lab Results Display: Normal range highlighting, previous value comparison, critical values with non-dismissable alert, collection/analysis timestamps, pending orders with expected turnaround.

Prescription PDF: One-click generation with patient demographics, allergies, diagnosis, drug details (generic + brand, dose, route, frequency, duration), clinician signature block.

Accessibility for Healthcare

Healthcare UIs have stricter requirements than typical web apps:

  • 4.5:1 minimum contrast (WCAG AA) — clinicians work in varied lighting
  • Large touch targets (44x44px minimum) — for gloved/rushed interaction
  • Keyboard navigation — for power users entering data rapidly
  • No color-only indicators — always pair color with text/icon (colorblind clinicians)
  • Screen reader labels on all form fields
  • No auto-dismissing toasts for clinical alerts — clinician must actively acknowledge

Anti-Patterns

  • Storing clinical data in browser localStorage
  • Silent failures in drug interaction checking
  • Dismissable toasts for critical clinical alerts
  • Tab-based encounter UIs that fragment the clinical workflow
  • Allowing edits to signed/locked encounters
  • Displaying clinical data without audit trail
  • Using any type for clinical data structures

Examples

Example 1: Patient Encounter Flow

Doctor opens encounter for Patient #4521
  → Sticky header shows: "Rajesh M, 58M, Allergies: Penicillin, Active Meds: Metformin 500mg"
  → Chief Complaint: selects "Chest Pain" template
    → Clicks chips: "substernal", "radiating to left arm", "crushing"
    → Red flag "crushing substernal chest pain" triggers non-dismissable alert
  → Examination: CVS system — "S1 S2 normal, no murmur"
  → Vitals: HR 110, BP 90/60, SpO2 94%
    → NEWS2 auto-calculates: score 8, risk HIGH, escalation alert shown
  → Diagnosis: searches "ACS" → selects ICD-10 I21.9
  → Medications: selects Aspirin 300mg
    → CDSS checks against Metformin: no interaction
  → Signs encounter → locked, addendum-only from this point

Example 2: Medication Safety Workflow

Doctor prescribes Warfarin for Patient #4521
  → CDSS detects: Warfarin + Aspirin = CRITICAL interaction
  → UI: red non-dismissable modal blocks prescribing
  → Doctor clicks "Override with reason"
  → Types: "Benefits outweigh risks — monitored INR protocol"
  → Override reason + alert stored in audit trail
  → Prescription proceeds with documented override

Example 3: Locked Encounter + Addendum

Encounter #E-2024-0891 signed by Dr. Shah at 14:30
  → All fields locked — no edit buttons visible
  → "Add Addendum" button available
  → Dr. Shah clicks addendum, adds: "Lab results received — Troponin elevated"
  → New record E-2024-0891-A1 linked to original
  → Timeline shows both: original encounter + addendum with timestamps