Health
PlatformDomainAcademyDesign SystemFeedback
v1.3
v1.3
  • 👋Introducing DIGIT Health
    • Release Notes
      • 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
  • 💙HEALTH CAMPAIGN MANAGEMENT
    • Understanding DIGIT 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
      • DIGIT HCM App
        • User Manual
          • Single Round Campaigns
            • Registration & Delivery
          • 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
          • Support Functions
            • Language Selection
            • Login
            • Forgot Password
            • Project Selection
            • Hamburger Menu
            • Help
            • Sync
            • Checklist
      • Campaign Management Dashboard
        • User Manual
      • Microplanning
      • HCM Console
  • 🚀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
        • Services
          • Project
          • Stock
          • Referral
      • Field App Architecture
    • Standards
    • Security
    • Interoperability
  • 🪝SETUP
    • Planning an HCM Implementation
    • Establish Project & Team
    • Gathering Requirements
    • Installation
      • Install Using GitHub Actions in AWS
      • Setup Seed Data
      • Setup App
      • Setup Kibana Dashboard
        • Create or Edit Existing Dashboards
        • Summary of Data Views and Dashboards
    • Configuration
      • 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
      • UI Configuration
        • Stock Management
        • Language Selection
        • Login
        • Forgot Password
        • Project Selection
        • Attendance Management
          • Attendance Package Extraction and Interaction with HCM Application
      • Dashboard Configuration
        • Dashboard UI Enhancements
        • HCM Dashboard Master Promotion Guide
    • Quality Assurance Testing
  • 🔵GENERAL
    • Source Code
    • Committee
      • Digital Product Advisory Committee Charter
      • Idea Management Process
    • Product Roadmap
Powered by GitBook

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

On this page
  • Demo Video
  • Overview
  • Pre-requisites
  • Steps
  • Generate APK - Steps
  • Change Master Data - Steps
  • Upsert Localisation
  • Localisation Link

Was this helpful?

Export as PDF
  1. SETUP
  2. Installation

Setup App

PreviousSetup Seed DataNextSetup Kibana Dashboard

Was this helpful?

Demo Video

Overview

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:

  • Flutter 3.16.5 version -

  • 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

  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 your IDE is configured with the Flutter and Dart plugins.

  2. 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="mz"`
ACTIONS_API_PATH="access/v1/actions/mdms/_get"
SYNC_DOWN_RETRY_COUNT="3"
RETRY_TIME_INTERVAL="5"
CONNECT_TIMEOUT="120000"
RECEIVE_TIMEOUT="120000"
SEND_TIMEOUT="120000"
CHECK_BANDWIDTH_API="/project/check/bandwidth"
ENV_NAME="DEMO"
  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:
  attendance_management:
    path: ../../packages/attendance_management
  dart_mappable_builder:
    path: ../../packages/dart_mappable_builder
  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 in the packages folder before overriding the dependencies.

  1. Create another file as pubspec_overrides.yaml in packages/attendance_management/pubspec_overrides.yaml

# melos_managed_dependency_overrides: dart_mappable_builder
# melos_managed_dependency_overrides: digit_components
dependency_overrides:
  digit_components:
    path: ../../packages/digit_components
  dart_mappable_builder:
    path: ../../packages/dart_mappable_builder
  1. Create another file as pubspec_overrides.yaml in packages/forms_engine/pubspec_overrides.yaml

# melos_managed_dependency_overrides: digit_components
dependency_overrides:
  digit_components:
    path: ../digit_components
  1. Run install_bricks.sh bash script which is located in the tools folder. This script fetches and links all the necessary dependencies for the project.

  2. After successfully running the script and setting up the env file, navigate to the app's folder from the terminal:

    cd apps/health_campaign_field_worker_app

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

    flutter devices.

  4. 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.

Generate APK - Steps

  • 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="mz"`
ACTIONS_API_PATH="access/v1/actions/mdms/_get"
SYNC_DOWN_RETRY_COUNT="3"
RETRY_TIME_INTERVAL="5"
CONNECT_TIMEOUT="120000"
RECEIVE_TIMEOUT="120000"
SEND_TIMEOUT="120000"
CHECK_BANDWIDTH_API="/project/check/bandwidth"
ENV_NAME="DEMO"
  • 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:
  attendance_management:
    path: ../../packages/attendance_management
  dart_mappable_builder:
    path: ../../packages/dart_mappable_builder
  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: All the folder names should be in the packages folder, before overriding the dependencies.

  • Create another file as pubspec_overrides.yaml in packages/attendance_management/pubspec_overrides.yaml

# melos_managed_dependency_overrides: dart_mappable_builder
# melos_managed_dependency_overrides: digit_components
dependency_overrides:
  dart_mappable_builder:
    path: ../dart_mappable_builder
  digit_components:
    path: ../digit_components
  • Create another file as pubspec_overrides.yaml in packages/forms_engine/pubspec_overrides.yaml

# melos_managed_dependency_overrides: digit_components
dependency_overrides:
  digit_components:
    path: ../digit_components
  • Run install_bricks.sh bash script which is located in the tools folder. This script fetches and links all the necessary dependencies for the project.

  • After successfully running the script and setting up the env file, navigate to - apps/health_campaign_field_worker_app folder in the terminal, and run the following command to generate the APK:

    flutter build apk --release --no-tree-shake-icons

  • After successfully running the above command, the APK will be generated in the path

    apps/health_campaign_field_worker_app/build\app\outputs\flutter-apk\app-release.apk

  • Install the generated APK on your preferred Android device.

Change Master Data - Steps

All the Master data persist in MDMS under the tenant folders.

App configuration: Primary details required to run the app:

Upsert 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"
        }
    ]
}'

Localisation Link

If the localisation is not executed prior, then -

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 Localisation:

🪝
DIGIT Health Campaign Management Demo | DIGIT HCM
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.3