Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
{
	uuid: "<a UUID>", // A unique identifier to identify the mediator, this identifier should always stay the same even if the mediator changes
	version: "", // the version of the mediator, if this is incremented the OpenHIM-core will update the channel configuration - expects a semver string
	name: "", // a human readable name for the mediator
	host: "", // the hostname or IP address where the mediator can be reached
	defaultChannelConfig: { // (optional) a map of default channel to add for this mediator
		"<channel_name1>": { ... }, // a channel object as defined by the OpenHIM-core
		"<channel_name1>": { ... }
	},
	routesendpoints: { // (optionalA minimum of 1 endpoint must be defined) a map of routes that represent the endpoints that the mediator can be contacted on
		"<route<endpoint_name1>": { ... }, // a route object as defined by OpenHIM-core - https://github.com/jembi/openhim-core-js/blob/master/src/model/channels.coffee#L5-L15
		"<route<endpoint_name2>": { ... }
	}
}

The OpenHIM-core SHALL respond with a HTTP status of 201 if the mediator registration was successful.

...

Code Block
languagejs
{
	"type": "openhim-response-type", // a static string that contains the response type, this should always contain this string
	"status": "Success", // (optional) an indicator of the status of the transaction, this can be one of the following: ['Processing', 'Failed', 'Completed', 'Successful', 'Completed with error(s)']
	"response": { ... }, // a response object as defined by OpenHIM-core - https://github.com/jembi/openhim-core-js/blob/master/src/model/transactions.coffee#L13-L18
	"orchestrationorchestrations": { ... }, // (optional) an array of orchestration objectobjects as defined by OpenHIM-core - https://github.com/jembi/openhim-core-js/blob/master/src/model/transactions.coffee#L26-L30
	"properties": { // (optional) a map of properties that the HIM may want to report
		"pro1": "val",
		"pro2": "val"
	}
}

...

Code Block
languagejs
"metrics": {
	"openhim.<channel id>.<route name>.<orchestration name>.<metric_name>": "62", // for metrics that apply to the entire transaction
	"openhim.<channel id>.<route name>.<orchestration name>.<call name>.<orchestration_name>.<metric_name>": "16", // for metrics that apply to a particular orchestration step, the orchestration_name should reference an orchestration in the orchestrations object
	...
}

Reporting metrics via the metrics service - May be supported in the future

Metrics can also be reported directly to a metrics service if the OpenHIM-core server that the mediator is being deployed on supports this. The metrics service will be a statsd instance so metrics must be reported using statsd UDP messages. The mediator MUST submit metrics using the following naming convention:

"openhim.<channel id>.<route name>.<orchestration <mediator_uuid>.<endpoint_name>.<metric_name>"
"openhim.<channel id>.<route <mediator_uuid>.<endpoint_name>.<orchestration name>.<call _name>.<metric_name>"