Detect Duplicates Across Chapter Boundaries
Peer mentors in NHF may belong to up to five chapters simultaneously. When a peer mentor registered under Chapter A logs an activity, and a coordinator from Chapter B separately logs what appears to be the same activity for the same peer mentor on the same day, both coordinators should be alerted. Cross-chapter activity queries must be performed at submission time using the peer mentor's full multi-chapter membership context. The detection logic must also run retroactively when a peer mentor is added to a second chapter after existing activities are present.
User Story
Acceptance Criteria
- Given a peer mentor belongs to two chapters, When a coordinator in Chapter B registers an activity that matches an existing activity logged under Chapter A for the same peer mentor, Then a duplicate warning is triggered referencing the Chapter A record
- Given a cross-chapter duplicate warning is displayed, When the coordinator views it, Then the warning clearly states which chapter the conflicting record belongs to and who registered it
- Given a peer mentor is added to a second chapter, When the system processes the new chapter affiliation, Then a retroactive duplicate check runs against the peer mentor's existing activity history and flags any cross-chapter conflicts into the deduplication queue
- Given the coordinator resolves a cross-chapter duplicate by selecting 'Assign to My Chapter', Then the activity is credited only to the coordinator's chapter and a log entry is written for audit purposes
- Given cross-chapter detection runs, When no conflicts are found, Then no warnings are shown and the submission proceeds normally
Business Value
Multi-chapter membership is a structural reality in NHF with 1,400 chapters. Without cross-chapter duplicate detection, a single peer mentor's one-hour activity could appear in Bufdir reports for five separate chapters, quintupling the apparent volume of peer support delivered. This misrepresentation risks NHF's credibility with Bufdir and could constitute a funding compliance violation.
Components
- Duplicate Activity Warning Dialog ui
- Duplicate Activity Detection Service service
- Cross-Chapter Activity Query data
- Supabase Contact Chapter Adapter infrastructure
- Duplicate Warning Event Logger infrastructure
- Duplicate Detection Service service
- Duplicate Check Repository data
- Duplicate Activity Detector infrastructure
- Contact Chapter Repository data
- Multi-Chapter Membership Service service