An Openhim mediator for handling exchange of information between EMR systems and the Tanzania National Health Client Registry
# National Health Client Registry Mediator
An OpenHIM mediator for handling system integration with National Health Client Registry.
## 1. Dev Requirements
1. Java 1.8
2. IntelliJ or Visual Studio Code
3. Maven 3.6.3
## 2. Mediator Configuration
This mediator is designed to work with multiple systems that send JSON Payloads while communicating with the NHCR via the HIM and the HIM transforms the
messages into HL7v2 messages before forwarding the requests to the NHCR
### 3 Configuration Parameters
The configuration parameters specific to the mediator and destination system can be found at
`src/main/resources/mediator.properties`
```
mediator.name=NHCR-Mediator
mediator.host=localhost
mediator.port=3014
mediator.timeout=60000
mediator.heartbeats=true
core.scheme=openhim-scheme
core.host=openhim-address
core.api.port=8080
core.api.user=root@openhim.org
core.api.password=openhim-password
destination.host=destination-system-address
destination.api.port=destination-system-address-port
destination.api.path=/destination-system-path
destination.scheme=destination-system-scheme
```
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:83c54769-5622-4cec-9f58-ccfc0ad24382",
"version": "0.1.0",
"name": "NHCR Mediator",
"description": "Description",
"endpoints": [
{
"name": "NHCR Mediator Route",
"host": "localhost",
"port": "3014",
"path": "/nhcr",
"type": "http"
}
],
"defaultChannelConfig": [
{
"name": "NHCR Mediator",
"urlPattern": "^/nhcr",
"type": "http",
"allow": [
"nhcr-mediator"
],
"routes": [
{
"name": "NHCR Mediator Route",
"host": "localhost",
"port": "3014",
"path": "/nhcr",
"type": "http",
"primary": "true"
}
]
}
]
}
```
## 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/nhcr-mediator- -jar- …