Health
PlatformDomainAcademyDesign SystemFeedback
v1.2
v1.2
  • Introducing DIGIT Health Platform
    • Roadmap
  • Platform
    • Release Notes
      • Master Data Management Service (MDMS) & Configuration Updates
      • Test Cases
      • Data Migration
      • Service Build Updates
      • Gate 2 Release Checklist
    • Platform Capabilities
      • Technical Skillset & Pre-requisites
    • Architecture
      • Master Data Management Service (MDMS)
      • High Level Design
        • Health Campaign System High Level Design
        • Design Decision Log
      • Low Level Design
        • Registries
          • Individual
          • Household
          • Product
          • Facility
          • Referral
        • Services
          • Project
          • Stock
    • Source Code
    • Installation
      • Setup Requirements
      • Supported Clouds
    • Platform Services
      • Individual Registry
      • Household Registry
      • Product Registry
      • Facility Registry
      • Stock & Inventory
      • Project Services
      • Referral Registry
      • Complaints
        • QA Sign-Off
          • Test Cases
      • User Management
        • QA Sign-Off
    • Configuration
      • Localisation Keys
      • Developer Guide
  • Products
    • Health Campaign Management
      • Frontline Worker's App
        • Features
        • User Personas
        • User Interface Design
          • User Management
          • Complaints Management
          • Supervision Flow
          • Beneficiary Registration
          • Service Delivery
          • Inventory Management
          • User Login
        • HCM App User Manual
          • Language Selection
          • Login
          • Forgot Password
          • Project Selection
          • Beneficiary Registration
          • Delivery Intervention
          • Stock Management
          • Checklist
          • Multi-Round Campaigns
          • Tracking Side-Effects for Beneficiaries
          • Tracking Beneficiary Referrals
          • Voucher-Based Registration and Distribution
          • Proximity-Based Search
          • Downloading Beneficiary Data for Longitudinal Tracking
          • Test Cases
        • Functional Specifications
        • Field App Architecture
        • Installation
          • App Setup
        • Configuration
          • HCM Master Promotion Guide
            • Configuring Tenants
              • MDMS Configuration
        • Release Notes
          • Success Metrics
          • Product Sign-off
          • Architect Sign-off
            • Health UAT API Execution Report
            • Performance Report
          • QA Sign-off
          • SMC UX Audit
        • Products Requirement Documents (PRDs)
          • User Management
          • Complaints Management
          • Supervision Flow
          • Role Action Mapping
          • Beneficiary Registration
          • Referral Management
          • Service Delivery
          • Inventory Management: Last Mile Delivery
          • Proximity-Based Search
          • 2D Voucher Scanning
          • Adverse Events Workflow
          • Multi-Round Service Delivery
          • Inventory Management
          • Referral Management
          • User Login
      • Campaign Management Dashboard
        • Features
        • User Stories
        • User Interface Design
        • Dashboard User Manual
        • Test Cases
        • Installation
        • Configuration
          • Dashboard UI Enhancements
          • HCM Dashboard Master Promotion Guide
        • Release Notes
          • UX Audit
          • PM Audit
          • Product Sign-Off
          • Architect Sign-Off
          • QA Sign-Off
        • Product Requirement Document (PRD)
  • Programme
    • Specifications
    • Deployment
    • LLIN Implementation
      • Standard Operating Procedures (SOPs) and Plans
        • SOP for Help desk Support
        • User Management SOP
          • Master Data Collection Template
            • Boundary Hierarchy
            • Boundary Data Specs
            • System User Setup
            • Facility
            • Product
        • Master Data Management SOP
        • Training Plan
        • Field Test Plan
        • Programme Roll-Out Plan
        • Change Management Strategy
        • UAT Plan
          • UAT 1
            • UAT 1 Test Scenarios
            • UAT Test Cases
              • Registration & Distribution
              • Inventory Flow
              • Supervision
            • User Acceptance Test Report
              • Plan Dates
          • UAT 2
            • UAT 2 SOP
            • UAT 2 Test Scenarios
            • UAT Observations
              • Registration and Distribution
              • Inventory Flow
              • Supervision
              • General Feedback
            • UAT Feedback Form: SUS
            • UAT Feedform Form: Process
      • Monitoring and Evaluation (M&E) Tools
      • Master data template
      • Implementation Checklist
      • DIGIT Pre-Training Tutorials
    • SMC Implementation
      • Localisation Plan
      • SMC Programme and Implementation Plan (Checklist)
      • Helpdesk and Support Process
      • Master Training of Trainers (ToT) Plan
      • UAT Plan
        • Change Management Strategy
      • Master Data Template
Powered by GitBook

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

On this page
  • Demo Video
  • Setup Guide
  • Steps to Restore Database Data
  • Frontline Worker's App Setup
  • Pre-requisites
  • Steps to Run the Application
  • Steps to Generate APK
  • Upserting Localisation

Was this helpful?

Export as PDF
  1. Products
  2. Health Campaign Management
  3. Frontline Worker's App
  4. Installation

App Setup

PreviousInstallationNextConfiguration

Last updated 1 year ago

Was this helpful?

Demo Video

Setup Guide

Database (DB) Restore (Providing a DB backup to avoid hassle since the automation of the seed data creation is a work in progress):

To restore the database, you can access the DB dump file. Use the following link to download the SQL file.

Steps to Restore Database Data

  • Run Kubectl, and copy cmd to copy the file to the server (playground pod where DB runs).

  • Execute the restore command inside the playground pod.

psql -h {host} -U {username} -d {dbname} -f /path/in/pod/seed_data.sql

Note:

  • Once the DB is restored, redeploy the MDMS service, persister, and indexer services using the config flag since we have updated a few links in the DevOps repository.

  • The Postgres version should be 14.8 or later.

kubectl apply -f /path/to/your/pod-config.yaml

Frontline Worker's App Setup

This guide provides step-by-step instructions to clone and run the Health Campaign Frontline Worker's App locally on your machine. The app is a Flutter application developed for health campaigns.

Pre-requisites

Before you begin, ensure that you have the following installed on your PC:

  • Android Studio or VS Code, any preferred IDE for Flutter development.

  • Android device or emulator for testing.

  • Run the flutter doctor command to ensure all the required checklists are marked.

Steps to Run the Application

  1. Open a terminal and run the following commands:

git clone https://github.com/egovernments/health-campaign-field-worker-app.git

cd health-campaign-field-worker-app

  1. Open the project in your preferred IDE (Android Studio, Visual Studio Code). Make sure that the IDE is configured with the Flutter and Dart plugins.

  2. Run install_bricks.sh bash script which is located in the tools folder.

  3. Navigate to the root folder of the project in the terminal and run the following command to initialise the packages using Melos:

melos bootstrap

(-or-)

melos bs

This command fetches and links all the necessary dependencies for the project.

  1. Now, create a .env file inside the apps/health_campaign_field_worker_app folder.

Sample .env file:

BASE_URL={replace with base url}
MDMS_API_PATH="egov-mdms-service/v1/_search"
TENANT_ID="default"
SYNC_DOWN_RETRY_COUNT="3"
RETRY_TIME_INTERVAL="5"
CONNECT_TIMEOUT="120000"
RECEIVE_TIMEOUT="120000"
SEND_TIMEOUT="120000"
  1. Create another file as pubspec_overrides.yaml in the same folder:

# melos_managed_dependency_overrides: digit_components,digit_firebase_services,forms_engine,intl, digit_showcase
dependency_overrides:
 digit_components:
   path: ..\\..\\packages\\digit_components
 digit_firebase_services:
   path: ..\\..\\packages\\digit_firebase_services
 digit_showcase:
   path: ..\\..\\packages\\digit_showcase
 forms_engine:
   path: ..\\..\\packages\\forms_engine
 intl: ^0.18.0

