Skip to content

Commit

Permalink
Merge pull request #36 from medizininformatik-initiative/v3.0.0
Browse files Browse the repository at this point in the history
V3.0.0
  • Loading branch information
juliangruendner authored Oct 8, 2023
2 parents ad9c016 + 5315aac commit b49919a
Show file tree
Hide file tree
Showing 151 changed files with 4,924 additions and 9,690 deletions.
8 changes: 8 additions & 0 deletions .github/scripts/install-blazectl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash -e

VERSION="0.13.0"

curl -sLO "https://github.com/samply/blazectl/releases/download/v$VERSION/blazectl-$VERSION-linux-amd64.tar.gz"
tar xzf "blazectl-$VERSION-linux-amd64.tar.gz"
rm "blazectl-$VERSION-linux-amd64.tar.gz"
sudo mv ./blazectl /usr/local/bin/blazectl
21 changes: 21 additions & 0 deletions .github/scripts/test-consent-queries.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash -e

SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
. "$SCRIPT_DIR/util.sh"

BASE="http://localhost:8081/fhir"
PERMIT_URI="$BASE/Consent?mii-provision-provision-code-type=2.16.840.1.113883.3.1937.777.24.5.1.1\$permit"
DENY_URI="$BASE/Consent?mii-provision-provision-code-type=2.16.840.1.113883.3.1937.777.24.5.1.1\$deny"

count() {
RESP=$(curl -sH 'Prefer: handling=strict' -H 'Accept: application/fhir+json' "$1")

if [ "$(echo "$RESP" | jq -r .resourceType)" = "OperationOutcome" ]; then
echo "$RESP" | jq -r .issue[].diagnostics
else
echo "$RESP" | jq -r .total
fi
}

test "permit count" "$(count "$PERMIT_URI")" "1"
test "permit count" "$(count "$DENY_URI")" "0"
19 changes: 19 additions & 0 deletions .github/scripts/util.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash -e

test() {
if [ "$2" = "$3" ]; then
echo "OK: the $1 is $3"
else
echo "Fail: the $1 is $2, expected $3"
exit 1
fi
}

test-le() {
if [ "$2" -le "$3" ]; then
echo "OK: the $1 of $2 is <= $3"
else
echo "Fail: the $1 is $2, expected <= $3"
exit 1
fi
}
14 changes: 14 additions & 0 deletions .github/scripts/wait-for-url.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash -e

URL=$1
START_EPOCH="$(date +"%s")"

eclipsed() {
EPOCH="$(date +"%s")"
echo $((EPOCH - START_EPOCH))
}

# wait at maximum 120 seconds
while [[ ($(eclipsed) -lt 120) && ("$(curl -s -o /dev/null -w '%{response_code}' "$URL")" != "200") ]]; do
sleep 2
done
File renamed without changes.
74 changes: 22 additions & 52 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,69 +9,39 @@ on:
pull_request:
branches:
- main

env:
TEST_DATA_REF: v0.2.0
TEST_DATA_PATH: test/data-to-sq
AUTH_USERNAME: "codex-developer"
AUTH_PASSWORD: "codex"
- develop

jobs:

test:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout Deploy Repo
uses: actions/checkout@v2

- name: Checkout Test Data Repo
uses: actions/checkout@v2
with:
repository: num-codex/codex-testdata-to-sq
ref: ${{ env.TEST_DATA_REF }}
path: ${{ env.TEST_DATA_PATH }}
- name: Check out Git repository
uses: actions/checkout@v3

- name: Cache Test Data
id: cache-test-data
uses: actions/cache@v2
- name: Check shell scripts
uses: ludeeus/action-shellcheck@master
with:
path: ${{ env.TEST_DATA_PATH }}/testCases
key: testcases-${{ hashFiles('**/*.json') }}
ignore_paths: .github/scripts

- name: Setup Python
if: steps.cache-test-data.outputs.cache-hit != 'true'
uses: actions/setup-python@v2
test-feasibility-triangle-fhir-server:
runs-on: ubuntu-latest

- name: Generate Test Data
if: steps.cache-test-data.outputs.cache-hit != 'true'
working-directory: ${{ env.TEST_DATA_PATH }}
run: python main.py
steps:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Setup Base Auth
run: bash num-node/setup-base-auth.sh "${{ env.AUTH_USERNAME }}" "${{ env.AUTH_PASSWORD }}"
- name: Install Blazectl
run: .github/scripts/install-blazectl.sh

- name: Build the stack
env:
CODEX_DSF_DIC_FHIR_APP_JVM_ARGS: -Xmx1g
CODEX_DSF_DIC_BPE_APP_JVM_ARGS: -Xmx500m
CODEX_DSF_ZARS_FHIR_APP_JVM_ARGS: -Xmx1g
CODEX_DSF_ZARS_BPE_APP_JVM_ARGS: -Xmx500m
CODEX_FEASIBILITY_BACKEND_API_BASE_URL: http://localhost:8091/api/
run: ./start-zars-and-num-node.sh --disable-result-obfuscation
- name: Start Blaze FHIR Server
run: docker-compose -f feasibility-triangle/fhir-server/docker-compose.yml up -d

