|
10 | 10 | 2. Demonstrate different CEL expression patterns |
11 | 11 | 3. Link to existing Logic Packs from spp_studio |
12 | 12 |
|
13 | | -Program Catalog (6 programs): |
| 13 | +Program Catalog (7 programs): |
14 | 14 | 1. Universal Child Grant - Member aggregation (child_benefit pack) |
15 | | -2. Elderly Social Pension - Age + constants (social_pension pack) |
16 | | -3. Emergency Relief Fund - Cached metrics (vulnerability_assessment pack) |
17 | | -4. Cash Transfer Program - Poverty threshold (cash_transfer_basic pack) |
18 | | -5. Disability Support Grant - Member existence (disability_assistance pack) |
19 | | -6. Food Assistance - Basic active check (no pack, simple CEL) |
| 15 | +2. Conditional Child Grant - First 1,000 days with compliance (child_benefit pack) |
| 16 | +3. Elderly Social Pension - Age + constants (social_pension pack) |
| 17 | +4. Emergency Relief Fund - Cached metrics (vulnerability_assessment pack) |
| 18 | +5. Cash Transfer Program - Poverty threshold (cash_transfer_basic pack) |
| 19 | +6. Disability Support Grant - Member existence (disability_assistance pack) |
| 20 | +7. Food Assistance - Basic active check (no pack, simple CEL) |
20 | 21 |
|
21 | 22 | CEL Expression Patterns Demonstrated: |
22 | 23 | - Field comparison: r.active == true |
23 | 24 | - Computed variables: age >= retirement_age |
24 | 25 | - Aggregate variables: hh_total_income < poverty_line, child_count > 0 |
25 | 26 | - Compound conditions: dependency_ratio >= 1.5 or (is_female_headed and elderly_count > 0) |
26 | 27 | - Arithmetic with variables: base_child_grant * child_count, disabled_count * disability_grant_per_member |
| 28 | +- Compliance criteria: members.exists(m, age_years(m.birthdate) < 5) |
27 | 29 | """ |
28 | 30 |
|
29 | 31 | # Demo programs aligned with spec and Logic Packs |
|
55 | 57 | "Logic Pack: child_benefit", |
56 | 58 | ], |
57 | 59 | }, |
| 60 | + { |
| 61 | + "id": "conditional_child_grant", |
| 62 | + "name": "Conditional Child Grant", |
| 63 | + "description": "Monthly grant for households with pregnant women and children aged 0-2. " |
| 64 | + "Targets the critical first 1,000 days of life to support nutrition and " |
| 65 | + "health-seeking behavior. Compliance requires prenatal visits, health " |
| 66 | + "checkups, and immunizations.", |
| 67 | + "target_type": "group", |
| 68 | + "entitlement_amount": 10.0, |
| 69 | + "entitlement_formula": "first_1000_days_grant", |
| 70 | + "cycle_duration": 30, # Monthly |
| 71 | + # CEL: Households with children under 2 (first 1,000 days) |
| 72 | + # Pattern: Member age check via members.exists() |
| 73 | + "cel_expression": "r.is_group == true and members.exists(m, age_years(m.birthdate) < 2)", |
| 74 | + # Compliance: prenatal visits, health checkups, immunizations |
| 75 | + "compliance_cel_expression": "members.exists(m, age_years(m.birthdate) <= 2)", |
| 76 | + # Link to Logic Pack |
| 77 | + "logic_pack": "child_benefit", |
| 78 | + "use_logic_studio": True, |
| 79 | + "logic_name": "Conditional Child Grant Eligibility", |
| 80 | + "expression_type": "filter", |
| 81 | + "stories": [], |
| 82 | + "demo_points": [ |
| 83 | + "Conditional cash transfer", |
| 84 | + "First 1,000 days targeting (0-2 years)", |
| 85 | + "Health visit and immunization compliance", |
| 86 | + "Compliance manager with CEL expression", |
| 87 | + "CEL: members.exists() for eligibility and compliance", |
| 88 | + "Logic Pack: child_benefit", |
| 89 | + ], |
| 90 | + }, |
58 | 91 | { |
59 | 92 | "id": "elderly_social_pension", |
60 | 93 | "name": "Elderly Social Pension", |
|
0 commit comments