App Setup
Demo Video
DIGIT Health Campaign Management Demo | DIGIT HCM
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. https://drive.google.com/file/d/1u2eljinnCCJAxUGCHRHHfnDQ5-WMZWIo/view?usp=sharing
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:
Flutter 3.10.0 version - Flutter SDK
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
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
Product Repo: egovernments/health-campaign-field-worker-app
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.
Run install_bricks.sh bash script which is located in the tools folder.
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.
Now, create a .env file inside the apps/health_campaign_field_worker_app folder.
Sample .env file:
Create another file as pubspec_overrides.yaml in the same folder:
Note: Check that all the folder names are present in the packages folder before overriding the dependencies.
Navigate to the app's folder from the terminal:
cd apps/health_campaign_field_worker_app
Connect your Android device or start an emulator. Ensure that it is visible by running
flutter devices.
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:
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.
Sample: https://github.com/egovernments/health-campaign-mdms/tree/DEV/data/default. App master data persist in:
https://github.com/egovernments/health-campaign-mdms/tree/DEV/data/default/health
Consist of service register: All the APIs that the app utilises to call the server: https://github.com/egovernments/health-campaign-mdms/blob/DEV/data/default/health/service-registry.json
App configuration: Primary details required to run the app:
https://github.com/egovernments/health-campaign-mdms/blob/DEV/data/default/health/field-app-configuration.json Project types: Details of the projects are listed here: https://github.com/egovernments/health-campaign-mdms/blob/DEV/data/default/health/project-types.json
Additional static configs: https://github.com/egovernments/health-campaign-mdms/blob/DEV/data/default/health/symptoms_types.json
Upserting Localisation
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:
API curl:
Link for Localisation:
Consolidated: https://github.com/egovernments/releasekit/blob/master/localisation/HCM/consolidated/en_MZ/consolidated.json Module’s Localisation: https://github.com/egovernments/releasekit/tree/master/localisation/HCM/V1.2
Last updated