DuplicateDetectionService
Component Detail
Description
A backend service that compares incoming and historical activity submissions to identify duplicates using configurable similarity thresholds across contact reference, date, time window, activity type, and duration. It assigns confidence scores to candidate pairs and persists flagged duplicates for coordinator review. The service also exposes management endpoints for updating thresholds based on confirmed or dismissed outcomes.
duplicate-detection-service
Sources & reasoning
Line 107 explicitly names duplicate detection as a concrete NHF requirement tied to multi-coordinator registration scenarios. Blueprint marks this [v1.0], consistent with it being a post-MVP quality enforcement feature building on the approval and flagging infrastructure. The Fase 1 scope does not include it, and the compliance risk to Bufdir reporting justifies high priority within v1.0 once basic oversight is established.
-
docs/source/likeperson.md · line 107Duplikatvarsling: Fange opp når samme aktivitet registreres av flere koordinatorer.
Responsibilities
- Compare activity submissions against recent history using weighted similarity scoring across key fields
- Apply configurable thresholds to classify pairs as high-confidence duplicates, possible duplicates, or distinct
- Persist flagged duplicate pairs with confidence scores and status to the database for review workflows
- Expose endpoints for retrieving flagged pairs, confirming duplicates, and dismissing false positives
- Adjust similarity thresholds based on coordinator feedback to reduce false positive and false negative rates
Interfaces
detectDuplicates(submission: ActivitySubmission): DuplicateCandidate[]
getFlaggedPairs(filter: AlertFilter): DuplicateAlert[]
confirmDuplicate(alertId: string, reviewerId: string): void
dismissFalsePositive(alertId: string, reviewerId: string): void
updateThresholds(config: SimilarityThresholdConfig): void
Related Data Entities (4)
Data entities managed by this component