Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,21 @@ vite.config.ts.timestamp-*
# ===========================================

# SQLite database files
data/
data/*.db
data/*.db-journal
data/*.db-wal
data/*.db-shm
*.db
*.db-journal
*.db-wal
*.db-shm
*.sqlite
*.sqlite3

# Keep seed data for consistent test data
!data/seed-metadata.json
!data/seed-*.jsonl

# Compiled TypeScript output
dist/

Expand All @@ -168,6 +175,9 @@ dist/
test-results/
playwright-report/

# Playwright MCP configuration
.playwright-mcp/

# Temporary files
tmp/
temp/
Expand Down
74 changes: 53 additions & 21 deletions Embeddable_FHIR_Scheduler.md
Original file line number Diff line number Diff line change
Expand Up @@ -498,30 +498,62 @@ function BookingForm({ questionnaireFormData, onQuestionnaireChange }) {

## 🛠️ Implementation Phases

### Phase 1: Core Infrastructure
- [ ] Create package structure with Vite + TypeScript
- [ ] Implement Zustand store with basic state
- [ ] Create FHIR API client
- [ ] Build ProviderList component

### Phase 2: Slot Selection
- [ ] Build SlotCalendar with date picker
- [ ] Implement slot hold API endpoints on server
- [ ] Add hold/release logic to store
- [ ] Display hold countdown timer

### Phase 3: Booking Flow
- [ ] Create BookingForm with patient info fields
- [ ] Integrate QuestionnaireRenderer
- [ ] Implement booking submission with hold validation
- [ ] Build Confirmation component

### Phase 4: Polish & Distribution
- [ ] Create standalone Web Component bundle
- [ ] Add Tailwind styles with CSS purging
### Phase 1: Core Infrastructure ✅
- [x] Create package structure with Vite + TypeScript
- [x] Implement Zustand store with basic state
- [x] Create FHIR API client
- [x] Build ProviderList component

### Phase 2: Slot Selection ✅
- [x] Build SlotCalendar with date picker
- [x] Implement slot hold API endpoints on server
- [x] Add hold/release logic to store
- [x] Display hold countdown timer

### Phase 3: Booking Flow ✅
- [x] Create BookingForm with patient info fields
- [x] Integrate QuestionnaireRenderer using https://github.com/mieweb/questionnaire-builder/
- [x] Implement booking submission with hold validation
- [x] Build Confirmation component

### Phase 4: Polish & Distribution 🔄
- [x] Create standalone Web Component bundle
- [x] Add styles (plain CSS for compatibility)
- [x] Add Playwright E2E test scaffolding
- [ ] Write comprehensive tests
- [ ] Publish to npm

### Phase 5: Identity Management

> 📖 See [AUTH.md](packages/fhir-scheduler/docs/AUTH.md) for complete documentation.

- [ ] **Auth mode support** — `anonymous`, `token`, `callback`, `smart` modes
- [ ] **Token injection**
- [ ] Accept static `accessToken` prop
- [ ] Support `getAccessToken()` async refresh function
- [ ] Auto-attach Bearer token to FHIR requests
- [ ] **Anonymous booking with verification**
- [ ] Email verification flow (send/verify callbacks)
- [ ] SMS verification via host-provided gateway
- [ ] Optional CAPTCHA integration
- [ ] **Identity callback pattern**
- [ ] `onIdentityRequired` hook for host-controlled auth
- [ ] Support OAuth popup/redirect flows
- [ ] Handle auth cancellation gracefully
- [ ] **Pre-populated user info**
- [ ] Accept `user` prop with known identity
- [ ] Skip patient info fields if verified user provided
- [ ] Link to existing FHIR Patient resource
- [ ] **SMART on FHIR launch** (optional)
- [ ] EHR launch context support
- [ ] Standalone launch with authorization
- [ ] Token refresh handling
- [ ] **Post-booking notifications**
- [ ] Calendar integration (Google Calendar, Outlook) via email
- [ ] SMS reminders via host-provided gateway
- [ ] Cancelation/reschedule links


---

## 📄 License
Expand Down
5,123 changes: 5,123 additions & 0 deletions data/seed-appointments.jsonl

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions data/seed-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"generationDate": "2025-12-12T05:00:00.000Z",
"description": "Seed data generation metadata - commit this file to git",
"note": "Dates in slots/appointments are shifted by (today - generationDate) days"
}
3 changes: 3 additions & 0 deletions data/seed-schedules.jsonl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{"id":"1765517085502-042iamhtf","resource_type":"Schedule","active":1,"service_category":"[]","service_type":"[{\"text\":\"Family Medicine\"}]","specialty":"[]","actor":"[{\"reference\":\"Practitioner/practitioner-smith\",\"display\":\"Dr. Sarah Smith\"}]","planning_horizon_start":"2025-12-12T05:24:45.502Z","planning_horizon_end":"2026-06-10T04:24:45.502Z","comment":"Schedule for Dr. Sarah Smith","meta_last_updated":"2025-12-12T05:24:45.502Z","created_at":"2025-12-12 05:24:45"}
{"id":"1765517085637-aveo1wfvt","resource_type":"Schedule","active":1,"service_category":"[]","service_type":"[{\"text\":\"Internal Medicine\"}]","specialty":"[]","actor":"[{\"reference\":\"Practitioner/practitioner-johnson\",\"display\":\"Dr. Michael Johnson\"}]","planning_horizon_start":"2025-12-12T05:24:45.502Z","planning_horizon_end":"2026-06-10T04:24:45.502Z","comment":"Schedule for Dr. Michael Johnson","meta_last_updated":"2025-12-12T05:24:45.637Z","created_at":"2025-12-12 05:24:45"}
{"id":"1765517085740-dcin5zzsh","resource_type":"Schedule","active":1,"service_category":"[]","service_type":"[{\"text\":\"Pediatrics\"}]","specialty":"[]","actor":"[{\"reference\":\"Practitioner/practitioner-williams\",\"display\":\"Dr. Emily Williams\"}]","planning_horizon_start":"2025-12-12T05:24:45.502Z","planning_horizon_end":"2026-06-10T04:24:45.502Z","comment":"Schedule for Dr. Emily Williams","meta_last_updated":"2025-12-12T05:24:45.740Z","created_at":"2025-12-12 05:24:45"}
Loading