EHI Playground
Welcome to the interactive SQL playground! Here you can write and execute SQL queries against the Epic EHI sample database directly in your browser.
SQL Query Editor
Tips:
- Press Ctrl+Enter to run your query
- Your query is automatically saved to the URL - bookmark or share the link!
- Try loading an example query from the dropdown above
- The database contains Epic EHI sample data with patient, encounter, and clinical tables
Quick Start Examples
Section titled “Quick Start Examples”Try these queries to get started:
-
List all patients:
SELECT PAT_ID, PAT_NAME, BIRTH_DATEFROM PATIENTLIMIT 10; -
Find recent encounters:
SELECT p.PAT_NAME, e.CONTACT_DATE, e.ENC_TYPE_TITLEFROM PAT_ENC eJOIN PATIENT p ON e.PAT_ID = p.PAT_IDORDER BY e.CONTACT_DATE DESCLIMIT 20; -
View available tables:
SELECT nameFROM sqlite_masterWHERE type='table'ORDER BY name;
Features
Section titled “Features”- Live Execution - Queries run instantly in your browser using SQL.js
- URL Sharing - Your queries are saved to the URL for easy sharing
- Example Library - Load pre-built queries from the manual chapters
- Keyboard Shortcuts - Press Ctrl+Enter to run queries quickly
- Export Results - Copy query results to use elsewhere
Happy querying! 🚀