Versions Compared

Key

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

...

Code Block
titletransaction.json
{
	"_id": "123",
	"status": "Processing|Failed|Completed",
	"applicationId": "Musha_OpenMRS",
	"request": {
		"path": "/api/test",
		"headers": [{
			{ "header1": "value1" },
			{ "header2": "value2" }
		]},
		"requestParamsquerystring": [
			{ "param1": "value1" },
			{ "param2": "value2" }
		]=value1&param2=value2",
		"body": "<HTTP body>",
		"method": "POST",
		"timestamp": "<ISO 8601>"
	},
	"response": {
		"status": 201,
		"body": "<HTTP body>",
		"headers": [{
			{ "header1": "value1" },
			{ "header2": "value2" }
		]},
		"timestamp": "<ISO 8601>"
	},
	"routes": [
		{
			"name": "<route name>"
			// Same structure as above
			"request": { ... },
			"response": { ... }
		}
	]
	"orchestrations": [
		{
			"name": "<orchestration name>"
			// Same structure as above
			"request": { ... },
			"response": { ... }
		}
	]
	"properties": [{ // optional meta data about a transaction
		{ "prop1": "value1" },
		{ "prop2": "value2" }
	]}
}

Router

The router allows request to be forwarded to one or more external services (these could be mediators or an actual HIE component). It does this by allowing the user to configure a number of channels. Each channel matches a certain path and contains a number of routes on which to forward requests. Request may be forwarded to multiple routes however there can only be one primary route. The primary route is a the route whose response is returned back to the service requester making use of the OpenHIM.

...