From 4e95fc6426c2b1293f7894211a5e207826ae2047 Mon Sep 17 00:00:00 2001 From: Joyce Quach Date: Fri, 29 Dec 2023 16:06:08 -0500 Subject: [PATCH 1/4] Remove auto assign since we don't use it anymore --- .github/auto_assign.yml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .github/auto_assign.yml diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml deleted file mode 100644 index 407ed6d..0000000 --- a/.github/auto_assign.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Set to true to add reviewers to pull requests -addReviewers: true - -# Set to true to add assignees to pull requests -addAssignees: false - -# A list of reviewers to be added to pull requests (GitHub user name) -reviewers: - - zacharyrobin - - KeeyanGhoreshi - - smalho01 - - plarocque4 - - kennyEung - -# A number of reviewers added to the pull request, Set to 0 to add all reviewers -numberOfReviewers: 0 From 28e4dd0e67648aec3aa89ba3c31522406d7b8f5a Mon Sep 17 00:00:00 2001 From: Joyce Quach Date: Fri, 29 Dec 2023 16:06:49 -0500 Subject: [PATCH 2/4] Run Prettier --- README.md | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 4379309..43b81c1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # 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). ## Running the server + 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 @@ -11,33 +13,36 @@ 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. To load the data from the json files in fhirResourcesToLoad, run the following script: -`gradle loadData` +`gradle loadData` ->Note: 'gradle loadData' can only be run while the FHIR server is running and `use_oauth` is false in `src/main/resources/fhirServer.properties` +> Note: 'gradle loadData' can only be run while the FHIR server is running and `use_oauth` is false in `src/main/resources/fhirServer.properties` ## Using OAuth security features -The FHIR server is open by default, but this can be changed in the `fhirServer.properties` file. -First, change the `use_oauth` flag to `true` to turn on security. Then set the `client_id`, `client_secret`, and `oauth_token` fields. +The FHIR server is open by default, but this can be changed in the `fhirServer.properties` file. -If using Keycloak and following the [CRD](https://github.com/mcode/CRD) guide, the `client_id` and `oauth_token` fields can be left as default. The `client_secret` can be found with the following steps: +First, change the `use_oauth` flag to `true` to turn on security. Then set the `client_id`, `client_secret`, and `oauth_token` fields. -1) Open the keycloak admin console (http://localhost:8180/auth) and log in -2) Open the ClientFhirServer, then the `clients` tab, and click `app-token`. -3) Click on the `Credentials` tab, use the `regenerate secret` option if needed. -4) Copy the client secret into the properties file under `client_secret` +If using Keycloak and following the [CRD](https://github.com/mcode/CRD) guide, the `client_id` and `oauth_token` fields can be left as default. The `client_secret` can be found with the following steps: -Finally, ensure that the [request generator](https://github.com/mcode/crd-request-generator) has the correct username and password in the `properties.json` file. If following the CRD guide, this will be one of the users created when setting up Keycloak. +1. Open the keycloak admin console (http://localhost:8180/auth) and log in +2. Open the ClientFhirServer, then the `clients` tab, and click `app-token`. +3. Click on the `Credentials` tab, use the `regenerate secret` option if needed. +4. Copy the client secret into the properties file under `client_secret` + +Finally, ensure that the [request generator](https://github.com/mcode/crd-request-generator) has the correct username and password in the `properties.json` file. If following the CRD guide, this will be one of the users created when setting up Keycloak. ## Server endpoints -|Relative URL|Endpoint Description| -|----|----| -|`/test-ehr/`|Base server endpoint| -|`/test-ehr/r4`|EHR FHIR Server endpoint (will not resolve in browser)| + +| Relative URL | Endpoint Description | +| -------------- | ------------------------------------------------------ | +| `/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. - From f8d1e0e80cb8b5065684a28e4652606b391a87ec Mon Sep 17 00:00:00 2001 From: Joyce Quach Date: Fri, 29 Dec 2023 17:05:45 -0500 Subject: [PATCH 3/4] Update README based on Dockerfile versions of Gradle and JDK --- README.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 43b81c1..f80a3c2 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # 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). +This subproject hosts a HAPI FHIR server that is based on the now-deprecated [hapi-fhir-jpaserver-example](https://github.com/jamesagnew/hapi-fhir/tree/master/hapi-fhir-jpaserver-example). The new repo is found [here](https://github.com/hapifhir/hapi-fhir-jpaserver-starter). ## Running the server -1. Make sure `gradle` is installed on your machine. Gradle v8 or higher. +1. Make sure `gradle` is installed on your machine. Gradle v6.9 or higher. 2. Run `gradle bootRun` 3. In a separate terminal tab, run `gradle loadData` to load resources @@ -27,14 +27,14 @@ The FHIR server is open by default, but this can be changed in the `fhirServer.p First, change the `use_oauth` flag to `true` to turn on security. Then set the `client_id`, `client_secret`, and `oauth_token` fields. -If using Keycloak and following the [CRD](https://github.com/mcode/CRD) guide, the `client_id` and `oauth_token` fields can be left as default. The `client_secret` can be found with the following steps: +If using Keycloak and following the [REMS Admin](https://github.com/mcode/rems-admin) guide, the `client_id` and `oauth_token` fields can be left as default. The `client_secret` can be found with the following steps: -1. Open the keycloak admin console (http://localhost:8180/auth) and log in +1. Open the Keycloak admin console (http://localhost:8180/auth) and log in 2. Open the ClientFhirServer, then the `clients` tab, and click `app-token`. 3. Click on the `Credentials` tab, use the `regenerate secret` option if needed. 4. Copy the client secret into the properties file under `client_secret` -Finally, ensure that the [request generator](https://github.com/mcode/crd-request-generator) has the correct username and password in the `properties.json` file. If following the CRD guide, this will be one of the users created when setting up Keycloak. +Finally, ensure that the [request generator](https://github.com/mcode/request-generator) has the correct username and password in the `properties.json` file. If following the REMS Admin guide, this will be one of the users created when setting up Keycloak. ## Server endpoints @@ -46,3 +46,17 @@ Finally, ensure that the [request generator](https://github.com/mcode/crd-reques ## Version Java v11 or higher is required to run this application. + +## Run configurations + +Run configurations to run, clean, and load data for the FHIR server can be used for the IntelliJ IDEA CE IDE. You can set breakpoints on the `Boot Run` configuration. + +These were last used with IntelliJ IDEA 2021.2.2 (Community Edition) and Microsoft Edge DevTools. + +### Steps: + +1. Select "Boot Run" as a Run Configuration from the dropdown menu. +2. Put a breakpoint (red dot) on the desired line, e.g. line 43 of `test-ehr/src/main/java/org/hl7/davinci/ehrserver/interceptor/QuestionnaireResponseSearchParameterInterceptor.java`. +3. Click the debug icon (green bug) up top. +4. Go to http://localhost:3000 (where a locally run request-generator is served at) and try to select a patient. You may have to wait for bootRun to finish starting up if you see a "Network Request Failed Error". request-generator will ask test-ehr for QuestionnaireResponse resources (to get the list of in-progress forms). +5. request-generator will pause as the breakpoint at line 43 gets hit. Hit F12 to open up DevTools on http://localhost:3000. You will see the QuestionnaireResponse (and other FHIR resources) have yet to be received. From c7619869a0e6c2cf3116041b28f94d40d1bd356b Mon Sep 17 00:00:00 2001 From: Joyce Quach Date: Fri, 29 Dec 2023 18:08:33 -0500 Subject: [PATCH 4/4] Update reference of HL7-DaVinci/test-ehr to mcode/test-ehr --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index febc2e7..2566c51 100644 --- a/build.gradle +++ b/build.gradle @@ -193,7 +193,7 @@ task loadRequestBuilder() { void setup() { exec { workingDir 'src/main/webapp/' - commandLine 'git','clone','--single-branch', '--branch','settings-change-hotfix','https://github.com/HL7-DaVinci/crd-request-generator.git','tempFolder' + commandLine 'git','clone','--single-branch', '--branch','settings-change-hotfix','https://github.com/mcode/request-generator.git','tempFolder' } exec { workingDir 'src/main/webapp/tempFolder'