Census Service

Overview

The Census Service enables the creation and categorization of census records, ensures boundary validity, enforces user compliance, and automates record timeframes. With robust demographic data handling and advanced analysis, it supports precise planning and resource allocation while maintaining data integrity.

Pre-requisites

  • Knowledge of SpringBoot.

  • Knowledge of Git or any version control system.

  • Knowledge of RESTful web services.

  • Knowledge of the Kafka and Postgres.

  • Knowledge of eGov-mdms service and eGov-persister will be helpful.

Key Features of Census Service

  • Census Record Creation: Create census records for specific boundaries and categorize them by population type, such as people, animals, and plants.

  • Demographic Data Handling: Store population data by demographic variables (e.g., age, gender, ethnicity) for detailed analysis (e.g., if categorized by age:{"0-14": 1000, "15-24": 8000}).

  • Boundary and User Validation:

    • Validate boundaries via the Boundary Service.

    • Verify user roles for compliance.

    • Manage and update census record validity periods.

  • Integration with Plan Service: Map facilities to boundaries via the Plan Facility API for seamless resource allocation and microplanning.

Service Dependencies

  • Boundary service

  • Plan service

  • Workflow service

  • Persister service

Base URL

/census-service

API Specification

Producer Details

Topic

Description

census-create-topic

Creates a census record for the specified boundary.

census-update-topic

Updates a census record.

census-bulk-update-topic

Updates a list of census records.

Consumer Details

Topic

Description

resource-census-create-topic

Triggers census creation after resource estimation

update-plan-facility

Marks the boundaries in census where facility is assigned.

Configurations and Helm Chart Details

API EndPoints
Roles

/census-service/_create

MICROPLAN_ADMIN

/census-service/_search

ROOT_POPULATION_DATA_APPROVER, POPULATION_DATA_APPROVER, ROOT_FACILITY_CATCHMENT_MAPPER, FACILITY_CATCHMENT_MAPPER

/census-service/_update

ROOT_POPULATION_DATA_APPROVER, POPULATION_DATA_APPROVER, ROOT_FACILITY_CATCHMENT_MAPPER, FACILITY_CATCHMENT_MAPPER

/census-service/bulk/_update

ROOT_POPULATION_DATA_APPROVER, POPULATION_DATA_APPROVER, ROOT_FACILITY_CATCHMENT_MAPPER, FACILITY_CATCHMENT_MAPPER

Environment Variable Details

Below are the variables that should be configured before deployment of the census service build image:

  • Add census service-related environment variables’ value like the way it is done in the unified-uat environment yaml file and unified-health-uat environment file (search for census-service).

  • Add these ‘db-host’, ’db-name’, ’db-url’, ’domain’ and all the digit core platform services configurations (persister, boundary, etc.) in the respective environments.

  • Make sure to add the DB (Postgres and flyway) username and password in the respective environment secret yaml file the way it is done here.

  • Make sure to add the DIGIT core services-related secrets that are configured in the respective environment secret file the way it is done here.

  • Localisation details here.

MDMS Details

NA

Reference Docs

Title

Link

Persister Technical Document

Boundary Service Documentation

Plan Service Documentation

API Contract

Postman Collection

Last updated

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.