Install vitest, @vitest/coverage-v8, jsdom, @testing-library/react,
@testing-library/jest-dom, @testing-library/user-event, and msw.
Create vitest.config.ts with jsdom environment, path aliases, and
coverage configuration. Add test scripts to package.json and
vitest/globals types to tsconfig.app.json.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Detailed task-by-task plan for Vitest + MSW + Playwright test infrastructure
covering hooks, services, page integration tests and E2E browser tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace manual useEffect data fetching with useCases/usePendingIcdCases
query hooks. Replace direct API calls in useInlineEdit with useCaseUpdate
and useKvnrUpdate mutations. Use useIcdUpdate for ICD saving. Remove
onCaseSaved callback prop drilling — mutations auto-invalidate the cache.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace manual useState/useEffect/setInterval polling with useQuery
(refetchInterval: 60s) and useMutation for markAsRead/markAllAsRead.
Public API remains identical so consumers need no changes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace manual useState/useEffect data fetching with useDashboard hook
that uses TanStack Query for automatic caching, refetching, and loading
state management.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Install @tanstack/react-query v5 and wrap the app with
QueryClientProvider as foundation for server-state management.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove Nachname/Vorname columns from ICD coding template (DSGVO)
- Restrict /cases/coding-template endpoint to admin-only
- ICD import reads last column for backwards compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a KVNR is entered on a case that has a random-suffix or legacy
Nachname-based fall_id, the fall_id is automatically rebuilt using
the new KVNR.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replaces Nachname-based fall_ids with KVNR or random 6-char suffix
for all existing cases in the database.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace patient last name in fall_id with KVNR (or random fallback).
Retroactive migration of all existing ~2900 fall_ids.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CaseResponse.nachname was required (str) but the masking function sets
it to None for dak_mitarbeiter. This caused Pydantic validation errors
(500) making the case list empty for non-admin users.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>