From 2ee8e0185a09de0109690ff1906c042bc4c900e9 Mon Sep 17 00:00:00 2001 From: Pierre Delpy Date: Mon, 1 Jul 2024 12:46:33 +0200 Subject: [PATCH] feature: upgrade to oBDS2FHIR --- ccp/modules/adt2fhir-rest-compose.yml | 18 ----------------- ccp/modules/mtba-setup.sh | 1 - ccp/modules/obds2fhir-rest-compose.yml | 20 +++++++++++++++++++ ...-rest-setup.sh => obds2fhir-rest-setup.sh} | 10 +++++----- ccp/vars | 2 +- 5 files changed, 26 insertions(+), 25 deletions(-) delete mode 100644 ccp/modules/adt2fhir-rest-compose.yml create mode 100644 ccp/modules/obds2fhir-rest-compose.yml rename ccp/modules/{adt2fhir-rest-setup.sh => obds2fhir-rest-setup.sh} (55%) diff --git a/ccp/modules/adt2fhir-rest-compose.yml b/ccp/modules/adt2fhir-rest-compose.yml deleted file mode 100644 index bba8163..0000000 --- a/ccp/modules/adt2fhir-rest-compose.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: "3.7" - -services: - adt2fhir-rest: - container_name: bridgehead-adt2fhir-rest - image: docker.verbis.dkfz.de/ccp/adt2fhir-rest:main - environment: - IDTYPE: BK_${IDMANAGEMENT_FRIENDLY_ID}_L-ID - MAINZELLISTE_APIKEY: ${IDMANAGER_LOCAL_PATIENTLIST_APIKEY} - SALT: ${LOCAL_SALT} - restart: always - labels: - - "traefik.enable=true" - - "traefik.http.routers.adt2fhir-rest.rule=PathPrefix(`/adt2fhir-rest`)" - - "traefik.http.middlewares.adt2fhir-rest_strip.stripprefix.prefixes=/adt2fhir-rest" - - "traefik.http.services.adt2fhir-rest.loadbalancer.server.port=8080" - - "traefik.http.routers.adt2fhir-rest.tls=true" - - "traefik.http.routers.adt2fhir-rest.middlewares=adt2fhir-rest_strip,auth" \ No newline at end of file diff --git a/ccp/modules/mtba-setup.sh b/ccp/modules/mtba-setup.sh index cdf0f31..d2acbe2 100644 --- a/ccp/modules/mtba-setup.sh +++ b/ccp/modules/mtba-setup.sh @@ -5,7 +5,6 @@ function mtbaSetup() { log INFO "MTBA setup detected -- will start MTBA Service and CBioPortal." if [ ! -n "$IDMANAGER_UPLOAD_APIKEY" ]; then log ERROR "Missing ID-Management Module! Fix this by setting up ID Management:" - exit 1; fi OVERRIDE+=" -f ./$PROJECT/modules/mtba-compose.yml" add_private_oidc_redirect_url "/mtba/*" diff --git a/ccp/modules/obds2fhir-rest-compose.yml b/ccp/modules/obds2fhir-rest-compose.yml new file mode 100644 index 0000000..3f1b0e9 --- /dev/null +++ b/ccp/modules/obds2fhir-rest-compose.yml @@ -0,0 +1,20 @@ +version: "3.7" + +services: + obds2fhir-rest: + container_name: bridgehead-obds2fhir-rest + image: docker.verbis.dkfz.de/ccp/obds2fhir-rest:main + environment: + IDTYPE: BK_${IDMANAGEMENT_FRIENDLY_ID}_L-ID + MAINZELLISTE_APIKEY: ${IDMANAGER_LOCAL_PATIENTLIST_APIKEY} + SALT: ${LOCAL_SALT} + KEEP_INTERNAL_ID: ${KEEP_INTERNAL_ID:-false} + MAINZELLISTE_URL: ${PATIENTLIST_URL:-"http://patientlist:8080/patientlist"} + restart: always + labels: + - "traefik.enable=true" + - "traefik.http.routers.obds2fhir-rest.rule=PathPrefix(`/obds2fhir-rest`) || PathPrefix(`/adt2fhir-rest`)" + - "traefik.http.middlewares.obds2fhir-rest_strip.stripprefix.prefixes=/obds2fhir-rest,/adt2fhir-rest" + - "traefik.http.services.obds2fhir-rest.loadbalancer.server.port=8080" + - "traefik.http.routers.obds2fhir-rest.tls=true" + - "traefik.http.routers.obds2fhir-rest.middlewares=obds2fhir-rest_strip,auth" \ No newline at end of file diff --git a/ccp/modules/adt2fhir-rest-setup.sh b/ccp/modules/obds2fhir-rest-setup.sh similarity index 55% rename from ccp/modules/adt2fhir-rest-setup.sh rename to ccp/modules/obds2fhir-rest-setup.sh index 707d9c5..504bc86 100644 --- a/ccp/modules/adt2fhir-rest-setup.sh +++ b/ccp/modules/obds2fhir-rest-setup.sh @@ -1,13 +1,13 @@ #!/bin/bash -function adt2fhirRestSetup() { - if [ -n "$ENABLE_ADT2FHIR_REST" ]; then - log INFO "ADT2FHIR-REST setup detected -- will start adt2fhir-rest API." +function obds2fhirRestSetup() { + if [ -n "$ENABLE_OBDS2FHIR_REST" ]; then + log INFO "oBDS2FHIR-REST setup detected -- will start obds2fhir-rest module." if [ ! -n "$IDMANAGER_LOCAL_PATIENTLIST_APIKEY" ]; then log ERROR "Missing ID-Management Module! Fix this by setting up ID Management:" - exit 1; + PATIENTLIST_URL=" " fi - OVERRIDE+=" -f ./$PROJECT/modules/adt2fhir-rest-compose.yml" + OVERRIDE+=" -f ./$PROJECT/modules/obds2fhir-rest-compose.yml" LOCAL_SALT="$(echo \"local-random-salt\" | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)" fi } diff --git a/ccp/vars b/ccp/vars index 027a093..080b134 100644 --- a/ccp/vars +++ b/ccp/vars @@ -28,4 +28,4 @@ done idManagementSetup mtbaSetup -adt2fhirRestSetup +obds2fhirRestSetup