Configuration

Overview

The purpose of this document is to provide a comprehensive guide to the various configuration options available in our HCM Admin Console Application. Proper configuration is crucial for optimizing performance, ensuring security, and customizing the user experience to meet specific needs. This document is designed to help system administrators, developers, and end-users understand and implement these configurations effectively. To learn more about HCM Service/App Configuration, Click here.

Scope

This guide covers all aspects of application configuration, including global settings, module-specific options, and environment-specific adjustments. It addresses different configuration methods such as through files, environment variables, and command-line arguments. Additionally, it includes advanced configuration topics like custom scripting, API integrations, and feature flag management.

Audience

The primary audience for this document includes:

  • System Administrators: Responsible for setting up and maintaining the application in various environments.

  • Developers: Need to understand configuration options for development, testing, and deployment.

  • End-Users: May require guidance on configuring user-specific settings via the user interface.

Structure

The document is organized into the following sections:

  1. Configuration Types: Detailed descriptions of global, module-specific, and environment-specific settings.

  2. Configuration Methods: Instructions on how to apply configurations using different methods.

  3. Common Configuration Options: Examples of frequently used settings, including database connections, authentication, logging, and UI adjustments.

  4. Advanced Configurations: Information on extending the application's functionality through custom scripts, plugins, and integrations.

  5. Best Practices: Recommendations for managing configurations securely and efficiently.

  6. Troubleshooting: Solutions to common configuration problems and tips for debugging issues.

  7. Appendices: Additional resources, including a glossary and references for further reading.

By following the guidance provided in this document, users can ensure that the application is configured correctly to meet their operational needs, enhancing both performance and user satisfaction.


This overview section sets the stage for the rest of the document by clearly outlining its purpose, scope, intended audience, and overall structure.

Boundary Master Setup

The Boundary serves as the primary master data for a campaign and can be configured using the screen provided below. To upload a boundary into the database, a hierarchy is required. If the necessary hierarchy is not available in the existing list, it can be created using the designated screen. Hierarchies of any level can be established.

An example of a hierarchy structure is as follows, with the hierarchy type set to ADMIN:

ADMIN Hierarchy
COUNTRY -> STATE -> DISTRICT -> ADMINISTRATIVE POST -> LOCALITY -> VILLAGE

After creating the hierarchy we can upload boundary data in bulk using.

In this screen user needs to first select the hierarchy type and download its respective template.

The template will be downloaded containing boundary levels in the headers according to the hierarchy. User needs to fill that template in a specific format . For the reference a dummy template is attached.

All the boundaries are localised using the localisation module -

boundary-${BOUNDARY_HIERARCHY_TYPE} // hierarchy type should be according to the selected hierarchy

The system automatically generates a default localization for all boundary codes during the boundary data upload, using the same language/locale as specified at the time of upload.

Sample Boundary data for Upload

MDMS Data Setup

MDMS Schema Collection

1. Hierarchy Config

This config defines the boundary hierarchy on which campaign can be created. All the boundary levels are coming according to the hierarchy configured. The lowest hierarchy will represent the lowest level hierarchy to be displayed. The boundary data is displayed according to this.

User can change the lowest hierarchy but it is advised to keep till the mentioned level because lot of boundaries will increase the validations and the load on the server to load all the boundaries

2. Template Validations (Admin Schemas)

Based on this schema validations happens in the excel from both UI and backend for all the different uploads , there is one schema with the title according to the uploaded type. If user wants to change anything in the excel validation then the data of the schema needs to be updated.

Schema properties

IsRequired : true for all those columns which are mandatory to be filled

orderNumber : position where that column will be present

title : set according to the type of upload

enum : defines a set of allowed values for a specific property, ensuring that only predefined, valid options can be assigned to that property.

numberProperties : numeric fields with specific characteristics such as uniqueness, required status, and value constraints like minimum and maximum limits.

string properties : text fields with specific characteristics such as required status, uniqueness, and constraints on length and content.

User can change the following validations from the excel using this schema such as-

  1. User Validations -

  • Roles - Roles to be validated can be added or delete in the schema

  • Employement Type - Can be changed from the enum

  • All the headers are mandatory they can be adjusted according to the requirement,just by changing isRequired to true/false.

  1. Facility Validations-

  • Facility Type - More type can be added or deleted.

  • Facility Status - More requirements can be added or deleted.

  • Facility Usage - More requirements can be added or deleted.

  • Capacity - Minimum and maximum can be changed.

  • Facility Name - max length and min length can be changed.

  • All the headers are mandatory they can be adjusted according to the requirement , just by changing isRequired to true/false.

  1. Target Validation -

  • Target - min and max validations can be changed.

  • Boundary code and target header are mandatory.

  • It also has a field called campaign type, so based on campaign type boundary target updated any new target column can be introduced.

