{"id":46300235,"url":"https://github.com/worldhealthorganization/ncd-e-registry","last_synced_at":"2026-03-04T11:02:41.369Z","repository":{"id":325312112,"uuid":"939087468","full_name":"WorldHealthOrganization/NCD-E-Registry","owner":"WorldHealthOrganization","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-20T16:16:01.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-20T18:11:49.348Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WorldHealthOrganization.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-26T01:06:07.000Z","updated_at":"2025-11-20T16:01:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/WorldHealthOrganization/NCD-E-Registry","commit_stats":null,"previous_names":["worldhealthorganization/ncd-e-registry"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/WorldHealthOrganization/NCD-E-Registry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorldHealthOrganization%2FNCD-E-Registry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorldHealthOrganization%2FNCD-E-Registry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorldHealthOrganization%2FNCD-E-Registry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorldHealthOrganization%2FNCD-E-Registry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WorldHealthOrganization","download_url":"https://codeload.github.com/WorldHealthOrganization/NCD-E-Registry/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorldHealthOrganization%2FNCD-E-Registry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30078415,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T08:01:56.766Z","status":"ssl_error","status_checked_at":"2026-03-04T08:00:42.919Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-04T11:02:36.153Z","updated_at":"2026-03-04T11:02:41.351Z","avatar_url":"https://github.com/WorldHealthOrganization.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# WHO NCD E-Registry\n\nThis repository contains WHO Noncommunicable Disease (NCD) E-Registry package developed by [Surveillance, Monitoring and Reporting (SMR)](https://www.who.int/teams/noncommunicable-diseases/surveillance).\n\n## Services\n\n1. **PostgreSQL with PostGIS:** Stores core data for NCD registry and reporting.\n2. **NCD DHIS2 Backend**: Handles business logic, data processing, and API integration.\n3. **NCD Web App (React/Frontend)**: User-facing web application for managing and reporting NCD data.\n4. **NCD Dashboard (React/Analytics)**: Interactive dashboard for data visualization and monitoring.\n\n## Pre-Setup Configuration\n\nBefore building images and running containers of the latest release, update the configuration files as described below:\n\n**1. PostgreSQL Configuration**\\\nFile: `ncd-tomcat/dhis_config/dhis.conf`\\\nEdit database connection details as per your configuration, for exmple:\n\n```ini\nconnection.url = jdbc:postgresql://\u003cip\u003e:\u003cport\u003e/\u003cdatabase-name\u003e\n```\n\n\\\n**2. NCD Web App Configuration**\\\n_a. Update Environment Variables:_\\\nFile: `ncd-webapp/.env`\n\n```ini\nREACT_APP_SERVICE_URL=https://\u003cyour-domain\u003e/service/\nREACT_APP_SERVICE_URL_API=https://\u003cyour-domain\u003e/service/api/\nREACT_APP_DASHBOARD_URL=https://\u003cyour-domain\u003e/ncddashboardv3/\n```\n\nb. Update Homepage URL:\\\nFile: `ncd-webapp/package.json`\n\n```json\n\"homepage\": \"https://\u003cyour-domain\u003e/ncd/\"\n```\n\n\\\n**3. NCD Dashboard Configuration**\\\n_a. Update Environment Variables:_\\\nFile: `ncd-dashboard/.env`\n\n```ini\nREACT_APP_URL_MAIN=https://\u003cyour-domain\u003e/\nREACT_APP_URL_SERVICE=https://\u003cyour-domain\u003e/service/api/\n```\n\n_b. Update Homepage URL:_\\\nFile: `ncd-dashboard/package.json`\n\n```json\n\"homepage\": \"https://\u003cyour-domain\u003e/ncddashboardv3/\"\n```\n\n## Building \u0026 Running NCD E-Registry\n\nFrom the project root directory, run `docker compose up -d --build` to:\n\n1. Start PostgreSQL with PostGIS and populate it with data\n2. Build and start the DHIS2 backend\n3. Build and start the Web App and Dashboard\n\n## Accessing the Applications\n\nNginx can be used as a frontend server to route domain traffic to Docker containers. Make sure your domain and SSL configurations are correctly set in your Nginx configuration files, for example:\n\n```nginx\nserver {\n    server_name \u003cyour-domain\u003e;\n\n    location /service/ {\n        proxy_pass http://localhost:8080/service/;\n        proxy_set_header X-Forwarded-Proto https;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header Host $host;\n    }\n\n    location /ncddashboardv3/ {\n        proxy_pass http://localhost:81/ncddashboardv3/;\n        proxy_set_header X-Forwarded-Proto https;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header Host $host;\n    }\n\n    location /ncd/ {\n        proxy_pass http://localhost:82/ncd/;\n        proxy_set_header X-Forwarded-Proto https;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header Host $host;\n    }\n}\n```\n\n## Indicator API\n\n### Overview\n\nThe Indicator API allows clients to fetch calculated indicator values based on:\n\n-   Report date\n-   Organization unit (facility or district)\n-   NCD program\n-   Disease type\n-   Organization level (facility vs district)\n\nAll endpoints require the same authentication used by the dashboard application.\n\n### 1. Patient-level indicators API\n\n**Endpoint Details:**\n\n-   **URL:** `https://\u003cyour-domain\u003e/service/api/dashboardIndicator/getIndicatorsnd`\n-   **Method:** POST\n-   **Content-Type:** `application/json`\n-   **Authentication:** Uses the same credentials as the dashboard\n\n**Purpose:**  \nRetrieves values for patient-level indicators based on specified criteria including organization unit (facility or district), program, disease type, and reporting date.\n\n**Request Format:**\n\n```json\n{\n    \"orguid\": \"ORG_UID\",\n    \"programuid\": \"eAHvg6zuxvK\",\n    \"typeofdisease\": \"All\",\n    \"reportdate\": \"REPORT_DATE\",\n    \"orgflag\": \"F\"\n}\n```\n\n**Request Parameters:**\n\n| Parameter       | Type   | Required | Description                                                        |\n| --------------- | ------ | -------- | ------------------------------------------------------------------ |\n| `orguid`        | string | Yes      | Unique identifier for the organization unit (facility or district) |\n| `programuid`    | string | Yes      | Unique identifier for the NCD program (default: eAHvg6zuxvK)       |\n| `typeofdisease` | string | Yes      | Disease type filter - see available options below                  |\n| `reportdate`    | string | Yes      | Report date in YYYY-MM-DD format                                   |\n| `orgflag`       | string | Yes      | Organization level flag: \"F\" for facility, \"D\" for district        |\n\n**Disease Type Options:**\n\n-   `\"All\"` - Returns indicators for all disease types\n-   `\"Hypertension and cardiovascular disease\"`\n-   `\"General cancer\"`\n-   `\"Diabetes\"`\n-   `\"Chronic respiratory diseases\"`\n-   `\"Childhood cancer\"`\n-   `\"Breast cancer\"`\n\n**Usage Notes:**\n\n-   Use `\"orgflag\": \"D\"` to retrieve aggregated district-level data\n-   Use `\"orgflag\": \"F\"` to retrieve specific facility-level values\n-   The `typeofdisease` parameter allows filtering by individual diseases or viewing all diseases combined\n\n### 2. Facility-level indicators API\n\n**Endpoint Details:**\n\n-   **URL:** `https://\u003cyour-domain\u003e/service/api/dashboardIndicator/getCustomFacilityDashboard`\n-   **Method:** GET\n-   **Content-Type:** `application/json`\n-   **Authentication:** Uses the same credentials as the dashboard\n\n**Purpose:**  \nRetrieves facility-level indicators for a specific facility and quarter.\n\n**Request Format:**\n\n```\nGET /service/api/dashboardIndicator/getCustomFacilityDashboard?orguid=ORG_UID\u0026year=REPORT_DATE\n```\n\n**Query Parameters:**\n\n| Parameter | Type   | Required | Description                                               |\n| --------- | ------ | -------- | --------------------------------------------------------- |\n| `orguid`  | string | Yes      | Unique identifier for the facility                        |\n| `year`    | string | Yes      | Reporting quarter in YYYYQN format (e.g., 2022Q1, 2022Q2) |\n\n**Example Request:**\n\n```\nhttps://\u003cyour-domain\u003e/service/api/dashboardIndicator/getCustomFacilityDashboard?orguid=YUv0ube9634\u0026year=2022Q1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworldhealthorganization%2Fncd-e-registry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworldhealthorganization%2Fncd-e-registry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworldhealthorganization%2Fncd-e-registry/lists"}