healthcare-emr-patterns
What it does
This code helps build safer and easier-to-use electronic medical record (EMR/EHR) systems. It focuses on protecting patients, ensuring information accuracy, and making doctors' work more efficient.
When to use it
- βWhen building a patient's visit workflow.
- βWhen creating a system for safely prescribing medications.
- βWhen designing accessible forms for medical data entry.
Skill link
https://github.com/affaan-m/ECC/blob/main/skills/healthcare-emr-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
βHow can I ensure the medical record system warns about dangerous drug interactions?β
5 new skills a week. 1 minute to read.
How it works
It sets clear rules, like always warning about dangerous drug interactions and never letting them go unnoticed. It also organizes the patient's visit on a single page for easier tracking.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
β¦
FAQ
What does 'patient safety first' mean?
It means that any design decision must be thought through to avoid any possibility of harming the patient, such as warning about dangerous medications.
What is a 'single-page encounter flow'?
It's a way to organize patient visit information on a single screen, scrolling from top to bottom, without needing to switch between tabs or pages.
Why is an 'audit trail' important?
An audit trail keeps a history of all changes made to patient data, showing who made the change, when, and what was changed, ensuring transparency and security.
Details
Original description by the author
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. Use when building EMR or EHR features such as encounter workflows, prescription generation, or clinical data entry UI.
repo: affaan-m/ECC
Popularity
- GitHub stars
- 280k
- Ranking position
- #326
- 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.