CertificationExpiryChecker
Component Detail
Description
A scheduled backend service that periodically checks all active peer mentor certifications for expiry and automatically transitions lapsed mentors to paused status. It removes expired mentors from assignment pools and public-facing listings without requiring manual coordinator action. Upon triggering a pause, it dispatches notifications to both the affected mentor and their coordinator via the push notification system.
certification-expiry-checker
Sources & reasoning
Line 80 explicitly ties certification expiry to automatic removal for HLF. The priority matrix places sertifisering at Fase 3 (line 155), which maps to v1.1 per roadmap ordinal. The blueprint also assigns [v1.1]. The feature depends on certification-training shipping first, making v1.1 the correct target phase.
-
docs/source/likeperson.md · line 80HLF kobler dette til sertifisering: ved utgått sertifikat forsvinner likepersonen fra lokallagets nettsider automatisk.
-
docs/source/likeperson.md · line 155| Kursadministrasjon / sertifisering | ✓ | - | - | ✓ | ✓ | SHOULD (HLF + Barnekreft) | 3 |
Responsibilities
- Run scheduled job to evaluate certification expiry dates against current date
- Transition mentors with lapsed certifications to paused status in the database
- Remove auto-paused mentors from active assignment pools and public listings
- Dispatch pause notifications to affected mentors and their coordinators
- Log each auto-pause event with expiry date and trigger timestamp for audit
Interfaces
runExpiryCheck(): Promise<AutoPauseResult[]>
pauseExpiredMentor(mentorId: string, expiryDate: Date): Promise<void>
getExpiringCertifications(withinDays: number): Promise<MentorCertification[]>
notifyPauseTriggered(mentorId: string, coordinatorId: string): Promise<void>
Related Data Entities (6)
Data entities managed by this component