Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add run configurations for use with IntelliJ #58

Merged
merged 3 commits into from
Nov 16, 2023
Merged

Conversation

jtquach1
Copy link

@jtquach1 jtquach1 commented Oct 24, 2023

Describe your changes

Please include a summary of the changes and the related issue/task. Please also include relevant motivation and context. List any dependencies that are required for this change, including links to other pull requests/branches in other repositories if applicable.

Summary

Adding Gradle run configurations for use with IntelliJ IDEA; these are just GUI options for gradle bootRun, gradle bootRun -Pdebug, gradle clean, and gradle loadData. I am using IntelliJ IDEA 2021.2.2 (Community Edition). I used these run configurations in a local setup of test-ehr (outside of Docker).

Screenshots of the Run Configurations as seen in IntelliJ

image image image image image image

Explanation

Clicking the debug icon (the green bug icon to the right of the "Play" icon) with "Boot Run" is the same as doing gradle bootRun -Pdebug in the terminal. However, you can have breakpoints link from IntelliJ to the debugger attached to gradle bootRun with this configuration.

Here's an example of how to set a breakpoint in test-ehr while also running request-generator:

Related to steps 1-3

image

Related to step 4

image
image
image

Related to step 5

image

  1. Select "Boot Run" as a Run Configuration from the dropdown menu.
  2. Put a breakpoint on line 43 of test-ehr/src/main/java/org/hl7/davinci/ehrserver/interceptor/QuestionnaireResponseSearchParameterInterceptor.java
  3. Click the debug icon up top.
  4. Go to 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 localhost:3000- you will see the QuestionnaireResponse (and other FHIR resources) have yet to be received.

Issue ticket number and Jira link

Please include the Jira Ticket Number and Link for this issue/task.

N/A. I made this PR while working on REMS-530, while investigating the QuestionnaireResponse GET endpoint.

Checklist before requesting a review

  • I have performed a self-review of my code
  • Ensure the target / base branch for any feature PR is set to dev not main (the only exception to this is releases from dev and hotfix branches)

Checklist for conducting a review

  • Review the code changes and make sure they all make sense and are necessary.
  • Pull the PR branch locally and test by running through workflow and making sure everything works as it is supposed to.

Workflow

Owner of the Pull Request will be responsible for merge after all requirements are met, including approval from at least one reviewer. Additional changes made after a review will dismiss any approvals and require re-review of the additional updates. Auto merging can be enabled below if additional changes are likely not to be needed. The bot will auto assign reviewers to your Pull Request for you.

@jtquach1 jtquach1 marked this pull request as ready for review October 24, 2023 19:44
@jtquach1 jtquach1 assigned plarocque4 and unassigned plarocque4 Oct 24, 2023
@jtquach1 jtquach1 merged commit 437e30f into dev Nov 16, 2023
3 checks passed
@jtquach1 jtquach1 deleted the add-run-configs branch November 16, 2023 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants