From a10538e297bd54ba5e887e651f1bbe0ee313abb8 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Mon, 13 Dec 2021 22:21:09 -0800 Subject: [PATCH] Patch: SHR version update and small fixes (#21) * SHR version update and small fixes * SHR version bump * Test fixes * MLLP fix --- .github/workflows/main.yml | 3 +++ README.md | 2 +- configs/opencr/config_port.json | 2 +- docker-compose.ci.yml | 8 ++++---- docker-compose.local.yml | 31 ++++++++++++++++++------------- docker-compose.yml | 3 +-- test/mllp/tests.sh | 4 ++-- 7 files changed, 30 insertions(+), 23 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8fcf4e6..7e44ec7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -73,6 +73,9 @@ jobs: env: POSTMAN_COLLECTION: https://www.getpostman.com/collections/2ee8ebff39c078bac256 run: docker-compose --profile test -f docker-compose.ci.yml up --exit-code-from newman newman + + - name: Run MLLP Tests + run: docker-compose --profile test -f docker-compose.ci.yml up --exit-code-from mllp_tests mllp_tests - name: Stop containers if: always() diff --git a/README.md b/README.md index 1b06d3b..3eb7aca 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ git clone https://github.com/B-TECHBW/hie-botswana.git ### 4. Start up core containers: ```sh cd hie-botswana -docker-compose -f docker-compose.local.yml up -d openhim-core openhim-console mongo-db opencr-fhir shr-fhir opencr-es kafka zookeeper +docker-compose -f docker-compose.local.yml up -d openhim-core openhim-console mongo-db opencr-fhir shr-fhir opencr-es kafka zookeeper nginx ``` ### 5. OpenHIM Password Setup: Open the OpenHIM console in the browser and use default login and password: diff --git a/configs/opencr/config_port.json b/configs/opencr/config_port.json index 6c4dc0e..69d2841 100644 --- a/configs/opencr/config_port.json +++ b/configs/opencr/config_port.json @@ -66,7 +66,7 @@ } }, "sync": { - "lastFHIR2ESSync": "2021-08-10T19:50:14" + "lastFHIR2ESSync": "2021-12-03T16:33:53" }, "__comments": { "matching.tool": "this tells if the app should use mediator algorithms or elasticsearch algorithms for matching, two options mediator and elasticsearch" diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index 766ff7b..b7527fc 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -77,7 +77,7 @@ services: profiles: ["mediators"] container_name: shr hostname: shr - image: ghcr.io/i-tech-uw/shared-health-record:v0.4.0 + image: ghcr.io/i-tech-uw/shared-health-record:v0.4.3 restart: unless-stopped environment: - NODE_ENV=docker @@ -194,17 +194,17 @@ services: mllp_tests: profiles: ["test"] container_name: mllp_tests - build: ./test + image: ghcr.io/b-techbw/mllp-tester:main networks: - hie volumes: - - ./test:/test + - ./test/mllp:/test # OpenHIM Config openhim-config: profiles: ["support"] container_name: openhim-config - image: ghcr.io/i-tech-uw/openhim-config:latest + image: ghcr.io/i-tech-uw/openhim-config:v0.0.0 volumes: - ./configs/openhim/test-openhim-config.json:/app/test-openhim-config.json networks: diff --git a/docker-compose.local.yml b/docker-compose.local.yml index c0d4f2e..18af6be 100644 --- a/docker-compose.local.yml +++ b/docker-compose.local.yml @@ -1,13 +1,13 @@ -version: '2.4' +version: "2.4" ## Port Assignments: ## See .env file -## Container debugging: -# 1. append the following lines to desired container +## Container debugging: +# 1. append the following lines to desired container # 2. boot up the container using `docker-compose up -d` # 3 run `docker exec -it bash` to start interactive shell -# +# # tty: true # stdin_open: true # entrypoint: bash @@ -98,7 +98,7 @@ services: shr: container_name: shr hostname: shr - image: ghcr.io/i-tech-uw/shared-health-record:v0.4.0 + image: ghcr.io/i-tech-uw/shared-health-record:v0.4.3 restart: unless-stopped environment: - NODE_ENV=docker @@ -180,14 +180,14 @@ services: # Kafka zookeeper: - image: 'bitnami/zookeeper:latest' + image: "bitnami/zookeeper:latest" hostname: zookeeper environment: - ALLOW_ANONYMOUS_LOGIN=yes networks: - - hie + - hie kafka: - image: 'bitnami/kafka:latest' + image: "bitnami/kafka:latest" hostname: kafka container_name: kafka environment: @@ -202,7 +202,7 @@ services: depends_on: - zookeeper networks: - - hie + - hie # Newman Tests newman: @@ -220,9 +220,14 @@ services: - hie volumes: - ./test/mllp:/test - tty: true - stdin_open: true - entrypoint: sh + + openhim-config: + container_name: openhim-config + image: ghcr.io/i-tech-uw/openhim-config:v0.0.0 + volumes: + - ./configs/openhim/test-openhim-config.json:/app/test-openhim-config.json + networks: + - hie volumes: es: @@ -238,6 +243,6 @@ volumes: nginx-data: driver: local kafka-data: - driver: local + driver: local networks: hie: diff --git a/docker-compose.yml b/docker-compose.yml index ff6c93c..12ce44f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,6 @@ services: ### # nginx reverse proxy # TODO: set up to use non-root user. See https://www.rockyourcode.com/run-docker-nginx-as-non-root-user/ - # TODO: Run letsencrypt as docker container: https://hub.docker.com/r/certbot/certbot/ ### nginx: profiles: ["core"] @@ -112,7 +111,7 @@ services: profiles: ["mediator"] container_name: shr hostname: shr - image: ghcr.io/i-tech-uw/shared-health-record:v0.4.0 + image: ghcr.io/i-tech-uw/shared-health-record:v0.4.3 restart: unless-stopped environment: - NODE_ENV=docker diff --git a/test/mllp/tests.sh b/test/mllp/tests.sh index dc25760..a412a2a 100755 --- a/test/mllp/tests.sh +++ b/test/mllp/tests.sh @@ -1,6 +1,6 @@ #!/bin/bash -hostname="localhost" -port=2575 +hostname="shr" +port=3001 for hl7File in messages/* do