# Sending Report to DHIS2

## Configurations

In order to send data to DHIS2 you need to set a username and password. This can be done in the following steps

1. Got to Legacy System Administration->Mantainance->Settings->Ugandaemr.

   > <img src="/files/tpLDa68aFDScglOROnF6" alt="UgandaEMR Settings" data-size="original">
2. Set the DHIS2 Server URL, username and password by:
3. Got to Legacy System Administration->Mantainance->Settings->Ugandaemrsync
4. Save the Above settings

## Sending Data to DHIS2

1. [Generate report](<https://mets-programme.gitbook.io/ugandaemr-documentation/reporting/pages/-M4YKpwDNXHvGDMF5aDw#Running a Report>) by following steps 1 to 4. this will generate a report. ![Generated Report](/files/Kr5pD2bavrRBtmsBvnca)
2. Click the *"SendToDHIS2"* action on the report generated on the reports page. This will popup a report preview all indicators. ![Report Preview](/files/oHYlhuqEOrU0fwzwR82A)
3. On the Preview window, confirm the values displayed and Click the *"SendToDHIS2"* button. Wait for the Response message which reads *"Data Sent Succesfully"* or an error message with reason why it was not sent. ![Response Toast](/files/7sp24RfJsqqd009fZwlN) **Note:** Pay attention to the response. It may include the following results.

   ```
    Imported: Number of indicators that have been newly added.
    Updated:  Number of indicators that have been changed 
    Ignored:  Number of indicators that have been ignored.
    Ignored:  Number of indicators that have been deleted.
   ```
4. When the report is not sent due to internet connection issues, you can try sening the report again by repeating step 2 and 3.

## [Trouble shooting tips](<https://mets-programme.gitbook.io/ugandaemr-documentation/reporting/pages/-M8QRtriqWvCZ7puMBVz#Sending to DHIS2 Failures>)


---

# 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://mets-programme.gitbook.io/ugandaemr-documentation/reporting/sending_to_dhis2.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.
