# Dropout Composite Rollout

This rollout note documents the single-indicator composite dropout implementation:

- Indicator: `trainee_dropout_rate`
- Numerator variable: `effective_dropout_trainees_protocol`
- Logic: TP-reported dropout OR system-final low-attendance dropout (`attendance < 80%`)
- Risk flag: projected/near-threshold low attendance for alerting workflows

## Data Contract

- TP-reported dropout reason categories:
  - `voluntary_withdrawal`
  - `dismissal`
  - `health`
  - `economic`
  - `migration`
  - `other`
- System-only final dropout reason:
  - `low_attendance_auto`

## Enforcement

For dropout imports, system validates TP coverage:

- If a trainee is system-final dropout for the same scope, TP dropout report must include that trainee.
- Import is blocked with missing trainee IDs when coverage is incomplete.

## Verification and Audit

- Dropout projection API exposes:
  - `systemDropoutRisk`
  - `systemDropoutFinal`
  - `tpReportedDropout`
  - `effectiveDropout`
  - `reasonCode`
  - `reasonSource`
- Outcome import audit metadata includes dropout coverage summary.

## Test Matrix

1. Non-cohort training, final attendance <80%
   - Expect `systemDropoutFinal=true`
   - Expect dropout import enforcement requires trainee ID.

2. Non-cohort training, attendance 80%+
   - Expect no system-final dropout.

3. Cohort training with cohort-only breakdown
   - Denominator excludes breakdown days only for affected cohort.
   - Final classification must be cohort-correct.

4. TP reports dropout reason without system-final
   - Effective dropout still true via TP report.
   - Reason source `tp_reported`.

5. TP omits system-final IDs
   - Import blocked with `missingTraineeIds`.

6. TP includes all system-final IDs
   - Import succeeds.

7. Reason-share KPI for project
   - Shares available on KPI payload for dropout indicator.

8. Transfer exclusion
   - Enrollment status containing `transfer` does not trigger system-final dropout.

