Skip to content

Commit 17caa21

Browse files
committed
fix(spp_mis_demo_v2): clarify household enrollment in USE_CASES, filter story family names from seeded generator
1 parent 9d87db3 commit 17caa21

2 files changed

Lines changed: 32 additions & 11 deletions

File tree

spp_mis_demo_v2/docs/USE_CASES.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@ Seeded RNG** architecture:
3030
- **100% Reproducible**: Same country selection = identical output every run
3131
- **Country-aware Names**: Names change by locale (Philippines, Sri Lanka, Togo)
3232

33+
### Household vs Individual Enrollment
34+
35+
Most programs target **households (groups)**, not individuals. When a program has
36+
`target_type = group`, the **household** is enrolled — not the person. Each story
37+
persona is the **head of household** who represents the family. For example, "Maria
38+
Santos enrolled in Cash Transfer" means the Santos Household (5 members) is the enrolled
39+
entity, with Maria as the head.
40+
41+
Only individual-targeting programs (Elderly Social Pension, Food Assistance) enroll the
42+
person directly.
43+
3344
---
3445

3546
## Blueprint Architecture
@@ -288,13 +299,13 @@ set of records.
288299

289300
**Journey:**
290301

291-
1. Enrolled in Cash Transfer Program 150 days ago
302+
1. Santos Household enrolled in Cash Transfer Program 150 days ago
292303
2. Received 3 monthly payments of $150 each
293-
3. Graduated from program 30 days ago
304+
3. Graduated from program 30 days ago (household exited)
294305

295306
**Demo Points:**
296307

297-
- Complete program lifecycle
308+
- Complete household program lifecycle
298309
- Graduation pathway demonstration
299310
- Payment history tracking
300311
- Success metrics
@@ -311,7 +322,7 @@ set of records.
311322

312323
**Journey:**
313324

314-
1. Enrolled in Cash Transfer Program 100 days ago
325+
1. Dela Cruz Household enrolled in Cash Transfer Program 100 days ago
315326
2. First payment ($150) - Successful
316327
3. Second payment ($150) - **Failed** (bank issue)
317328
4. GRM ticket filed for payment failure
@@ -360,7 +371,7 @@ set of records.
360371

361372
**Journey:**
362373

363-
1. Enrolled in Universal Child Grant 140 days ago
374+
1. Morales Household enrolled in Universal Child Grant 140 days ago
364375
2. Received 4 monthly payments ($150 each)
365376
3. Children attending school
366377

@@ -383,7 +394,7 @@ set of records.
383394

384395
**Journey:**
385396

386-
1. Fast-track enrolled in Emergency Relief Fund 55 days ago
397+
1. Gutierrez Household fast-track enrolled in Emergency Relief Fund 55 days ago
387398
2. Received 2 emergency payments ($400 each, Tier 2)
388399
3. Rapid vulnerability assessment completed
389400

@@ -405,7 +416,7 @@ set of records.
405416

406417
**Journey:**
407418

408-
1. Enrolled in Disability Support Grant 100 days ago
419+
1. Martinez Household enrolled in Disability Support Grant 100 days ago
409420
2. Received 3 monthly payments ($175 each: base $100 + 1 member x $75)
410421
3. Active program participant
411422

@@ -445,12 +456,12 @@ set of records.
445456

446457
**Profile:**
447458

448-
- Cash Transfer beneficiary
459+
- Cash Transfer beneficiary household
449460
- Multi-ticket GRM integration
450461

451462
**Journey:**
452463

453-
1. Enrolled in Cash Transfer Program 180 days ago
464+
1. Castillo Household enrolled in Cash Transfer Program 180 days ago
454465
2. Background story for GRM multi-ticket scenarios
455466

456467
---

spp_mis_demo_v2/models/seeded_volume_generator.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,22 @@ def __init__(self, env, locale, seed=42):
4646
if provider:
4747
self._male_names = list(provider.first_names_male)
4848
self._female_names = list(provider.first_names_female)
49-
self._last_names = list(provider.last_names)
49+
all_last_names = list(provider.last_names)
5050
else:
5151
# Fallback: generic English names
5252
self._male_names = ["John", "James", "Robert", "Michael", "David", "William"]
5353
self._female_names = ["Mary", "Patricia", "Jennifer", "Linda", "Elizabeth", "Susan"]
54-
self._last_names = ["Smith", "Johnson", "Williams", "Brown", "Jones", "Garcia"]
54+
all_last_names = ["Smith", "Johnson", "Williams", "Brown", "Jones", "Garcia"]
55+
56+
# Extract family names from reserved story names to avoid collisions.
57+
# Seeded groups use family_name as the group name, so a seeded "Santos"
58+
# group would be confusing next to story group "Maria Santos".
59+
reserved_family_names = set()
60+
for name in self.reserved_names:
61+
parts = name.split()
62+
if len(parts) >= 2:
63+
reserved_family_names.add(parts[-1])
64+
self._last_names = [n for n in all_last_names if n not in reserved_family_names]
5565

5666
# Caches
5767
self._gender_cache = {}

0 commit comments

Comments
 (0)