HomeVisitReportService
Component Detail
Service Layer
medium complexity
backend
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Business logic layer that validates, enriches, and persists home-visit report data. It enforces completeness rules, associates the report with the correct activity record, and exposes the finished report to coordinators for follow-up planning.
home-visit-report-service
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
- Validate report completeness and field-level constraints before persistence
- Associate submitted reports with the corresponding activity record
- Persist reports via HomeVisitReportRepository and return the saved entity
- Expose retrieval methods so coordinators can query reports by activity or date range
- Emit a task-handoff notification to the coordinator when next-steps content is present
Interfaces
submitReport(activityId: string, draft: HomeVisitReportDraft): Promise<HomeVisitReport>
getReportByActivity(activityId: string): Promise<HomeVisitReport | null>
listReportsForCoordinator(coordinatorId: string, filters: ReportFilters): Promise<HomeVisitReport[]>