Configuration

Overview

The document is a guide to the various configuration options available in the HCM Console. Proper configuration is crucial for optimising performance, ensuring security, and customising 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 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: They may require guidance on configuring user-specific settings via the user interface.

Structure

The document is organised 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:

HierarchyType22
Country -> Province -> District -> AdministrativePost -> Locality -> Village

First, navigate to the MDMS data configuration page with moduleName = HCM-ADMIN-CONSOLE and masterName = HierarchySchema and configure the console and campaign as the hierarchy you want to have (Ex. HierarchyTest22)

Keep hierarchy, lowest level, and split boundaries on column same for console and campaign and name should be same as defined while creating hierarchy. (Example: Here we have AdministrativePost and Locality)

Now navigate to the boundary management page and continue with boundary creation.

After creating the hierarchy we can download the template and add data to it.

In this screen, the user needs to download the template containing boundary levels in the headers according to the hierarchy. The user needs to fill that template in a specific format. A dummy template is attached for reference.

All the boundaries are localised to the below localisation module:

hcm-boundary-${BOUNDARY_HIERARCHY_TYPE} // hierarchy type should be according to the selected hierarchy and  the module has everything in lowercase.

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.

The data provided above is based on the hierarchy created above. Any changes in the levels will change the headers respectively and data will have to be filled accordingly.

MDMS Data Setup

1. Hierarchy Configuration (Newly added in 0.3)

This schema contains different hierarchy types and their lowest hierarchy.

Based on isActive, choose which type of hierarchy the campaign will be created. This config defines the boundary hierarchy on which a campaign can be created. All the boundary levels are coming according to the hierarchy configured. The lowestHierarchy will represent the lowest level hierarchy to be displayed in the boundary selection screen while creating a campaign.

The SplitBoundariesOn defines the hierarchy level for dividing the target sheet tabs.

The consolidateUsersAt the function is utilised during microplan integration, ensuring user sheets are populated

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

HierarchySchema Sample MDMS Data
[
    {
        "type": "microplan",
        "group": [
            "MALARIA"
        ],
        "hierarchy": "MICROPLAN",
        "department": [],
        "lowestHierarchy": "VILLAGE",
        "highestHierarchy": "COUNTRY",
        "splitBoundariesOn": "DISTRICT",
        "consolidateUsersAt": "LOCALITY"
    },
    {
        "type": "boundary",
        "group": [
            "MALARIA"
        ],
        "hierarchy": "MICROPLAN",
        "department": [],
        "lowestHierarchy": "VILLAGE",
        "highestHierarchy": "COUNTRY",
        "splitBoundariesOn": "DISTRICT",
        "consolidateUsersAt": "LOCALITY"
    },
    {
        "type": "campaign",
        "group": [
            "MALARIA"
        ],
        "hierarchy": "NEWTEST0002",
        "department": [],
        "lowestHierarchy": "ADMINISTRATIVEPOST",
        "splitBoundariesOn": "DISTRICT",
        "consolidateUsersAt": "LOCALITY",
        "highestHierarchy": "COUNTRY"
    },
    {
        "type": "default",
        "group": [
            "MALARIA"
        ],
        "hierarchy": "DEFAULTBOUNDARYNEWONE",
        "department": [],
        "lowestlevel": "ADMINISTRATIVEPOST",
        "splitBasedOn": "DISTRICT",
        "consolidateUsersAt": "LOCALITY",
        "highestHierarchy": "COUNTRY"
        
    },
    {
        "type": "console",
        "group": [
            "MALARIA"
        ],
        "hierarchy": "ADMIN",
        "department": [],
        "lowestHierarchy": "Posto Administrativo",
        "splitBoundariesOn": "Distrito",
        "consolidateUsersAt": "LOCALITY",
        "highestHierarchy": "COUNTRY"
    }
]

2. Template Validations (Admin Schemas)

Based on this schema, validations happen in Excel from both the UI and the backend for the different uploads; there is one schema with the title according to the uploaded type. If a 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 that 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.

Users can change the following validations from Excel using this schema such as:

  1. User Validations -

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

  • Employment Type - This 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 types 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 - Maximum length and minimum 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 - Minimum and maximum validations can be changed.

  • Boundary code and target header are mandatory.

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

AdminSchema Sample MDMS data
{
    "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"
        }
    ]
}

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

3. Attributes Configuration

It includes a list of attribute configurations, each identified by a unique key and specified by a code and an internationalisation 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.

