Skip to content

This mediator handles the integration between CTC3 and ESRS

Notifications You must be signed in to change notification settings

SoftmedTanzania/esrs-mediator-ctc3

Repository files navigation

ESRS-Mediator-CTC3

Codacy Badge Java CI Badge Coverage Status

An OpenHIM mediator for handling system integrations between CTC3 and ESRS.

1. Dev Requirements

  1. Java 1.8
  2. IntelliJ or Visual Studio Code
  3. Maven 3.6.3

2. Mediator Configuration

This mediator handles the data validation of the message payload being sent to ESRS .

3 Configuration Parameters

The configuration parameters specific to the mediator and destination system can be found at

src/main/resources/mediator.properties

    mediator.name=eLMIS-to-DHIS2-Mediator
    mediator.host=localhost
    mediator.port=3031
    mediator.timeout=60000
    mediator.heartbeats=true

    core.host=localhost
    core.api.port=8080
    core.api.user=root@openhim.org
    core.api.password=openhim-password

    destination.host=localhost
    destination.api.port=8080
    destination.api.path=/destination-system-path
    destination.scheme=http

The configuration parameters specific to the mediator and the mediator's metadata can be found at

src/main/resources/mediator-registration-info.json

    {
        "urn": "urn:uuid:c11b99a0-d8af-11eb-badb-9d2a2a013a07",
        "version": "0.1.0",
        "name": "eLMIS - DHIS2 Mediator",
        "description": "An openHIM mediator for handling system integration between eLMIS and DHIS2",
        "endpoints": [
            {
                "name": "eLMIS to DHIS2 Mediator Route",
                "host": "localhost",
                "port": "3031",
                "path": "/dhis2",
                "type": "http"
            }
        ],
        "defaultChannelConfig": [
            {
                "name": "eLMIS to DHIS2 Mediator",
                "urlPattern": "^/dhis2$",
                "type": "http",
                "allow": ["elmis-role"],
                "routes": [
                    {
                        "name": "eLMIS - DHIS2 Mediator Route",
                        "host": "localhost",
                        "port": "3031",
                        "path": "/dhis2",
                        "type": "http",
                        "primary": "true"
                    }
                ]
            }
        ],
        "configDefs": [
            {
                "param": "destinationConnectionProperties",
                "displayName": "Destination Connection Properties",
                "description": "Configuration to set the hostname, port and path for the destination server",
                "type": "struct",
                "template": [
                    {
                        "param": "destinationHost",
                        "displayName": "Destination Host Name",
                        "description": "IP address/hostname of the destination server. e.g 192.168.1.1",
                        "type": "string"
                    },
                    {
                        "param": "destinationPort",
                        "displayName": "Destination Port Number",
                        "description": "The port number of the destination server. e.g 8080",
                        "type": "number"
                    },
                    {
                        "param": "destinationPath",
                        "displayName": "Destination Path",
                        "description": "The destination path",
                        "type": "string"
                    },
                    {
                        "param": "destinationScheme",
                        "displayName": "Destination Scheme",
                        "description": "Whether the destination is using HTTP or HTTPS requests.",
                        "type": "option",
                        "values": [
                            "http",
                            "https"
                        ]
                    },
                    {
                        "param": "destinationUsername",
                        "displayName": "Destination Username",
                        "description": "The destination username for receiving data from the HIM.",
                        "type": "string"
                    },
                    {
                        "param": "destinationPassword",
                        "displayName": "Destination Password",
                        "description": "The destination password for receiving data from the HIM.",
                        "type": "password"
                    }
                ]
            }
        ]
    }

4. Deployment

To build and run the mediator after performing the above configurations, run the following

  mvn clean package -DskipTests=true -e source:jar javadoc:jar
  java -jar target/dhis2-mediator-<version>-jar-with-dependencies.jar

About

This mediator handles the integration between CTC3 and ESRS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages