Health
PlatformDomainAcademyDesign SystemFeedback
v1.7
v1.7
  • 👋Introducing Health
    • Release Notes
      • HCM v1.7 Release Notes
        • Release Checklist
        • Eligibility Checklist
        • Service Build Updates
      • HCM v1.6 Release Notes
        • Service Build Updates
        • Release Checklist
        • Migration from v1.5 to v1.6
      • HCM v1.5 Release Notes
        • Migration from v1.4 to v1.5
        • Service Build Updates
        • Release Checklist
      • HCM v1.4 Release Notes
        • Migration from v1.3 to v1.4
        • Service Build Updates
        • Release Checklist
      • v1.3 Release Notes
      • v1.3 Tech Release Summary
        • Master Data Management Service (MDMS) & Configuration Updates
        • Test Cases
        • Service Build Updates
      • v1.2 Release Notes
      • v1.0 Release Notes
  • Product Roadmap
  • 💙HEALTH CAMPAIGN MANAGEMENT
    • Understanding Health Campaign Management (HCM)
    • Value Proposition
  • 🎯HCM PRODUCT SUITE
    • Functional Specifications
      • Campaign Type Setup
      • Campaign Setup
      • Inventory
      • Boundary Hierarchy
      • Beneficiary
      • Boundary Data Specs
      • Draft System User Setup
      • Role Action Mapping
    • Building Blocks & Services
    • Health Products
      • HCM App
        • User Manual
          • Single Round Campaigns
            • Registration & Delivery
              • Registration & Delivery: IRS
          • Multi-Round Campaigns
            • Registration & Delivery
            • Download Beneficiary Data
          • Common Functions
            • User Management
            • 2D Voucher Scanning
            • Proximity-Based Search
            • Voucher-Based Registration and Distribution
            • Tracking Beneficiary Referrals
            • Tracking Side-Effects for Beneficiaries
            • Tracking Adverse Events
            • Health Facility Referral
            • Raising Complaints
            • Resolving Complaints
            • Inventory Management
              • User Manual
                • Stock Management
                • Stock Reconciliation
                • View Reports
                • Bale Scanning
            • Attendance Management
            • Payments
              • Guide to HCM Payments
            • Community Living Facilities
              • Product Requirement Document
          • Support Functions
            • Language Selection
            • Login
            • Forgot Password
            • Project Selection
            • Hamburger Menu
            • Help
            • Sync
            • Checklist
      • Campaign Management Dashboard
        • User Manual
        • Configurations
          • MDMS Configurations and s3 assets
          • IRS Dashboard Chart Configurations
        • Kibana Dashboard Integration With DSS Module
          • Auth Proxy Setup and Configuration for Kibana
        • SMC Dashboard
      • Microplanning
      • HCM Console
      • Health Payments
        • MDMS Configurations
        • Attendance Update and Approval Process
          • Project Selection
          • Register Inbox
          • View Attendance:Edit And Approve
        • Bill Generation Process
          • Project And Bill Aggregation
          • Bill Generation
          • My Bills
  • 🚀REFERENCE IMPLEMENTATIONs
    • Mozambique
      • LLIN Overview
      • Customisation
      • Rollout
  • 🧰TECHNOLOGY
    • Architecture
      • High Level Design
        • Health Campaign System High Level Design
        • Design Decision Log
      • Low Level Design
        • Registries
          • Individual
          • Household
          • Product
          • Facility
          • Attendance
          • Expense
        • Services
          • Project
          • Stock
          • Referral
          • Muster Roll
          • Expense Calculator
      • Field App Architecture
        • UI Packages
          • Closed HouseHold package
          • Registration & Delivery Package
            • Eligibility Checklist
            • Communal Living Facilities
          • Referral Reconciliation Package
          • Inventory Management Package
          • Attendance Management Package
          • DIGIT Scanner Package
          • Digit Showcase Package
          • Digit Data Model Package
          • DIGIT DSS Package
          • Complaints Package
          • Survey Form Package
          • Sync Service Package
    • Standards
    • Security
    • Interoperability
  • 🪝SETUP
    • Planning an HCM Implementation
    • Establish Project & Team
    • Gathering Requirements
    • Installation
      • Install Using GitHub Actions in AWS
      • System Data Setup
      • Project Data Setup
      • Setup Mobile App
      • Setup Kibana Dashboard
        • Create or Edit Existing Dashboards
      • Server Cleanup
    • Configuration
      • Configuring HCM to Campaign and Country Needs
      • Service Configuration
        • Individual Registry
        • Household Registry
        • Product Registry
        • Facility Registry
        • Stock & Inventory
        • Project Services
        • Referral Management
        • Attendance
        • Complaints
          • QA Sign-Off
            • Test Cases
        • User Management
          • QA Sign-Off
        • Muster Roll
        • Expense Service
        • Expense calculator
      • UI Configuration
        • Stock Management
        • Language Selection
        • Login
        • Forgot Password
        • Project Selection
        • Dashboard Configuration
          • Dashboard UI Enhancements
          • HCM Dashboard Master Promotion Guide
        • Attendance Management
          • Attendance Package Extraction and Interaction with HCM Application
    • Quality Assurance Testing
      • Regression Test cases
        • HCM Product
        • HCM Console
        • Microplanning
      • Eligibility and CLF Test cases
      • Console v0.3.1
      • Micro planning v0.2
      • HCM Payments v0.1
  • 🔵COMMUNITY
    • Source Code
    • Committee
      • Digital Product Advisory Committee Charter
      • Idea Management Process
      • Sessions
        • November 2023 Session
        • August 2024 Session
          • Minutes of the Meeting
        • December 2024 Session
    • HCM Declarative Statements & FAQs