Note: Check that all the folder names are present in the packages folder before overriding the dependencies.

  1. Navigate to the app's folder from the terminal:

    cd apps/health_campaign_field_worker_app

  2. Connect your Android device or start an emulator. Ensure that it is visible by running

    flutter devices.

  3. Now, run the following command to launch the app:

    flutter run

    This command will build the app and install it on the connected device or emulator.

Steps to Generate APK

  • Create a .env file inside the apps/health_campaign_field_worker_app folder.

Sample .env file:

BASE_URL="https://health-demo.digit.org/"
MDMS_API_PATH="egov-mdms-service/v1/_search"
TENANT_ID="default"
SYNC_DOWN_RETRY_COUNT="3"
RETRY_TIME_INTERVAL="5"
CONNECT_TIMEOUT="120000"
RECEIVE_TIMEOUT="120000"
SEND_TIMEOUT="120000"
ENV_NAME="UAT"
  • Navigate to the root folder of the project in the terminal and run the following command:

    melos clean

    melos bs

  • After successfully running melos bs, navigate to the apps/health_campaign_field_worker_app folder in the terminal and run the following command to generate the APK:

    flutter build APK --release

    How to change the master data: All the Master data persist in MDMS under the tenant folders.

    App configuration: Primary details required to run the app:

Upserting Localisation

  1. Import the following curl in Postman:

Note:

  • Replace the {URL} with the required environment.

  • Get the {authToken} of SUPER_USER.

  • Replace the {tenantId} with the required tenant.

  • Each message object should have a unique code and module.

Sample message to upsert:

{
            "code": "ADMINISTRATION_UNIT_FORM_LABEL",
            "message": "Administrative Unit",
            "module": "hcm-beneficiary",
            "locale": "en_MZ"
      }

API curl:

curl --location '{URL}/localization/messages/v1/_upsert' \
--header 'Content-Type: application/json' \
--data '{
    "RequestInfo": {
        "apiId": "emp",
        "ver": "1.0",
        "ts": "10-03-2017 00:00:00",
        "action": "create",
        "did": "1",
        "key": "abcdkey",
        "msgId": "20170310130900",
        "requesterId": "rajesh",
        "authToken": "{authToken}",
        "userInfo": {
            "id": 128
        }
    },
    "tenantId": "{tenantId}",
    "locale": "{locale}", // Eg. en_MZ
    "module": "hcm-common",
    "messages": [
        {
            "code": "ADMINISTRATION_UNIT_FORM_LABEL",
            "message": "Administrative Unit",
            "module": "hcm-beneficiary",
            "locale": "en_MZ"
        }
    ]
}'

Link for Localisation:

Flutter 3.10.0 version -

Product Repo:

Sample: . App master data persist in:

Consist of service register: All the APIs that the app utilises to call the server:

Project types: Details of the projects are listed here:

Additional static configs:

Consolidated: Module’s Localisation:

DIGIT Health Campaign Management Demo | DIGIT HCM
https://drive.google.com/file/d/1u2eljinnCCJAxUGCHRHHfnDQ5-WMZWIo/view?usp=sharing
Flutter SDK
egovernments/health-campaign-field-worker-app
https://github.com/egovernments/health-campaign-mdms/tree/DEV/data/default
https://github.com/egovernments/health-campaign-mdms/tree/DEV/data/default/health
https://github.com/egovernments/health-campaign-mdms/blob/DEV/data/default/health/service-registry.json
https://github.com/egovernments/health-campaign-mdms/blob/DEV/data/default/health/field-app-configuration.json
https://github.com/egovernments/health-campaign-mdms/blob/DEV/data/default/health/project-types.json
https://github.com/egovernments/health-campaign-mdms/blob/DEV/data/default/health/symptoms_types.json
https://github.com/egovernments/releasekit/blob/master/localisation/HCM/consolidated/en_MZ/consolidated.json
https://github.com/egovernments/releasekit/tree/master/localisation/HCM/V1.2