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>
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>
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>
Overdracht dashboard:
- Patiënten nu gefilterd op rapportages (laatste 24u) i.p.v. encounters
- Reports-block toont correcte type labels en kleuren
Rapportage module:
- Alle report types toegevoegd aan centrale lib/types/report.ts
- Quick actions met alle 8 rapportage types en icons
- Default type gewijzigd naar 'voortgang'
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Implements bidirectional linking between appointments and reports:
- E4.S1: Create report from appointment modal with encounter pre-linked
- E4.S2: Link existing reports to appointments via EncounterSelector
- E4.S3: Show linked reports in appointment modal edit view
- E4.S4: Navigation between appointments and reports with deep linking
Also includes bug fixes for patient search:
- Fix FHIR to internal format mapping for patient data
- Fix debounced search interference after patient selection
- Fix UUID handling for optional practitioner_id
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- E0.S1: Add encounter_id and intake_id columns to reports table
- E0.S2: Add performance indices for reports and encounters
- E0.S3: Regenerate TypeScript types
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add 6 FAQ markdown files for clientbeheer, intake, screening,
behandelplan, spraak, and inloggen
- Add 2 guidelines files for interface and technical documentation
- Implement CategoryDetector for keyword-based category detection
- Implement KnowledgeLoader for loading relevant knowledge files
- Implement PromptBuilder for combining base prompt with knowledge
Part of AI Documentatie Assistent feature (Epic 0 & Epic 1)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
TypeScript and ESLint fixes:
- Fixed unescaped quotes in report-timeline.tsx (ESLint error)
- Restored database.types.ts from git history (was empty)
- Added reports table type definition to database.types.ts
- Fixed missing getCookieHeader import in intakes/actions.ts
- Fixed use-media-query.ts ternary operator (TypeScript error)
- Simplified z.enum() in report.ts (removed unsupported error options)
All type checking and linting now passes successfully.
Build tested locally and ready for Vercel deployment.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed multiple TypeScript compilation errors that blocked production build:
Component Type Fixes:
- client-sidebar.tsx: Changed icon type from React.ElementType to
React.ComponentType<{ className?: string }> for proper prop typing
- patient-form.tsx: Added type casting for FHIR extension property access
- page.tsx: Added explicit Intake[] type annotation
- document-card.tsx: Added null check for file_size property
- rich-text-editor.tsx: Removed invalid false parameter from setContent()
Data Model Fixes:
- actions.ts (intakes): Changed encounter status 'finished' to 'completed'
(FHIR-compliant value)
- actions.ts (intakes): Set diagnosis clinical_status to always use 'active'
- actions.ts (intakes): Cast treatment_advice to Record<string, any>
Schema Extensions:
- lib/fhir/types/index.ts: Added extension property to FHIRPatient interface
to support custom FHIR extensions (john-doe, insurance, GP, episode-status)
Validation Fixes:
- lib/types/intake.ts: Fixed Zod enum errorMap syntax (changed to message)
All changes ensure type safety while maintaining runtime functionality.
Build now completes successfully with zero TypeScript errors.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
BREAKING: Removed duplicate lib/database.types.ts in favor of
lib/supabase/database.types.ts
Problem:
- Database types existed in two locations causing sync issues
- Old lib/database.types.ts was empty (0 bytes)
- Import paths were inconsistent across codebase
- Build failed due to missing type definitions
Solution:
- Generated fresh types from remote Supabase database
- Updated all imports from @/lib/database.types to @/lib/supabase/database.types
- Removed duplicate lib/database.types.ts file
Affected modules:
- lib/auth/server.ts - Auth server utilities
- lib/auth/client.ts - Auth client utilities
- lib/types/client.ts - Client type definitions
- lib/fhir/transforms/patient.ts - FHIR patient transforms
- lib/fhir/transforms/practitioner.ts - FHIR practitioner transforms
Impact: All database queries now use up-to-date type definitions
including new tables (intakes, risk_assessments, encounters, etc.)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Epic 2 - Cliëntenbeheer: Complete implementation of patient list with
search/filter functionality and comprehensive new patient form with
John Doe crisis admission support.
E2.S1 - Cliëntenlijst:
- Add client-side search bar with form submission
- Implement status filter dropdown (all/screening/active/finished/cancelled)
- Create StatusBadge component with color-coded status indicators
- Update table columns: Status, Name, BSN, Last Updated
- Add status filtering support to FHIR Patient API route
- Update FHIR patient transform to include episode-status extension
- Sort patients by updated_at descending (newest first)
E2.S2 - Nieuwe Cliënt Flow:
- Complete rewrite of patient form with all FO-required fields
- Implement John Doe checkbox with conditional BSN requirement
- Add BSN validation with Dutch Modulo-11 check algorithm
- Add comprehensive form fields:
* Name fields: prefix, given name, family name
* BSN with 9-digit pattern validation
* Birth date with max date validation
* Gender selection
* Address: street, postal code, city
* Contact: phone, email
* Insurance: company, policy number
- Add warning messages for John Doe crisis admissions
- Set default episode status to 'planned' for all new patients
- Redirect to patient detail page after successful creation
- Update FHIR transform bidirectional insurance extension support:
* dbPatientToFHIR: serialize insurance to JSON extension
* fhirPatientToDB: parse insurance from JSON extension
- Pre-populate form fields when editing existing patients
Technical changes:
- app/api/fhir/Patient/route.ts: Add status query param and sorting
- app/epd/patients/actions.ts: Add status filter parameter
- app/epd/patients/page.tsx: Pass status searchParam
- app/epd/patients/components/patient-list.tsx: Complete UI rewrite
- app/epd/patients/components/patient-form.tsx: Complete form rewrite
- lib/fhir/transforms/patient.ts: Add insurance extension handling
- docs/specs/screening-intake/bouwplan-screening-intake-v1.0.md: Update status
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Implements complete database schema for screening and intake workflow:
Database additions:
- 7 new tables: screenings, screening_activities, screening_documents,
intakes, anamneses, examinations, risk_assessments
- Extended patients table with status (episode_status) and is_john_doe
- Extended encounters table with intake_id for linking
- Extended care_plans with intake reference columns
Architecture:
- Separate tables for reusable content (anamneses, examinations, risk_assessments)
- JSONB fields for context-bound data (kindcheck_data, treatment_advice)
- RLS policies, indexes, and updated_at triggers on all new tables
- Helper view: active_intakes_overview
Generated TypeScript types from schema for type-safe database access.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Rename releases.ts to documentatie.ts for better naming
- Add 'use client' directives to UI components for client-side rendering
- Add new documentation pages for features:
- Client Management (CRUD operations)
- Intake System (AI-powered intake analysis)
- Treatment Planning (SMART goals and progress tracking)
- Verpleegkundige Overdracht (nursing handover with ROM measurements)
- Voice-Controlled Reporting (AI-driven speech recording)
- Interface Design System (complete UI/UX specifications)
- Build Errors Fix (troubleshooting guide)
- Add client dashboard page with route structure
- Update documentation index with new categories and planned features
- Refactor BentoCard to use native anchor tags instead of Button component
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added new "Bugs" group to release notes system for documenting
bug fixes and troubleshooting guides.
Changes:
- Added "Bugs & Fixes" group to _index.json (order: 4)
- Added "webpack-module-resolution" category under bugs group
- Created comprehensive MDX documentation for webpack fix
- Updated TypeScript types to include 'bugs' as valid group
- Updated sort order in getAllReleases() function
- Updated getReleasesGrouped() to include bugs filter
- Updated sidebar to expand bugs group by default
Content:
- Detailed webpack module resolution bug documentation
- Root cause analysis with technical explanation
- Solution implementation with code examples
- Prevention best practices
- Quick reference troubleshooting table
- Related issues and future improvements
Structure:
Group: Bugs & Fixes (order: 4)
└── Webpack Module Resolution (order: 10)
- Error: Cannot read properties of undefined (reading 'call')
- Fix: Wrapper component pattern
- Status: Completed
- Version: 0.2.1
This creates a dedicated space for documenting production issues,
their solutions, and lessons learned for future reference.
Added comprehensive improvements to the login and authentication flow:
**UI Improvements:**
- Add password visibility toggle (Eye/EyeOff icons) for password fields
- Improve error message consistency with Dutch translations
- Fix syntax error in login page try-catch block
**Error Handling:**
- Add user-friendly error messages for invalid credentials
- Add specific error codes: invalid_credentials, email_not_confirmed
- Improve error message for non-existent accounts during login
- Handle duplicate email detection during signup with auto-switch to login mode
**Middleware:**
- Add /reset-password and /update-password to public routes
- Fix redirect issue preventing access to password reset flow
**Password Reset Flow:**
- Verify password reset works for magic link users (can set initial password)
- Ensure existing password users can reset their password
- Both flows use the same update mechanism via Supabase
**Documentation:**
- Add comprehensive release notes in docs/RELEASE_AUTH_IMPROVEMENTS.md
All changes maintain backward compatibility with existing magic link users.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add before-user-created hook function for server-side duplicate email detection
- Implement fallback detection using identities array check (Supabase limitation)
- Update signUpWithPassword to detect duplicate emails via hook errors or empty identities
- Add error handling in login page to show duplicate email errors and auto-switch to login mode
- Add auth hook setup documentation and test scripts
- Add password reset and update password flows
- Add email templates for signup confirmation and password reset