-
Notifications
You must be signed in to change notification settings - Fork 5
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
[JN-TBD] Refactoring pre-enroll surveys #1433
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
893cad4
Refactoring pre-enroll surveys
devonbush 3dfce9a
more updates
devonbush bc489c5
WIP
devonbush 6d9d6b2
WIP
devonbush 01398a3
WIP2
devonbush 458bca7
test fixes
devonbush 35474e6
Merge branch 'development' into db-prenroll-type
devonbush 90a6bd8
cleanup
devonbush 9f737f0
more test fix
devonbush 507f687
test fix
devonbush c54696b
adding PRE_ENROLL type
devonbush 5294ad1
Merge branch 'development' into db-prenroll-type
devonbush 4a2719d
Merge branch 'development' into db-prenroll-type
devonbush 4dfb8ea
typo in changelog
devonbush File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
core/src/main/java/bio/terra/pearl/core/dao/study/AttachSurvey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package bio.terra.pearl.core.dao.study; | ||
|
||
|
||
public enum AttachSurvey { | ||
WITH_CONTENT, // include the content json of the survey | ||
WITHOUT_CONTENT // exclude the content from the retrieval | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
core/src/main/java/bio/terra/pearl/core/model/survey/SurveyType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package bio.terra.pearl.core.model.survey; | ||
|
||
public enum SurveyType { | ||
PRE_ENROLL, // for prenrollment surveys | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we'll need to add this as an allowed |
||
CONSENT, // for consent forms | ||
RESEARCH, // for surveys intended to be included in the research dataset of a study | ||
OUTREACH, // for surveys intended for outreach purposes, e.g. to collect marketing/feedback information | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
core/src/main/resources/db/changelog/changesets/2025_01_27_prenroll_type.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
databaseChangeLog: | ||
- changeSet: | ||
id: "preenroll_type" | ||
author: dbush | ||
changes: | ||
- sql: | ||
sql: | ||
insert into study_environment_survey (study_environment_id, created_at, last_updated_at, survey_id, survey_order, active) | ||
select id, now(), now(), pre_enroll_survey_id as survey_id, 1, true from study_environment where pre_enroll_survey_id is not null; | ||
- sql: | ||
sql: | ||
update survey set survey_type = 'PRE_ENROLL', auto_assign = false where stable_id in (select | ||
stable_id from survey join study_environment on pre_enroll_survey_id = survey.id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pre-reg is portal-scoped, pre-enroll is study scoped, right? So this was just renaming it to be correct?
(Just making sure I've got the terminology straight in my head- I mix these up a bunch)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this is renaming to be correct, not changing behavior