Skip to content

Commit

Permalink
Minor Adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianschaffer committed Dec 10, 2024
1 parent 01f2211 commit 6532eb4
Show file tree
Hide file tree
Showing 18 changed files with 127 additions and 123 deletions.
2 changes: 1 addition & 1 deletion .github/integration-test/basic-auth/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Image is uses as base for a dummy container from which curl can request data within the same network as the other containers
# Image is used as base for a dummy container from which curl can request data within the same network as the other containers
FROM alpine
RUN apk add --no-cache curl
CMD ["sh", "-c", "while true; do sleep 3600; done"]
6 changes: 3 additions & 3 deletions .github/integration-test/basic-auth/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ services:
FHIR_SOURCE_SERVER: "http://proxy:8080/fhir"
FHIR_SOURCE_USER: "test"
FHIR_SOURCE_PASSWORD: "bar"
FHIR_DESTINATION_SERVER: "http://proxy:8080/fhir"
FHIR_DESTINATION_USER: "test"
FHIR_DESTINATION_PASSWORD: "bar"
FHIR_REPORT_SERVER: "http://proxy:8080/fhir"
FHIR_REPORT_USER: "test"
FHIR_REPORT_PASSWORD: "bar"
SEND_REPORT_TO_SERVER: ${FDE_SEND_REPORT_TO_SERVER:-false}
AUTHOR_IDENTIFIER_SYSTEM: ${FDE_AUTHOR_IDENTIFIER_SYSTEM:-}
AUTHOR_IDENTIFIER_VALUE: ${FDE_AUTHOR_IDENTIFIER_VALUE:-}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ get_response() {
-d 'grant_type=client_credentials' \
-d 'client_id=account' \
-d 'client_secret=test'")
FHIR_DESTINATION_BEARER_TOKEN=$(echo "$oauth_response" | jq -r '.access_token')
FHIR_REPORT_BEARER_TOKEN=$(echo "$oauth_response" | jq -r '.access_token')

response=$(docker exec "$CURL_TESTER_ID" sh -c "
curl -s 'https://secure-fhir-server:8443/fhir/$URL' \
-H 'Content-Type: application/fhir+json' \
-H 'Authorization: Bearer $FHIR_DESTINATION_BEARER_TOKEN'")
-H 'Authorization: Bearer $FHIR_REPORT_BEARER_TOKEN'")

echo "$response"
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/integration-test/evaluate-and-post-report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ get_response() {
-d 'grant_type=client_credentials' \
-d 'client_id=account' \
-d 'client_secret=test'")
FHIR_DESTINATION_BEARER_TOKEN=$(echo "$oauth_response" | jq -r '.access_token')
FHIR_REPORT_BEARER_TOKEN=$(echo "$oauth_response" | jq -r '.access_token')

response=$(docker exec "$CURL_TESTER_ID" sh -c "
curl -s 'https://secure-fhir-server:8443/fhir/$URL' \
-H 'Content-Type: application/fhir+json' \
-H 'Authorization: Bearer $FHIR_DESTINATION_BEARER_TOKEN'")
-H 'Authorization: Bearer $FHIR_REPORT_BEARER_TOKEN'")

echo "$response"
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/integration-test/evaluate-and-post-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ get_response() {
-d 'grant_type=client_credentials' \
-d 'client_id=account' \
-d 'client_secret=test'")
FHIR_DESTINATION_BEARER_TOKEN=$(echo "$oauth_response" | jq -r '.access_token')
FHIR_REPORT_BEARER_TOKEN=$(echo "$oauth_response" | jq -r '.access_token')

response=$(docker exec "$CURL_TESTER_ID" sh -c "
curl -s 'https://secure-fhir-server:8443/fhir/$URL' \
-H 'Content-Type: application/fhir+json' \
-H 'Authorization: Bearer $FHIR_DESTINATION_BEARER_TOKEN'")
-H 'Authorization: Bearer $FHIR_REPORT_BEARER_TOKEN'")

echo "$response"
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/integration-test/no-auth/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Image is uses as base for a dummy container from which curl can request data within the same network as the other containers
# Image is used as base for a dummy container from which curl can request data within the same network as the other containers
FROM alpine
RUN apk add --no-cache curl
CMD ["sh", "-c", "while true; do sleep 3600; done"]
2 changes: 1 addition & 1 deletion .github/integration-test/no-auth/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
environment:
CONVERT_TO_CSV: ${FDE_CONVERT_TO_CSV:-true}
FHIR_SOURCE_SERVER: "http://fhir-server:8080/fhir"
FHIR_DESTINATION_SERVER: "http://fhir-server:8080/fhir"
FHIR_REPORT_SERVER: "http://fhir-server:8080/fhir"
SEND_REPORT_TO_SERVER: ${FDE_SEND_REPORT_TO_SERVER:-false}
AUTHOR_IDENTIFIER_SYSTEM: ${FDE_AUTHOR_IDENTIFIER_SYSTEM:-}
AUTHOR_IDENTIFIER_VALUE: ${FDE_AUTHOR_IDENTIFIER_VALUE:-}
Expand Down
2 changes: 1 addition & 1 deletion .github/integration-test/oauth/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Image is uses as base for a dummy container from which curl can request data within the same network as the other containers
# Image is used as base for a dummy container from which curl can request data within the same network as the other containers
FROM alpine
RUN apk add --no-cache curl
CMD ["sh", "-c", "while true; do sleep 3600; done"]
8 changes: 4 additions & 4 deletions .github/integration-test/oauth/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ services:
FHIR_SOURCE_OAUTH_ISSUER_URI: "https://secure-keycloak:8443/realms/test"
FHIR_SOURCE_OAUTH_CLIENT_ID: "account"
FHIR_SOURCE_OAUTH_CLIENT_SECRET: "test"
FHIR_DESTINATION_SERVER: "https://secure-fhir-server:8443/fhir"
FHIR_DESTINATION_OAUTH_ISSUER_URI: "https://secure-keycloak:8443/realms/test"
FHIR_DESTINATION_OAUTH_CLIENT_ID: "account"
FHIR_DESTINATION_OAUTH_CLIENT_SECRET: "test"
FHIR_REPORT_SERVER: "https://secure-fhir-server:8443/fhir"
FHIR_REPORT_OAUTH_ISSUER_URI: "https://secure-keycloak:8443/realms/test"
FHIR_REPORT_OAUTH_CLIENT_ID: "account"
FHIR_REPORT_OAUTH_CLIENT_SECRET: "test"
SEND_REPORT_TO_SERVER: ${FDE_SEND_REPORT_TO_SERVER:-false}
AUTHOR_IDENTIFIER_SYSTEM: ${FDE_AUTHOR_IDENTIFIER_SYSTEM:-}
AUTHOR_IDENTIFIER_VALUE: ${FDE_AUTHOR_IDENTIFIER_VALUE:-}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@ jobs:
- name: Run Integration Test to check if it correctly exits when there are insufficient writing permissions
run: .github/integration-test/missing-permissions-test.sh

- name: Run Integration Test for Posting the MeasureReport to the FHIR server
- name: Run Integration Test for Posting the MeasureReport to the Report FHIR server
run: .github/integration-test/evaluate-and-post-report.sh ${{ matrix.test }} Test_PROJECT_Evaluation_1

- name: Run Integration Test for Posting the MeasureReport to the FHIR server with the Same Project Identifier
- name: Run Integration Test for Posting the MeasureReport to the Report FHIR server with the Same Project Identifier
run: .github/integration-test/evaluate-and-post-update.sh ${{ matrix.test }} Test_PROJECT_Evaluation_1

- name: Run Integration Test for Posting the MeasureReport to the FHIR server with a Different Project Identifier
- name: Run Integration Test for Posting the MeasureReport to the Report FHIR server with a Different Project Identifier
run: .github/integration-test/evaluate-and-post-different-doc-ref.sh ${{ matrix.test }} Test_PROJECT_Evaluation_2

- name: Remove Blaze volumes
Expand Down
65 changes: 33 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ For a more detailed Documentation see: * [Documentation](Documentation/Documenta

## Run

When running the Fhir Data Evaluator with Docker, it will require a Measure resource file as input and save the resulting
MeasureReport into a Directory named after the current date combined with the Measure's name (specified in the 'name' field).
When running the Fhir Data Evaluator with Docker, it will require a Measure resource file as input. The resulting
MeasureReport will be saved inside `/app/output/` of the Docker container into a new Directory named after the current
date combined with the Measure's name (specified in the 'name' field of the Measure).
If specified, additional CSV files will be created that represent the MeasureReport.

An example of a Measure can be found [here](Documentation/example-measures/example-measure-1.json).
Expand Down Expand Up @@ -83,7 +84,7 @@ docker run -v <your/measurefile.json>:/app/measure.json -v <your/output/dir>:/ap

### Sending the MeasureReport to a FHIR Server

If `SEND_REPORT_TO_SERVER` is set to true, the MeasureReport is sent to the `FHIR_DESTINATION_SERVER` along with a
If `SEND_REPORT_TO_SERVER` is set to true, the MeasureReport is sent to the `FHIR_REPORT_SERVER` along with a
DocumentReference that is configured with the following environment variables:
* `AUTHOR_IDENTIFIER_SYSTEM` (example: `http://dsf.dev/sid/organization-identifier`)
* `AUTHOR_IDENTIFIER_VALUE` (example: `Test_DIC1`)
Expand All @@ -92,35 +93,35 @@ DocumentReference that is configured with the following environment variables:

## Environment Variables

| Name | Default | Description |
|:-------------------------------------|:--------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------|
| FHIR_SOURCE_SERVER | http://localhost:8080/fhir | The base URL of the FHIR server to use for downloading the resources. |
| FHIR_SOURCE_USER | | The username to use for HTTP Basic Authentication for the source FHIR server. |
| FHIR_SOURCE_PASSWORD | | The password to use for HTTP Basic Authentication for the source FHIR server. |
| FHIR_SOURCE_MAX_CONNECTIONS | 4 | The maximum number of connections to open towards the source FHIR server. |
| FHIR_SOURCE_MAX_QUEUE_SIZE | 500 | The maximum number FHIR server requests at the source FHIR server to queue before returning an error. |
| FHIR_SOURCE_PAGE_COUNT | 1000 | The number of resources per page to request from the source FHIR server. |
| FHIR_SOURCE_BEARER_TOKEN | | Bearer token for authentication for the source FHIR server. |
| FHIR_SOURCE_OAUTH_ISSUER_URI | | The issuer URI of the OpenID Connect provider for the source FHIR server. |
| FHIR_SOURCE_OAUTH_CLIENT_ID | | The client ID to use for authentication with OpenID Connect provider for the source FHIR server. |
| FHIR_SOURCE_OAUTH_CLIENT_SECRET | | The client secret to use for authentication with OpenID Connect provider for the source FHIR server. |
| FHIR_DESTINATION_SERVER | http://localhost:8080/fhir | The base URL of the FHIR server to use for (optionally) uploading the MeasureReport. |
| FHIR_DESTINATION_USER | | The username to use for HTTP Basic Authentication for the destination FHIR server. |
| FHIR_DESTINATION_PASSWORD | | The password to use for HTTP Basic Authentication for the destination FHIR server. |
| FHIR_DESTINATION_MAX_CONNECTIONS | 4 | The maximum number of connections to open towards the destination FHIR server. |
| FHIR_DESTINATION_MAX_QUEUE_SIZE | 500 | The maximum number FHIR server requests at the destination FHIR server to queue before returning an error. |
| FHIR_DESTINATION_BEARER_TOKEN | | Bearer token for authentication for the destination FHIR server. |
| FHIR_DESTINATION_OAUTH_ISSUER_URI | | The issuer URI of the OpenID Connect provider for the destination FHIR server. |
| FHIR_DESTINATION_OAUTH_CLIENT_ID | | The client ID to use for authentication with OpenID Connect provider for the destination FHIR server. |
| FHIR_DESTINATION_OAUTH_CLIENT_SECRET | | The client secret to use for authentication with OpenID Connect provider for the destination FHIR server. |
| MAX_IN_MEMORY_SIZE_MIB | 10 | The maximum in-memory buffer size for each webclient in MiB. |
| TZ | Europe/Berlin | The time zone used to create the output directory and set the date in the DocumentReference. |
| CONVERT_TO_CSV | false | Whether for the MeasureReport should be generated CSV files. |
| SEND_REPORT_TO_SERVER | false | Whether the MeasureReport should be sent to a FHIR server. |
| AUTHOR_IDENTIFIER_SYSTEM | http://dsf.dev/sid/organization-identifier | The system of the author organization used when uploading the report. |
| AUTHOR_IDENTIFIER_VALUE | | The code of the author organization used when uploading the report. |
| PROJECT_IDENTIFIER_SYSTEM | http://medizininformatik-initiative.de/sid/project-identifier | The system of the master identifier used when uploading the report. |
| PROJECT_IDENTIFIER_VALUE | | The value of the master identifier used when uploading the report. |
| Name | Default | Description |
|:--------------------------------|:--------------------------------------------------------------|:------------------------------------------------------------------------------------------------------|
| FHIR_SOURCE_SERVER | http://localhost:8080/fhir | The base URL of the FHIR server to use for downloading the resources. |
| FHIR_SOURCE_USER | | The username to use for HTTP Basic Authentication for the source FHIR server. |
| FHIR_SOURCE_PASSWORD | | The password to use for HTTP Basic Authentication for the source FHIR server. |
| FHIR_SOURCE_MAX_CONNECTIONS | 4 | The maximum number of connections to open towards the source FHIR server. |
| FHIR_SOURCE_MAX_QUEUE_SIZE | 500 | The maximum number FHIR server requests at the source FHIR server to queue before returning an error. |
| FHIR_SOURCE_PAGE_COUNT | 1000 | The number of resources per page to request from the source FHIR server. |
| FHIR_SOURCE_BEARER_TOKEN | | Bearer token for authentication for the source FHIR server. |
| FHIR_SOURCE_OAUTH_ISSUER_URI | | The issuer URI of the OpenID Connect provider for the source FHIR server. |
| FHIR_SOURCE_OAUTH_CLIENT_ID | | The client ID to use for authentication with OpenID Connect provider for the source FHIR server. |
| FHIR_SOURCE_OAUTH_CLIENT_SECRET | | The client secret to use for authentication with OpenID Connect provider for the source FHIR server. |
| FHIR_REPORT_SERVER | http://localhost:8080/fhir | The base URL of the FHIR server to use for (optionally) uploading the MeasureReport. |
| FHIR_REPORT_USER | | The username to use for HTTP Basic Authentication for the Report FHIR server. |
| FHIR_REPORT_PASSWORD | | The password to use for HTTP Basic Authentication for the Report FHIR server. |
| FHIR_REPORT_MAX_CONNECTIONS | 4 | The maximum number of connections to open towards the Report FHIR server. |
| FHIR_REPORT_MAX_QUEUE_SIZE | 500 | The maximum number FHIR server requests at the Report FHIR server to queue before returning an error. |
| FHIR_REPORT_BEARER_TOKEN | | Bearer token for authentication for the Report FHIR server. |
| FHIR_REPORT_OAUTH_ISSUER_URI | | The issuer URI of the OpenID Connect provider for the Report FHIR server. |
| FHIR_REPORT_OAUTH_CLIENT_ID | | The client ID to use for authentication with OpenID Connect provider for the Report FHIR server. |
| FHIR_REPORT_OAUTH_CLIENT_SECRET | | The client secret to use for authentication with OpenID Connect provider for the Report FHIR server. |
| MAX_IN_MEMORY_SIZE_MIB | 10 | The maximum in-memory buffer size for each webclient in MiB. |
| TZ | Europe/Berlin | The time zone used to create the output directory and set the date in the DocumentReference. |
| CONVERT_TO_CSV | false | Whether for the MeasureReport should be generated CSV files. |
| SEND_REPORT_TO_SERVER | false | Whether the MeasureReport should be sent to the FHIR Report server. |
| AUTHOR_IDENTIFIER_SYSTEM | http://dsf.dev/sid/organization-identifier | The system of the author organization used when uploading the report. |
| AUTHOR_IDENTIFIER_VALUE | | The code of the author organization used when uploading the report. |
| PROJECT_IDENTIFIER_SYSTEM | http://medizininformatik-initiative.de/sid/project-identifier | The system of the master identifier used when uploading the report. |
| PROJECT_IDENTIFIER_VALUE | | The value of the master identifier used when uploading the report. |


## Documentation
Expand Down
Loading

0 comments on commit 6532eb4

Please sign in to comment.