Demo data generator for SP-MIS programs. Creates 7 social protection
programs with CEL eligibility expressions, enrolls 8 demo personas with
payment histories, and optionally generates ~730 deterministic
households from seeded blueprints (seed=42) for reproducible volume
data. Activates registry variables from spp_studio and installs
Logic Packs for eligibility rules.
- Generate 7 programs (Universal Child Grant, Conditional Child Grant, Elderly Pension, Emergency Relief, Cash Transfer, Disability Support, Food Assistance) with CEL expressions
- Enroll 8 demo personas with predefined stories and payment histories covering all demo scenarios
- Generate ~730 deterministic households with ~2555 members from 28
blueprints via
SeededVolumeGeneratorwithrandom.Random(seed=42)— same seed always produces identical output - Install Logic Packs from
spp_studiofor eligibility rules (child_benefit, social_pension, vulnerability_assessment, cash_transfer_basic, disability_assistance) - Activate registry variables (age, child_count, hh_total_income, dependency_ratio, etc.) via post_init_hook
- 4 demo modes (Sales, Training, Testing, Complete) with automatic field defaults
- Multi-locale support for name generation (fil_PH, si_LK, fr_TG)
- Geographic data loading for Philippines, Sri Lanka, and Togo
- Create change requests at various workflow stages (draft, pending, approved, rejected)
- Cross-module integration: automatically creates GRM tickets, case records, and Claim 169 QR credentials when those modules are installed
- Fairness analysis demo data and PRISM API client creation
| Model | Description |
|---|---|
spp.mis.demo.generator |
Core demo generator with all generation logic |
spp.mis.demo.wizard |
Wizard interface (inherits from generator) |
After installing:
- Navigate to Settings > Demo Data > Load MIS Demo
- The wizard opens with options for demo mode (Sales, Training, Testing, Complete)
- Click "Load Demo Data" to generate
For programmatic generation:
wizard = env['spp.mis.demo.wizard'].create({})
wizard.action_generate_demo_data()All programs use CEL expressions with activated registry variables:
- Universal Child Grant:
r.is_group == true and child_count > 0(member aggregation) - Conditional Child Grant: First 1,000 days targeting for young children
- Elderly Social Pension:
r.is_group == false and age >= retirement_age(age computation) - Emergency Relief Fund:
dependency_ratio >= 1.5 or (is_female_headed and elderly_count > 0)(compound conditions) - Cash Transfer Program:
hh_total_income < poverty_line and hh_size >= 2(income-based targeting) - Disability Support Grant:
r.is_group == true and has_disabled_member(member existence check) - Food Assistance:
r.is_registrant == true and r.active == true(simple field comparison)
The SeededVolumeGenerator uses random.Random(seed=42) for all
structural choices:
- Ages, incomes, genders, and names from locale-specific pools
- Birthdates, registration dates, GPS coordinates
- Household structure from 28 deterministic blueprints across 5 categories (young families, middle-age, elderly, working-age, extended/vulnerable)
- Membership realism applied post-generation (83% enrolled, 10% exited, 5% paused, 2% not eligible)
Running the generator twice with the same seed produces identical output.
- Menu: Settings > Demo Data > Load MIS Demo
- Form: Wizard with generation options (demo mode, Logic Pack installation, volume data configuration)
| Group | Access |
|---|---|
spp_security.group_spp_admin |
Full CRUD |
- Override
_create_demo_programs()to customize program definitions - Override
_enroll_demo_stories()to modify enrollment logic - Add custom demo modes by extending
demo_modeselection field - Inherit
spp.mis.demo.generatorto add fields or generation methods
spp_starter_sp_mis, spp_cr_types_advanced, spp_demo,
spp_gis_report, spp_claim_169
Table of contents
- Initial migration to OpenSPP2
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
- OpenSPP.org
Current maintainers:
This module is part of the OpenSPP/OpenSPP2 project on GitHub.
You are welcome to contribute.




