feat: show patient dashboard artifact on selection
This commit is contained in:
@@ -24,7 +24,7 @@ const ActionSchema = z.object({
|
||||
confidence: z.number().min(0).max(1),
|
||||
artifact: z
|
||||
.object({
|
||||
type: z.enum(['dagnotitie', 'zoeken', 'overdracht', 'fallback']),
|
||||
type: z.enum(['dagnotitie', 'zoeken', 'overdracht', 'fallback', 'patient-dashboard']),
|
||||
prefill: z.record(z.string(), z.any()),
|
||||
})
|
||||
.optional(),
|
||||
@@ -140,6 +140,7 @@ export function getConfidenceLabel(confidence: number): string {
|
||||
*/
|
||||
export function validateArtifactType(intent: SwiftIntent, artifactType?: BlockType): boolean {
|
||||
if (!artifactType) return true; // No artifact is valid
|
||||
if (artifactType === 'patient-dashboard') return true;
|
||||
|
||||
// Intent should match artifact type (except for 'unknown' and 'fallback')
|
||||
if (intent === 'unknown') return artifactType === 'fallback';
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { VerpleegkundigCategory } from '@/lib/types/report';
|
||||
// Intent types
|
||||
export type SwiftIntent = 'dagnotitie' | 'zoeken' | 'overdracht' | 'unknown';
|
||||
|
||||
export type BlockType = Exclude<SwiftIntent, 'unknown'>;
|
||||
export type BlockType = Exclude<SwiftIntent, 'unknown'> | 'patient-dashboard';
|
||||
|
||||
// Shift types
|
||||
export type ShiftType = 'nacht' | 'ochtend' | 'middag' | 'avond';
|
||||
@@ -28,6 +28,7 @@ export interface ExtractedEntities {
|
||||
patientId?: string;
|
||||
category?: VerpleegkundigCategory;
|
||||
content?: string;
|
||||
query?: string;
|
||||
}
|
||||
|
||||
// Block sizes
|
||||
@@ -61,6 +62,12 @@ export const BLOCK_CONFIGS: Record<BlockType, BlockConfig> = {
|
||||
size: 'lg',
|
||||
icon: 'ArrowRightLeft',
|
||||
},
|
||||
'patient-dashboard': {
|
||||
type: 'patient-dashboard',
|
||||
title: 'Patiëntoverzicht',
|
||||
size: 'lg',
|
||||
icon: 'LayoutDashboard',
|
||||
},
|
||||
};
|
||||
|
||||
// Recent action type
|
||||
|
||||
Reference in New Issue
Block a user