Resource Generator Service

Overview

The resource estimation service is responsible for processing various file formats to estimate resources, generating microplans, uploading result sheets, and updating the HCM Console.

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, egov-filestore, boundary-service, project-factory and egov-localization will be helpful.

Key Features of Resource Estimation Service

  • File Parsing and Resource Estimation:

    • The service processes multiple file formats (Excel, Shapefiles, GeoJSON) to estimate the resources required for a microplanning campaign.

    • It reads the input data, applies predefined assumptions and formulas, and calculates the necessary resources.

  • Triggers for Plan-Facility Creation, Census Data Creation, and Plan Generation:

    • Plan-Facility Creation Trigger: When a facility file is uploaded, the service triggers the Plan-Facility Creation API from the project-factory. This ensures that the facilities are created based on the file contents.

    • Census Data Creation Trigger: When a population file is uploaded, the service triggers the Census Data Creation process. This involves reading the population file, processing the data, and updating the system with the relevant census information.

    • Plan Generation Trigger: After the census data is approved, the service reads the updated population file, updates the census data, and triggers the resource estimation and microplan generation based on the latest data detailing the necessary resources and their distribution for the campaign.

  • Resource Mapping:

    • The service enriches the mapping of resource columns from the data upload to a predefined set of attributes required for each campaign. This ensures the resources are aligned with the necessary specifications.

  • Upload Updated Result Sheet:

    • After the microplan is created and have gone through the estimation approval process, the updated approved resource estimations sheet is uploaded to the filestore and updated back into the plan configuration ensuring the latest version of the resource data is securely stored and accessible.

  • HCM Console Integration:

    • The service integrates with the HCM Console, updating the project factory with the estimated resources. This ensures that the project factory always has the most accurate and up-to-date resource requirements for effective campaign planning and execution.

Service Dependencies

  • Mdms service

  • Filestore service

  • Project factory service

  • Plan service

  • Boundary service

  • Localization service

API Specification

NA

Sequence Diagram

Producer Details

Topic

Description

resource-microplan-create-topic

Pushes to plan service for microplan creation after resource estimation.

resource-plan-config-update-topic

Updates a plan configuration with INVALID_DATA status in case of exception while processing file.

Consumer Details

Topic

Description

plan-config-update-topic

Triggers resource estimation, microplan creation, and campaign manager integration.

Environment Variables Details

Below are the variables that should be configured well before deployment of the resource estimation service build image.

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

  • Make sure to add the digit core services related secrets are configured in the respective environment secret file the way it's done here.

  • Localisation details here.

MDMS Details

  • Configure all the MDMS data for plan service

  • Refer to the following:

- Plan service documentation

- https://github.com/egovernments/egov-mdms-data/tree/UNIFIED-QA/data/mz/health/hcm-microplanning

Reference Docs

Title

Link

MDMS Technical Document

Filestore Service Documentation

Boundary Service Documentation

Localization Service Documentation

Project Factory Documentation

Plan Service Documentation

Last updated

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