From c8aaba657e7692b5b2c909cb5df9b388b024dcbc Mon Sep 17 00:00:00 2001 From: colinislit Date: Mon, 29 Dec 2025 22:40:34 +0100 Subject: [PATCH] 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. --- app/api/swift/chat/route.ts | 14 +- .../swift/artifacts/blocks/agenda-block.tsx | 32 +- .../artifacts/blocks/agenda-cancel-view.tsx | 91 +- .../artifacts/blocks/agenda-create-form.tsx | 80 +- .../artifacts/blocks/agenda-list-view.tsx | 87 +- .../blocks/agenda-reschedule-form.tsx | 60 +- components/swift/chat/chat-panel.tsx | 2 +- docs/implementatieplan-lead-dev.md | 109 + .../intent/architecture-intent-scalability.md | 1292 ++++++++++ docs/intent/architecture-swift-cortex-v2.md | 2231 +++++++++++++++++ docs/intent/fo-swift-intent-system-v2.md | 167 ++ .../haalbaarheidsanalyse-swift-cortex-v2.md | 356 +++ .../intent/intent-architecture-v2-proposal.md | 86 + docs/intent/mvp-userstories-intent-system.md | 69 + docs/intent/review-swift-cortex-v2.md | 116 + .../ux-evaluation-intent-scalability.md | 69 + .../intent/ux-simulation-intent-next-level.md | 83 + ...ntent-tijdslijn-swift-intent-driven-epd.md | 627 +++++ docs/swift/architecture-intent-scalability.md | 879 ------- docs/swift/bouwplan-swift-v3.md | 24 +- docs/swift/competitive-analysis.md | 774 ++++++ docs/swift/e0-medical-scribe-system-prompt.md | 8 +- docs/swift/fo-swift-medical-scribe-v3.md | 24 +- docs/templates/commit_template.md | 2 +- lib/swift/chat-api.ts | 2 +- 25 files changed, 6230 insertions(+), 1054 deletions(-) create mode 100644 docs/implementatieplan-lead-dev.md create mode 100644 docs/intent/architecture-intent-scalability.md create mode 100644 docs/intent/architecture-swift-cortex-v2.md create mode 100644 docs/intent/fo-swift-intent-system-v2.md create mode 100644 docs/intent/haalbaarheidsanalyse-swift-cortex-v2.md create mode 100644 docs/intent/intent-architecture-v2-proposal.md create mode 100644 docs/intent/mvp-userstories-intent-system.md create mode 100644 docs/intent/review-swift-cortex-v2.md create mode 100644 docs/intent/ux-evaluation-intent-scalability.md create mode 100644 docs/intent/ux-simulation-intent-next-level.md create mode 100644 docs/socials/content-tijdslijn-swift-intent-driven-epd.md delete mode 100644 docs/swift/architecture-intent-scalability.md create mode 100644 docs/swift/competitive-analysis.md diff --git a/app/api/swift/chat/route.ts b/app/api/swift/chat/route.ts index b92ec33..88e8df3 100644 --- a/app/api/swift/chat/route.ts +++ b/app/api/swift/chat/route.ts @@ -1,9 +1,9 @@ /** * Swift Chat API Route (v3.0) * - * Streaming chat endpoint voor Swift Medical Scribe met Server-Sent Events (SSE). + * Streaming chat endpoint voor Swift Assistent met Server-Sent Events (SSE). * - * Epic: E3 (Chat API & Medical Scribe) + * Epic: E3 (Chat API & Swift Assistent) * Story: E3.S1 (Chat API endpoint skeleton) */ @@ -76,10 +76,10 @@ const RequestSchema = z.object({ type RequestData = z.infer; /** - * Build medical scribe system prompt (E3.S3) + * Build Swift Assistent system prompt (E3.S3) * Full prompt with intent detection, entity extraction, and action generation */ -function buildMedicalScribePrompt(context?: RequestData['context']): string { +function buildSystemPrompt(context?: RequestData['context']): string { // Build context section const patientContext = context?.activePatient ? `{ @@ -92,7 +92,7 @@ function buildMedicalScribePrompt(context?: RequestData['context']): string { const shiftContext = context?.shift ?? 'ochtend'; - return `Je bent een medische assistent (medical scribe) voor Swift, een Nederlands EPD-systeem voor GGZ-instellingen. + return `Je bent Swift Assistent, een medische assistent voor Swift EPD, een Nederlands EPD-systeem voor GGZ-instellingen. ## Je rol @@ -524,8 +524,8 @@ export async function POST(request: NextRequest) { // 4. Prepare conversation history (limit to last N messages) const history = messages.slice(-MAX_HISTORY_MESSAGES); - // 5. Build medical scribe system prompt (E3.S3) - const systemPrompt = buildMedicalScribePrompt(context); + // 5. Build Swift Assistent system prompt (E3.S3) + const systemPrompt = buildSystemPrompt(context); // 6. Check for Claude API key const apiKey = process.env.ANTHROPIC_API_KEY; diff --git a/components/swift/artifacts/blocks/agenda-block.tsx b/components/swift/artifacts/blocks/agenda-block.tsx index 96a94fa..9765cb6 100644 --- a/components/swift/artifacts/blocks/agenda-block.tsx +++ b/components/swift/artifacts/blocks/agenda-block.tsx @@ -5,6 +5,7 @@ import { AgendaListView } from './agenda-list-view'; import { AgendaCreateForm } from './agenda-create-form'; import { AgendaCancelView } from './agenda-cancel-view'; import { AgendaRescheduleForm } from './agenda-reschedule-form'; +import { motion, AnimatePresence } from 'framer-motion'; export interface AgendaBlockProps { mode: 'list' | 'create' | 'cancel' | 'reschedule'; @@ -36,6 +37,7 @@ export function AgendaBlock({ case 'list': return ( ); case 'create': - return ; + return ; case 'cancel': return ( ); case 'reschedule': - return ; + return ; default: - return
Unknown mode: {mode}
; + return
Unknown mode: {mode}
; } }; return ( -
- {renderContent()} -
+ + + + {renderContent()} + + + ); } diff --git a/components/swift/artifacts/blocks/agenda-cancel-view.tsx b/components/swift/artifacts/blocks/agenda-cancel-view.tsx index cc20118..871f507 100644 --- a/components/swift/artifacts/blocks/agenda-cancel-view.tsx +++ b/components/swift/artifacts/blocks/agenda-cancel-view.tsx @@ -9,6 +9,7 @@ import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group'; import { Label } from '@/components/ui/label'; import { cancelEncounter } from '@/app/epd/agenda/actions'; import { CalendarEvent, APPOINTMENT_TYPES, AppointmentTypeCode } from '@/app/epd/agenda/types'; +import { motion } from 'framer-motion'; interface AgendaCancelViewProps { disambiguationOptions?: CalendarEvent[]; @@ -74,7 +75,7 @@ export function AgendaCancelView({ disambiguationOptions, prefillData, onClose }

Afspraak geannuleerd

De afspraak is succesvol verwijderd uit de agenda.

- + ); } @@ -82,16 +83,21 @@ export function AgendaCancelView({ disambiguationOptions, prefillData, onClose } // Disambiguation Mode if (!effectiveEncounter && disambiguationOptions && disambiguationOptions.length > 1) { return ( -
-
+ +

Afspraak annuleren

-
-
-

+

+

Er zijn meerdere afspraken gevonden. Welke wil je annuleren?

@@ -103,11 +109,11 @@ export function AgendaCancelView({ disambiguationOptions, prefillData, onClose } const timeStr = format(new Date(evt.start), 'HH:mm'); return ( -
+