Powered by GitBook

https://creativecommons.org/licenses/by/4.0/

On this page
  • Overview
  • Download Database Dump File
  • Load the Backup File into the Database
  • Load Data into the Database
  • Verify the Output
  • To Enable Filestore Service
  • Redeploy all the services at once to read from new data
  • Setup PGR and Payments Workflow
  • Create Superuser
  • Steps to create new boundary data

Was this helpful?

Export as PDF
  1. SETUP
  2. Installation

System Data Setup

PreviousInstall Using GitHub Actions in AWSNextProject Data Setup

Last updated 2 months ago

Was this helpful?

Overview

Before you run the DIGIT HCM product, you need to set up the basic system data such as boundaries of the geography and the master data. In this document, we will load the base data for the server.

Download Database Dump File

Download the seed_data_dump_1.7.sql file into your local system and save it in a folder/directory.

Load the Backup File into the Database

To load the file to the database:

  • Get the database pod name by executing the following command and copy the NAME from the output. Refer to the screenshot below:

kubectl get pods -n playground
  • We also need db_name, and db_username. We configured these values earlier in the forked repository infra-as-code/terraform/sample-aws/input.yaml file.

    • Navigate to infra-as-code/terraform/sample-aws.

    • Open input.yamland note down db_username, db_name, which configured earlier.

  • Get {DB_HOST} the value by executing the command below, and find and copy the "db-host" value. Refer to the screenshot below for select and copy of "db-host". This will be used in the next commands.

kubectl describe cm -n egov egov-config

Load Data into the Database

Now we have all the data required to run the command below which will load the data into the database.

  • Go to the folder/directory where the dump file was downloaded and open the terminal in that folder or use the 'cd' command to change to that directory:

  • Replace {PLAYGROUND_POD_NAME} , {DATABASE_HOST}, {DATABASE_USERNAME}, {DB_NAME} in command given below and run it:

kubectl cp seed_data_dump_1.7.sql playground/{PLAYGROUND_POD_NAME}:/home/seed_data_dump_1.7.sql && kubectl exec -n playground {PLAYGROUND_POD_NAME} -- sh -c "PGPASSWORD=demo123456 psql -h {DATABASE_HOST} -p 5432 -U {DATABASE_USERNAME} -d {DATABASE_NAME} -f /home/seed_data_dump_1.7.sql"