attributeConfig Sample MDMS Data
[
    {
        "key": 4,
        "code": "Gender",
        "i18nKey": "CAMPAIGN_ATTRIBUTE_GENDER"
    },
    {
        "key": 1,
        "code": "Age",
        "i18nKey": "CAMPAIGN_ATTRIBUTE_AGE"
    }
]

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. TimelineRefetch is also added to call the getProcessAPI of the timeline after a certain interval of time.

baseTimeOut Sample MDMS Data
[
  {
      "maxTime": 5000,
      "baseTimeOut": 50,
      "timelineRefetch": 3000
  }
]

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

6. Delivery Type Config

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

deliveryTypeConfig Sample MDMS Data
[
    {
        "key": 1,
        "code": "DIRECT"
    },
    {
        "key": 2,
        "code": "INDIRECT"
    }
]

7. Mail Configuration

It has the by default mail ID to contact the L1 or implementation team if the hierarchy a user wants is not present. The mail ID can be configured from this schema

mailConfig Sample MDMS Data
[
    {
        "mailId": "L1team@email.com"
    }
]

8. Operator Configuration

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

operatorConfig Sample MDMS Data
[
    {
        "key": 6,
        "code": "LESS_THAN_EQUAL_TO"
    },
    {
        "key": 5,
        "code": "GREATER_THAN_EQUAL_TO"
    },
    {
        "key": 4,
        "code": "EQUAL_TO"
    },
    {
        "key": 3,
        "code": "IN_BETWEEN"
    },
    {
        "key": 2,
        "code": "GREATER_THAN"
    },
    {
        "key": 1,
        "code": "LESS_THAN"
    }
]

9. Product Type

This schema displays the options to add the resource type if the resource a user wants is not present in the options. The resource added here will be present in the resources dropdown, so prevent adding any junk data.

productType Sample MDMS Data
[
    {
        "key": 4,
        "code": "RESIDUAL_SPRAY"
    },
    {
        "key": 3,
        "code": "TONIC"
    },
    {
        "key": 2,
        "code": "TABLET"
    },
    {
        "key": 1,
        "code": "BEDNET"
    }
]

10. ReadMe Configuration

This schema is used to display the info message in the UI and the read-me sheet in the downloaded template. It configures according to the upload type which shows the instructions to a user on how to fill the template. These codes are localised according to the message.

Below is an example of how data is entered into the read-me schema for the headers and their description:

ReadMeConfig Sample MDMS Data
{
      "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 descriptions are written in codes that are localised using the localisation module named:

hcm-admin-schemas

11. Login Configuration

To show the privacy policy component on the login page, a user needs to include the configurations in the MDMS:

Master Name: commonUiConfig

ModuleName: LoginConfig

In this user can customize(add/delete) the fields according to the requirement.

For more details, you can refer here.

LoginConfig Sample MDMS Data
{
    "texts": {
        "header": "CORE_COMMON_LOGIN",
        "submitButtonLabel": "CORE_COMMON_CONTINUE",
        "secondaryButtonLabel": "CORE_COMMON_FORGOT_PASSWORD"
    },
    "title": "login",
    "inputs": [
        {
            "key": "username",
            "type": "text",
            "label": "CORE_LOGIN_USERNAME",
            "populators": {
                "name": "username",
                "error": "ERR_USERNAME_REQUIRED",
                "validation": {
                    "required": true
                }
            },
            "isMandatory": true
        },
        {
            "key": "password",
            "type": "password",
            "label": "CORE_LOGIN_PASSWORD",
            "populators": {
                "name": "password",
                "error": "ERR_PASSWORD_REQUIRED",
                "validation": {
                    "required": true
                }
            },
            "isMandatory": true
        },
        {
            "key": "city",
            "type": "dropdown",
            "label": "CORE_COMMON_CITY",
            "disable": false,
            "populators": {
                "name": "city",
                "error": "ERR_HRMS_INVALID_CITY",
                "mdmsConfig": {
                    "select": "(data)=>{ return Array.isArray(data['tenant'].tenants) && Digit.Utils.getUnique(data['tenant'].tenants).map(ele=>({code:ele.code,name:Digit.Utils.locale.getTransformedLocale('TENANT_TENANTS_'+ele.code)}))}",
                    "masterName": "tenants",
                    "moduleName": "tenant",
                    "localePrefix": "TENANT_TENANTS"
                },
                "optionsKey": "name"
            },
            "isMandatory": true
        },
        {
            "key": "check",
            "type": "component",
            "disable": false,
            "component": "PrivacyComponent",
            "populators": {
                "name": "check"
            },
            "customProps": {
                "module": "HCM"
            },
            "isMandatory": false,
            "withoutLabel": true
        }
    ]
}

12. Policy Configuration

This configuration displays the data in the privacy pop-up. An example of the configuration is shown below:

Policy MDMS Data
{
      "header": "PRIVACY_HEADER",
      "module": "HCM",
      "contents": [
        {
          "header": "PRIVACY_HEADER_1_SUB_1",
          "descriptions": [
            {
              "text": "PRIVACY_HEADER_1_SUB_1_DESC_1",
              "type": null,
              "isBold": false
            },
            {
              "text": "PRIVACY_HEADER_1_SUB_1_DESC_2",
              "type": null,
              "isBold": false
            },
            {
              "text": "PRIVACY_HEADER_1_SUB_1_DESC_3",
              "type": null,
              "isBold": false
            },
]
},
 {
              "text": "PRIVACY_HEADER_9_SUB_9_DESC_5",
              "type": null,
              "isBold": false,
              "subDescriptions":[
                {
                  "text": "PRIVACY_HEADER_9_SUB_9_DESC_5_SUBDESC_1",
                  "type": null,
                  "isBold": false,
                  "isSpaceRequired": true
                },
                {
                  "text": "PRIVACY_HEADER_9_SUB_9_DESC_5_SUBDESC_2",
                  "type": null,
                  "isBold": false,
                  "isSpaceRequired": true
                }
              ]
            }
          ]
        },

In the schema:

Type can be the following:

  • null:

    • When type is null, it indicates that the description is just plain text.

  • point:

    • When type is set to point, it likely means that the description should be displayed as a bullet point or list item.

  • step:

    • When type is set to step, it suggests that the description is part of a sequence of steps.

  • subdescriptions: to show the sub-descriptions in the point.

13. Date with boundary

This config is used when we want to update the dates with or without the selected boundaries.

If the flag is false, then by default it updates the dates at the country level. If the user wants to update the dates at the lower boundary levels, then make the flag true.

DateWithBoundary MDMS data
"dateWithBoundary": [
    {
      "dateWithBoundary": true
    }
  ]

New Schemas Added

1. Project Type Configuration

This configuration is now used in the place of delivery configuration.

This is used to store all the pre-required conditions for the delivery conditions screens.

Master Name: HCM-PROJECT-TYPES

ModuleName: projectTypes

ProjectTypes MDMS Data
 {
      "id": "ea1bb2e7-06d8-4fe4-ba1e-f4a6363a21be",
      "name": "configuration for Multi Round Campaigns",
      "code": "MR-DN",
      "group": "MALARIA",
      "type": "multiround",
      "beneficiaryType": "INDIVIDUAL",
      "eligibilityCriteria": [
        "All households having members under the age of 18 are eligible.",
        "Prison inmates are eligible."
      ],
      "taskProcedure": [
        "1 bednet is to be distributed per 2 household members.",
        "If there are 4 household members, 2 bednets should be distributed.",
        "If there are 5 household members, 3 bednets should be distributed."
      ],
      "resources": [
        {
          "productVariantId": "PVAR-2024-05-09-000331",
          "isBaseUnitVariant": false,
          "name": "SP 500mg"
        },
        {
          "productVariantId": "PVAR-2024-05-09-000332",
          "isBaseUnitVariant": true,
          "name": "SP 250mg"
        }
      ],
      "observationStrategy": "DOT1",
      "validMinAge": 3,
      "validMaxAge": 64,
      "cycles": [
        {
          "mandatoryWaitSinceLastCycleInDays": null,
          "startDate": 1714329000000,
          "endDate": 1715279400000,
          "id": 1,
          "deliveries": [
            {
              "id": 1,
              "deliveryStrategy": "DIRECT",
              "mandatoryWaitSinceLastDeliveryInDays": null,
              "doseCriteria": [
                {
                  "condition": "3<=age<11",
                  "ProductVariants": [
                    {
                      "productVariantId": "PVAR-2024-05-09-000331", // should be set according to the environment
                      "quantity": 1,
                       "name": "SP 500mg"
                    },
                  ]
                },
              ]
            },
          ]
        },
      ]
    },

This is the sample data for the project type - MR-DN

Explanation for the MDMS Data

  1. Project Types: Three main project types (LLIN-mz, MR-DN, and IRS-mz) with unique configurations.

  2. Cycles and Deliveries:

    • Each project type contains cycles, and each cycle contains multiple deliveries.

    • Deliveries include details such as deliveryStrategy, doseCriteria, and ProductVariants.

  3. Resources: A list of resources specific to each project type.

  4. Eligibility Criteria: Contains a list of conditions for each project type.

  5. Other Configurations:

    • attrAddDisable, deliveryAddDisable, and similar attributes determine UI behavior.

Requirements

Mandatory to set product variant ID according to the environment.

"ProductVariants": [
                    {
                      "productVariantId": "PVAR-2024-05-09-000331", // should be set according to the environment
                      "quantity": 1,
                       "name": "SP 500mg"
                    },
                  ]

2. Roles for Checklist

This Master data is used to show the dropdown of roles in the checklist screens

RolesForChecklist Sample MDMS Data
{
    "tenantId": "mz",
    "schemaCode": "HCM-ADMIN-CONSOLE.rolesForChecklist",
    "uniqueIdentifier": null,
    "data": {
        "key": 1,
        "code": "DISTRIBUTOR"
    },
    "isActive": true
}

3. Checklist Templates

This Master data is used to default template of checklist for selcted campaign + role + checklist type

Checklist Templates Sample MDMS Data
{
        "tenantId": "mz",
        "schemaCode": "HCM-ADMIN-CONSOLE.ChecklistTemplates",
        "uniqueIdentifier": null,
        "data": {
            "data": [
                {
                    "id": "2d4a7b1e-1f2f-4a8a-9672-43396c6c9a1c",
                    "key": 1,
                    "type": {
                        "code": "SingleValueList"
                    },
                    "level": 1,
                    "title": "Is there a feedback system for health facilities to report any issues or requests related to bednet distribution?",
                    "value": null,
                    "options": [
                        {
                            "id": "0cff9846-03a2-4453-bf0e-200cdda5f390",
                            "key": 1,
                            "label": "Shortages",
                            "optionComment": true,
                            "optionDependency": false,
                            "parentQuestionId": "2d4a7b1e-1f2f-4a8a-9672-43396c6c9a1c"
                        },
                        {
                            "id": "2d4a7b1e-7c0d-48b1-9d53-8601c6264b90",
                            "key": 2,
                            "label": "Quality complaints",
                            "optionDependency": false,
                            "parentQuestionId": "2d4a7b1e-1f2f-4a8a-9672-43396c6c9a1c"
                        }
                    ],
                    "isActive": true,
                    "parentId": null,
                    "isRequired": false
                },
                {
                    "id": "4add5323-fc98-4e71-a783-27dbb922c99f",
                    "key": 2,
                    "type": {
                        "code": "SingleValueList"
                    },
                    "level": 1,
                    "title": "What types of health facilities do you distribute to?",
                    "value": null,
                    "options": [
                        {
                            "id": "34eac43a-e0b5-428f-9d11-12fc5b10b1ac1",
                            "key": 1,
                            "label": "Hospitals",
                            "optionComment": false,
                            "optionDependency": false,
                            "parentQuestionId": "4add5323-fc98-4e71-a783-27dbb922c99f"
                        },
                        {
                            "id": "23ace43b-e0b5-428f-9d11-12fc5b10b1ac1",
                            "key": 2,
                            "label": "Clinics",
                            "optionComment": false,
                            "optionDependency": true,
                            "parentQuestionId": "4add5323-fc98-4e71-a783-27dbb922c99f"
                        },
                        {
                            "id": "32bbca43-db87-469b-8be4-22012cc22284",
                            "key": 3,
                            "label": "Community health centers",
                            "optionDependency": false,
                            "parentQuestionId": "4add5323-fc98-4e71-a783-27dbb922c99f"
                        }
                    ],
                    "isActive": true,
                    "parentId": null,
                    "isRequired": false
                },
                {
                    "id": "23ca54be-038e-42df-a557-bb5fcd374dd5",
                    "key": 3,
                    "type": {
                        "code": "SingleValueList"
                    },
                    "level": 1,
                    "title": "What services or products do you distribute to health facilities?",
                    "value": null,
                    "options": [
                        {
                            "id": "ea32bc56-038e-42df-a557-bb5fcd374dd5",
                            "key": 1,
                            "label": "Medical equipment",
                            "optionComment": false,
                            "optionDependency": false,
                            "parentQuestionId": "23ca54be-038e-42df-a557-bb5fcd374dd5"
                        },
                        {
                            "id": "a34vc429-d13f-4340-ae5e-fe7f8aca4212",
                            "key": 2,
                            "label": "Pharmaceuticals",
                            "optionDependency": false,
                            "parentQuestionId": "23ca54be-038e-42df-a557-bb5fcd374dd5"
                        },
                        {
                            "id": "6c43b57c-d13f-4340-ae5e-fe7f8aca4212",
                            "key": 3,
                            "label": "Personal protective equipment (PPE)",
                            "optionDependency": false,
                            "parentQuestionId": "23ca54be-038e-42df-a557-bb5fcd374dd5"
                        }
                    ],
                    "isActive": true,
                    "parentId": null,
                    "isRequired": false
                },
                {
                    "id": "c65ac34b-7cc0-4993-a8fe-37e854d2b189",
                    "key": 4,
                    "type": {
                        "code": "SingleValueList"
                    },
                    "level": 2,
                    "title": "Do you have enough products for distribution to health facilities?",
                    "value": null,
                    "options": [
                        {
                            "id": "cb45ca84-7cc0-4993-a8fe-37e854d2b189",
                            "key": 1,
                            "label": "Yes",
                            "optionDependency": false,
                            "parentQuestionId": "c65ac34b-7cc0-4993-a8fe-37e854d2b189"
                        },
                        {
                            "id": "a54c73cb-60da-4c51-8501-cf4a4f473a66",
                            "key": 2,
                            "label": "No",
                            "optionComment": true,
                            "optionDependency": false,
                            "parentQuestionId": "c65ac34b-7cc0-4993-a8fe-37e854d2b189"
                        }
                    ],
                    "isActive": true,
                    "parentId": "23ace43b-e0b5-428f-9d11-12fc5b10b1ac1",
                    "isRequired": false
                }
            ],
            "role": "DISTRIBUTOR",
            "campaignType": "IRS-mz",
            "checklistType": "TRAINING_SUPERVISION"
        },
        "isActive": true
    }

4. App Field Types

This is used to describe the type of questions available in the dropdown while configuring the checklist.

AppFieldTypes Sample MDMS Data
{
    "code": "SingleValueList",
    "type": [
        "checklist"
    ]
}

5. HierarchySchema

This schema is used by replacing hierarchyConfig schema.

The Console is being referred to for campaign creation. The campaign is being referred for boundary management.

HierarchySchema MDMS Data
[
  {
    "id": "331e5c2a-3938-41a2-bcd5-e4f9b400b688",
    "tenantId": "mz",
    "schemaCode": "HCM-ADMIN-CONSOLE.HierarchySchema",
    "uniqueIdentifier": "microplan",
    "data": {
      "type": "microplan",
      "group": [
        "MALARIA"
      ],
      "hierarchy": "MICROPLAN",
      "department": [],
      "lowestHierarchy": "VILLAGE",
      "highestHierarchy": "COUNTRY",
      "splitBoundariesOn": "DISTRICT"
    },
    "isActive": true,
    "auditDetails": {
      "createdBy": "8b110055-330f-4e7b-b4c0-f618f29b9d47",
      "lastModifiedBy": "8b110055-330f-4e7b-b4c0-f618f29b9d47",
      "createdTime": 1733211459676,
      "lastModifiedTime": 1733211459676
    }
  },
  {
    "id": "896176e1-7fcf-4be6-a129-322a389953fe",
    "tenantId": "mz",
    "schemaCode": "HCM-ADMIN-CONSOLE.HierarchySchema",
    "uniqueIdentifier": "boundary",
    "data": {
      "type": "boundary",
      "group": [
        "MALARIA"
      ],
      "hierarchy": "NEWTEST006",
      "department": [],
      "lowestHierarchy": "ADMINISTRATIVEPOST",
      "splitBoundariesOn": "Province"
    },
    "isActive": true,
    "auditDetails": {
      "createdBy": "db842ca9-25c5-4419-a72f-459443d38feb",
      "lastModifiedBy": "db842ca9-25c5-4419-a72f-459443d38feb",
      "createdTime": 1731665666033,
      "lastModifiedTime": 1732102535659
    }
  },
  {
    "id": "996176e1-7fcf-4be6-a129-322a389953fe",
    "tenantId": "mz",
    "schemaCode": "HCM-ADMIN-CONSOLE.HierarchySchema",
    "uniqueIdentifier": "campaign",
    "data": {
      "type": "campaign",
      "group": [
        "MALARIA"
      ],
      "hierarchy": "MICROPLAN",
      "department": [],
      "lowestHierarchy": "VILLAGE",
      "splitBoundariesOn": "DISTRICT"
    },
    "isActive": true,
    "auditDetails": {
      "createdBy": "db842ca9-25c5-4419-a72f-459443d38feb",
      "lastModifiedBy": "db842ca9-25c5-4419-a72f-459443d38feb",
      "createdTime": 1731665666033,
      "lastModifiedTime": 1733228020643
    }
  },
  {
    "id": "561f0cb3-54a9-47b6-acd5-68c19c4056eb",
    "tenantId": "mz",
    "schemaCode": "HCM-ADMIN-CONSOLE.HierarchySchema",
    "uniqueIdentifier": "default",
    "data": {
      "type": "default",
      "group": [
        "MALARIA"
      ],
      "hierarchy": "DEFAULTBOUNDARYNEWONE",
      "department": [],
      "lowestlevel": "ADMINISTRATIVEPOST",
      "splitBasedOn": "DISTRICT"
    },
    "isActive": true,
    "auditDetails": {
      "createdBy": "db842ca9-25c5-4419-a72f-459443d38feb",
      "lastModifiedBy": "db842ca9-25c5-4419-a72f-459443d38feb",
      "createdTime": 1731665602677,
      "lastModifiedTime": 1731665602677
    }
  },
  {
    "id": "d7fb813c-184d-4a1a-9376-a18a99ade34e",
    "tenantId": "mz",
    "schemaCode": "HCM-ADMIN-CONSOLE.HierarchySchema",
    "uniqueIdentifier": "console",
    "data": {
      "type": "console",
      "group": [
        "MALARIA"
      ],
      "hierarchy": "ADMIN",
      "department": [],
      "lowestHierarchy": "Posto Administrativo",
      "splitBoundariesOn": "Distrito"
    },
    "isActive": true,
    "auditDetails": {
      "createdBy": "db842ca9-25c5-4419-a72f-459443d38feb",
      "lastModifiedBy": "db842ca9-25c5-4419-a72f-459443d38feb",
      "createdTime": 1731663168565,
      "lastModifiedTime": 1732511530109
    }
  }
]

6. MicroplanIntegration

This Master is utilized for Microplan Data fetching. Here, "type" refers to the data template that needs to be filled. "To" and "from" pertain to Microplan data, and while populating campaign data, various filter conditions, such as "includes" or "equals," can be applied.

microplanIntegration MDMS Data
[
    {
        "type": "user",
        "mappings": [
            {
                "to": "Supervisor",
                "from": [
                    "PER_BOUNDARY_FOR_THE_CAMPAIGN",
                    "PER_BOUNDARY",
                    "TEAM",
                    "SUPERVISORS"
                ],
                "filter": "includes"
            },
            {
                "to": "Registrar",
                "from": [
                    "PER_BOUNDARY_FOR_THE_CAMPAIGN",
                    "PER_BOUNDARY",
                    "TEAM",
                    "REGISTRATION"
                ],
                "filter": "includes"
            },
            {
                "to": "Distributor",
                "from": [
                    "PER_BOUNDARY_FOR_THE_CAMPAIGN",
                    "PER_BOUNDARY",
                    "TEAM",
                    "DISTRIBUTION"
                ],
                "filter": "includes"
            }
        ]
    },
    {
        "type": "Target-LLIN-mz",
        "mappings": [
            {
                "to": "HCM_ADMIN_CONSOLE_TARGET",
                "from": [
                    "CONFIRMED_HCM_ADMIN_CONSOLE_TARGET_POPULATION"
                ],
                "filter": "equal"
            }
        ]
    },
    {
        "type": "Target-MR-DN",
        "mappings": [
            {
                "to": "HCM_ADMIN_CONSOLE_TARGET_SMC_AGE_3_TO_11",
                "from": [
                    "CONFIRMED_HCM_ADMIN_CONSOLE_TARGET_POPULATION_AGE_3TO11"
                ],
                "filter": "equal"
            },
            {
                "to": "HCM_ADMIN_CONSOLE_TARGET_SMC_AGE_12_TO_59",
                "from": [
                    "CONFIRMED_HCM_ADMIN_CONSOLE_TARGET_POPULATION_AGE_12TO59"
                ],
                "filter": "equal"
            }
        ]
    }
]

Removed Masters

1. hierarchyConfig

HierarchySchema hierarchy schema is used now.

2. Delivery Configuration

It was replaced by projectTypes to maintain the consistency between the health product app and console.

Helm Configurations

Refer here to learn more about the Helm Configurations

Last updated

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