colinislit
06287d49f4
refactor(login): update interface preference from 'swift' to 'cortex'
...
- Changed default interface preference in LoginForm component from 'klassiek' to 'cortex'.
- Updated redirect path logic to reflect the new 'cortex' preference.
- Modified button label and state management to align with the new interface preference terminology.
- Adjusted type definition for InterfacePreference to include 'cortex' instead of 'swift'.
2025-12-31 10:08:22 +01:00
colinislit
26ed58b7ff
docs(cortex): add PRD, TO and rename swift → cortex
...
New documents:
- prd-cortex-v2.md: Product Requirements Document with MVP scope,
user flows, success criteria, and roadmap
- to-cortex-v2.md: Technical Design with three-layer architecture,
API design, error handling, and logging
Renamed files (swift → cortex):
- architecture-swift-cortex-v2.md → architecture-cortex-v2.md
- fo-swift-intent-system-v2.md → fo-cortex-intent-system-v2.md
- haalbaarheidsanalyse-swift-cortex-v2.md → haalbaarheidsanalyse-cortex-v2.md
- review-swift-cortex-v2.md → review-cortex-v2.md
Updated content:
- All swift references replaced with cortex
- FO: confidence threshold 0.9 → 0.7 (industry standard)
- TO v1.1: Added error handling, input sanitization, improved
suïcidaliteit regex, model version note
- Legacy docs: Added note about swift → cortex rename
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-30 10:22:22 +01:00
colinislit
2170b23348
refactor: rename swift → cortex in code and documentation
...
Complete rename of "swift" terminology to "cortex" across the codebase:
Code Changes:
- Rename directories: lib/swift → lib/cortex, components/swift → components/cortex
- Rename API routes: /api/swift/* → /api/cortex/*
- Rename page routes: /epd/swift → /epd/cortex
- Rename store: swift-store.ts → cortex-store.ts
Type Renames:
- SwiftIntent → CortexIntent
- SwiftStore → CortexStore
- useSwiftStore → useCortexStore
- SwiftContext → CortexContext
- useSwiftVoice → useCortexVoice
Documentation Updates (docs/intent/):
- Safety Net → Nudge (Layer 3 rename)
- SafetySuggestion → NudgeSuggestion
- evaluateSafetyNet → evaluateNudge
- SWIFT_* feature flags → CORTEX_*
- All path references updated to match new structure
Files affected: 47 files, ~700 lines changed
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-30 09:18:06 +01:00
colinislit
c8aaba657e
refactor(swift): update references from Medical Scribe to Swift Assistent
...
- Updated comments and documentation to reflect the new branding of the chat API and related components.
- Renamed functions and variables to align with the Swift Assistent terminology.
- Enhanced UI components with animations using Framer Motion for a smoother user experience.
- Removed outdated architecture documentation related to the Medical Scribe system.
This change is part of the transition to the Swift Assistent branding, ensuring consistency across the application.
2025-12-29 22:40:34 +01:00
colinislit
14a9d34337
feat(swift): voeg chat orchestration toe (E5)
...
Epic 5 compleet: Chat orchestration voor Swift Agenda Planning.
Alle agenda intents worden nu correct gerouteerd naar AgendaBlock
met user-friendly error handling en fallback opties.
E5.S1 - Action Routing (2 SP)
- routeIntentToArtifact() functie in action-parser
- Maps agenda intents naar juiste AgendaBlock mode
- Confidence threshold enforcement (< 0.7 → fallback)
- Required entity validation (patient voor create, identifier voor reschedule)
- Command-input gebruikt nieuwe routing ipv legacy openBlock
- Migratie naar modern artifact systeem (openArtifact)
E5.S2 - Chat Prompt Update (2 SP)
- 4 agenda intents toegevoegd aan Swift chat system prompt
- agenda_query: afspraken opvragen op datumrange
- create_appointment: nieuwe afspraak maken (required: patient, datetime)
- cancel_appointment: afspraak annuleren (disambiguation support)
- reschedule_appointment: afspraak verzetten (required: identifier)
- Entity extraction rules gedocumenteerd (dateRange, datetime, identifier)
- 4 complete voorbeelden met JSON action format
- Clarification questions voor incomplete data
- Prompt size: ~325 → ~525 regels (+60%)
E5.S3 - Error States (2 SP)
- AgendaErrorState component voor full-page errors
- AgendaErrorAlert component voor inline form errors
- getUserFriendlyMessage() vertaalt technical → user-friendly Dutch
- Auto-redirect bij auth errors (401 → /login)
- Fallback link naar /epd/agenda in alle error states
- Context-aware messaging (query/create/cancel/reschedule)
- Retry functionaliteit voor recoverable errors
- Dev-only technical details collapsible
Error message mapping:
- 401 → "Je sessie is verlopen. Log opnieuw in." + auto-redirect
- 403 → "Je hebt geen toegang tot deze afspraak."
- 404 → "De gevraagde afspraak kon niet worden gevonden."
- 500 → "Er ging iets mis op de server. Probeer het opnieuw."
- Network → "Geen internetverbinding. Controleer je netwerkverbinding."
- Timeout → "De aanvraag duurde te lang. Probeer het opnieuw."
Components updated:
- command-input: gebruikt routeIntentToArtifact + openArtifact
- agenda-create-form: gebruikt AgendaErrorAlert met fallback link
- chat/route: uitgebreide system prompt met agenda sectie
Nieuwe files:
- lib/swift/action-parser.ts: routeIntentToArtifact() functie
- components/swift/artifacts/blocks/agenda-error-state.tsx (225 regels)
- docs/swift/implementation-e5-s1-action-routing.md
- docs/swift/implementation-e5-s2-chat-prompt.md
- docs/swift/implementation-e5-s3-error-states.md
Documentatie:
- Bouwplan bijgewerkt: Epic 5 → Done
- 3 implementation docs met API specs en testing scenarios
- Error handling best practices gedocumenteerd
Progress: 48 SP / 51 SP (94%) - Epic 6 (QA) remaining
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 22:44:18 +01:00
colinislit
a6b63665e1
feat(swift): implement agenda planning module (Epic 4 UI)
...
- Add AgendaBlock core component with list, create, cancel, reschedule modes
- Implement AgendaListView with patient/type/location details and actions
- Implement AgendaCreateForm with fuzzy patient search and validation
- Implement AgendaCancelView with disambiguation support
- Implement AgendaRescheduleForm with date/time picker
- Integrate with server actions (create, cancel, reschedule)
- Add radio-group UI component
- Update documentation and status
2025-12-27 22:29:11 +01:00
colinislit
0031bd5fd1
feat(swift): voeg date/time parsing toe (E2)
...
Epic 2 compleet: NLP-helpers voor datum en tijd interpretatie.
Implementatie:
- parseRelativeDate(): ondersteunt "vandaag", "morgen", "deze week",
weekdagen (maandag-zondag), en absolute datums (30 december, 28-12-2024)
- parseTime(): ondersteunt "14:00", "14", "half drie", "kwart voor drie",
en natuurlijke taal tijdsaanduidingen
- combineDatetime(): combineert datum + tijd naar ISO string
- isNotInPast(): validatie voor toekomstige datums
- isDateRange(): type guard voor datum ranges
Integratie:
- Entity extractor gebruikt date/time parser voor agenda intents
- Normaliseert ruwe strings ("morgen", "14:00") naar Date objecten
- Ondersteunt Nederlandse tijdsaanduidingen
Tests & validatie:
- Unit tests voor alle parser functies
- Verify script voor handmatige testing
- Review document met bevindingen en suggesties
Story points: 7 SP (E2.S1: 3, E2.S2: 2, E2.S3: 2)
2025-12-27 22:14:22 +01:00
colinislit
d2ffccc22b
feat(swift): voeg agenda backend API's toe (E3)
...
Epic 3 compleet: Backend integratie voor Swift Agenda Planning.
Nieuwe endpoints:
- GET /api/swift/agenda - Query afspraken op datumrange
- POST /api/swift/agenda/create - Nieuwe afspraak aanmaken
- POST /api/swift/agenda/cancel - Afspraak annuleren
- POST /api/swift/agenda/reschedule - Afspraak verzetten
- GET /api/swift/patients/search - Fuzzy patiënt zoeken
Alle endpoints bevatten:
- Supabase authenticatie + resource ownership checks
- Zod validatie met Nederlandse foutmeldingen
- Hergebruik van bestaande agenda server actions
Test documentatie: docs/swift/test-plan-epic3-backend.md
Progress: 3/7 Epics compleet (E0, E1, E2, E3)
Story points: 11 SP (E3.S1: 3, E3.S2: 3, E3.S3: 3, E3.S4: 2)
2025-12-27 22:12:01 +01:00
colinislit
6460b4361f
feat: add agenda intent scaffolding
2025-12-27 21:46:24 +01:00
colinislit
5b27a3b538
docs: complete agenda planning epic 0
2025-12-27 21:13:27 +01:00
colinislit
da76336d83
docs: add swift agenda planning build plan
2025-12-27 21:08:25 +01:00
colinislit
43467f07fa
feat: show patient dashboard artifact on selection
2025-12-27 20:50:39 +01:00
colinislit
812c41a042
feat: split swift into standalone module
2025-12-27 19:56:24 +01:00
colinislit
0f7c8f00be
docs(swift): Epic 5 status update - voortgang 87%
...
Bouwplan v3 bijgewerkt met correcte status na Epic 5 completion:
Status Updates:
- Epic 3 header: IN PROGRESS → COMPLEET ✅
- Epic 5 header: toegevoegd COMPLEET status ✅
Voortgang Correcties:
- Stories: 24/31 compleet, 3 geskipt = 27 done (was: 26/31)
- Story Points: 71 SP / 82 SP = 87% (ongewijzigd, correct)
- Geannuleerde SP: 1+3+3 = 7 SP (was: 3 SP)
Epic 5 Samenvatting Toegevoegd:
- Status: 5/5 stories compleet (13 SP)
- Features: AI-filtering psychiater, linked evidence UI, voice input, error handling, polish
- Git commits: c6616d8 , adf6c3f , 1bab375 , 1ecc8f9 , 60afb17
- Files: overdracht.ts, overdracht-prompt.ts, overdracht-block.tsx, linked-evidence.tsx, error-handler.ts, offline-banner.tsx
Huidige Status:
✅ Epics 0-5 compleet (27 stories done, 71 SP)
⏳ Epic 6 te doen (4 stories, 8 SP)
Voortgang: 87% - Ready voor Epic 6 (Testing & Refinement)!
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 19:19:15 +01:00
colinislit
60afb175c5
docs(swift): Epic 5 COMPLEET! 🎉 E5.S5 polish & animations (87% total)
...
Bouwplan progress update: 71 SP / 82 SP (87%)
🎉 **EPIC 5 COMPLEET** - AI-Filtering & Polish (13 SP / 13 SP = 100%)
Updates:
- Epic 5 status: 4/5 → 5/5 stories ✅ **COMPLEET**
- Total progress: 26/31 stories (was 25/31)
- Story points: 71/82 SP = 87% (was 70/82 = 85%)
- E5.S5 status: ⏳ → ✅
E5.S5 was al volledig geïmplementeerd verspreid over Epics 2-5:
**Smooth Transitions (14 components):**
- transition-colors, transition-all in alle interactive elements
- Button/input hover + focus states
- artifact-enter animation (200ms ease-out)
- Reduced motion support
**Loading States (6 components):**
- CommandInput: isProcessing met Loader2
- DagnotatieBlock: isSubmitting
- OverdrachtBlock: isLoadingPatients
- ZoekenBlock: isSearching
- ChatPanel: isStreaming
- LinkedEvidence: popover loading
**Toast Confirmations:**
- DagnotatieBlock: "Dagnotitie opgeslagen" + smooth close (500ms)
- Error toasts met getErrorInfo() Nederlandse berichten
- All blocks: safeFetch error handling
**Animations:**
- @keyframes artifact-enter (translateX 100% → 0%)
- @keyframes float (badges)
- Reduced motion: animations → none
- Loader2 animate-spin
Deliverables section toegevoegd met:
- 5 implementation secties gedocumenteerd
- 11 deliverables
- 10 acceptatiecriteria
- Technical details (durations, easing, sizes)
- Status: "AL GEÏMPLEMENTEERD (Epics 2-5)"
🎯 **Epic 5 Samenvatting:**
- E5.S1 (5 SP): AI-filtering psychiater ✅
- E5.S2 (3 SP): Linked evidence UI ✅
- E5.S3 (2 SP): Voice input integratie ✅
- E5.S4 (2 SP): Error states & offline ✅
- E5.S5 (1 SP): Polish & animations ✅
Voortgang: 87% compleet - Alleen Epic 6 (Testing & Refinement) nog te doen!
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 19:11:09 +01:00
colinislit
1ecc8f93c1
docs(swift): mark E5.S4 as complete (already implemented in E5.S2)
...
Bouwplan progress update: 70 SP / 82 SP (85%)
Updates:
- Epic 5 status: 3/5 → 4/5 stories (12 SP compleet)
- Total progress: 25/31 stories (was 24/31)
- Story points: 70/82 SP = 85% (was 68/82 = 83%)
- E5.S4 status: ⏳ → ✅
E5.S4 was al volledig geïmplementeerd in E5.S2:
- error-handler.ts (301 regels) met isOffline(), getErrorInfo(), safeFetch(), retryFetch()
- offline-banner.tsx (72 regels) met OfflineBanner component + useOffline hook
- CommandCenter: OfflineBanner integration
- ContextBar: margin fix (marginTop: '40px' when offline)
- ChatPanel: error messages (type: 'error')
- All blocks: safeFetch + getErrorInfo error handling
Deliverables section toegevoegd met:
- Bestaande implementatie details (3 secties)
- 11 deliverables gedocumenteerd
- 10 acceptatiecriteria
- Technical details (timeout, retry logic, event listeners)
- Status: "AL GEÏMPLEMENTEERD IN E5.S2"
Voortgang: 85% compleet - Epic 5 4/5 stories done! Laatste story: E5.S5 (1 SP)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 18:57:22 +01:00
colinislit
1bab37592b
docs(swift): mark E5.S3 as complete (already implemented in E2)
...
Bouwplan progress update: 68 SP / 82 SP (83%)
Updates:
- Epic 5 status: 2/5 → 3/5 stories (10 SP compleet)
- Total progress: 24/31 stories (was 23/31)
- Story points: 68/82 SP = 83% (was 66/82 = 80%)
- E5.S3 status: ⏳ → ✅
E5.S3 was al volledig geïmplementeerd in Epic 2:
- use-swift-voice.ts hook (116 regels)
- CommandInput voice integratie
- Mic button rechts van input
- Live transcript in input field
- Waveform visualization
- Deepgram streaming (nl, nova-2, 2000ms endpointing)
Deliverables section toegevoegd met:
- Bestaande implementatie details
- Code references (regelnu mmers)
- Technical details (base text tracking, interim/final logic)
- 8 acceptatiecriteria gedocumenteerd
- Status: "AL GEÏMPLEMENTEERD IN E2"
Voortgang: 83% compleet - Epic 5 3/5 stories done!
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 18:51:51 +01:00
colinislit
41acfabe4b
docs(swift): update bouwplan met E5.S2 completion
...
Bouwplan progress update: 66 SP / 82 SP (80%)
Updates:
- Epic 5 status: 1/5 → 2/5 stories (8 SP compleet)
- Total progress: 23/31 stories (was 22/31)
- Story points: 66/82 SP = 80% (was 63/82 = 77%)
- E5.S2 status: ⏳ → ✅
E5.S2 Deliverables section:
- ✅ Alle implementation details gedocumenteerd
- Git commit hash toegevoegd (adf6c3f )
- Code voorbeelden: LinkedEvidence + enrichWithSourceData
- File change statistics toegevoegd (+231/-4)
- 10 acceptatiecriteria gedocumenteerd
Voortgang: 80% compleet - Epic 5 2/5 stories done!
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 18:39:54 +01:00
colinislit
422b5bd20d
docs(swift): update bouwplan met E5.S1 completion
...
Bouwplan progress update: 63 SP / 82 SP (77%)
Updates:
- Epic 5 status: To Do → In Progress (1/5 stories, 5 SP compleet)
- Total progress: 22/31 stories (was 21/31)
- Story points: 63/82 SP = 77% (was 58/82 = 71%)
- E5.S1 status: ⏳ → ✅
E5.S1 Deliverables section:
- ✅ Alle checkboxes gemarkeerd als compleet
- Git commit hash toegevoegd (c6616d8 )
- File change statistics toegevoegd (+104/-8)
- Implementatie details gedocumenteerd
Voortgang: 77% compleet - Epic 5 in progress!
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 17:46:04 +01:00
colinislit
03f252d162
docs(swift): E5.S1 implementatie details toegevoegd aan bouwplan
...
Epic 5.S1 (AI-filtering psychiater) volledig uitgewerkt met Swift-specifieke implementatie.
Updates:
- Context: OverdrachtBlock is Swift artifact (niet EPD pagina)
- Role toggle UI: Verpleegkundige vs Psychiater selector
- API updates: filterForRole parameter in schema + route
- AI prompt: buildSystemPrompt(role) met psychiater filtering
- Filtering logic: 2-stage (server: include_in_handover, AI: behandelrelevantie)
- Deliverables checklist: 10 items
- Acceptatiecriteria: 7 criteria
Psychiater filtering rules:
✅ WEL: medicatie-issues, gedrag, risico, psychose, crisis, afwijkende vitals
❌ UIT: routine medicatie, ADL, sociale activiteiten, standaard observaties
Technische details:
- lib/types/overdracht.ts: GenerateOverdrachtSchema update
- lib/ai/overdracht-prompt.ts: buildSystemPrompt() functie
- app/api/overdracht/generate/route.ts: callClaudeAPI(context, role)
- components/swift/blocks/overdracht-block.tsx: filterRole state + toggle UI
Output verschil:
- Verpleegkundige: 5 aandachtspunten, 3 actiepunten (volledig)
- Psychiater: 2-3 aandachtspunten, 1-2 actiepunten (behandelrelevant)
Ready voor implementatie E5.S1 (5 SP).
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 17:02:08 +01:00
colinislit
428dbe8515
docs(swift): Epic 4 status en samenvatting bijgewerkt
...
Epic 4 header en samenvatting compleet gemaakt voor consistentie.
Updates:
- Epic 4 header: "✅ COMPLEET" toegevoegd
- Uitgebreide Epic 4 samenvatting toegevoegd
- Overzicht belangrijkste features (tabs, lifecycle, animaties)
- Git commits overzicht (855744c , f6c422b , a10a4c3 )
- Files gewijzigd lijst
- Voortgang status: 58 SP / 82 SP (71%)
Consistent met Epic 3 documentatie stijl.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 16:41:40 +01:00
colinislit
a10a4c3813
feat(swift): implementeer slide-in animaties + Epic 4 compleet (E4.S3)
...
Epic 4 volledig afgerond! Artifact systeem compleet met tabs, lifecycle, en animaties.
Voortgang: 58 SP / 82 SP (71%) - 21/31 stories compleet, 3 geskipt
E4.S3 - Slide-in Animatie (2 SP)
- artifact-enter keyframes in globals.css (200ms ease-out)
- Slide van rechts: translateX(100%) → translateX(0) met opacity fade
- Reduced motion support: animation: none bij prefers-reduced-motion
- ArtifactContainer: artifact-enter class op content wrapper
- Key prop (activeArtifact.id) triggert re-animation bij switch
- Smooth visuele feedback bij artifact opening/switching
- Build succesvol zonder errors
E4.S4 - GESKIPT (Placeholder State)
- Placeholder al volledig geïmplementeerd in E4.S1
- Bevat emoji (📋 ), titel, en voorbeelden zoals gespecificeerd
- 3 SP geannuleerd (totaal nu 82 SP i.p.v. 85 SP)
Epic 4 Samenvatting:
- ✅ E4.S1: ArtifactContainer met tabs (5 SP)
- ✅ E4.S2: Lifecycle management (3 SP)
- ✅ E4.S3: Slide-in animaties (2 SP)
- ❌ E4.S4: Placeholder (geskipt, in E4.S1)
Components Updated:
- app/globals.css: artifact-enter keyframes + reduced motion support
- artifact-container.tsx: animatie class op wrapper met key prop
Documentatie:
- Bouwplan bijgewerkt naar v3.0 (Epic 4 compleet)
- E4.S3 deliverables gedocumenteerd
- E4.S4 skip rationale toegevoegd
- Voortgang: 71% compleet (58/82 SP)
- Epic overzicht: 4/6 epics compleet
Volgende Epic: E5 (AI-Filtering & Polish) - 13 SP
🎉 Epic 4 compleet! Artifact systeem volledig functioneel!
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 16:39:46 +01:00
colinislit
f6c422bb14
feat(swift): implementeer artifact lifecycle management (E4.S2)
...
Epic 4 Story 2 compleet: Meerdere artifacts met open/close/switch werken!
E4.S2 - Artifact Lifecycle Management (3 SP)
- Store state: openArtifacts[], activeArtifactId
- Store actions met max 3 artifacts logica
- ArtifactArea refactor naar ArtifactContainer
- CommandCenter integration met nieuwe artifact system
Store Updates (stores/swift-store.ts):
- openArtifacts: Artifact[] — Array van open artifacts
- activeArtifactId: string | null — Currently active artifact
- Initial state: [], null
Store Actions:
```typescript
openArtifact(artifact: Omit<Artifact, 'id' | 'createdAt'>) {
// Auto-generate ID + timestamp
// Max 3 artifacts: remove oldest if at capacity
// Set new artifact as active
}
closeArtifact(id: string) {
// Filter out artifact
// Auto-switch to last remaining if closing active
}
switchArtifact(id: string) {
// Verify artifact exists
// Set activeArtifactId
}
closeAllArtifacts() {
// Clear all artifacts + active ID
}
```
Features:
- Max 3 artifacts enforced (oldest removed at capacity)
- Auto-switch when closing active artifact
- Console logging voor debugging
- ID generation met crypto.randomUUID()
- Timestamp tracking met createdAt
Components Updated:
- components/swift/artifacts/artifact-area.tsx (30 regels)
- Simplified: alleen ArtifactContainer rendering
- Props: openArtifacts, activeArtifactId, switchArtifact, closeArtifact
- components/swift/command-center/command-center.tsx
- openArtifact() i.p.v. openBlock()
- getArtifactTitle() voor dynamic titles
- Escape: closeAllArtifacts() i.p.v. closeBlock()
- Artifact opening met title generation
Integration Flow:
1. Chat: AI genereert action met artifact data
2. ChatPanel: setPendingAction(action)
3. CommandCenter: useEffect detecteert pendingAction
4. CommandCenter: getArtifactTitle(type, prefill)
5. CommandCenter: openArtifact({ type, prefill, title })
6. Store: Auto-generate ID, check max 3, add to array
7. ArtifactArea: Renders ArtifactContainer met artifacts
8. ArtifactContainer: Shows tabs (if >1), renders active block
Console Logging:
- "[Store] Max 3 artifacts reached, removing oldest"
- "[Store] Opening artifact: dagnotitie Dagnotitie - Jan"
- "[Store] Closing artifact: [id] New active: [id]"
- "[Store] Switching to artifact: [id]"
- "[Store] Cannot switch to artifact: [id] (not found)"
Build Status:
- ✅ pnpm build succesvol (geen type errors)
- Alleen bekende warnings (Supabase realtime, useCallback)
Voortgang: 56 SP / 85 SP (66%) - 18/31 stories compleet, 2 geskipt
Next: E4.S3 (Slide-in animatie) - 200ms ease-out transitions
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 16:33:56 +01:00
colinislit
855744c927
feat(swift): implementeer ArtifactContainer met tabs (E4.S1)
...
Epic 4 Story 1 compleet: Basis structuur voor meerdere artifacts met tabs.
E4.S1 - ArtifactContainer Component (5 SP)
- Artifact interface gedefineerd in store
- ArtifactTab component met active state en close button
- ArtifactContainer met conditional tab rendering
- Helper functies voor artifact rendering en titels
Nieuwe Components:
- components/swift/artifacts/artifact-tab.tsx (60 regels)
- Tab UI met title, active state, close button
- Hover effects en opacity animations
- Min/max width, title truncation met tooltip
- Stop propagation op close click
- components/swift/artifacts/artifact-container.tsx (127 regels)
- Props: artifacts[], activeArtifactId, onSelect, onClose
- Tabs alleen bij >1 artifact
- renderArtifactBlock(): switch op artifact type
- getArtifactTitle(): user-friendly titles met patient naam
- Placeholder state wanneer geen artifacts
Artifact Interface:
```typescript
interface Artifact {
id: string;
type: BlockType;
prefill: BlockPrefillData;
title: string;
createdAt: Date;
}
```
Features:
- Tab rendering: alleen bij meerdere artifacts
- Active tab styling: amber-500 border bottom
- Close button: opacity 0 → 100 on hover/active
- Title generation: "Dagnotitie - Jan" voor context
- Block rendering: dagnotitie, zoeken, overdracht, fallback
- Placeholder: "Artifacts verschijnen hier" met voorbeelden
- Responsive: min-w-[140px] max-w-[200px] per tab
Tab Styling:
- Active: bg-white + border-b-2 border-b-amber-500
- Hover: bg-slate-50
- Close button: group-hover:opacity-100
- Text: text-sm font-medium truncate
Build Status:
- ✅ pnpm build succesvol (geen type errors)
- Alleen bekende warnings (Supabase realtime, useCallback)
Note: E4.S1 definieert structuur. E4.S2 voegt store management toe
(openArtifacts[], activeArtifactId, openArtifact(), closeArtifact()).
Voortgang: 53 SP / 85 SP (62%) - 17/31 stories compleet, 2 geskipt
Next: E4.S2 (Artifact lifecycle management) - Store state & actions
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 16:29:01 +01:00
colinislit
3814189934
feat(swift): implementeer artifact opening from chat (E3.S6) 🎉
...
Epic 3 Story 6 compleet: Artifacts openen automatisch vanuit chat!
🎉 EPIC 3 COMPLEET - Medical Scribe Chat werkt end-to-end!
E3.S6 - Artifact Opening from Chat (2 SP)
- PendingAction state triggers artifact opening
- useEffect in CommandCenter luistert naar pendingAction
- Automatische block opening met prefill data
- Visual flow: Chat → AI → Action → Artifact verschijnt rechts
Components Updated:
- components/swift/artifacts/artifact-area.tsx (86 regels)
- Renders DagnotatieBlock, ZoekenBlock, OverdrachtBlock
- Placeholder state wanneer geen block actief
- Conditional rendering based on activeBlock state
- components/swift/command-center/command-center.tsx
- useEffect voor pendingAction handling
- openBlock(type, prefill) aanroep
- setPendingAction(null) cleanup
- Console logging voor debugging
Artifact Opening Flow:
1. User: "Notitie voor Jan: medicatie gegeven"
2. AI response met JSON action (confidence 0.95)
3. ChatPanel: parseActionFromResponse()
4. ChatPanel: setPendingAction(action) if confidence ≥ 0.7
5. CommandCenter: useEffect triggers op pendingAction
6. CommandCenter: openBlock('dagnotitie', { patientName: 'Jan', ... })
7. ArtifactArea: Renders DagnotatieBlock met prefill
8. setPendingAction(null) cleanup
Features:
- Automatische artifact opening bij high confidence (≥0.7)
- Prefill data van AI naar block (patientName, category, content, etc.)
- Console logging voor debugging:
- "[CommandCenter] Processing pending action: {...}"
- "[CommandCenter] Opening artifact: dagnotitie with prefill: {...}"
- Placeholder state met voorbeelden wanneer geen artifact actief
- Overflow-y-auto voor scrollable artifacts
Blocks Supported:
- dagnotitie → DagnotatieBlock
- zoeken → ZoekenBlock
- overdracht → OverdrachtBlock
- fallback → FallbackPicker
Build Status:
- ✅ pnpm build succesvol (geen type errors)
- Alleen bekende warnings (Supabase realtime, useCallback)
Epic 3 Summary (Chat API & Medical Scribe):
- ✅ E3.S1 — Chat API endpoint skeleton (3 SP)
- ✅ E3.S2 — Streaming response logic (5 SP)
- ✅ E3.S3 — Medical scribe system prompt (3 SP)
- ✅ E3.S4 — Intent detection in response (5 SP)
- ❌ E3.S5 — Frontend streaming (GESKIPT - 3 SP)
- ✅ E3.S6 — Artifact opening from chat (2 SP)
Epic 3 Stats: 5/6 stories (18 SP), 1 geskipt (3 SP)
Voortgang: 48 SP / 85 SP (56%) - 16/31 stories compleet, 2 geskipt
Next Epic: E4 (Artifact Area & Tabs) - Meerdere artifacts, tabs, animaties
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 16:23:00 +01:00
colinislit
5b10176a39
docs(swift): skip E3.S5 - streaming logica al in ChatPanel
...
E3.S5 (Frontend streaming handling) geskipt:
- useChatStream hook niet nodig (YAGNI)
- Streaming logica al werkend in ChatPanel (E3.S2)
- Geen andere components gebruiken streaming
- E3.S6 dependencies aangepast: nu E3.S4 i.p.v. E3.S5
Status update:
- Epic 3: 5/6 stories (4 compleet, 1 geskipt, 1 to do)
- Voortgang: 15/31 compleet, 1 geskipt (46 SP / 85 SP = 54%)
- Next: E3.S6 (Artifact opening) - laatste story Epic 3!
2025-12-27 16:19:13 +01:00
colinislit
9b85448a43
feat(swift): implementeer intent detection & action parsing (E3.S4)
...
Epic 3 Story 4 compleet: AI action objects worden geparsed en gevalideerd.
E3.S4 - Intent Detection in Response (5 SP)
- Action parser met JSON extraction uit markdown code blocks
- Zod validatie voor action schema (intent, entities, confidence, artifact)
- Confidence-based artifact opening (≥0.7 threshold)
- Visual feedback met action badges in chat messages
- Console logging voor debugging
Nieuwe Components:
- lib/swift/action-parser.ts (149 regels)
- parseActionFromResponse(): Extract & validate JSON actions
- extractJsonBlock(): Regex matching voor ```json blocks
- removeJsonBlocks(): Clean text zonder JSON
- shouldOpenArtifact(): Confidence check (≥0.7)
- getConfidenceLabel(): "Zeer zeker", "Redelijk zeker", etc.
- validateArtifactType(): Intent/artifact type matching
Components Updated:
- components/swift/chat/chat-panel.tsx
- Action parsing in onDone callback
- setPendingAction voor artifact opening (E3.S6)
- Console logging: "[ChatPanel] Action detected"
- components/swift/chat/chat-message.tsx
- Action badge met Sparkles icon
- Intent label (Dagnotitie, Patiënt zoeken, Overdracht)
- CheckCircle icon voor high confidence (≥0.7)
- Confidence label display
- stores/swift-store.ts
- updateLastMessage(): Optional action parameter
- Type-safe action assignment (null/undefined handling)
Features:
- JSON extraction via regex: /```json\s*\n([\s\S]*?)\n```/
- Zod schema: type, intent, entities, confidence, artifact
- Confidence thresholds: >0.9, 0.7-0.9, 0.5-0.7, <0.5
- Visual feedback: Sparkles + CheckCircle icons
- Cleaned text content (JSON removed from display)
- Action stored in message.action en pendingAction state
Action Schema:
```typescript
{
type: "action",
intent: "dagnotitie" | "zoeken" | "overdracht" | "unknown",
entities: {
patientName?: string,
patientId?: string,
category?: "medicatie" | "adl" | "gedrag" | "incident" | "observatie",
content?: string,
query?: string
},
confidence: number, // 0-1
artifact?: {
type: BlockType,
prefill: Record<string, any>
}
}
```
Build Status:
- ✅ pnpm build succesvol (geen type errors)
- Alleen bekende warnings (Supabase realtime, useCallback)
Voortgang: 46 SP / 85 SP (54%) - E3.S4 compleet
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 16:11:43 +01:00
colinislit
8efac8483f
feat(swift): implementeer medical scribe system prompt (E3.S3)
...
Epic 3 Story 3 compleet: Volledige medical scribe prompt v1.0 geïmplementeerd.
E3.S3 - Medical Scribe System Prompt (3 SP)
- buildMedicalScribePrompt() functie (243 regels)
- Intent detection voor P1 intents: dagnotitie, zoeken, overdracht
- P2 intents: rapportage, agenda
- Confidence thresholds (>0.9, 0.7-0.9, 0.5-0.7, <0.5)
- JSON action object format met artifact prefill
- Context injection (activePatient, shift)
- Verduidelijkingsvragen en error handling
- Nederlands tone of voice (vriendelijk, professioneel, to-the-point)
- 4 voorbeelden: happy path, zoeken, verduidelijking, onduidelijke intent
Key Features:
- Intent herkenning met triggers en entities
- Automatische category detection (medicatie/adl/gedrag/incident/observatie)
- Slim gebruik van context (activePatient als default)
- Follow-up conversatie support
- Error handling met Nederlandse messages
Prompt Structuur:
- Je rol: medical scribe voor Swift GGZ EPD
- Wat je doet: intents herkennen, verduidelijken, actions genereren
- Wat je NIET doet: medisch advies, aannames, lange uitleg
- Context: activePatient, shift injection
- Voorbeelden: 4 concrete user flows
Components Updated:
- app/api/swift/chat/route.ts: buildMedicalScribePrompt() functie
Documentatie:
- docs/swift/e0-medical-scribe-system-prompt.md (519 regels)
- docs/swift/e0-design-tokens-and-components.md (E0.S1 & E0.S2)
- docs/swift/bouwplan-swift-v3.md: E3.S3 ✅ compleet
Build Status:
- ✅ pnpm build succesvol (geen type errors)
- Alleen bekende Supabase realtime warnings
Voortgang: 41 SP / 85 SP (48%) - E3.S3 compleet
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 14:46:26 +01:00
colinislit
b6fccc6e44
docs(swift): update bouwplan v3 - Epic 2 compleet
...
Epic 2 Progress Update:
- Epic 2 status: ⏳ To Do → ✅ Compleet (5/5 stories, 13 SP)
- E2.S1 - E2.S5: Alle stories gemarkeerd als compleet
- Overall progress: 20% → 35% (11/31 stories, 30/85 SP)
Deliverables toegevoegd:
- Store uitbreiding (+87 regels)
- ChatMessage component (76 regels)
- ChatPanel component (148 regels)
- ChatInput component (184 regels)
- Keyboard shortcuts (⌘K, Esc, Enter, Shift+Enter)
- Auto-scroll, scroll-lock, scroll-to-bottom button
- Cross-platform support
Git commits gedocumenteerd:
- e3ff72c (E2.S1 & E2.S2)
- b5e245e (E2.S3)
- 8f6f24f (E2.S4)
- d2931a3 (E2.S5)
Changes:
- Epic overzicht tabel: E2 status updated naar Compleet
- E2 stories table: Alle stories ✅ Compleet
- Totale voortgang: 11/31 stories (35%)
- Deliverables sectie toegevoegd met file details
- E2.S5 technical notes toegevoegd
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 14:16:02 +01:00
colinislit
c77f1eb554
redesigdn docs
2025-12-27 13:17:00 +01:00
colinislit
33c6698870
feat(swift): Epic 5 Progress - Error Handling & Keyboard Shortcuts (E5.S2-S3)
...
Epic 5 deels compleet: Error handling en keyboard shortcuts geïmplementeerd.
Voortgang: 62 SP / 72 SP (86%) - Nog 1 story voor MVP compleet!
E5.S2 - Error Handling (2 SP)
- Gecentraliseerde error handler utility (lib/swift/error-handler.ts)
- isOffline(), isNetworkError(), getErrorInfo() functies
- safeFetch() wrapper met 30s timeout en retry logic
- retryFetch() met exponential backoff (max 3 retries)
- User-friendly Nederlandse error messages voor alle HTTP status codes
- OfflineBanner component met online/offline detection
- Alle blocks en CommandInput gebruiken nieuwe error handler
- Context bar margin adjustment voor offline banner
- parseErrorResponse() voor HTML error detection
E5.S3 - Keyboard Shortcuts (2 SP)
- ⌘Enter / Ctrl+Enter quick submit in CommandInput
- ⌘Enter / Ctrl+Enter quick save in DagnotatieBlock
- Visual hints (⌘↵) op submit button in DagnotatieBlock
- Geverifieerd: ⌘K focus, Escape close, 1-3 FallbackPicker
- Cross-platform support (macOS + Windows/Linux)
- preventDefault() voor browser conflict preventie
Components Updated:
- DagnotatieBlock: safeFetch, getErrorInfo, retryFetch, ⌘Enter save
- OverdrachtBlock: safeFetch, retryFetch voor AI generation
- ZoekenBlock: safeFetch, getErrorInfo voor patient search
- CommandInput: safeFetch, getErrorInfo, ⌘Enter submit
- CommandCenter: OfflineBanner integration
- ContextBar: useOffline hook voor margin adjustment
Nieuwe Files:
- lib/swift/error-handler.ts (301 regels) - Error handling utilities
- components/swift/command-center/offline-banner.tsx (72 regels)
- docs/swift/keyboard-shortcuts-reference.md (200+ regels)
- docs/swift/test-plan-e5-s2-error-handling.md (350+ regels)
- docs/swift/test-plan-e5-s3-keyboard-shortcuts.md (350+ regels)
- docs/swift/PROJECT-STATUS-2024-12-27.md (500+ regels) - Status report
Documentatie:
- Bouwplan bijgewerkt naar v2.5
- Epic completion details toegevoegd met progress bars
- Manual test checklist bijgewerkt (17/20 scenarios)
- Risico's sectie bijgewerkt (alle major risks gemitigeerd)
- Sprint planning status: E5 75% compleet (6/8 SP)
Technische verbeteringen:
- Offline detection met visual feedback
- Network error retry met exponential backoff
- HTTP 401/404/500/503 error messages in Nederlands
- Timeout protection (30s) op alle API calls
- Keyboard shortcuts met visual hints
- Cross-platform shortcut support
Testing:
- Error handling test plan met 8 categorieën
- Keyboard shortcuts test plan met 6 categorieën
- 40+ test scenarios gedocumenteerd
- Quick smoke test checklists
Voortgang: 62 SP / 72 SP (86%) - E5.S2 en E5.S3 compleet
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 09:27:32 +01:00
colinislit
a9d464357b
test-plan
2025-12-26 13:10:36 +01:00
ikbenlit
5174b48f48
refactor(swift): Update UI styles and animations for improved consistency
...
- Changed background colors and text colors across various components to enhance readability and visual appeal.
- Updated animation properties for smoother transitions in CanvasArea and BlockContainer.
- Adjusted styles in FallbackPicker, OverdrachtBlock, and other components to align with the new design system.
- Improved accessibility by ensuring color contrasts meet standards.
This update aims to create a more cohesive user experience throughout the application.
2025-12-26 13:10:04 +01:00
colinislit
d67405df5f
feat(swift): Epic 4 - Navigation & Auth compleet
...
E4.S1 - Login form uitbreiden:
- Interface selector (Swift/Klassiek) toegevoegd
- Visuele keuze met icons (Layout/Zap)
- Redirect naar gekozen interface na login
E4.S2 - Preference opslag:
- updateInterfacePreference() in lib/auth/client.ts
- getInterfacePreference() voor ophalen
- Opslag in user_metadata.preferred_interface
E4.S3 - Redirect middleware:
- /epd → redirect naar preferred interface
- /login → redirect naar preferred interface (als ingelogd)
- Default: klassiek (/epd/clients)
E4.S4 - Fallback Picker:
- FallbackPicker component voor lage confidence
- Grid met 3 opties (Notitie, Zoeken, Overdracht)
- Keyboard shortcuts [1], [2], [3]
- Toont originele input voor context
Voortgang: Epic 4 compleet (8 SP)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-24 09:28:10 +01:00
ikbenlit
2a67a0a2d9
git commit -m "feat(swift): implement Epic 3 - P1 Blocks (E3.S0-S6)" -m "Epic 3 compleet: Alle P1 blocks geïmplementeerd met volledige functionaliteit." -m "E3.S0 - CanvasArea block rendering" -m "- Switch/case voor block types met prefill data" -m "- AnimatePresence voor smooth transitions" -m "- PatientContextCard auto-display wanneer activePatient is gezet" -m "" -m "E3.S1 - Block Container animaties" -m "- Framer Motion animaties voor container, content en close button" -m "- Stagger effecten voor content children" -m "- Hover/tap animaties voor close button" -m "" -m "E3.S2 - DagnotatieBlock" -m "- Patient search met debounced FHIR API integratie" -m "- Category selector (medicatie, adl, gedrag, incident, observatie)" -m "- Textarea met character counter (max 500)" -m "- Opslaan naar /api/reports met validatie en error handling" -m "" -m "E3.S3 - Patient search API" -m "- GET /api/patients/search?q= met fuzzy search" -m "- Match score berekening voor resultaten" -m "- Auth check en error handling" -m "" -m "E3.S4 - ZoekenBlock" -m "- Debounced patient search met dropdown" -m "- Patient selectie → setActivePatient in store" -m "- Auto-close na selectie + recent action" -m "" -m "E3.S5 - PatientContextCard" -m "- Auto-open na patient selectie" -m "- Notities, vitals, diagnoses en risico's secties" -m "- API integratie met /api/overdracht/[patientId]" -m "" -m "E3.S6 - OverdrachtBlock" -m "- Lijst van patiënten met activiteit" -m "- Period selector (1d, 3d, 7d, 14d)" -m "- AI samenvatting generatie per patiënt" -m "- Aandachtspunten en actiepunten weergave" -m "" -m "Technische verbeteringen:" -m "- Technische debt opgelost: BlockContainer animaties, CanvasArea rendering" -m "- PatientContextCard toegevoegd aan blocks" -m "- Alle blocks gebruiken BlockContainer voor consistente styling" -m "" -m "Voortgang: 56 SP / 72 SP (78%) - Epic 3 compleet"
2025-12-24 09:06:39 +01:00
colinislit
3e94271827
feat: complete E2.S5 Input → Block wiring
...
- Implementeer handleSubmit met API call naar /api/intent/classify
- Voeg error handling en fallback naar dagnotitie toe
- Integreer openBlock en addRecentAction
- Update bouwplan: Epic 2 compleet (33 SP done, 46%)
2025-12-24 08:44:40 +01:00
colinislit
db036a3d92
feat(swift): E2 Intent Classification voltooid
...
Epic 2 - Intent Classification (10 SP):
- E2.S1: Local classifier met regex patterns (<50ms)
- E2.S2: Entity extraction (patientName, category, content)
- E2.S3: AI fallback met Claude Haiku bij confidence <0.8
- E2.S4: POST /api/intent/classify API route
Two-tier systeem:
1. Lokale regex classificatie (snel, offline)
2. AI fallback voor lage confidence of complexe input
Bouwplan bijgewerkt naar v1.4 (31/68 SP, 46% done)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Colin Lit <colin@example.com >
2025-12-23 22:59:30 +01:00
colinislit
7f91e048f3
feat(swift): E1 Command Center voltooid
...
E1.S1 Command Center layout:
- 4-zone layout (context, canvas, recent, input)
- Keyboard shortcuts (⌘K focus, Escape close)
- CanvasArea met empty state + voorbeelden
E1.S2 Context Bar:
- Shift indicator met icons per dienst
- Patient chip met avatar + clear button
- Terug naar EPD link
E1.S3 Command Input:
- Dynamic placeholder op basis van context
- Send button (verschijnt bij input)
- Focus state met ring
E1.S4 Voice Input:
- useSwiftVoice hook (wraps Deepgram)
- Real-time waveform visualisatie
- Streaming transcript naar input
E1.S5 Recent Strip:
- Intent-based chips met icons + kleuren
- Relative time (zojuist, 5m, 2u)
- Click-to-repeat functionaliteit
- Quick hints bij lege state
Bouwplan bijgewerkt: E0+E1 done (21/68 SP, 31%)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-23 22:44:39 +01:00
colinislit
1592979dd9
chore: Opruimen oude documentatie
...
Verwijderd:
- docs/specs/ (UI, agenda, ai-integratie, behandelplan, diagnose, overdracht, screening-intake, speech)
- docs/troubleshooting/
- docs/performance/
- Losse docs (audit, migratie, seed data)
Documentatie is verplaatst naar Google Drive of vervangen door Swift specs.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-23 22:30:45 +01:00
colinislit
855b1e99ae
feat(swift): E0 Setup & Foundation + documentatie
...
Swift - Contextual UI EPD: "Van 12 klikken naar 1 zin"
Documentatie:
- PRD, FO, TO, UX specificaties
- Bouwplan met 6 epics, 27 stories (68 SP)
- Analyse en onderzoeksdocumenten
E0 Setup & Foundation:
- E0.S1: Zustand v5.0.9 geïnstalleerd
- E0.S2: Swift store met context, blocks, input state
- E0.S3: /epd/swift route met eigen layout (dark theme)
- E0.S4: Folder structuur components/swift/, lib/swift/
Components:
- CommandCenter (container)
- ContextBar (shift, patient)
- CommandInput (text + voice button)
- RecentStrip (laatste 5 acties)
- BlockContainer (wrapper voor blocks)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-23 22:28:41 +01:00
colinislit
0b2f55c1e4
perf: Performance optimalisaties (4 iteraties)
...
Iteratie 1 - Parallel Fetching:
- Patient dashboard: Promise.all voor 3 data fetches
- Resultaat: ~45% sneller (800ms → 440ms)
Iteratie 2 - Loading States:
- Skeleton loaders voor EPD, patient, agenda, rapportage
- Betere perceived performance tijdens laden
Iteratie 3 - Lazy Load FullCalendar:
- Dynamic import met next/dynamic (ssr: false)
- ~150KB minder in initiële bundle
Iteratie 4 - Reports API Optimalisatie:
- Selectieve kolommen (10 i.p.v. 20)
- Server-side pagination (limit/offset)
- Database indexes voor timeline queries
- Resultaat: 89% sneller (1671ms → 188ms)
Overige fixes:
- Type casts voor Json → Behandelstructuur/SmartGoal/etc.
- Metadata template fix in layout.tsx
Documentatie:
- docs/audit-rapport.md - PO-vriendelijk audit rapport
- docs/performance/baseline-2025-12-12.md - Metingen + resultaten
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-12 15:24:38 +01:00
colinislit
265d3a971f
feat(diagnose+agenda): Diagnose module met ICD-10 en agenda uitbreidingen
...
Diagnose Module:
- Diagnose overzicht pagina met alle patiënt diagnoses
- Diagnosis manager met ICD-10 combobox zoekfunctie
- Diagnose kaarten met hoofddiagnose markering
- Modal voor nieuwe/bewerkte diagnoses
- ICD-10 GGZ codes dataset (lib/data/)
- Zod schemas voor diagnose validatie
- TypeScript types voor ICD-10 (lib/types/icd10.ts)
- Complete documentatie (PRD, FO, TO, Bouwplan)
Agenda Uitbreidingen:
- Patient context card in afspraak modal
- Rapportage composer direct in afspraak modal
- Rapportage bewerken vanuit gekoppelde rapportages
- Verbeterde focus styling voor inputs
Behandelplan:
- Flat componenten structuur (behandeldoel-card, form, planning)
- Context header component
- Uitgebreide types (lib/types/behandelplan.ts)
- Actions voor behandelplan beheer
UI Componenten:
- Command component (shadcn/ui) voor combobox
- Popover component (shadcn/ui)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-12 13:29:59 +01:00
colinislit
593bef4dcf
feat(overdracht): Incident badges + expandable rapportage content
...
Incident telling:
- Nieuwe incident_count in PatientOverzicht alerts
- Telt type='incident', 'crisis' én verpleegkundig category='incident'
- Oranje badge in patiëntenlijst
- "Met alerts" filter includeert nu ook incidenten
Expandable content:
- Rapportages in timeline tonen nu volledige tekst
- "Lees meer" / "Minder tonen" toggle voor berichten >5 regels
- Behoudt whitespace/regeleinden in tekst
Opruiming:
- Oude screenshots verwijderd
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-08 14:26:07 +01:00
colinislit
75c7e284b9
feat(verpleegrapportage): Nieuwe module + opruiming codebase
...
Verpleegrapportage module:
- Nieuwe /epd/verpleegrapportage met patiëntenoverzicht
- Rapportage invoer workspace met timeline view
- Overdracht overzicht met AI-samenvatting
- API endpoints voor verpleegrapportage data
Opruiming:
- Oude /epd/overdracht en /epd/dagregistratie verwijderd (vervangen)
- Oude /api/nursing-logs verwijderd (geconsolideerd naar reports)
- Verouderde design docs en reports verwijderd
- Fonts verplaatst van docs/ naar public/fonts/
Bugfixes:
- Risk-manager: fix constraint violation (db values vs display labels)
- Overdracht API: filter op rapportages i.p.v. encounters
Database:
- Migratie voor consolidatie nursing_logs naar reports tabel
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-08 11:19:48 +01:00
colinislit
9e4e16035b
feat(behandelplan): E3 UI componenten en documentatie updates
...
Behandelplan UI (E3):
- page-client.tsx: Client-side behandelplan pagina
- actions.ts: Server actions voor CRUD operaties
- behandelplan-view.tsx: Volledige behandelplan weergave
- behandelplan-list.tsx: Lijst van behandelplannen
- editable-section.tsx: Herbruikbare edit sectie component
- sections/: Goal, intervention en behandelstructuur forms
UI Componenten:
- components/ui/checkbox.tsx (shadcn)
- components/ui/input.tsx (shadcn)
- components/ui/select.tsx (shadcn)
Documentatie:
- agenda-systeem.mdx toegevoegd
- _index.json en metadata.json bijgewerkt
Dependencies:
- @radix-ui/react-checkbox toegevoegd
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-06 00:35:00 +01:00
colinislit
d965f69a9b
feat(overdracht): E4 + E5 + E6 - Overdracht UI compleet
...
Epic 4 - Overdracht Overzicht:
- /epd/overdracht pagina met patiënten grid
- PatientCard component met alert badges
- Filter tabs (Alle patiënten / Met alerts)
- Responsive grid layout
Epic 5 - Overdracht Detail:
- /epd/overdracht/[patientId] pagina
- VitalsBlock: vitale functies met interpretatie kleuren
- ReportsBlock: rapportages laatste 24 uur
- NursingLogsBlock: gemarkeerde dagnotities
- RisksBlock: actieve risico's gesorteerd op niveau
- AISummaryBlock: Claude AI samenvatting met bronverwijzingen
Epic 6 - Integratie & Polish:
- Overdracht link in EPD sidebar
- Navigatie links dagregistratie <-> overdracht
- Build en type check passed
Bouwplan v1.3: alle 19 stories afgerond
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-06 00:33:49 +01:00
colinislit
d622ac8035
feat(overdracht): E2 + E3 - API overdracht en dagregistratie UI
...
Epic 2 - API Overdracht:
- GET /api/overdracht/patients (patiënten met alerts)
- GET /api/overdracht/[patientId] (detail met vitals, reports, logs, risks)
- POST /api/overdracht/generate (AI samenvatting met bronverwijzingen)
- lib/ai/overdracht-prompt.ts (system + user prompt)
- lib/types/overdracht.ts (TypeScript types)
Epic 3 - Dagregistratie UI:
- /epd/dagregistratie/[patientId] pagina
- Quick entry form (categorie, tijd, tekst, overdracht checkbox)
- Edit/Delete functionaliteit met inline editing
- Confirm delete dialog
- Summary cards (totaal, overdracht, incidenten)
Bouwplan bijgewerkt naar v1.2 (10/19 stories voltooid)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-06 00:18:06 +01:00
colinislit
08cffd0245
feat(overdracht): E0 + E1 - Database setup en API nursing logs
...
Epic 0 - Database Setup:
- nursing_logs tabel met indexes en constraints
- RLS policies (SELECT/INSERT/UPDATE/DELETE)
- TypeScript types gegenereerd
Epic 1 - API Nursing Logs:
- GET/POST /api/nursing-logs (lijst + aanmaken)
- PATCH/DELETE /api/nursing-logs/[id] (bewerken + verwijderen)
- Zod validatie schemas
- Automatische shift_date berekening
Documentatie:
- PRD, FO, TO en Bouwplan voor Overdracht Dashboard
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-06 00:03:18 +01:00
colinislit
ac98070fe4
| E2.S1 | Prompt engineering | System prompt + user prompt templates, evidence-based mapping
...
| E2.S2 | Generate endpoint | `POST /api/behandelplan/generate` retourneert JSON, < 8 sec response
| E2.S3 | AI event logging | Calls loggen naar `ai_events` tabel
new file: app/api/behandelplan/generate/route.ts
modified: docs/specs/behandelplan/bouwplan-behandelplan-v1.md
modified: docs/templates/bouwplan_template.md
new file: lib/ai/behandelplan-prompt.ts
new file: lib/ai/intervention-mapping.ts
modified: lib/supabase/database.types.ts
2025-12-04 09:27:12 +01:00
colinislit
621e1c90f9
| Epic | Status | Wat is gedaan |
...
|---------------------|---------------|---------------------|
| E0: Foundation | ✅ Afgerond | Types + DB migratie |
| E1: Leefgebieden | ✅ Afgerond | 3 componenten |
| E2: AI Generatie | ⏳ Nog te doen | - |
| E3: Behandelplan UI | ⏳ Nog te doen | - |
Gemaakte bestanden:
- lib/types/leefgebieden.ts - 7 domeinen met kleuren/emoji's
- lib/types/behandelplan.ts - SMART doelen, interventies, Zod schemas
- components/behandelplan/leefgebieden-form.tsx - Intake formulier
- components/behandelplan/leefgebieden-scores.tsx - Score weergave
- components/behandelplan/leefgebieden-badge.tsx - Domain badges
- components/behandelplan/index.ts - Exports
2025-12-04 09:09:23 +01:00