feat(cortex): add Intake Blocks MVP for voice/text commands
Adds 4 new intents for intake workflow: - intake_status: shows completion percentage and section checklist - intake_navigeer: navigation to specific intake tabs - risico_query: displays risk assessments with severity indicators - diagnose_query: shows primary/secondary diagnoses New components: - IntakeStatusBlock, RisicoBlock, DiagnoseBlock - Shared block components (BlockLoading, BlockError, BlockEmpty, BlockSection, BlockItem, BlockFooter) - useBlockData and useIntakeContext hooks New API routes: - GET /api/cortex/intake/status - GET /api/cortex/intake/risico - GET /api/cortex/intake/diagnose Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -158,6 +158,60 @@ const INTENT_PATTERNS: Record<Exclude<CortexIntent, 'unknown'>, PatternConfig[]>
|
||||
{ pattern: /^(verzet|verplaats)\s+\d{1,2}[:.]\d{2}\b/i, weight: 0.9 },
|
||||
{ pattern: /^verzet\s+\w+\s+naar\b/i, weight: 0.85 },
|
||||
],
|
||||
|
||||
// =========================================================================
|
||||
// Intake intents (MVP)
|
||||
// =========================================================================
|
||||
|
||||
intake_status: [
|
||||
// "Wat moet ik nog doen?" patterns
|
||||
{ pattern: /^(wat\s+)?moet\s+ik\s+nog\s+(doen|invullen)/i, weight: 1.0 },
|
||||
{ pattern: /^is\s+(de\s+)?intake\s+compleet/i, weight: 0.95 },
|
||||
{ pattern: /^intake\s+(checklist|status|voortgang)/i, weight: 0.95 },
|
||||
{ pattern: /^welke\s+secties\s+(zijn|nog)/i, weight: 0.85 },
|
||||
{ pattern: /^wat\s+is\s+(de\s+)?(intake\s+)?status/i, weight: 0.9 },
|
||||
{ pattern: /^status\s+(van\s+)?(de\s+)?intake/i, weight: 0.9 },
|
||||
{ pattern: /^intake\s+overzicht/i, weight: 0.85 },
|
||||
],
|
||||
|
||||
intake_navigeer: [
|
||||
// "Ga naar [sectie]" patterns
|
||||
{ pattern: /^ga\s+naar\s+(de\s+)?(risico|risicotaxatie)/i, weight: 1.0 },
|
||||
{ pattern: /^ga\s+naar\s+(de\s+)?diagnose/i, weight: 1.0 },
|
||||
{ pattern: /^ga\s+naar\s+(de\s+)?kindcheck/i, weight: 1.0 },
|
||||
{ pattern: /^ga\s+naar\s+(de\s+)?anamnese/i, weight: 1.0 },
|
||||
{ pattern: /^ga\s+naar\s+(de\s+)?behandeladvies/i, weight: 1.0 },
|
||||
{ pattern: /^ga\s+naar\s+(de\s+)?(rom|vragenlijst)/i, weight: 1.0 },
|
||||
{ pattern: /^ga\s+naar\s+(de\s+)?onderzoek/i, weight: 1.0 },
|
||||
{ pattern: /^ga\s+naar\s+(de\s+)?contact/i, weight: 1.0 },
|
||||
{ pattern: /^ga\s+naar\s+(de\s+)?algemeen/i, weight: 1.0 },
|
||||
|
||||
// "Open [sectie]" patterns
|
||||
{ pattern: /^open\s+(de\s+)?(risico|diagnose|kindcheck|anamnese)/i, weight: 0.95 },
|
||||
|
||||
// "Naar [sectie]" patterns (shorter)
|
||||
{ pattern: /^naar\s+(risico|diagnose|kindcheck|anamnese|behandeladvies)/i, weight: 0.9 },
|
||||
],
|
||||
|
||||
risico_query: [
|
||||
// "Wat zijn de risico's?" patterns
|
||||
{ pattern: /^(wat\s+zijn\s+)?(de\s+)?risico'?s/i, weight: 1.0 },
|
||||
{ pattern: /^(toon|show|bekijk)\s+(de\s+)?risico/i, weight: 0.95 },
|
||||
{ pattern: /^risicotaxatie/i, weight: 0.95 },
|
||||
{ pattern: /^risico\s+overzicht/i, weight: 0.9 },
|
||||
{ pattern: /^welke\s+risico'?s/i, weight: 0.9 },
|
||||
{ pattern: /^risico'?s\s+(van|voor)\s+\w+/i, weight: 0.95 },
|
||||
],
|
||||
|
||||
diagnose_query: [
|
||||
// "Welke diagnoses?" patterns
|
||||
{ pattern: /^(welke\s+)?diagnose[ns]?(\s+heeft)?/i, weight: 1.0 },
|
||||
{ pattern: /^(toon|show|bekijk)\s+(de\s+)?diagnose/i, weight: 0.95 },
|
||||
{ pattern: /^wat\s+is\s+(de\s+)?diagnose/i, weight: 0.95 },
|
||||
{ pattern: /^diagnose\s+overzicht/i, weight: 0.9 },
|
||||
{ pattern: /^diagnose[ns]?\s+(van|voor)\s+\w+/i, weight: 0.95 },
|
||||
{ pattern: /^icd\s*-?\s*10/i, weight: 0.8 },
|
||||
],
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user