-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
136 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ services: | |
keycloak: | ||
default: | ||
|
||
|
||
networks: | ||
reverse-proxy: | ||
name: reverse-proxy_public | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ services: | |
elastic: | ||
default: | ||
|
||
|
||
configs: | ||
kibana-kibana.yml: | ||
file: ./kibana.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,9 @@ | |
"FHIR_IG_IMPORTER_CORE_HOST": "0.0.0.0", | ||
"FHIR_IG_IMPORTER_CORE_URL": "http://0.0.0.0:3001/fhir/ig/v1.0", | ||
"FHIR_IG_IMPORTER_UI_VERSION": "latest", | ||
"FHIR_IG_IMPORTER_CORE_VERSION": "latest" | ||
"FHIR_IG_IMPORTER_CORE_VERSION": "latest", | ||
"OPENHIM_CONSOLE_BASE_URL": "http://localhost:9000", | ||
"OPENHIM_API_USERNAME": "[email protected]", | ||
"OPENHIM_IG_PASSWORD": "instant101" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ services: | |
image: node:erbium-alpine | ||
environment: | ||
OPENHIM_API_USERNAME: '[email protected]' | ||
OPENHIM_API_PASSWORD: 'openhim-password' | ||
OPENHIM_DEFAULT_PASSWORD: 'openhim-password' | ||
# Reject unauthorised is only needed if the OpenHIM's SSL is not setup | ||
NODE_TLS_REJECT_UNAUTHORIZED: 0 | ||
command: sh -c "node openhimConfig.js" | ||
|
60 changes: 30 additions & 30 deletions
60
interoperability-layer-openhim/importer/volume/openhimConfig.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,54 @@ | ||
'use strict' | ||
"use strict"; | ||
|
||
const fs = require('fs') | ||
const https = require('https') | ||
const path = require('path') | ||
const fs = require("fs"); | ||
const https = require("https"); | ||
const path = require("path"); | ||
|
||
const OPENHIM_CORE_SERVICE_NAME = 'openhim-core' | ||
const OPENHIM_MEDIATOR_API_PORT = 8080 | ||
const OPENHIM_CORE_SERVICE_NAME = "openhim-core"; | ||
const OPENHIM_MEDIATOR_API_PORT = 8080; | ||
const OPENHIM_API_PASSWORD = | ||
process.env.OPENHIM_API_PASSWORD || 'openhim-password' | ||
process.env.OPENHIM_DEFAULT_PASSWORD || "openhim-password"; | ||
const OPENHIM_API_USERNAME = | ||
process.env.OPENHIM_API_USERNAME || '[email protected]' | ||
process.env.OPENHIM_API_USERNAME || "[email protected]"; | ||
|
||
const authHeader = new Buffer.from( | ||
`${OPENHIM_API_USERNAME}:${OPENHIM_API_PASSWORD}` | ||
).toString('base64') | ||
).toString("base64"); | ||
|
||
const jsonData = JSON.parse( | ||
fs.readFileSync(path.resolve(__dirname, 'openhim-import.json')) | ||
) | ||
fs.readFileSync(path.resolve(__dirname, "openhim-import.json")) | ||
); | ||
|
||
const data = JSON.stringify(jsonData) | ||
const data = JSON.stringify(jsonData); | ||
|
||
const options = { | ||
protocol: 'https:', | ||
protocol: "https:", | ||
hostname: OPENHIM_CORE_SERVICE_NAME, | ||
port: OPENHIM_MEDIATOR_API_PORT, | ||
path: '/metadata', | ||
method: 'POST', | ||
path: "/metadata", | ||
method: "POST", | ||
headers: { | ||
'Content-Type': 'application/json', | ||
'Content-Length': data.length, | ||
Authorization: `Basic ${authHeader}` | ||
} | ||
} | ||
"Content-Type": "application/json", | ||
"Content-Length": data.length, | ||
Authorization: `Basic ${authHeader}`, | ||
}, | ||
}; | ||
|
||
const req = https.request(options, res => { | ||
const req = https.request(options, (res) => { | ||
if (res.statusCode == 401) { | ||
throw new Error(`Incorrect OpenHIM API credentials`) | ||
throw new Error(`Incorrect OpenHIM API credentials`); | ||
} | ||
|
||
if (res.statusCode != 201) { | ||
throw new Error(`Failed to import OpenHIM config: ${res.statusCode}`) | ||
throw new Error(`Failed to import OpenHIM config: ${res.statusCode}`); | ||
} | ||
|
||
console.log('Successfully Imported OpenHIM Config') | ||
}) | ||
console.log("Successfully Imported OpenHIM Config"); | ||
}); | ||
|
||
req.on('error', error => { | ||
console.error('Failed to import OpenHIM config: ', error) | ||
}) | ||
req.on("error", (error) => { | ||
console.error("Failed to import OpenHIM config: ", error); | ||
}); | ||
|
||
req.write(data) | ||
req.end() | ||
req.write(data); | ||
req.end(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.