How openimis/openimis-be-insuree_py works
This openIMIS reference module manages insurees, families, and related enrollment data. Its main workflow is GraphQL requests routed through the module schema to query or mutate domain records; mutations delegate persistence and photo handling to services. It also exposes family and enrollment reports. The source excerpts are partial, so some report and schema wiring is documented or indexed rather than directly visible; uncertain links are omitted.
Main entry points: models.py Insuree records · schema.py GraphQL schema · gql_queries.py Query fields · gql_mutations.py Mutation fields
Components 13
GraphQL API
- GraphQL schema
insuree/schema.py - Query fields
insuree/gql_queries.py - Mutation fields
insuree/gql_mutations.py - Batch loaders
insuree/dataloaders.py
Insuree Domain
- Module setup
insuree/apps.py - Domain services
insuree/services.py - Insuree records
insuree/models.py
Reports
- Enrolled families
insuree/reports/enrolled_families.py - Family overview
insuree/reports/insuree_family_overview.py - Missing photos
insuree/reports/insuree_missing_photo.py - Pending enrollment
insuree/reports/insurees_pending_enrollment.py
Other components
- openIMIS client
- openIMIS database
Connections 16
- openIMIS client → GraphQL schema: sends GraphQL
README.md - GraphQL schema → Query fields: routes queries
insuree/schema.py - GraphQL schema → Mutation fields: routes mutations
insuree/schema.py - Module setup → Batch loaders: registers loaders
insuree/apps.py - Query fields → Insuree records: queries records
insuree/gql_queries.py - Query fields → Batch loaders: uses loaders
insuree/gql_queries.py - Mutation fields → Domain services: delegates writes
insuree/gql_mutations.py - Mutation fields → Insuree records: records mutations
insuree/gql_mutations.py - Domain services → Insuree records: updates records
insuree/services.py - Insuree records → openIMIS database: maps tables
README.md - Enrolled families → Insuree records: reads records
insuree/reports/enrolled_families.py - Enrolled families → openIMIS database: queries data
- Family overview → Insuree records: reads records
insuree/reports/insuree_family_overview.py - Family overview → openIMIS database: queries data
- Missing photos → openIMIS database: runs SQL
insuree/reports/insuree_missing_photo.py - Pending enrollment → openIMIS database: runs SQL
insuree/reports/insurees_pending_enrollment.py