Voegt docs/datamodel/diagrammen/ toe: één self-contained HTML per
deelmodel (instroom, aanmelding, behandelplan, diagnose,
intake-behandeladvies, rapportage, screening, wachtlijst), elk met een
Mermaid erDiagram, blueprint-vormgeving en sleep/scroll pan-zoom
(mermaid.js + svg-pan-zoom via CDN, geen serverside build nodig).
Per diagram alleen sleutel-/FK-attributen en de kernrelaties uit de §2/§3
entiteiten-/cardinaliteitensecties van het bijbehorende deelmodel, niet elk
veld — bedoeld als navigeerbaar overzicht naast de tabelvorm, niet als
vervanging ervan.
Scope-keuzes:
- model-intake.md en datamodel-discovery.md zijn overgeslagen: eerstgenoemde
is volledig vervangen door model-intake-behandeladvies.md, laatstgenoemde
is een prosedocument zonder entiteitenstructuur.
- model-aanmelding.md toont alleen de nog geldige PERSOON/CLIENT-kern;
AANMELDING/VERWIJZING/ZORGEPISODE zijn vervangen door model-instroom.md
en daar al gediagrammeerd.
- model-screening.md krijgt een expliciete waarschuwing in titel en
bronregel: het losse screeningsbesluit is achterhaald door besluit B21
(screeningsbesluit = acceptatiebesluit, nu care_acceptance_decision in
model-instroom.md).
- model-behandelplan.md, model-rapportage.md en model-wachtlijst.md tonen
een statusnotitie (in herziening resp. deels herzien resp. voorlopig
onderzoeksmodel) conform hun documentstatus.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Legt de middag-/avondsessie van 19 juli vast die tot nu toe alleen in
commit messages en het besluitenlog terug te vinden was: afronding van de
instroom-feitenronde (vraag 3-5, entiteiten/cardinaliteiten, B21-B30,
synchronisatie begrippenlijst/model-aanmelding) en de nieuwe feitenronde
intake/behandeladvies (episode-timing, Treatment Advice, B31-B34).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Voegt feitenmodel-intake-behandeladvies.md en model-intake-behandeladvies.md
toe: FCO-IM-feitenronde en entiteiten-/cardinaliteitenafleiding voor
Clinical Intake Assessment, Intake Contact, Child Safety Check en Treatment
Advice. Corrigeert de episode-timing (intake start ná het acceptatiebesluit,
niet bij een niet meer bestaande aanmelding-uitkomst "intake").
Sluit feitenmodel-instroom.md §7 vraag 2 af (behandeladvies-uitkomsten,
sinds sessielog 19 juli geparkeerd): behandeladvies wordt een eigen
Treatment Advice-object met vervangt-mechanisme, naar het patroon van Care
Acceptance Decision — geen apart voorafgaand advies. Op basis van volledige
LKS 4.0-teksttoetsing (niet alleen samenvattingen): doorverwijzing/
terugverwijzing zijn een volgtijdelijk paar, extra_diagnostiek is
praktijkgefundeerd niet LKS-genormeerd, en MDT-bespreking is voor settings
3-8 een dwingende norm (minimale hook: intake_mdt_review).
Legt B31-B34 vast in het besluitenlog, synchroniseert begrippenlijst §4
(Clinical Intake Assessment, Intake Contact, Child Safety Check, Treatment
Advice) en markeert het oudere model-intake.md niet-destructief als
vervangen, consistent met hoe model-aanmelding.md eerder is behandeld.
begrippenlijst-kernmodel.md §3: vervangt de voorlopige werktermen (Inbound
Care Signal, Access Assessment Case, Presenting Care Need, Screening
Recommendation) door de bevestigde instroom-begrippen uit model-instroom.md
(Referral Request/Submission/Case, Professional/Municipal Referral, Legal
Mandate, Case Information Request/Withdrawal, Crisis Encounter Note, Case
Urgency Assessment). §10 bijgewerkt: opgeloste terminologievragen gemarkeerd,
Wvggz/Wmo-Jeugdwet-aannames als nieuw juridisch te bevestigen punt.
model-aanmelding.md: AANMELDING/VERWIJZING/VERWIJSDOCUMENT/TOEWIJZING/
ZORGEPISODE (§2.10-§2.13, §2.15) niet-destructief gemarkeerd als vervallen
met verwijzing naar de vervangende entiteit in model-instroom.md — tekst
blijft als historisch werkdocument staan, consistent met het
niet-destructieve patroon dat elders in het datamodel wordt toegepast.
PERSOON/CLIENT/CLIENTRELATIE/VERWIJZER/PRAKTIJK_INSTELLING/CLIENT_HUISARTS/
VERZEKERING/TOESTEMMING/CLIENTPORTAAL_ACCOUNT (§2.1-§2.9, §2.14, §2.16)
blijven ongewijzigd en behouden hun sectienummers, waar model-instroom.md
extern naar verwijst. §7 (open besluitpunten) per punt van een status
voorzien, inclusief waar de uiteindelijke beslissing afweek van het advies.
Corrigeert ook twee foutieve paden in model-instroom.md (§4 waardelijsten
verwezen naar de verkeerde sectie in model-aanmelding.md).
Legt de uitkomst van de instroom-feitenronde en het entiteitenmodel formeel
vast als besluiten B21-B30: screening=acceptatie, losse besluit-/vervolgroute-
/onderbouwingsfeiten, expliciete vervangt-relatie bij herziening,
cliënt-intrekking zonder bevoegdheidseis, tijdlijn i.p.v. statusmachine,
zorgverzoek zonder bekende persoon, Wmo/Jeugdwet en Wvggz als eigen
instroomroutes, crisisdocumentatie vóór identificatie, herhaalbare
urgentiebeoordeling, en een minimale hook voor teambetrokkenheid vooruitlopend
op een aparte zorgteam-ronde.
Werkt §10 (vervolg en nog open) bij: markeert afgeronde punten, voegt de
juridische verificatie- en behandeladvies-onderzoekspunten toe, en noteert
dat model-aanmelding.md's AANMELDING/VERWIJZING/ZORGEPISODE-deel is vervangen
door model-instroom.md (synchronisatie volgt als eerstvolgende stap).
Voegt model-instroom.md toe: de eerste entiteiten-/cardinaliteitenafleiding
uit feitenmodel-instroom.md (20 entiteiten, Engelstalig conform B20,
vervangt-patroon voor herzieningen, tijdlijn i.p.v. statusmachine voor
Referral Case).
Vier reviewrondes verwerkt:
- technische en GGZ-domeinreview (vertakkende vervangt-keten gefixed,
timestamp-precisie, ontbrekende ZPM-velden hersteld);
- tweede ronde met datamodel-, GGZ-domein- en UX-expert-agents (lege
screening-entiteit vervallen, naamgeving, cardinaliteitsfout, read-model-eis);
- GGZ-wetgeving-onderzoek (Wvggz, Wmo/Jeugdwet, 275-dagentoets,
365-dagenregel, crisisdocumentatie) vertaald naar nieuwe entiteiten
(municipal_care_assignment, legal_mandate, crisis_encounter_note);
- domeinreview eigenaarschap/urgentie met Colin: herhaalbare
urgentiebeoordeling (case_urgency_assessment) en een bewust minimale hook
voor teambetrokkenheid (episode_team_involvement) — het volledige
zorgteam-model blijft een aparte, nog te plannen ronde.
feitenmodel-instroom.md: "verzoek zonder bekende persoon" (crisisaanmelding)
beantwoord — geen placeholder-persoon, koppeling als eigen gedateerd feit.
Beantwoordt de resterende open vragen uit feitenmodel-instroom.md §7:
aanvullende_informatie_nodig wordt een gebeurtenisfeit i.p.v. besluituitkomst
of statusfase, heroverweging na afwijzing krijgt een expliciete
"vervangt"-relatie tussen acceptatiebesluiten, en intrekking vóór start
intake krijgt twee routes (cliënt-intrekking zonder bevoegdheidseis,
institutionele correctie met dezelfde bevoegdheid als het origineel) waarbij
de al ontstane zorgepisode altijd wordt afgesloten, nooit verwijderd.
Referral Case krijgt daarmee een tijdlijn-gebaseerde stand i.p.v. een vaste
lineaire statusmachine. Alleen vraag 2 (behandeladvies-uitkomsten) blijft
open als apart onderzoek.
Voegt de discovery- en besluitvormingsronde van 18-19 juli toe (besluitenlog,
begrippenlijst, feitenmodel-instroom met scenariotoetsen, terminologie- en
leveranciersonderzoek) en synchroniseert feitenmodel-instroom.md met de
screening=acceptatie-beslissing (§5). Herstructureert docs/datamodel/ naar
submappen per documentsoort (besluiten/sessielogs/feitenmodellen/deelmodellen/
onderzoek/entiteitenkaarten) zodat toekomstige besluitenlogs en feitenrondes
per deelgebied een vaste plek krijgen.
- datamodel-discovery.md: scopeverbreding ronde 1 (wachtlijst, diagnose,
behandelplan), besluiten zorgepisode als eigen entiteit, DSM-5-TR
primair met ICD-10-mapping, wachtlijstplaatsing op twee momenten
(Treeknormen), behandelplan-kern; bevindingen prototype-verkenning
- entiteitenkaart-instroom.html: samenhang-diagram (aanmelding als
besluitproces vs zorgepisode als periode van zorg), diagram 3 met
wachtlijst/diagnose/behandelplan, nieuwe waardelijsten
- sessielog 17 juli: 13 besluiten, bevindingen en open vragen
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- datamodel-discovery.md: FCO-IM-werkwijze, spelregels, feitzinnen §5.1
afgerond met besluiten 17 juli (persoon/cliënt-splitsing, verwijzer +
praktijk als eigen entiteiten, AGB per verwijzertype, flexibele
statussen, verwijsbrief als nudge, cliëntportaal-account, BSN optioneel
op persoon)
- entiteitenkaart-instroom.html: ER-diagram + waardelijsten instroomflow,
gepubliceerd als artifact ter review
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- docs/intent/samenspel-tip-ecd.html: laag-of-platform discussiestuk voor
de werksessie over de TIP-koppeling (twee modellen, drie routes,
API-mapping, beslisvragen)
- docs/sessions/2026-07-14-sessielog.md: besluiten, reviewbevindingen en
uitgevoerde opschoning van vandaag
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Cortex handelt een no-show af vanuit één chatcommando: afspraak
annuleren (declarabiliteits-nudge), en de openstaande concept-
huisartsbrief wordt via LLM herschreven en ter review aangeboden
in een document artifact (human-in-the-loop, PATCH dispatch zet
status op verzendklaar).
- API-routes: context, rescript, cancel, dispatch
- NoShowDocumentBlock: review/edit UI met origineel-vergelijk
- Mock-data voor concept huisartsbrief
- PRD, FO, bouwplan en epics in docs/intent/noshow-case/
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Introduced new navigation handler for intake_navigeer intent, allowing users to navigate to specific patient intake pages.
- Added intake status display to show completion percentage and section checklist.
- Updated action-parser schema to include new intake intents and improved routing for better user experience.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes 4 bugs preventing intake blocks from working:
1. Chat API validation: Add 'nudge' to message type enum, allow empty
content for streaming messages
2. AI chat recognition: Add P3 intake intents (intake_status,
risico_query, diagnose_query, intake_navigeer) to system prompt
with triggers, entities, and JSON examples
3. Artifact rendering: Add intake block imports and switch cases
to artifact-container.tsx
4. API 400 error: Convert null to undefined for optional Zod params
(searchParams.get returns null, Zod .optional() expects undefined)
Also adds:
- Testplan for E2E testing (60+ test cases)
- Session log with lessons learned and new intent checklist
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add intake intents to action-parser schema and routing
- Add navigation handler in command-center for intake_navigeer intent
- Navigate to patient intakes page with toast feedback
- Update bouwplan: E5 now complete (6/7 epics done)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Updated DagnotatieBlock to use activePatient for prefill if no patientId is provided.
- Enhanced PatientDashboardBlock to fallback to activePatient for patientId and name.
- Adjusted usePatientSelection to handle pending actions and re-route after patient selection.
- Refined chat components to manage nudge messages and integrate them into the chat flow.
- Improved UI elements for better patient selection experience.
This update enhances user experience by ensuring that the active patient context is utilized across multiple components, streamlining workflows and reducing manual input.
Inline patient selectie via @naam in de chat input.
YAGNI Versimpeling: 8→4 SP, 5→3 stories
- Geen selectedMentions array (activePatient is al beschikbaar)
- Geen API payload wijziging nodig
- Geen meerdere mentions tracking
E2.S1 - @-detectie:
- Detecteer laatste @ in input
- Track query en startIndex
- Actief als geen space na @ en minimaal 1 char
E2.S2 - PatientMentionDropdown:
- Hergebruik usePatientSearch (debounce 150ms, limit 5)
- Hergebruik PatientListItem (size="sm")
- Positioned above input (bottom-full)
- Escape sluit dropdown
E2.S3 - Selectie flow:
- Vervang @query met @naam in input
- Zet activePatient via usePatientSelection
- Sluit dropdown automatisch
Bouwplan v1.4: Epic 2 compleet (14/19 SP - 74%)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove 39 swift documentation files that were duplicated.
Original files are preserved in docs/archive/swift/.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Adjusted date handling in the agenda API to ensure optional parameters for start, end, and label are correctly processed.
- Enhanced chat input and action parser to support optional date labels for relative dates.
- Updated agenda components to handle date ranges and loading states more effectively.
- Improved error handling and loading indicators in the agenda block for better user experience.
This commit ensures consistency in date handling across the application, aligning with the new requirements for relative date inputs.
Implements AI-powered multi-intent classification for Cortex V2.
When Reflex Arc (Layer 1) detects complexity, it escalates to
the Orchestrator for intelligent classification using Claude 3.5 Haiku.
E2.S1 - System prompt for Orchestrator
- ORCHESTRATOR_SYSTEM_PROMPT constant with Dutch instructions
- Multi-intent detection (en, daarna, ook, eerst, vervolgens)
- Pronoun resolution rules (hij/zij → active patient)
- JSON-only output format specification
E2.S2 - Context formatting for AI
- formatContextForPrompt() with emoji structure
- Dutch labels for shifts and views
- Graceful null handling, token limiting (max 5 agenda, 3 recent)
E2.S3 - AI classification endpoint
- classifyWithOrchestrator() calling Claude 3.5 Haiku
- Builds IntentChain from AI response
- Tracks tokens used and processing time
E2.S4 - IntentChain parsing with Zod
- parseAIResponse() with Zod schema validation
- Strips markdown code blocks
- Partial extraction for malformed responses
- Graceful fallback to intent: 'unknown'
E2.S5 - POST /api/cortex/classify hybrid endpoint
- Reflex first, escalate to Orchestrator if needed
- Response includes handledBy: 'reflex' | 'orchestrator'
- Auth check, feature flag check, request validation
E2.S6 - Graceful fallback
- buildFallbackChain() with confidence cap (0.6)
- buildChainFromReflex() for simple chains
- classifyWithTimeout() wrapper (5s default)
New files:
- lib/cortex/orchestrator.ts (~780 lines)
- app/api/cortex/classify/route.ts (~180 lines)
Key deliverable: "Zeg Jan af en maak notitie" correctly
parsed into 2 actions in an IntentChain.
Progress: 27 SP / 48 SP (56%) - E0, E1, E2 complete
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added a new '/blog' route to middleware for improved navigation.
- Updated sitemap to dynamically include blog posts and series URLs.
- Enhanced blog page metadata with Open Graph and Twitter card information.
- Implemented structured data for blog posts and series to improve SEO.
- Removed outdated blog post "Week 1: De Kickoff" from content.
- Introduced optional OG image field in blog frontmatter for better sharing visuals.
- Epic 0 status: ⏳ To Do → ✅ Done
- All 5 stories (E0.S1-S5) marked as complete
- All done criteria checkboxes marked as checked
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Adjusted confidence threshold for executing simple commands from >0.9 to >=0.7 in architecture documentation and code.
- Updated API endpoint paths from `/api/intent/*` to `/api/cortex/*` for intent classification and execution.
- Modified related tests to reflect the new confidence threshold and endpoint changes.
This update enhances the system's responsiveness to user commands while maintaining clarity in API structure.
- 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'.
- 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.
- 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
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)