Verify the Output

After running the above command, the output should look like it is shown in below:

To Enable Filestore Service

After connecting to Kubernetes cluster , edit the deployment of FileStore service using the following command:

export KUBE_EDITOR='code --wait'
kubectl edit deployment egov-filestore -n egov

The deployment.yaml for Filestore Service will open in VS Code , add the aws key and secret key provided to you in the way shown below:

Close the deployment.yaml file opened in your VS Code editor and the deployment will be updated.

Redeploy all the services at once to read from new data

  • Run the below command to delete and restart all the services

kubectl delete pods --all -n egov
  • Run the command below to check if all pods/services are running. If not, wait for some time and check again:

kubectl get pods -n egov

Setup PGR and Payments Workflow

If PGR Module is enabled, follow below steps to setup it -

  • Port Forward workflow v2 service using below command

kubectl port-forward svc/egov-workflow-v2 -n egov 8080:8080
  • Run below cURL to create a business service for PGR workflow

curl --location 'http://localhost:8080/egov-workflow-v2/egov-wf/businessservice/_create' \
--header 'Content-Type: application/json' \
--data-raw '{"RequestInfo":{"apiId":"Rainmaker","action":"","did":1,"key":"","msgId":"20170310130900|en_IN","requesterId":"","ts":1513579888683,"ver":".01","authToken":"67f85f54-5cac-4aa6-b90f-828996cc2e30","userInfo":{"id":24226,"uuid":"11b0e02b-0145-4de2-bc42-c97b96264807","userName":"amr001","name":"leela","mobileNumber":"9814424443","emailId":"leela@llgmail.com","locale":null,"type":"EMPLOYEE","roles":[{"name":"CSC Collection Operator","code":"CSC_COLL_OPERATOR","tenantId":"pb.amritsar"},{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"},{"name":"Grievance Routing Officer","code":"GRO","tenantId":"pb.amritsar"},{"name":"NoC counter employee","code":"NOC_CEMP","tenantId":"pb.amritsar"},{"name":"TL Counter Employee","code":"TL_CEMP","tenantId":"pb.amritsar"},{"name":"TL Field Inspector","code":"TL_FIELD_INSPECTOR","tenantId":"pb.amritsar"},{"name":"TL Creator","code":"TL_CREATOR","tenantId":"pb.amritsar"},{"name":"Customer Support Representative","code":"CSR","tenantId":"pb.amritsar"},{"name":"NoC counter Approver","code":"NOC_APPROVER","tenantId":"pb.amritsar"},{"name":"TL Approver","code":"TL_APPROVER","tenantId":"pb.amritsar"},{"name":"Super User","code":"SUPERUSER","tenantId":"pb"},{"name":"BPA Services Approver","code":"BPA_APPROVER","tenantId":"pb.amritsar"},{"name":"Field Employee","code":"FEMP","tenantId":"pb.amritsar"},{"name":"Counter Employee","code":"CEMP","tenantId":"pb.amritsar"},{"name":"NoC Field Inpector","code":"NOC_FIELD_INSPECTOR","tenantId":"pb.amritsar"},{"name":"NOC Department Approver","code":"NOC_DEPT_APPROVER","tenantId":"pb.amritsar"},{"name":"Super User","code":"SUPERUSER","tenantId":"pb.amritsar"},{"name":"Grievance Officer","code":"GO","tenantId":"pb.amritsar"},{"name":"Anonymous User","code":"ANONYMOUS","tenantId":"pb.amritsar"},{"name":"Collection Operator","code":"COLL_OPERATOR","tenantId":"pb.amritsar"},{"name":"NoC Doc Verifier","code":"NOC_DOC_VERIFIER","tenantId":"pb.amritsar"},{"name":"TL doc verifier","code":"TL_DOC_VERIFIER","tenantId":"pb.amritsar"}],"active":true,"tenantId":"mz"}},"BusinessServices":[{"tenantId":"mz","businessService":"PGR","business":"pgr-services","businessServiceSla":432000000,"states":[{"tenantId":"mz","sla":null,"state":null,"applicationStatus":null,"docUploadRequired":false,"isStartState":true,"isTerminateState":false,"isStateUpdatable":true,"actions":[{"tenantId":"mz","action":"CREATE","nextState":"PENDING_ASSIGNMENT","roles":["REGISTRAR","DISTRIBUTOR","WAREHOUSE_MANAGER","HELPDESK_USER","SYSTEM_ADMINISTRATOR","PGR-ADMIN"],"active":true}]},{"tenantId":"mz","sla":null,"state":"PENDING_ASSIGNMENT","applicationStatus":"PENDING_ASSIGNMENT","docUploadRequired":false,"isStartState":false,"isTerminateState":false,"isStateUpdatable":false,"actions":[{"tenantId":"mz","currentState":"PENDING_ASSIGNMENT","action":"RESOLVE","nextState":"RESOLVED","roles":["HELPDESK_USER","L2_SUPPORT","SYSTEM_ADMINISTRATOR","PGR-ADMIN"],"active":true},{"tenantId":"mz","currentState":"PENDING_ASSIGNMENT","action":"ASSIGN","nextState":"PENDING_ASSIGNMENT","roles":["HELPDESK_USER","L2_SUPPORT","SYSTEM_ADMINISTRATOR","PGR-ADMIN"],"active":true},{"tenantId":"mz","currentState":"PENDING_ASSIGNMENT","action":"REJECT","nextState":"REJECTED","roles":["HELPDESK_USER","SYSTEM_ADMINISTRATOR","PGR-ADMIN"],"active":true}]},{"tenantId":"mz","sla":null,"state":"RESOLVED","applicationStatus":"RESOLVED","docUploadRequired":false,"isStartState":false,"isTerminateState":true,"isStateUpdatable":false,"actions":null},{"tenantId":"mz","sla":null,"state":"REJECTED","applicationStatus":"REJECTED","docUploadRequired":false,"isStartState":false,"isTerminateState":true,"isStateUpdatable":false,"actions":null},{"tenantId":"mz","sla":null,"state":"CANCELLED","applicationStatus":"CANCELLED","docUploadRequired":false,"isStartState":false,"isTerminateState":true,"isStateUpdatable":false,"actions":null}]}]}'
  • Run below cURL to create a business service for payments workflow

