Skip to content

Commit d3cdc03

Browse files
committed
Implement the in Modifier for Token Search Params
Closes: #1970
1 parent 62b41a7 commit d3cdc03

107 files changed

Lines changed: 2161 additions & 1130 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Exterm Terminology Test
2+
3+
Docker compose test setup were a Blaze data server accesses an external terminology server with is also a Blaze but with other feature toggles enabled.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
services:
2+
data-server:
3+
image: "blaze:latest"
4+
environment:
5+
JAVA_TOOL_OPTIONS: "-Xmx2g"
6+
DB_BLOCK_CACHE_SIZE: "2048"
7+
DB_SCALE_FACTOR: "2"
8+
EXTERN_TERMINOLOGY_SERVICE_URL: "http://terminology-server:8080/fhir"
9+
LOG_LEVEL: "debug"
10+
ports:
11+
- "8080:8080"
12+
volumes:
13+
- "blaze-data:/app/data"
14+
healthcheck:
15+
test: [ "CMD", "wget", "--spider", "http://localhost:8080/health" ]
16+
interval: 10s
17+
timeout: 5s
18+
retries: 5
19+
start_period: 30s
20+
21+
terminology-server:
22+
image: "blaze:latest"
23+
environment:
24+
JAVA_TOOL_OPTIONS: "-Xmx5g"
25+
ENABLE_TERMINOLOGY_SERVICE: "true"
26+
ENABLE_TERMINOLOGY_LOINC: "true"
27+
ENABLE_TERMINOLOGY_SNOMED_CT: "true"
28+
SNOMED_CT_RELEASE_PATH: "/app/sct-release"
29+
LOG_LEVEL: "debug"
30+
ports:
31+
- "8081:8081"
32+
- "8082:8080"
33+
volumes:
34+
- "blaze-terminology-data:/app/data"
35+
- "./SnomedCT_InternationalRF2_PRODUCTION_20250701T120000Z:/app/sct-release"
36+
healthcheck:
37+
test: [ "CMD", "wget", "--spider", "http://localhost:8080/health" ]
38+
interval: 10s
39+
timeout: 5s
40+
retries: 5
41+
start_period: 30s
42+
43+
volumes:
44+
blaze-data:
45+
blaze-terminology-data:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Exterm Terminology Test
2+
3+
Docker compose test setup were a Blaze data server accesses an external terminology server with is also a Blaze but with other feature toggles enabled.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
services:
2+
keycloak:
3+
image: "quay.io/keycloak/keycloak:26.4.2@sha256:3617b09bb4b7510a8d8d9b9fc5707399e2d70688dbcc2f8fb013a144829be1b9"
4+
command: "start-dev --import-realm --health-enabled=true"
5+
ports:
6+
- "8090:8080"
7+
volumes:
8+
- "${GITHUB_WORKSPACE}/.github/openid-auth-test/realm:/opt/keycloak/data/import"
9+
healthcheck:
10+
test: [ "CMD-SHELL", "exec 3<>/dev/tcp/127.0.0.1/9000; echo -e 'GET /health/ready HTTP/1.1\r\nHost: localhost:9000\r\nConnection: close\r\n\r\n' >&3; grep -q '\"status\": \"UP\"' <&3" ]
11+
interval: 10s
12+
timeout: 5s
13+
retries: 5
14+
start_period: 30s
15+
16+
data-server:
17+
image: "blaze:latest"
18+
environment:
19+
JAVA_TOOL_OPTIONS: "-Xmx2g"
20+
DB_BLOCK_CACHE_SIZE: "2048"
21+
DB_SCALE_FACTOR: "2"
22+
EXTERN_TERMINOLOGY_SERVICE_URL: "http://terminology-server:8080/fhir"
23+
EXTERN_TERMINOLOGY_SERVICE_OPENID_PROVIDER_URL: "http://keycloak:8080/realms/blaze"
24+
EXTERN_TERMINOLOGY_SERVICE_OPENID_CLIENT_ID: "account"
25+
EXTERN_TERMINOLOGY_SERVICE_OPENID_CLIENT_SECRET: "e11a3a8e-6e24-4f9d-b914-da7619e8b31f"
26+
LOG_LEVEL: "debug"
27+
ports:
28+
- "8080:8080"
29+
volumes:
30+
- "blaze-data:/app/data"
31+
healthcheck:
32+
test: [ "CMD", "wget", "--spider", "http://localhost:8080/health" ]
33+
interval: 10s
34+
timeout: 5s
35+
retries: 5
36+
start_period: 30s
37+
depends_on:
38+
keycloak:
39+
condition: service_healthy
40+
41+
terminology-server:
42+
image: "blaze:latest"
43+
environment:
44+
JAVA_TOOL_OPTIONS: "-Xmx5g"
45+
ENABLE_TERMINOLOGY_SERVICE: "true"
46+
ENABLE_TERMINOLOGY_LOINC: "true"
47+
ENABLE_TERMINOLOGY_SNOMED_CT: "true"
48+
SNOMED_CT_RELEASE_PATH: "/app/sct-release"
49+
OPENID_PROVIDER_URL: "http://keycloak:8080/realms/blaze"
50+
LOG_LEVEL: "debug"
51+
ports:
52+
- "8081:8081"
53+
- "8082:8080"
54+
volumes:
55+
- "blaze-terminology-data:/app/data"
56+
- "./SnomedCT_InternationalRF2_PRODUCTION_20250701T120000Z:/app/sct-release"
57+
healthcheck:
58+
test: [ "CMD", "wget", "--spider", "http://localhost:8080/health" ]
59+
interval: 10s
60+
timeout: 5s
61+
retries: 5
62+
start_period: 30s
63+
depends_on:
64+
keycloak:
65+
condition: service_healthy
66+
67+
volumes:
68+
blaze-data:
69+
blaze-terminology-data:

.github/openid-auth-test/docker-compose.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ services:
66
- "8090:8080"
77
volumes:
88
- "${GITHUB_WORKSPACE}/.github/openid-auth-test/realm:/opt/keycloak/data/import"
9+
healthcheck:
10+
test: [ "CMD-SHELL", "exec 3<>/dev/tcp/127.0.0.1/9000; echo -e 'GET /health/ready HTTP/1.1\r\nHost: localhost:9000\r\nConnection: close\r\n\r\n' >&3; grep -q '\"status\": \"UP\"' <&3" ]
11+
interval: 10s
12+
timeout: 5s
13+
retries: 5
14+
start_period: 30s
915

1016
blaze:
1117
image: "blaze:latest"
@@ -16,14 +22,15 @@ services:
1622
- "8080:8080"
1723
volumes:
1824
- "blaze-data:/app/data"
19-
depends_on:
20-
- keycloak
2125
healthcheck:
2226
test: [ "CMD", "wget", "--spider", "http://localhost:8080/health" ]
2327
interval: 10s
2428
timeout: 5s
2529
retries: 5
2630
start_period: 30s
31+
depends_on:
32+
keycloak:
33+
condition: service_healthy
2734

2835
volumes:
2936
blaze-data:
File renamed without changes.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
script_dir="$(dirname "$(readlink -f "$0")")"
5+
. "$script_dir/util.sh"
6+
7+
access_token=$(curl -sfH 'Accept: application/json' -d 'grant_type=client_credentials' -u account:e11a3a8e-6e24-4f9d-b914-da7619e8b31f http://localhost:8090/realms/blaze/protocol/openid-connect/token | jq -r .access_token)
8+
9+
if [ -z "$access_token" ]; then
10+
echo "Missing access token"
11+
exit 1;
12+
fi
13+
14+
base="${1:-http://localhost:8080/fhir}"
15+
16+
echo "ℹ️ JSON Format"
17+
18+
capability_statement=$(curl -sfH 'Accept: application/fhir+json' --oauth2-bearer "$access_token" "$base/metadata")
19+
20+
test "status" "$(echo "$capability_statement" | jq -r .status)" "active"
21+
test "kind" "$(echo "$capability_statement" | jq -r .kind)" "instance"
22+
test "software name" "$(echo "$capability_statement" | jq -r .software.name)" "Blaze"
23+
test "URL" "$(echo "$capability_statement" | jq -r .implementation.url)" "http://localhost:8080/fhir"
24+
test "FHIR version" "$(echo "$capability_statement" | jq -r .fhirVersion)" "4.0.1"
25+
test "format" "$(echo "$capability_statement" | jq -r '.format | join(",")')" "application/fhir+json,application/fhir+xml"
26+
27+
test "Patient Profile" "$(echo "$capability_statement" | jq -r '.rest[0].resource[] | select(.type == "Patient") .profile')" "http://hl7.org/fhir/StructureDefinition/Patient"
28+
29+
test "Operation Measure \$evaluate-measure Definition" "$(echo "$capability_statement" | jq -r '.rest[0].resource[] | select(.type == "Measure") .operation[] | select(.name == "evaluate-measure") | .definition')" "http://hl7.org/fhir/OperationDefinition/Measure-evaluate-measure"
30+
test "Operation Patient \$everything Definition" "$(echo "$capability_statement" | jq -r '.rest[0].resource[] | select(.type == "Patient") .operation[] | select(.name == "everything") | .definition')" "http://hl7.org/fhir/OperationDefinition/Patient-everything"
31+
test "Operation Patient \$everything Documentation" "$(echo "$capability_statement" | jq -r '.rest[0].resource[] | select(.type == "Patient") .operation[] | select(.name == "everything") | .documentation')" "Returns all resources from the patient compartment of one concrete patient including the patient. Has a fix limit of 10,000 resources if paging isn't used. Paging is supported when the _count parameter is used. No other params are supported."
32+
33+
test "Operation \$totals Documentation" "$(echo "$capability_statement" | jq -r '.rest[0].operation[] | select(.name == "totals") | .documentation')" "Retrieves the total counts of resources available by resource type."
34+
35+
echo "ℹ️ XML Format"
36+
37+
capability_statement=$(curl -sfH 'Accept: application/fhir+xml' --oauth2-bearer "$access_token" "$base/metadata")
38+
39+
test "status" "$(echo "$capability_statement" | xq -x //status/@value)" "active"
40+
test "kind" "$(echo "$capability_statement" | xq -x //kind/@value)" "instance"
41+
test "software name" "$(echo "$capability_statement" | xq -x //software/name/@value)" "Blaze"
42+
test "URL" "$(echo "$capability_statement" | xq -x //implementation/url/@value)" "http://localhost:8080/fhir"
43+
test "FHIR version" "$(echo "$capability_statement" | xq -x //fhirVersion/@value)" "4.0.1"
File renamed without changes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
script_dir="$(dirname "$(readlink -f "$0")")"
5+
. "$script_dir/util.sh"
6+
7+
access_token=$(curl -sfH 'Accept: application/json' -d 'grant_type=client_credentials' -u account:e11a3a8e-6e24-4f9d-b914-da7619e8b31f http://localhost:8090/realms/blaze/protocol/openid-connect/token | jq -r .access_token)
8+
9+
if [ -z "$access_token" ]; then
10+
echo "Missing access token"
11+
exit 1;
12+
fi
13+
14+
version="$1"
15+
base="${2:-http://localhost:8080/fhir}"
16+
terminology_capabilities=$(curl -sH 'Accept: application/fhir+json' --oauth2-bearer "$access_token" "$base/metadata?mode=terminology")
17+
18+
test "SCT version" "$(echo "$terminology_capabilities" | jq -r '.codeSystem[] | select(.uri == "http://snomed.info/sct").version[0].code' )" "$version"
File renamed without changes.

0 commit comments

Comments
 (0)