chore(strip): verwijder kapotte intake-tabs anamnese, onderzoeken en ROM
Opslaan faalde altijd door label/code-mismatch met de database-constraints (reviewbevinding). Tabs komen terug bij de rebuild op het nieuwe datamodel. - tab-mappen anamnese/, examination/, rom/ verwijderd - tabs uit intake-tabs.tsx, server actions uit actions.ts - intake-status API telt de secties niet meer mee (voortgangsring klopt) - Cortex-navigatiedoelen (regex, entity-mapping, prompt) bijgewerkt zodat 'ga naar anamnese' geen 404 meer geeft Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -207,8 +207,8 @@ Je herkent de volgende gebruikersintenties en voert acties uit:
|
||||
- Actie: Toon DiagnoseBlock met ICD-10 codes
|
||||
|
||||
- **intake_navigeer** — Navigeer naar intake sectie
|
||||
- Triggers: "ga naar risico", "ga naar diagnose", "ga naar kindcheck", "ga naar anamnese", "open risicotaxatie", "naar behandeladvies"
|
||||
- Entities: navigationTarget (risk/diagnosis/kindcheck/anamnese/contacts/examination/rom/behandeladvies)
|
||||
- Triggers: "ga naar risico", "ga naar diagnose", "ga naar kindcheck", "open risicotaxatie", "naar behandeladvies"
|
||||
- Entities: navigationTarget (risk/diagnosis/kindcheck/contacts/behandeladvies)
|
||||
- Required: navigationTarget, actieve patient
|
||||
- Actie: Navigeer naar de intake sectie in het EPD
|
||||
|
||||
|
||||
@@ -26,11 +26,8 @@ interface IntakeSection {
|
||||
|
||||
const INTAKE_SECTIONS: IntakeSection[] = [
|
||||
{ id: 'contacts', label: 'Contactmomenten', required: false },
|
||||
{ id: 'anamnese', label: 'Anamnese', required: true },
|
||||
{ id: 'risk', label: 'Risicotaxatie', required: true },
|
||||
{ id: 'kindcheck', label: 'Kindcheck', required: true },
|
||||
{ id: 'examination', label: 'Onderzoek', required: false },
|
||||
{ id: 'rom', label: 'Meetinstrumenten (ROM)', required: false },
|
||||
{ id: 'diagnosis', label: 'Diagnose', required: true },
|
||||
{ id: 'behandeladvies', label: 'Behandeladvies', required: true },
|
||||
];
|
||||
@@ -139,41 +136,17 @@ export async function GET(request: NextRequest) {
|
||||
}
|
||||
|
||||
// Fetch counts for each section in parallel
|
||||
const [
|
||||
contactsResult,
|
||||
anamneseResult,
|
||||
riskResult,
|
||||
examinationResult,
|
||||
romResult,
|
||||
diagnosisResult,
|
||||
] = await Promise.all([
|
||||
const [contactsResult, riskResult, diagnosisResult] = await Promise.all([
|
||||
// Contacts (encounters)
|
||||
supabase
|
||||
.from('encounters')
|
||||
.select('id', { count: 'exact', head: true })
|
||||
.eq('intake_id', targetIntakeId),
|
||||
// Anamnese
|
||||
supabase
|
||||
.from('anamneses')
|
||||
.select('id', { count: 'exact', head: true })
|
||||
.eq('intake_id', targetIntakeId),
|
||||
// Risk assessments
|
||||
supabase
|
||||
.from('risk_assessments')
|
||||
.select('id', { count: 'exact', head: true })
|
||||
.eq('intake_id', targetIntakeId),
|
||||
// Examinations (non-ROM)
|
||||
supabase
|
||||
.from('examinations')
|
||||
.select('id', { count: 'exact', head: true })
|
||||
.eq('intake_id', targetIntakeId)
|
||||
.neq('examination_type', 'ROM'),
|
||||
// ROM examinations
|
||||
supabase
|
||||
.from('examinations')
|
||||
.select('id', { count: 'exact', head: true })
|
||||
.eq('intake_id', targetIntakeId)
|
||||
.eq('examination_type', 'ROM'),
|
||||
// Diagnoses (conditions linked to intake via encounter_id)
|
||||
supabase
|
||||
.from('conditions')
|
||||
@@ -184,11 +157,8 @@ export async function GET(request: NextRequest) {
|
||||
// Build section status
|
||||
const sectionCounts: Record<string, number> = {
|
||||
contacts: contactsResult.count || 0,
|
||||
anamnese: anamneseResult.count || 0,
|
||||
risk: riskResult.count || 0,
|
||||
kindcheck: intake.kindcheck_data && Object.keys(intake.kindcheck_data as object).length > 0 ? 1 : 0,
|
||||
examination: examinationResult.count || 0,
|
||||
rom: romResult.count || 0,
|
||||
diagnosis: diagnosisResult.count || 0,
|
||||
behandeladvies: intake.treatment_advice && Object.keys(intake.treatment_advice as object).length > 0 ? 1 : 0,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user