curl --location 'http://localhost:8080/egov-workflow-v2/egov-wf/businessservice/_create' \
--header 'Content-Type: application/json' \
--data '{
    "RequestInfo": {
        "apiId": "muster-roll",
        "action": "",
        "did": 1,
        "key": "",
        "msgId": "20170310130900|en_IN",
        "requesterId": "",
        "ts": 1513579888683,
        "ver": "1.0.0",
        "authToken": "94ecb06f-8e5b-4798-af8f-56a987560209",
        "userInfo": {
            "uuid": "5e6aad61-021b-4f0b-affe-e2cf306f2d6b"
        }
    },
    "BusinessServices": [
        {
            "tenantId": "mz",
            "businessService": "HCMMUSTERROLL",
            "business": "health-muster-roll",
            "businessServiceSla": null,
            "states": [
                {
                    "sla": null,
                    "state": null,
                    "applicationStatus": null,
                    "docUploadRequired": false,
                    "isStartState": true,
                    "isTerminateState": false,
                    "isStateUpdatable": true,
                    "actions": [
                        {
                            "action": "SUBMIT",
                            "nextState": "APPROVAL_PENDING",
                            "roles": [
                                "PROXIMITY_SUPERVISOR"
                            ]
                        }
                    ]
                },
                {
                    "sla": null,
                    "state": "APPROVAL_PENDING",
                    "applicationStatus": "INWORKFLOW",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": false,
                    "isStateUpdatable": true,
                    "actions": [
                        {
                            "action": "EDIT",
                            "nextState": "APPROVAL_PENDING",
                            "roles": [
                                "PROXIMITY_SUPERVISOR"
                            ]
                        },
                        {
                            "action": "APPROVE",
                            "nextState": "APPROVED",
                            "roles": [
                                "PROXIMITY_SUPERVISOR"
                            ]
                        }
                    ]
                },
                {
                    "sla": null,
                    "state": "APPROVED",
                    "applicationStatus": "ACTIVE",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": true,
                    "isStateUpdatable": false,
                    "actions": null
                }
            ]
        }
    ]
}'

