# 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="https://2263683135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4YKhNOQtSxoP0vCjuG%2Fuploads%2Fgit-blob-a07faac1ea450229acbbd06a78bac196399ae577%2Ffacility_uuid.png?alt=media" 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/ugandaemr_reports#Running a Report>) by following steps 1 to 4. this will generate a report. ![Generated Report](https://2263683135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4YKhNOQtSxoP0vCjuG%2Fuploads%2Fgit-blob-afe672cc55d4158e2c92ebdf2ffd17240a0ca1e5%2Fsending_report_to_dhis2.png?alt=media)
2. Click the *"SendToDHIS2"* action on the report generated on the reports page. This will popup a report preview all indicators. ![Report Preview](https://2263683135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4YKhNOQtSxoP0vCjuG%2Fuploads%2Fgit-blob-fb2b6ed5102f2d3553d3905baf1c77b125750492%2Fsend_to_dhis2_preview.png?alt=media)
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](https://2263683135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4YKhNOQtSxoP0vCjuG%2Fuploads%2Fgit-blob-e13ee0addd09e1e16e4550669dab120fce1f74fe%2Fsend_to_dhis2_response.png?alt=media) **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/report_trouble_shooting#Sending to DHIS2 Failures>)
