# Setup Project Data

## Overview

This step involves the execution of the Postman collection for the minimum setup data required to run a campaign from the field worker app.

## Steps

{% stepper %}
{% step %}

### Restart Spring Cloud Gateway

* Execute the below command to restart the Spring Cloud Gateway.
* Check if all the services are up and running by using the following command:

```
kubectl get pods -n egov
```

* If all the services are running with Ready 1/1, restart the Spring Cloud Gateway service using the command given below:

  ```
  kubectl delete pods {gateway-pod-name} -n egov
  ```

{% endstep %}

{% step %}

### Load project data

{% hint style="info" %}
All file examples in this document refer to the default branches in the health campaign DevOps and configuration repositories for example purposes. Once you have forked or cloned these repositories, refer to the forked or cloned repositories.&#x20;
{% endhint %}

Create an environment variable file and add the following variables in Postman:

* Click on **New > Environment** and add the following variables:

<div align="left"><figure><img src="https://content.gitbook.com/content/mb5VUHEnO0msarLMPz6q/blobs/nbKLTHHZEKbFN8XaLgKL/Screenshot%202024-04-03%20at%201.22.15%20AM.png" alt="" width="375"><figcaption></figcaption></figure></div>

* **URL -** domain\_name provided in infra-as-code/terraform/sample-aws/input.yaml
  * Example: https\://{**domain\_name**}
* **tenantId** - mz
* **apiUserName** and **apiPassword** - newly created superuser credentials
* **startDate** and **endDate** in epoch format - [`epoch converter`](https://www.epochconverter.com/)&#x20;
* **boundaryCode** -  use the default value (**VFTw0jbRf1y**) if Master data is unchanged <br>

  <div align="left"><figure><img src="https://content.gitbook.com/content/mb5VUHEnO0msarLMPz6q/blobs/IoJfMBEFGRwT0fTqN3DF/Screenshot%202024-04-03%20at%2011.42.14%20AM.png" alt="" width="563"><figcaption></figcaption></figure></div>
* Import the seed data script
  {% endstep %}

{% step %}

### Seed data in the Postman script

{% file src="<https://content.gitbook.com/content/mb5VUHEnO0msarLMPz6q/blobs/tDzmgW8cX0OJi6EbUVZ9/HCM%20seed.postman_collection.json>" %}

* This collection includes all the scripts to create users, projects, staff, and product variants.
* Import the HCM setup script in Postman - [import guide](https://learning.postman.com/docs/getting-started/importing-and-exporting/importing-data/)
* Choose the new environment created in the environment tab.

![](https://content.gitbook.com/content/mb5VUHEnO0msarLMPz6q/blobs/Yt8n8LwDiFn3OSyDUJIz/environment-editor-select-env-v10-20.jpg)

* Click on the imported HCM setup collection, and click run.&#x20;

<div align="left"><figure><img src="https://content.gitbook.com/content/mb5VUHEnO0msarLMPz6q/blobs/q5WhGqtqg9le05Mad1pV/click%20on%20run.png" alt="" width="375"><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://content.gitbook.com/content/mb5VUHEnO0msarLMPz6q/blobs/5z0Ofuky99OunilEwWUx/Screenshot%202024-04-03%20at%2012.12.32%20PM.png" alt="" width="375"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Load localisation

{% hint style="info" %}
**Localisation is required to load and show data in different available languages. You can add localisation for English, French, and Portuguese languages by following the instructions given below. If only one specific language is required, download that language-specific collection and run it.**&#x20;
{% endhint %}

* Prepare to set up

  * Create a port forward to the localisation pod by executing the following command:

  ```shell
  kubectl port-forward svc/egov-localization -n egov 8080:8080
  ```

  * Replace the **URL** variable in the Postman Environment with <http://localhost:8080>

  #### **All Languages (English, French, Portuguese)**

  * Define locale code for localeEnglish, localeFrench, and localePortuguese in the environment file.
    * localeEnglish - en\_MZ
    * localeFrench - fr\_MZ
    * localePortuguese - pt\_MZ
* Download the file below for all localisations - English, French, and Portuguese. Data has to be loaded at once:

{% file src="<https://3976166735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmb5VUHEnO0msarLMPz6q%2Fuploads%2FaLfgwfy1azBAwQEIEbYc%2FLocalization_Seed_Script.postman_collection%20.json?alt=media&token=5ed2b4e6-dff1-4668-8c09-51811335f10c>" %}

* Import the downloaded file into Postman, select all language localisation collections, and click on run. See the screenshot below for reference:

<figure><img src="https://content.gitbook.com/content/mb5VUHEnO0msarLMPz6q/blobs/HOrMlDwa9VeLWwwL5Eg4/image.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/mb5VUHEnO0msarLMPz6q/blobs/tZ8sag2TNK7TYZzGSKq9/image.png" alt=""><figcaption></figcaption></figure>

{% tabs %}
{% tab title="Localisation - English" %}
Instructions for the installation of HCM in English

* **To add localisations specific to the English language only, download the file given below:**

Import the downloaded file into Postman, select the English collection, and click on run. See the screenshot below for reference:

<figure><img src="https://content.gitbook.com/content/mb5VUHEnO0msarLMPz6q/blobs/nHg1izSBhguQHzbObv0p/Screenshot%20from%202024-08-09%2006-16-03.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/mb5VUHEnO0msarLMPz6q/blobs/kKlBO6bvXdW04vo34wPg/Screenshot%20from%202024-08-09%2006-16-13.png" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Localisation - French" %}
Instructions for the installation of HCM in French

* **To add localisations specific to the French language only, download the file given below:**

Import the downloaded file into Postman, select the French collection, and click on run. See the screenshot below for reference:

<figure><img src="https://content.gitbook.com/content/mb5VUHEnO0msarLMPz6q/blobs/TTck2z1FGaLMdckg0gje/Screenshot%20from%202024-08-09%2006-16-24.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/mb5VUHEnO0msarLMPz6q/blobs/18Jfvmn1x0SFKUk0qATl/Screenshot%20from%202024-08-09%2006-16-32.png" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Localisation - Portugese" %}
Instructions for the installation of HCM in Portuguese:

* **To add localisations specific to the Portuguese language only, download the file given below:**

Import the downloaded file into Postman, select the Portuguese collection, and click on run. See the screenshot below for reference:

<figure><img src="https://content.gitbook.com/content/mb5VUHEnO0msarLMPz6q/blobs/GEjeQ6g6cGs0mGGqJ83i/Screenshot%20from%202024-08-09%2006-16-44.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/mb5VUHEnO0msarLMPz6q/blobs/z8UZ8jDXWf5AJsZP5qrP/Screenshot%20from%202024-08-09%2006-16-51.png" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digit.org/health/deploy/installation/setup-project-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
