|
1 | | -Manages beneficiary graduation from time-bound social protection programs. Defines graduation pathways with weighted criteria, conducts assessments against those criteria, calculates readiness scores, and tracks graduation outcomes with post-graduation monitoring periods. Supports both positive exits (graduation) and negative exits (program removal). |
| 1 | +Manages beneficiary graduation and exit from time-bound social protection programs. Defines |
| 2 | +graduation pathways with weighted criteria, conducts assessments against those criteria, calculates |
| 3 | +readiness scores, and tracks graduation outcomes with post-graduation monitoring periods. Supports |
| 4 | +both positive exits (graduation) and negative exits (program removal). |
2 | 5 |
|
3 | 6 | ### Key Capabilities |
4 | 7 |
|
5 | | -- Define graduation pathways with configurable criteria, exit type, and monitoring duration |
6 | | -- Create weighted criteria with different assessment methods (self-report, verification, computed, observation) |
7 | | -- Conduct beneficiary assessments with criteria responses and evidence attachments |
8 | | -- Calculate readiness scores based on weighted criteria and enforce required criteria |
9 | | -- Submit assessments for manager approval through a draft/submitted/approved/rejected workflow |
10 | | -- Track graduation dates and compute post-graduation monitoring periods |
11 | | -- Filter assessments by assessor, state, pathway, and recommendation |
| 8 | +- Define graduation pathways with configurable criteria, exit type (`is_positive_exit`), and monitoring duration |
| 9 | +- Create weighted criteria with four assessment methods: self-report, verification, computed, observation |
| 10 | +- Conduct beneficiary assessments with per-criterion scores, a manual met/not-met judgment, and notes |
| 11 | +- Calculate weighted readiness scores (0–1) from `score` fields and enforce required criteria via `is_met` flags through `_compute_scores()`. The `score` (numeric, 0–1) and `is_met` (boolean) fields serve different purposes: `score` drives the weighted readiness score, while `is_met` is a qualitative assessor judgment used to check whether required criteria are satisfied. They are intentionally independent because some assessment methods (e.g., field observation) may not map cleanly to a numeric score. |
| 12 | +- Approve assessments through a draft → submitted → approved/rejected workflow; approval auto-sets `graduation_date` when recommendation is "graduate" |
| 13 | +- Compute `monitoring_end_date` from `graduation_date` + pathway's `post_graduation_monitoring_months` |
| 14 | +- Ships with three pre-configured pathways: Standard Graduation (12 months monitoring), Early Graduation (18 months), and Administrative Exit (negative, 0 months) |
12 | 15 |
|
13 | 16 | ### Key Models |
14 | 17 |
|
15 | | -| Model | Description | |
16 | | -| ---------------------------------- | -------------------------------------------------------- | |
17 | | -| `spp.graduation.pathway` | Defines a graduation pathway with criteria and exit type | |
18 | | -| `spp.graduation.criteria` | Individual criterion within a pathway with weight and method | |
19 | | -| `spp.graduation.assessment` | Assessment of a beneficiary against a pathway with scores | |
20 | | -| `spp.graduation.criteria.response` | Response to a specific criterion within an assessment | |
| 18 | +| Model | Description | |
| 19 | +| ---------------------------------- | ------------------------------------------------------------------------ | |
| 20 | +| `spp.graduation.pathway` | Graduation pathway with exit type, approval/assessment flags, and criteria | |
| 21 | +| `spp.graduation.criteria` | Weighted criterion within a pathway; has assessment method and required flag | |
| 22 | +| `spp.graduation.assessment` | Assessment of a beneficiary against a pathway; tracks scores and approval state | |
| 23 | +| `spp.graduation.criteria.response` | Per-criterion response with `score`, `is_met`, `value`, `notes`, and `evidence_attachment_ids` | |
21 | 24 |
|
22 | 25 | ### Configuration |
23 | 26 |
|
24 | 27 | After installing: |
25 | 28 |
|
26 | | -1. Navigate to **Graduation > Configuration > Pathways** |
27 | | -2. Create graduation pathways specifying exit type (positive/negative) and monitoring months |
28 | | -3. Add criteria to each pathway with weight, assessment method, and required flag |
29 | | -4. Users can then create assessments under **Graduation > Assessments > All Assessments** |
| 29 | +1. Navigate to **Graduation > Configuration > Pathways** (managers only) |
| 30 | +2. Three default pathways are pre-installed; create additional ones as needed |
| 31 | +3. On each pathway, set `is_positive_exit`, `is_assessment_required`, `is_approval_required`, and `post_graduation_monitoring_months` |
| 32 | +4. Open the **Criteria** tab on the pathway form to add criteria with weight, assessment method, and required flag (inline editable list) |
| 33 | +5. Users create assessments under **Graduation > Assessments > All Assessments** |
30 | 34 |
|
31 | 35 | ### UI Location |
32 | 36 |
|
33 | | -- **Menu**: Graduation (top-level menu) |
34 | | -- **Assessments**: Graduation > Assessments > All Assessments / My Assessments |
35 | | -- **Configuration**: Graduation > Configuration > Pathways (managers only) |
36 | | -- **Views**: List, kanban (grouped by state), and form views with approval workflow |
37 | | -- **Pathway Form**: Criteria tab shows inline editable criteria list |
38 | | -- **Assessment Form**: Criteria Responses and Recommendation tabs |
| 37 | +- **Top-level menu**: Graduation (visible to `group_spp_graduation_user` and above) |
| 38 | +- **Graduation > Assessments > All Assessments**: List, kanban (grouped by state), form, graph, and pivot views |
| 39 | +- **Graduation > Assessments > My Assessments**: Same views, pre-filtered to current user's assessments |
| 40 | +- **Graduation > Configuration > Pathways**: List and form views (managers only) |
| 41 | +- **Pathway form**: Two-column layout with a **Criteria** tab containing an inline editable list |
| 42 | +- **Assessment form**: **Overview** tab (beneficiary, pathway, scores, dates), **Criteria Responses** tab (inline editable list with `criteria_id`, `score`, `is_met`, `value`, `notes`, `evidence_attachment_ids`), **Recommendation** tab (selection + notes), and **History** tab (audit metadata). Statusbar shows draft/submitted/approved. Alert banners for submitted and rejected states. |
| 43 | +- **Assessment form buttons**: Submit (draft), Approve/Reject (submitted, managers only), Reset to Draft (submitted or rejected, managers only) |
39 | 44 |
|
40 | 45 | ### Security |
41 | 46 |
|
42 | | -| Group | Access | |
43 | | -| ------------------------------------------ | --------------------------------------------------------- | |
44 | | -| `spp_graduation.group_spp_graduation_user` | Read pathways/criteria; create/edit own assessments (no delete) | |
45 | | -| `spp_graduation.group_spp_graduation_manager` | Full CRUD on all graduation data and configuration | |
| 47 | +| Group | Access | |
| 48 | +| --------------------------------------------- | ----------------------------------------------------------------------- | |
| 49 | +| `spp_graduation.group_spp_graduation_user` | Read pathways/criteria; read/write/create own assessments (no delete); full CRUD on own criteria responses | |
| 50 | +| `spp_graduation.group_spp_graduation_manager` | Full CRUD on all graduation models | |
| 51 | + |
| 52 | +Record rules restrict users to assessments where `assessor_id = current user` and responses on those assessments. Managers have unrestricted access. Multi-company isolation rules apply to pathways and assessments. |
46 | 53 |
|
47 | 54 | ### Extension Points |
48 | 55 |
|
49 | | -- Inherit `spp.graduation.assessment` and override `_compute_scores()` to customize readiness calculation |
| 56 | +- Override `_compute_scores()` on `spp.graduation.assessment` to customize readiness calculation logic |
| 57 | +- Override `_compute_monitoring_end()` to change how monitoring end dates are derived |
50 | 58 | - Inherit `spp.graduation.pathway` to add domain-specific pathway fields |
51 | | -- Extend approval workflow by inheriting assessment actions (`action_submit`, `action_approve`) |
52 | | - |
| 59 | +- Inherit assessment workflow actions (`action_submit`, `action_approve`, `action_reject`, `action_reset_draft`) |
53 | 60 | ### Dependencies |
54 | 61 |
|
55 | | -`base`, `spp_security`, `mail` |
| 62 | +`base`, `spp_registry`, `spp_security`, `mail` |
0 commit comments