-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #290 from ItsMurumba/TB-408
Adds Reprocess package (UI + Mediator)
- Loading branch information
Showing
7 changed files
with
149 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
|
||
--- | ||
description: Pre-defined recipes for common use cases | ||
--- | ||
|
||
# 📜 Recipes | ||
|
||
OpenHIM platform comes bundles with a set of generic packages that can be deployed and configured to support a number of different use cases. To help users of OpenHIM Platform get started with something they can make use of immediately, a number of default OpenHIM Platform reciepes are provided. These help you get started with everything you need setup and configured for a particular use case. | ||
|
||
We current support the following default recipes: | ||
|
||
OpenHIM platform comes bundled with a set of generic packages that can be deployed and configured to support a number of different use cases. To help users of OpenHIM Platform get started with something they can make use of immediately, a number of default OpenHIM Platform recipes are provided. These help you get started with everything you need setup and configured for a particular use case. | ||
|
||
We currently support the following default recipes: | ||
|
||
<table data-view="cards"><thead><tr><th align="center"></th><th></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center"><strong>Central Data Repository with Data Warehouse</strong></td><td>A FHIR-based Shared Health record linked to an MPI for linking and matching patient demographics and a default reporting pipeline to transform and visualise FHIR data.</td><td></td><td><a href="central-data-repository-with-data-warehousing.md">central-data-repository-with-data-warehousing.md</a></td></tr><tr><td align="center"><strong>Central Data Repository</strong></td><td>A FHIR-based Shared Health record linked to an MPI for linking and matching patient demographics. No reporting is include but all FHIR data is pushed to Kafka for external system to use.</td><td></td><td><a href="central-data-repository-no-reporting.md">central-data-repository-no-reporting.md</a></td></tr><tr><td align="center"><strong>Master Patient Index</strong></td><td>A master patient index setup using JeMPI. it also includes OpenHIM as the API gateway providing security, a mapping mediator to allow FHIR-based communication with JeMPI and Keycloak to support user management.</td><td></td><td><a href="master-patient-index.md">master-patient-index.md</a></td></tr></tbody></table> |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: '3.9' | ||
|
||
services: | ||
reprocess-mediator: | ||
ports: | ||
- target: 3000 | ||
published: 3000 | ||
mode: host | ||
|
||
reprocess-mediator-ui: | ||
ports: | ||
- target: 80 | ||
published: 3030 | ||
mode: host |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
version: '3.9' | ||
|
||
services: | ||
reprocess-mediator: | ||
image: jembi/reprocess-mediator:${REPROCESS_CORE_VERSION} | ||
networks: | ||
openhim: | ||
reprocess: | ||
environment: | ||
TRUST_SELF_SIGNED: ${TRUST_SELF_SIGNED} | ||
OPENHIM_MEDIATOR_URL: ${OPENHIM_MEDIATOR_URL} | ||
OPENHIM_USERNAME: ${OPENHIM_USERNAME} | ||
OPENHIM_PASSWORD: ${OPENHIM_PASSWORD} | ||
REGISTER_MEDIATOR: ${REGISTER_MEDIATOR} | ||
|
||
reprocess-mediator-ui: | ||
image: jembi/reprocess-mediator-ui:${REPROCESS_UI_VERSION} | ||
networks: | ||
openhim: | ||
reprocess: | ||
environment: | ||
REPROCESSOR_API_BASE_URL: ${REPROCESSOR_API_BASE_URL} | ||
|
||
networks: | ||
openhim: | ||
name: openhim_public | ||
external: true | ||
reprocess: | ||
name: reprocess_public | ||
external: true | ||
|
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"id": "reprocess-mediator", | ||
"name": "Reprocess Mediator", | ||
"description": "A mediator that allows for configuring and reprocessing of transactions", | ||
"type": "use-case", | ||
"version": "1.4.2", | ||
"dependencies": ["interoperability-layer-openhim"], | ||
"environmentVariables": { | ||
"TRUST_SELF_SIGNED": "true", | ||
"OPENHIM_MEDIATOR_URL": "https://openhim-core:8080", | ||
"OPENHIM_USERNAME": "[email protected]", | ||
"OPENHIM_PASSWORD": "instant101", | ||
"REGISTER_MEDIATOR": "true", | ||
"REPROCESSOR_API_BASE_URL": "http://reprocess-mediator:3000", | ||
"REPROCESS_CORE_VERSION": "latest", | ||
"REPROCESS_UI_VERSION": "latest" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/bin/bash | ||
|
||
declare ACTION="" | ||
declare COMPOSE_FILE_PATH="" | ||
declare UTILS_PATH="" | ||
declare STACK="reprocess-mediator" | ||
declare MODE="" | ||
|
||
function init_vars() { | ||
ACTION=$1 | ||
MODE=$2 | ||
|
||
COMPOSE_FILE_PATH=$( | ||
cd "$(dirname "${BASH_SOURCE[0]}")" || exit | ||
pwd -P | ||
) | ||
|
||
UTILS_PATH="${COMPOSE_FILE_PATH}/../utils" | ||
|
||
readonly ACTION | ||
readonly COMPOSE_FILE_PATH | ||
readonly UTILS_PATH | ||
readonly STACK | ||
readonly MODE | ||
} | ||
|
||
# shellcheck disable=SC1091 | ||
function import_sources() { | ||
source "${UTILS_PATH}/docker-utils.sh" | ||
source "${UTILS_PATH}/log.sh" | ||
} | ||
|
||
function initialize_package() { | ||
local reprocess_dev_compose_filename="" | ||
|
||
if [[ "${MODE}" == "dev" ]]; then | ||
log info "Running package in DEV mode" | ||
reprocess_dev_compose_filename="docker-compose.dev.yml" | ||
else | ||
log info "Running package in PROD mode" | ||
fi | ||
|
||
( | ||
docker::deploy_service $STACK "${COMPOSE_FILE_PATH}" "docker-compose.yml" "$reprocess_dev_compose_filename" | ||
) || { | ||
log error "Failed to deploy package" | ||
exit 1 | ||
} | ||
} | ||
|
||
function destroy_package() { | ||
docker::stack_destroy $STACK | ||
|
||
docker::prune_configs "reprocess-mediator" | ||
} | ||
|
||
main() { | ||
init_vars "$@" | ||
import_sources | ||
|
||
if [[ "${ACTION}" == "init" ]] || [[ "${ACTION}" == "up" ]]; then | ||
log info "Running package" | ||
|
||
initialize_package | ||
elif [[ "${ACTION}" == "down" ]]; then | ||
log info "Scaling down package" | ||
|
||
docker::scale_services $STACK 0 | ||
elif [[ "${ACTION}" == "destroy" ]]; then | ||
log info "Destroying package" | ||
destroy_package | ||
else | ||
log error "Valid options are: init, up, down, or destroy" | ||
fi | ||
} | ||
|
||
main "$@" |