- name: Wait for FHIR Server Running
uses: ifaxity/wait-on-action@v1
with:
resource: http://localhost:8081/health
timeout: 60000
- name: Wait for Blaze FHIR Server
run: .github/scripts/wait-for-url.sh http://localhost:8081/health

- name: Initialize Test Data
run: bash num-node/init-testdata.sh
- name: Load Data
run: blazectl --no-progress --server http://localhost:8081/fhir upload .github/test-data

- name: Run tests
env:
TERM: "xterm"
QUERY_ENDPOINT_URL: "http://localhost:8091/api/v1/query-handler/run-query"
AUTH_TOKEN_REQUEST_URL: "https://localhost:8443/auth/realms/codex-develop/protocol/openid-connect/token"
run: test/run_tests.sh
- name: Run Test Queries
run: .github/scripts/test-consent-queries.sh
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ test/testdata
num-node/testdata
!num-node/testdata/test-patient-all.json
start-zars-and-num-node-all.sh
.env
deploy-config.json
*.pem
!ca.pem
.htpasswd
88 changes: 88 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Changelog

All notable changes to this project will be documented in this file.

## Component specific changes

Please refer to the respective repositories for a more in depth changelog of single components:

|Component|Link|
|--|--|
|UI|<https://github.com/medizininformatik-initiative/feasibility-gui>|
|Ontology Generation|<https://github.com/medizininformatik-initiative/fhir-ontology-generator>|
|Backend|<https://github.com/medizininformatik-initiative/feasibility-backend>|
|AKTIN Broker|<https://github.com/aktin/broker>|
|AKTIN Feasibility Plugin|<https://github.com/medizininformatik-initiative/feasibility-aktin-plugin>|
|DSF Feasibility Plugin|<https://github.com/medizininformatik-initiative/feasibility-dsf-process>|
|FLARE|<https://github.com/medizininformatik-initiative/flare>|
|Blaze FHIR server|<https://github.com/medizininformatik-initiative/blaze>|

## [3.0.0] - 2023-08-08

### Overall

- Updated all components and underlying libraries to the new versions
- Updated all components to version compatible with ontology version 2.0
- Adjusted readme to reflect changes in the underlying components

### Features

| Feature | Affected Components |
| -- | -- |
|Added support for referenced criteria|UI, backend, Ontology, Sq2cql, FLARE|
|Added support for composite search parameters|UI, SQ, Ontology, Sq2cql, FLARE|
|Updated to new DSF version v1.0.0 compatible with new DSF verison v1.x | Backend, DSF feasibility plugin|
|Added Dateselection|UI|
|Update ontology to new ontology generation and added ontology to images directly| Ontology, Backend, FLARE|
|Added encrypted result logging| Backend|
|Add support for self-signed certificates| Backend, FLARE, DSF feasibility plugin |


## [2.1.0] - 2023-07-25

### Overall

- Updated AKTIN Client to 1.6.0: Fix websocket timeout and improve error handling - <https://github.com/medizininformatik-initiative/feasibility-aktin-plugin/releases/tag/v1.6.0>
- Updated FLARE to 1.0: Fix Execution Operation - <https://github.com/medizininformatik-initiative/flare/releases/tag/v1.0.0>
- Updated Blaze to 0.22: implements $everything, adds basic frontend, Support for Custom Search Parameters <https://github.com/samply/blaze/releases/tag/v0.22.0>
- Added Troubleshooting specific for triangle
- Update testdata repo from MII


## [2.0.0] - 2023-03-29

### Overall

- Updated all components and underlying libraries to the new versions
- Updated UI to angular 15
- Updated keycloak to 21.0
- Updated nginx to 1.23
- Refactored deploy repository - removed DSF from this deployment and added reference to DSF deployment in Readme
- Removed hapi fhir-server from deployment

### Features

| Feature | Affected Components |
| -- | -- |
|Added calculated criterion age|Ontology, Sq2cql, FLARE|
|Improved at site obfuscation|DSF Feasibility Plugin, AKTIN Client|
|Added SQ query import and export|UI|
|Improved FHIR query execution and result caching |FLARE|
|Update Consent to new search params and add central MII consent query|UI, Ontology|
|Update ontology to newest KDS version| Ontology|
|Update AKTIN client to new version, move query handling to Java plugin and add query validation|AKTIN client|
|SQ query validation|Backend, AKTIN client|
|Add CQL execution to direct broker| Backend|

### Security and Privacy

| Feature | Affected Components |
| - | - |
|Added extra security measures, which restrict number queries a user can send and results a user can view|UI, Backend|
|Improved at site obfuscation|DSF Feasibility Plugin, Aktin Client|
|Hard rate limit at sites for AKTIN and DSF feasibility plugins|DSF feasibility plugin, AKTIN Client|
|Query results are no longer persisted and only kept in memory for a configurable amount of time|Backend|
|Delete query results from central DSF and AKTIN broker on collection|Backend|
|User blacklisting if too many queries are sent in a given time|Backend|

## [1.6.0] - 2022-09-08
Loading

0 comments on commit b49919a

Please sign in to comment.