Create Superuser

  • Check if the egov-user service is up and running by using the following command:

kubectl get pods -n egov | grep egov-user

If the egov-user service is running with Ready 1/1, then connect to it by port forwarding:

kubectl port-forward svc/egov-user -n egov 8080:8080
  • Import the below curl in Postman or execute it in another terminal window:

curl --location 'http://localhost:8080/user/users/_createnovalidate' \
--header 'Content-Type: application/json' \
--data-raw '{
    "requestInfo": {
        "apiId": "Rainmaker",
        "ver": ".01",
        "ts": null,
        "action": "_update",
        "did": "1",
        "key": "",
        "msgId": "20170310130900|en_IN",
        "authToken": "51e00caf-3218-4f15-ba70-a45f7d40abc1"
    },
    "user": {
        "userName": testuser2",
        "name": "Admin User 2",
        "gender": null,
        "mobileNumber": "9898989899",
        "type": "EMPLOYEE",
        "active": true,
        "password": "eGov@1234",
        "roles": [
            {
                "name": "Super User",
                "code": "SUPERUSER",
                "tenantId": "mz"
            },
             {
                "name": "CAMPAIGN_MANAGER",
                "code": "CAMPAIGN_MANAGER",
                "tenantId": "mz"
            },
            { 
                "name": "BOUNDARY_MANAGER",
                "code": "BOUNDARY_MANAGER",
                "tenantId": "mz"
            },
            {
                "name": "System Administrator",
                "code": "SYSTEM_ADMINISTRATOR",
                "tenantId": "mz"
            },
            {
                "name": "National Supervisor",
                "code": "NATIONAL_SUPERVISOR",
                "tenantId": "mz"
            },
            {
                "name": "Localisation admin",
                "code": "LOC_ADMIN",
                "tenantId": "mz"
            },
            {
                "name": "Distributor",
                "code": "DISTRIBUTOR",
                "tenantId": "mz"
            },
            {
                "name": "MDMS ADMIN",
                "code": "MDMS_ADMIN",
                "tenantId": "mz"
            },
            {
                "name": "HELPDESK USER",
                "code": "HELPDESK_USER",
                "tenantId": "mz"
            },
            {
                "name": "HRMS Admin",
                "code": "HRMS_ADMIN",
                "tenantId": "mz"
            },
            {
                "name": "Microplan Campaign integrator",
                "code": "MICROPLAN_CAMPAIGN_INTEGRATOR",
                "tenantId": "mz"
            },
            {
                "name": "Microplan Admin",
                "code": "MICROPLAN_ADMIN",
                "tenantId": "mz"
            }
        ],
        "emailId": "xyz@gmail.com",
        "tenantId": "mz"
    }
}'
  • Replace the username, password, and tenantId with proper values (keep tenantid as 'mz' if master data is loaded in DB unchanged).

Steps to create new boundary data

  • The initial seed boundary data includes a default boundary master dataset. However, if you need to configure a custom boundary hierarchy and data, you can refer to the detailed setup guide here:

🪝
LogoConfiguration | DIGIT Docs
19MB
seed_data_dump_v1.7.sql
Sample screenshot of database pod
Sample Screenshot of command output for db_host
Example screenshot with cd command to download folder