HomeVisitReportRepository
Component Detail
Data Layer
medium complexity
backend
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Data access layer responsible for reading and writing home-visit report records to persistent storage. It maps between domain objects and database rows and ensures reports remain correctly linked to their parent activity records.
home-visit-report-repository
Sources & reasoning
Lines 96-98 define the exact field structure and coordinator-handoff purpose. Line 354-355 places this in Fase 3 (v1.1) in the roadmap, and the needs matrix marks it NICE (Blind. + Barnekreft) / Fase 3. Two organizations, not universal, and Fase 3 maps to v1.1 by ordinal.
-
docs/source/likeperson.md · line 96-98Formalisert rapportstruktur etter hjemmebesøk: Helsetilstand, kursinteresse, hjelpemiddelsituasjon, «veien videre» - fungerer som bestilling til koordinatoren.
-
docs/source/likeperson.md · line 354-355Formalisert rapportstruktur (Blindeforbundet + Barnekreftforeningen)
Responsibilities
- Insert new home-visit report records linked to an activity ID
- Fetch a single report by activity ID or report ID
- Query reports by coordinator, date range, or status for overview listings
- Update report fields when a coordinator marks follow-up actions as resolved
Interfaces
save(report: HomeVisitReport): Promise<HomeVisitReport>
findByActivityId(activityId: string): Promise<HomeVisitReport | null>
findByCoordinatorId(coordinatorId: string, filters: ReportFilters): Promise<HomeVisitReport[]>
update(reportId: string, changes: Partial<HomeVisitReport>): Promise<HomeVisitReport>