A web application for testing SQL on FHIR ViewDefinitions against FHIR servers. This playground allows you to create, edit, and execute ViewDefinitions with support for multiple output formats and direct resource processing.
- Support for multiple FHIR servers
- Direct resource processing via "Use direct resources" checkbox - allows testing ViewDefinitions with custom FHIR resources
- Multiple output formats: JSON, NDJSON, CSV
- Request/response trace debugging
- Real-time error feedback
This project uses Bun as the JavaScript runtime and package manager.
If you don't have Bun installed:
curl -fsSL https://bun.sh/install | bashbun installbun run devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
bun run buildbun run start- Runtime: Bun - Fast JavaScript runtime and package manager
- Framework: Next.js 15 - React framework with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- Deployment: Vercel with GitHub Actions
The playground supports multiple FHIR servers with different capabilities. You can easily add new servers to test SQL on FHIR ViewDefinitions against different implementations.
-
Edit the Server Configuration File
Open
src/lib/server-config.tsand add your server to theserverConfigsarray:export const serverConfigs: ServerConfig[] = [ // ... existing servers ... { id: 'my-server', // Unique identifier (lowercase, no spaces) name: 'My FHIR Server', // Display name shown in the server dropdown url: 'https://my-server.com/fhir', // FHIR server base URL description: 'My custom FHIR server' // Optional: shown as help text in dropdown } ];
-
Test Your Configuration
# Run the development server bun run devOpen http://localhost:3000 and verify:
- Your server appears in the server dropdown
- The description is displayed correctly
-
Deploy Your Changes
git add src/lib/server-config.ts git commit -m "Add [Your Server Name] to server configuration" git pushThe changes will automatically deploy to production via GitHub Actions.
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | ✓ | Unique identifier for the server (used in URLs and code) |
name |
string | ✓ | Display name shown in the server dropdown |
url |
string | ✓ | FHIR server base URL (should support SQL on FHIR) |
description |
string | Optional help text displayed in the server dropdown |
-
Aidbox (
aidbox)- URL:
https://niquola77.edge.aidbox.app/fhir - Type: Standard FHIR server with SQL on FHIR support
- URL:
-
Helios Software (
helios)- URL:
https://sof.heliossoftware.com - Type: Supports direct resource processing via
$runoperation
- URL:
This project uses GitHub Actions for automatic deployment to Vercel on every push to the main branch.
The repository includes a GitHub Actions workflow (.github/workflows/deploy.yml) that automatically deploys to Vercel. To enable automatic deployments, you need to configure the following GitHub repository secrets:
-
VERCEL_TOKEN: Your Vercel authentication token
- Get it from Vercel Account Settings > Tokens
-
VERCEL_ORG_ID: Your Vercel organization ID
- Found in
.vercel/project.json(value:team_4nvOpzKfZPO3DhNzJx3eNgUJ)
- Found in
-
VERCEL_PROJECT_ID: Your Vercel project ID
- Found in
.vercel/project.json(value:prj_yjA8dnKYXxqdsKLqhivWtpquv8me)
- Found in
To add these secrets:
- Go to your GitHub repository settings
- Navigate to Settings > Secrets and variables > Actions
- Click "New repository secret" and add each of the three secrets above
You can also deploy manually using the Vercel CLI:
bunx vercel --prodFor more information, check out the Vercel deployment documentation.