sample data as follows,

while introducing a new campaign/project type this target schema needs to be added for it.

{
    "tenantId": "mz",
    "moduleName": "HCM-ADMIN-CONSOLE",
    "adminSchema": [
        {
            "title": "user", // type of upload
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
                "enumProperties": [  
                    {
                        "enum": [    // what all roles user can use 
                            "Registrar",
                            "Distributor",
                            "Supervisor",
                            "Help Desk",
                            "Monitor Local",
                            "Logistical officer"
                        ],
                        "name": "HCM_ADMIN_CONSOLE_USER_ROLE",
                        "isRequired": true,
                        "description": "User Role",
                        "orderNumber": 3
                    },
                    {
                        "enum": [
                            "Temporary",
                            "Permanent"
                        ],
                        "name": "HCM_ADMIN_CONSOLE_USER_EMPLOYMENT_TYPE",
                        "isRequired": true,
                        "description": "Employement Type",
                        "orderNumber": 4
                    }
                ],
                "numberProperties": [
                    {
                        "name": "HCM_ADMIN_CONSOLE_USER_PHONE_NUMBER",
                        "type": "number",
                        "isUnique": true,
                        "isRequired": true,
                        "description": "Phone Number",
                        "orderNumber": 2
                    }
                ],
                "stringProperties": [
                    {
                        "name": "HCM_ADMIN_CONSOLE_USER_NAME",
                        "type": "string",
                        "maxLength": 128,
                        "minLength": 2,
                        "isRequired": true,
                        "description": "User Name",
                        "orderNumber": 1
                    },
                    {
                        "name": "HCM_ADMIN_CONSOLE_BOUNDARY_CODE_MANDATORY",
                        "type": "string",
                        "isRequired": true,
                        "description": "Boundary Code (Mandatory)",
                        "orderNumber": 5
                    }
                ]
            },
            "campaignType": "all"
        },
        {
            "title": "facility",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
                "enumProperties": [
                    {
                        "enum": [
                            "Warehouse",
                            "Health Facility",
                            "Storing Resource"
                        ],
                        "name": "HCM_ADMIN_CONSOLE_FACILITY_TYPE",
                        "isRequired": true,
                        "description": "Facility type",
                        "orderNumber": 2
                    },
                    {
                        "enum": [
                            "Temporary",
                            "Permanent"
                        ],
                        "name": "HCM_ADMIN_CONSOLE_FACILITY_STATUS",
                        "isRequired": true,
                        "description": "Facility status",
                        "orderNumber": 3
                    },
                    {
                        "enum": [
                            "Active",
                            "Inactive"
                        ],
                        "name": "HCM_ADMIN_CONSOLE_FACILITY_USAGE",
                        "isRequired": true,
                        "description": "Facility usage",
                        "orderNumber": 6
                    }
                ],
                "numberProperties": [
                    {
                        "name": "HCM_ADMIN_CONSOLE_FACILITY_CAPACITY",
                        "type": "number",
                        "maximum": 100000000,
                        "minimum": 1,
                        "isRequired": true,
                        "description": "Camapcity",
                        "orderNumber": 4
                    }
                ],
                "stringProperties": [
                    {
                        "name": "HCM_ADMIN_CONSOLE_FACILITY_NAME",
                        "type": "string",
                        "isUnique": true,
                        "maxLength": 2000,
                        "minLength": 1,
                        "isRequired": true,
                        "description": "Facility Name",
                        "orderNumber": 1
                    },
                    {
                        "name": "HCM_ADMIN_CONSOLE_BOUNDARY_CODE_MANDATORY",
                        "type": "string",
                        "isRequired": true,
                        "description": "Boundary Code",
                        "orderNumber": 5
                    }
                ]
            },
            "campaignType": "all"
        },
        {
            "title": "boundary",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
                "numberProperties": [
                    {
                        "name": "HCM_ADMIN_CONSOLE_TARGET_SMC_AGE_3_TO_11",
                        "type": "number",
                        "isRequired": true,
                        "description": "Target at village level - Age 3 to 11 Months (Mandatory and to be entered by the user)",
                        "orderNumber": 2
                    },
                    {
                        "name": "HCM_ADMIN_CONSOLE_TARGET_SMC_AGE_12_TO_59",
                        "type": "number",
                        "isRequired": true,
                        "description": "Target at village level - Age 12 to 59 Months (Mandatory and to be entered by the user)",
                        "orderNumber": 3
                    }
                ],
                "stringProperties": [
                    {
                        "name": "HCM_ADMIN_CONSOLE_BOUNDARY_CODE",
                        "type": "string",
                        "isRequired": true,
                        "description": "Boundary Code",
                        "orderNumber": 1,
                        "freezeColumn": true
                    }
                ]
            },
            "campaignType": "MR-DN"
        },
        {
            "title": "boundary",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
                "numberProperties": [
                    {
                        "name": "HCM_ADMIN_CONSOLE_TARGET",
                        "type": "number",
                        "isRequired": true,
                        "description": "Target at the Selected Boundary Level",
                        "orderNumber": 2
                    }
                ],
                "stringProperties": [
                    {
                        "name": "HCM_ADMIN_CONSOLE_BOUNDARY_CODE",
                        "type": "string",
                        "isRequired": true,
                        "description": "Boundary Code",
                        "orderNumber": 1,
                        "freezeColumn": true
                    }
                ]
            },
            "campaignType": "LLIN-mz"
        },
        {
            "title": "boundaryWithTarget",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
                "numberProperties": [
                    {
                        "name": "HCM_ADMIN_CONSOLE_TARGET",
                        "type": "number",
                        "maximum": 100000000,
                        "minimum": 1,
                        "isRequired": true,
                        "description": "Target at the Selected Boundary Level",
                        "orderNumber": 1
                    }
                ],
                "stringProperties": [
                    {
                        "name": "HCM_ADMIN_CONSOLE_BOUNDARY_CODE",
                        "type": "string",
                        "isRequired": true,
                        "description": "Boundary Code",
                        "orderNumber": 1,
                        "freezeColumn": true
                    }
                ]
            },
            "campaignType": "LLIN-mz"
        },
        {
            "title": "boundaryWithTarget",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
                "numberProperties": [
                    {
                        "name": "HCM_ADMIN_CONSOLE_TARGET_SMC_AGE_3_TO_11",
                        "type": "number",
                        "maximum": 100000000,
                        "minimum": 1,
                        "isRequired": true,
                        "description": "Target at village level - Age 3 to 11 Months (Mandatory and to be entered by the user)",
                        "orderNumber": 2
                    },
                    {
                        "name": "HCM_ADMIN_CONSOLE_TARGET_SMC_AGE_12_TO_59",
                        "type": "number",
                        "maximum": 100000000,
                        "minimum": 1,
                        "isRequired": true,
                        "description": "Target at village level - Age 12 to 59 Months (Mandatory and to be entered by the user)",
                        "orderNumber": 3
                    }
                ],
                "stringProperties": [
                    {
                        "name": "HCM_ADMIN_CONSOLE_BOUNDARY_CODE",
                        "type": "string",
                        "isRequired": true,
                        "description": "Boundary Code",
                        "orderNumber": 1,
                        "freezeColumn": true
                    }
                ]
            },
            "campaignType": "MR-DN"
        }
    ]
}
adminSchema.json

