Skip to content

Conversation

sunilparajuli
Copy link
Member

Summary

Create Django management command to generate bulk synthetic test data for insurees, families, policies, and claims for performance testing and development environments.

Background

Currently, we lack sufficient test data to properly evaluate system performance under realistic load conditions. Manual data entry is time-consuming and doesn't scale for performance testing scenarios where we need thousands of records.

Usage Examples

# Small test dataset
python manage.py generate_synthetic_data --preset small

# Custom configuration
python manage.py generate_synthetic_data --families 10000 --members 4 --claims 2

# Large dataset for load testing
python manage.py generate_synthetic_data --preset large --no-confirm

@sunilparajuli
Copy link
Member Author

init.py was missing under command & leaf folder as well.

@weilu
Copy link
Contributor

weilu commented Oct 1, 2025

@sunilparajuli
Copy link
Member Author

@sunilparajuli please also consider reusing or deleting this: https://github.com/openimis/openimis-be-insuree_py/blob/develop/insuree/management/commands/generateinsurees.py

I will consider carefully removing this in next PR

Comment on lines +38 to +44
from insuree.models import (ConfirmationType, Education, Family, FamilyType,
Gender, IdentificationType, Insuree, InsureePolicy,
Profession, Relation, InsureeStatus)
from location.models import HealthFacility, Location
from medical.models import Diagnosis, Item, Service
from policy.models import Policy
from product.models import Product
Copy link
Contributor

@weilu weilu Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would these cause circular dependency issues? Should this script be moved to medical/claim/assembly module?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes this could raise circular dependency as of now, to avoid i can move it to the functions below but i agree it should be moved to medical/claim module. I will move it to claim or medical which seems most fit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants