SkillsLib.ai

Epic SQL Query Optimization & Clinical Data Analysis

Optimize Epic SQL queries and unlock clinical data insights instantly

0.0(0 reviews)
10+ downloads
Updated Oct 2026

What You Can Do

Write, optimize, and debug SQL queries against Epic's complex clinical databases in seconds. You can analyze query performance, identify bottlenecks, and generate production-ready queries that respect Epic's data model and security practices. This skill helps you extract meaningful clinical insights while maintaining data integrity and compliance standards.

Features

Query optimization

Analyze slow queries and suggest index strategies, rewrites, and execution plans tailored to Epic's schema

Clinical data extraction

Generate queries for common healthcare analytics: patient cohorts, medication patterns, lab trends, and outcomes

Performance profiling

Review execution plans and recommend materialized views, stored procedures, or query refactoring

Schema navigation

Access detailed reference information on Epic tables (PATIENT, ORDERS, RESULTS, MEDICATION, etc.) and relationships

Compliance guardrails

Enforce PHI masking, audit logging, and role-based access patterns in your queries

Query explanation

Translate complex SQL into plain English, document business logic, and create data dictionaries

Batch query generation

Create multi-query workflows for common analytics pipelines (e.g., daily patient census, readmission risk)

Example Output

Example 1: Patient Medication Cohort Query

code
SELECT DISTINCT p.PAT_ID, p.PAT_NAME, m.MED_DESCRIPTION,
  m.START_DATE, DATEDIFF(DAY, m.START_DATE, m.END_DATE) AS DURATION
FROM PATIENT p
INNER JOIN MEDICATION m ON p.PAT_ID = m.PAT_ID
WHERE m.MED_DESCRIPTION LIKE '%Metformin%'
  AND m.START_DATE >= DATEADD(YEAR, -1, GETDATE())
ORDER BY p.PAT_ID, m.START_DATE DESC;

Why it works: Uses INNER JOIN to avoid null medications, DATEDIFF for readability, indexes on PAT_ID and MED_DESCRIPTION.

Example 2: Performance Analysis Report

  • ✅ Query execution time: 2.3s (was 45s)
  • ✅ Rows scanned: 50K (was 2.1M)
  • ✅ Recommended index: CREATE INDEX idx_medication_drug ON MEDICATION(MED_DESCRIPTION, START_DATE)
  • ✅ Estimated improvement: 95% faster after indexing

What's Included

  • SKILL.md: Complete Claude skill with Epic SQL workflows, decision trees, and verification checklists
  • Query templates: Pre-built starter queries for common clinical analyses (census, readmissions, lab trends)
  • Epic schema reference: Quick-lookup guide to major tables and relationships
  • Performance checklist: Step-by-step optimization workflow with profiling commands
  • Compliance worksheet: Template for documenting data access justification and PHI handling

Who It's For

  • Clinical data analysts — Extract cohorts, outcomes, and operational metrics from Epic
  • Healthcare IT specialists — Optimize infrastructure and support data requests from clinicians
  • Research coordinators — Query patient data for clinical trials and outcomes research
  • Quality/compliance officers — Monitor clinical workflows and audit data access patterns
  • Population health managers — Analyze patient populations for risk stratification and interventions

Best For

  • Building patient cohort queries for research or quality initiatives
  • Diagnosing slow reports and optimizing existing queries
  • Extracting clinical metrics (readmission rates, medication adherence, lab abnormalities)
  • Creating recurring data exports for dashboards and analytics platforms
  • Documenting data definitions and audit trails for compliance reviews

You might also like

Film Location Scout Site Analyzer
$45
Scouting3.8(32)
Film Location Scout Site Analyzer

You can evaluate unfamiliar locations objectively against your specific production needs—whether that's crane access, parking capacity, noise restrictions, or permit requirements. The skill generates comprehensive scout reports that compare multiple sites using weighted evaluation matrices, flag deal-breakers early, and document infrastructure limitations so your production team makes informed decisions before committing resources to visits.

SCADA System Integration & Troubleshooting
$30
SCADA System Integration & Troubleshooting

You'll design robust SCADA system architectures, configure industrial protocols (Modbus, Profibus, OPC-UA, DNP3), and diagnose connectivity and performance issues across distributed control networks. Get step-by-step configuration guidance, integration workflows, and troubleshooting decision trees tailored to your specific hardware and protocol stack.

DaVinci Resolve Color Grading Workflow & Quality Control
$35
DaVinci Resolve Color Grading Workflow & Quality Control

You can establish systematic color grading workflows that accelerate project delivery, ensure visual consistency across episodes and projects, and maintain broadcast-quality standards. Claude generates reusable templates, quality control checklists, and grading decision frameworks tailored to your project's color science and deliverable requirements.

Invoice & Payment Collection Enforcer
$55
Invoice & Payment Collection Enforcer

Use Claude to automate your entire collection workflow, from first touch to recovery, with legally sound escalation protocols. You'll recover more money in less time, reduce bad debt write-offs by 25-40%, and build defensible collection records that withstand legal scrutiny. Claude handles customized demand letters, compliance validation, debtor profiling, and escalation strategies tailored to account age, debtor behavior, and jurisdiction.

Active Transportation Network Analysis & Planning
$35
Active Transportation Network Analysis & Planning

You can conduct comprehensive active transportation network audits that identify missing links, connectivity gaps, and underserved communities. Claude helps you prioritize infrastructure investments against limited budgets using equity screening, mode-share modeling, and cost-benefit analysis—producing client-ready documentation and stakeholder presentations that justify infrastructure decisions with quantitative evidence rather than assumptions.

Draw.io Diagram Automation for Project Management
$25
Draw.io Diagram Automation for Project Management

Turn project descriptions, timelines, and structured data into professional draw.io diagrams instantly. You can generate flowcharts, org charts, Gantt charts, swimlane diagrams, and process flows by describing what you need. Claude creates draw.io XML that you can open directly in the editor or modify further.

Fine Dining Guest Experience & Service Recovery
$45
Fine Dining Guest Experience & Service Recovery

Generate personalized service recovery scripts to defuse guest complaints and turn negative experiences into loyalty. Create detailed VIP protocols and staff action plans tailored to specific dining scenarios. Develop training guides and checklists that empower your team to handle difficult situations with professionalism and grace.

Wwise Implementation & Troubleshooting Assistant
$45
Wwise Implementation & Troubleshooting Assistant

This skill helps you troubleshoot Wwise integration issues, diagnose audio performance bottlenecks, and generate comprehensive documentation for interactive audio specifications. You'll get step-by-step fixes for common implementation problems, performance optimization strategies, and best practices for audio systems across different game engines and platforms.

$25.00