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 initial enrolment flow #9

Merged
merged 41 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
bc0a2c6
Add initial study consent page
mpgxvii Jul 18, 2024
f261d6c
Add initial eligibility page
mpgxvii Jul 18, 2024
f26e737
Add initial study landing page
mpgxvii Jul 18, 2024
237606c
Update styles of existing pages and update home page navigation
mpgxvii Jul 18, 2024
87b6bca
Remove unnecessary study page components
mpgxvii Jul 18, 2024
ca9a970
Fix saving of consent and eligibility and checking for eligibility be…
mpgxvii Jul 19, 2024
b0f2cd9
Fix index page css
mpgxvii Jul 19, 2024
c773ff0
Get eligibility questionnaire externally
mpgxvii Jul 19, 2024
d5a29ad
Get consent questionnaire externally
mpgxvii Jul 19, 2024
bedd22d
Get study info externally
mpgxvii Jul 19, 2024
270f4d6
Add profile/user information component
mpgxvii Jul 19, 2024
fe84036
Get project id from query param
mpgxvii Jul 19, 2024
2f2e6e4
Fix checking of consent in consent page
mpgxvii Jul 24, 2024
d9baa71
Rename study consent module
mpgxvii Aug 2, 2024
a400d2b
Add initial hydra consent module
mpgxvii Aug 2, 2024
654bd23
Get username from mp_login
mpgxvii Aug 8, 2024
93a493f
Add setting of project id during registration
mpgxvii Aug 8, 2024
f5a56fe
Fix registration page
mpgxvii Aug 8, 2024
9db5140
Add project id to transient payload
mpgxvii Aug 13, 2024
7153a92
Fix formatting issues
mpgxvii Aug 13, 2024
5d85a49
Delete consent page, moved to study-consent
mpgxvii Aug 13, 2024
aca3ecd
Fix type check issues
mpgxvii Aug 13, 2024
5beee61
Fix tests
mpgxvii Aug 13, 2024
cf5bfc6
Merge branch 'feat/initial-components' of https://github.com/RADAR-ba…
mpgxvii Aug 13, 2024
82433a2
Fix formatting
mpgxvii Aug 13, 2024
28778ba
Fix types
mpgxvii Aug 13, 2024
234c7ba
Merge branch 'dev' of https://github.com/RADAR-base/radar-self-enrolm…
mpgxvii Aug 13, 2024
0bb1417
Fix error handling
mpgxvii Aug 13, 2024
d73b027
Merge branch 'feat/initial-components' of https://github.com/RADAR-ba…
mpgxvii Aug 13, 2024
8af964e
Merge branch 'dev' of https://github.com/RADAR-base/radar-self-enrolm…
mpgxvii Aug 14, 2024
bb9545c
Merge branch 'feat/initial-components' of https://github.com/RADAR-ba…
mpgxvii Aug 14, 2024
b9b9428
Update eligibility page
mpgxvii Aug 19, 2024
a3b29e5
Fix login issue when session exists
mpgxvii Aug 19, 2024
f4cde4f
Merge pull request #12 from RADAR-base/feat/consent-module
mpgxvii Sep 3, 2024
a3c7906
Add support for multiple projects: Keep data in projects array
mpgxvii Sep 10, 2024
faab1c0
Fix formatting
mpgxvii Sep 10, 2024
e8f92dc
Fix eligibility typo
mpgxvii Sep 11, 2024
4733c76
Fix consent: allow skippable consent
mpgxvii Sep 12, 2024
787c3c7
Fix types and formatting
mpgxvii Sep 12, 2024
78e6a0e
Update eligibility toast
mpgxvii Sep 12, 2024
5c3b64f
Update registration and study pages
mpgxvii Sep 12, 2024
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
55 changes: 55 additions & 0 deletions data/consent-questionnaire.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
export const consentQuestions = [
{
field_name: "consent",
form_name: "consent",
section_header: "",
field_type: "info",
field_label: "",
select_choices_or_calculations: [
{
label:
"We invite you to take part in this research study. This Participant Information Questionnaire will explain the study to help you decide whether you want to take part. It is entirely up to you whether or not to join the study.",
code: "Patient Information Sheet",
},
{
label:
"If you join the study you will contribute to research that might help find ways to improve health and medical care. However, taking part does not give direct benefits. You will be able to see the data being recorded each day, to give you information on your activity and mobility.",
code: "Data Information",
},
],
field_note: "",
text_validation_type_or_show_slider_number: "",
text_validation_min: "",
text_validation_max: "",
identifier: "",
branching_logic: "",
required_field: "",
custom_alignment: "",
question_number: "",
matrix_group_name: "2MW",
matrix_ranking: "",
field_annotation: "",
evaluated_logic: "",
},
{
field_name: "has_consent",
form_name: "consent",
section_header: "",
field_type: "checkbox",
field_label: "I give my consent to take part in this study.",
select_choices_or_calculations: "",
field_note: "",
text_validation_type_or_show_slider_number: "",
text_validation_min: "",
text_validation_max: "",
identifier: "",
branching_logic: "",
required_field: "yes",
custom_alignment: "",
question_number: "",
matrix_group_name: "",
matrix_ranking: "",
field_annotation: "",
evaluated_logic: "",
},
]
87 changes: 87 additions & 0 deletions data/eligibility-questionnaire.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
export const eligibilityQuestions = [
{
field_name: "age",
form_name: "eligibility",
section_header: "",
field_type: "text",
field_label: "How old are you?",
select_choices_or_calculations: "",
field_note: "",
text_validation_type_or_show_slider_number: "",
text_validation_min: "",
text_validation_max: "",
identifier: "",
branching_logic: "",
required_field: "yes",
custom_alignment: "",
question_number: "",
matrix_group_name: "",
matrix_ranking: "",
field_annotation: "",
evaluated_logic: ""
},
{
field_name: "city",
form_name: "eligibility",
section_header: "",
field_type: "text",
field_label: "What city do you live in?",
select_choices_or_calculations: "",
field_note: "",
text_validation_type_or_show_slider_number: "",
text_validation_min: "",
text_validation_max: "",
identifier: "",
branching_logic: "",
required_field: "yes",
custom_alignment: "",
question_number: "",
matrix_group_name: "",
matrix_ranking: "",
field_annotation: "",
evaluated_logic: ""
},
{
field_name: "has_fitbit",
form_name: "eligibility",
section_header: "",
field_type: "text",
field_label: "Do you have a Fitbit?",
select_choices_or_calculations: "",
field_note: "",
text_validation_type_or_show_slider_number: "",
text_validation_min: "",
text_validation_max: "",
identifier: "",
branching_logic: "",
required_field: "yes",
custom_alignment: "",
question_number: "",
matrix_group_name: "",
matrix_ranking: "",
field_annotation: "",
evaluated_logic: ""
},
{
field_name: "is_eligible",
form_name: "eligibility",
section_header: "",
field_type: "text",
field_label: "Eligible",
select_choices_or_calculations: "",
field_note: "",
text_validation_type_or_show_slider_number: "",
text_validation_min: "",
text_validation_max: "",
identifier: "",
branching_logic: "",
mpgxvii marked this conversation as resolved.
Show resolved Hide resolved
required_field: "",
custom_alignment: "",
question_number: "",
matrix_group_name: "",
matrix_ranking: "",
field_annotation: "",
evaluated_logic: ""
}
]

23 changes: 23 additions & 0 deletions data/profile-questionnaire.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export const profileQuestions = [
{
field_name: "first_name",
form_name: "profile",
field_type: "text",
field_label: "First Name",
required_field: "yes",
},
{
field_name: "last_name",
form_name: "profile",
field_type: "text",
field_label: "Last Name",
required_field: "yes",
},
{
field_name: "address",
form_name: "profile",
field_type: "text",
field_label: "Address",
required_field: "yes",
},
]
29 changes: 29 additions & 0 deletions data/study-questionnaire.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
export const studyInfo = [
{
field_name: "consent",
form_name: "consent",
section_header: "",
field_type: "info",
field_label: "",
select_choices_or_calculations: [
{
label:
"This study aims to understand the effects of eating disorders. Participants will be askeed to fill out questionnaires and undergo non-invaise tests over the course of one year.",
code: "Study Overview",
},
],
field_note: "",
text_validation_type_or_show_slider_number: "",
text_validation_min: "",
text_validation_max: "",
identifier: "",
branching_logic: "",
required_field: "",
custom_alignment: "",
question_number: "",
matrix_group_name: "2MW",
matrix_ranking: "",
field_annotation: "",
evaluated_logic: "",
},
]
Loading
Loading