An OpenHIM mediator for handling system integrations between National Health Client Registry (NHCR) and EMRs.
- Java 1.8
- IntelliJ or Visual Studio Code
- Maven 3.6.3
The file contents of mediator.properties
and mediator-registration-info.json
must be changed before deployment
This idea behind this mediator is to deploy the same JAR with a different set of configurations parameters based on the system to connect.
The configuration parameters specific to the mediator and destination system can be found at
src/main/resources/mediator.properties
# Mediator Properties
mediator.name=EMR-Mediator-NHCR
mediator.host=localhost
mediator.port=3026
mediator.timeout=60000
mediator.heartbeats=true
core.host=localhost
core.api.port=8080
[email protected]
core.api.password=openhim-password
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:4ef307a0-a114-11eb-83c5-cd3414c149f3",
"version": "0.1.0",
"name": "EMR Mediator NHCR",
"description": "An OpenHIM mediator to handle data sharing between NHCR and EMR",
"endpoints": [
{
"name": "EMR Mediator NHCR Route",
"host": "localhost",
"port": "3026",
"path": "/emr",
"type": "http"
}
],
"defaultChannelConfig": [
{
"name": "EMR Mediator NHCR",
"urlPattern": "^/emr$",
"type": "http",
"allow": ["emrmediatornhcr"],
"routes": [
{
"name": "EMR Mediator NHCR Route",
"host": "localhost",
"port": "3026",
"path": "/emr",
"type": "http",
"primary": "true"
}
]
}
]
}
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/emr-mediator-nhcr-<version>-jar-with-dependencies.jar