Service Layer medium complexity backend
1
Dependencies
2
Dependents
2
Entities
0
Integrations

Description

Service that detects potential duplicate activity submissions across coordinators and local associations, fulfilling NHF's requirement to identify activities sharing the same contact, activity type, and date within a configurable time window. Surfaces suggested flags without automatically rejecting records, allowing human review to determine true duplicates across the 1,400 NHF local associations.

Feature: Activity Flagging

duplicate-detection-service

Responsibilities

  • Query activities by contact_id, activity_type, and date within configurable time window
  • Return ranked list of potential duplicate candidates with match confidence
  • Expose configurable deduplication window per organisation
  • Feed duplicate suggestions into flagged-activities triage view

Interfaces

findDuplicateCandidates(activityId: string, windowHours: number): Promise<DuplicateCandidate[]>
getDeduplicationConfig(orgId: string): Promise<DuplicationConfig>

Relationships

Dependencies (1)

Components this component depends on

Dependents (2)

Components that depend on this component

Related Data Entities (2)

Data entities managed by this component