3. Attributes Config

It includes a list of attribute configurations, each identified by a unique key and specified by a code and an internationalization key (i18nKey). The attributes listed are "Age," "Height," "Weight," and "Gender," which can be used in campaigns to capture relevant information.

The attribute dropdown is populated from this schema. If the user wants to add or delete attribute options this schema is helpful.

4. Base Timeout

This schema configures the base time interval after which the search API is called following a file upload. The search API checks the validation status of the uploaded file. The frequency of the API calls is determined by the data present, with the time interval calculated as the base time multiplied by the number of fields in the sheet, constrained by both the minimum base time and the maxTime stated in the schema. The search API will continue to be called repeatedly until a successful or failed response is received.

Advised not to change the base time and max time to prevent delay in validation progress.

baseTimeOut.json

5. Delivery Config

It defines two project types, "LLIN-mz" and "MR-DN," each with specific configurations for attribute management, delivery settings, and cycle configurations. The delivery settings include conditions based on attributes and specific product configurations to be used during the delivery cycles.

  • Project Types:

    • LLIN-mz:

      • Attributes and deliveries cannot be added or disabled.

      • Allows custom attributes.

      • Configured for 1 cycle and 1 delivery.

      • Delivery includes attributes and products with conditions based on attribute values.

    • MR-DN:

      • Attributes and deliveries can be added.

      • Allows custom attributes.

      • Configured for 3 cycles and 3 deliveries.

      • Each delivery includes conditions for different age ranges and associated product configurations.

      • Conditions specify whether delivery is direct or indirect.

  • Common Configurations:

    • Attribute Configurations: Define specific attributes with their types, values, and conditions.

    • Product Configurations: Define products to be delivered, including details like key, count, value, and name.

    • Cycle Configurations: Specify the number of cycles and deliveries within each project type.

    • Conditions: Differentiate between direct and indirect deliveries based on attribute values (e.g., age ranges).

