Skip to content
Merged

Dev #41

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/docker-cd-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:

- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v1
Expand All @@ -20,8 +23,9 @@ jobs:
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and push Server Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64,windows/amd64
push: true
tags: codexrems/test-ehr:REMSvExperimental
6 changes: 5 additions & 1 deletion .github/workflows/docker-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:

- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v1
Expand All @@ -20,8 +23,9 @@ jobs:
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and push Server Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64,windows/amd64
push: true
tags: codexrems/test-ehr:REMSvCurrent
6 changes: 5 additions & 1 deletion .github/workflows/keycloak-docker-cd-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:

- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v1
Expand All @@ -20,9 +23,10 @@ jobs:
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and push Keycloak Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64,windows/amd64
file: Dockerfile.keycloak
push: true
tags: codexrems/keycloak:REMSvExperimental
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/keycloak-docker-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,20 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and push Keycloak Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64,windows/amd64
file: Dockerfile.keycloak
push: true
tags: codexrems/keycloak:REMSvCurrent
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/keycloak-m1-docker-cd-dev.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/keycloak-m1-docker-cd.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/keycloak-m1-docker-ci.yml

This file was deleted.

3 changes: 0 additions & 3 deletions Dockerfile.keycloak-m1

This file was deleted.

14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# EHR FHIR Server
This subproject hosts a HAPI FHIR server that is based on the [hapi-fhir-jpaserver-example](https://github.com/jamesagnew/hapi-fhir/tree/master/hapi-fhir-jpaserver-example).

## Init the test-ehr
1. delete `target` and `build` folders from test-ehr if they exist
2. from Terminal (1) while in test-ehr folder: `gradle bootRun`
3. from Terminal (2) while in test-ehr folder: `gradle loadData`

## Running the server
`gradle bootRun`
1. Make sure `gradle` is installed on your machine. Gradle v8 or higher.
2. Run `gradle bootRun`
3. In a separate terminal tab, run `gradle loadData` to load resources

This will start the server running on http://localhost:8080/test-ehr.

**If you've loaded resources before, and want a clean slate, delete the `target` and `build` folders from test-ehr if they exist.**

## Adding resources to the database
The FHIR server will persist FHIR resources between restarts. You can delete the folder `target` to clear all resources.

Expand Down Expand Up @@ -38,4 +37,7 @@ Finally, ensure that the [request generator](https://github.com/mcode/crd-reques
|----|----|
|`/test-ehr/`|Base server endpoint|
|`/test-ehr/r4`|EHR FHIR Server endpoint (will not resolve in browser)|

## Version
Java v11 or higher is required to run this application.

6 changes: 4 additions & 2 deletions src/main/java/org/hl7/davinci/ehrserver/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ public abstract class Config {

static {
try {
if (System.getenv("DOCKER_PROFILE") != null && System.getenv("DOCKER_PROFILE").equals("true")) {
if (System.getenv("DOCKER_PROFILE") != null && System.getenv("DOCKER_PROFILE").equals("docker-windows")) {
load(Config.class.getResourceAsStream("/fhirServer.docker-windows.properties"));
} else if (System.getenv("DOCKER_PROFILE") != null && System.getenv("DOCKER_PROFILE").equals("docker-linux")) {
load(Config.class.getResourceAsStream("/fhirServer.docker.properties"));
} else {
}else {
load(Config.class.getResourceAsStream("/fhirServer.properties"));
}
} catch (IOException e) {
Expand Down
11 changes: 11 additions & 0 deletions src/main/resources/fhirServer.docker-windows.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
client_id = app-token
client_secret= #replaceMe#
realm=ClientFhirServer
use_oauth = false
oauth_token = http://docker.for.win.localhost:8180/auth/realms/ClientFhirServer/protocol/openid-connect/token
oauth_authorize = http://localhost:8180/auth/realms/ClientFhirServer/protocol/openid-connect/auth
proxy_authorize = http://localhost:8080/test-ehr/auth
proxy_token = http://localhost:8080/test-ehr/token
redirect_post_launch = http://localhost:8080/test-ehr/_services/smart/Launch
redirect_post_token = http://localhost:8080/test-ehr/token
auth_redirect_host = localhost