According to the configuration indirect delivery is configured for the 1st delivery and indirect and the next. This is the by default configuration according to the WHO recommendations which is present user can also modify the details.

In this values come throught the product variant ID which should be changed according to the environment.

Mandatory to set product variant ID according to the environment.

 "productConfig": [
            {
              "key": 1,
              "count": 1,
              "value": "PVAR-2024-05-03-000305",  // product variant id should be configured according to the environment.
              "name": "SP - 250mg"
            }
          ]
        }
      ]
    },

6. Delivery Type Config

This is used in delivery config schema to show the direct and indirect deliveries.

7. Mail Config

It has the by default mail id to contact the L1 or implementation team if the hierarchy you want is not present. The mail id can be configured from this schema

8. Operator Config

This schema contains all the operator options which is required for the attributes.

9. Product Type

This schema displays the options to add the resource type, if the resource you want is not present in the options. And the resource added here will be present in the resources dropdown, so prevent from adding any junk data.

10. ReadMe Config

This schema is used to display the the info message in the UI and read me sheet in the downloaded template.

It configures according to the upload type. Which shows the instructions to user how to fill the template. These are codes are localised according to the message.

Given belowe is the example of the how data is entered into the read Me schema for the headers and their description -

{
      "type": "userWithBoundary",
      "texts": [
        {
          "header": "USERWITHBOUNDARY_README_HEADER_1",
          "isHeaderBold": true,
          "inSheet": true,
          "inUiInfo": true,
          "descriptions": [
            {
              "text": "USERWITHBOUNDARY_README_HEADER_1_DESC_1",
              "isStepRequired": true
            },
            {
              "text": "USERWITHBOUNDARY_README_HEADER_1_DESC_2",
              "isStepRequired": true
            }
          ]
        },
        {
          "header": "USERWITHBOUNDARY_README_HEADER_2",
          "isHeaderBold": true,
          "inSheet": true,
          "inUiInfo": true,
          "descriptions": [
            {
              "text": "USERWITHBOUNDARY_README_HEADER_2_DESC_1",
              "isStepRequired": true
            },
            {
              "text": "USERWITHBOUNDARY_README_HEADER_2_DESC_2",
              "isStepRequired": true
            },
            {
              "text": "USERWITHBOUNDARY_README_HEADER_2_DESC_3",
              "isStepRequired": true
            },
            {
              "text": "USERWITHBOUNDARY_README_HEADER_2_DESC_4",
              "isStepRequired": true
            }
          ]
        },
  • type: defined the type of upload

  • header: The text identifier for the header.

  • isHeaderBold: A boolean indicating whether the header text should be displayed in bold.

  • inSheet: A boolean indicating whether this header should be included in the sheet.

  • inUiInfo: A boolean indicating whether this header should be displayed in the UI.

  • text: The text identifier for the description.

  • isStepRequired: A boolean indicating whether this description step is required.

All the headers and description are written in codes which is localised using the localisation module named -

rainmaker-hcm-admin-schemas

Helm Configurations

Project factory service has dependency on kafka, postgres and rediss.

HELM chart

Changes in the HELM -

name: SPLIT_BOUNDARIES_ON
    value: {{ .Values.splitBoundariesOn | default "Distrito" }} 

Multiple tabs are generated according to the boundary type mentioned in this, user can changes according to the requirement.

name: USER_PASSWORD_AUTO_GENERATE
    value: "true"  
  - name: USER_DEFAULT_PASSWORD
    value: "eGov@123" 

To generate a default password or a random password.

name: NOT_CREATE_USER_IF_ALREADY_THERE
    value: "true"

To test for the mobile number.

Last updated

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