+ get() = sequenceOf(
+ base,
+ base.copy(warning = "This value is required"),
+ base.copy(value = "Some value"),
+ base.copy(style = TextFormFieldItem.Style.TEXT_AREA),
+ base.copy(
+ value = "Some value",
+ style = TextFormFieldItem.Style.TEXT_AREA,
+ warning = "Please enter a valid value"
+ ),
+ )
+}
+
+@ThemePreviews
+@Composable
+private fun Previews(@PreviewParameter(TextFormFieldPreviewParamProvider::class) item: TextFormFieldItem) {
+ SurveyItemPreview {
+ item.Content(Modifier)
+ }
+}
diff --git a/heartbeat-app/src/main/kotlin/edu/stanford/bdh/heartbeat/app/survey/ui/fields/UnsupportedFormFieldItem.kt b/heartbeat-app/src/main/kotlin/edu/stanford/bdh/heartbeat/app/survey/ui/fields/UnsupportedFormFieldItem.kt
new file mode 100644
index 000000000..7c513ed84
--- /dev/null
+++ b/heartbeat-app/src/main/kotlin/edu/stanford/bdh/heartbeat/app/survey/ui/fields/UnsupportedFormFieldItem.kt
@@ -0,0 +1,30 @@
+package edu.stanford.bdh.heartbeat.app.survey.ui.fields
+
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.text.style.TextAlign
+import edu.stanford.bdh.heartbeat.app.survey.ui.QuestionFieldLabel
+import edu.stanford.bdh.heartbeat.app.survey.ui.QuestionNumberInfo
+import edu.stanford.bdh.heartbeat.app.survey.ui.SurveyCard
+
+data class UnsupportedFormFieldItem(
+ override val fieldId: String,
+ val type: String,
+ val info: QuestionNumberInfo,
+ val fieldLabel: QuestionFieldLabel?,
+) : FormFieldItem {
+ @Composable
+ override fun Content(modifier: Modifier) {
+ SurveyCard(modifier = modifier) {
+ info.Content(Modifier)
+ fieldLabel?.Content(Modifier)
+ Text(
+ modifier = modifier.fillMaxWidth(),
+ text = "Unsupported Question Type ($type)",
+ textAlign = TextAlign.Start
+ )
+ }
+ }
+}
diff --git a/heartbeat-app/src/main/res/drawable/ic_launcher_foreground.xml b/heartbeat-app/src/main/res/drawable/ic_launcher_foreground.xml
deleted file mode 100644
index 2b068d114..000000000
--- a/heartbeat-app/src/main/res/drawable/ic_launcher_foreground.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/heartbeat-app/src/main/res/mipmap-hdpi/ic_launcher.webp b/heartbeat-app/src/main/res/mipmap-hdpi/ic_launcher.webp
index e80e5aa58..9c3a63f7a 100644
Binary files a/heartbeat-app/src/main/res/mipmap-hdpi/ic_launcher.webp and b/heartbeat-app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/heartbeat-app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/heartbeat-app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
index 1b993878b..00a2c153d 100644
Binary files a/heartbeat-app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp and b/heartbeat-app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ
diff --git a/heartbeat-app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/heartbeat-app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
index 4c67a512a..3441ff527 100644
Binary files a/heartbeat-app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and b/heartbeat-app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/heartbeat-app/src/main/res/mipmap-mdpi/ic_launcher.webp b/heartbeat-app/src/main/res/mipmap-mdpi/ic_launcher.webp
index abc0ef564..b39a8ed3a 100644
Binary files a/heartbeat-app/src/main/res/mipmap-mdpi/ic_launcher.webp and b/heartbeat-app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/heartbeat-app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/heartbeat-app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
index cf022d2c8..bd0cd7021 100644
Binary files a/heartbeat-app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp and b/heartbeat-app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ
diff --git a/heartbeat-app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/heartbeat-app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
index 284f2d1c9..ac794329c 100644
Binary files a/heartbeat-app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and b/heartbeat-app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/heartbeat-app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/heartbeat-app/src/main/res/mipmap-xhdpi/ic_launcher.webp
index 788523738..5a4b3ca43 100644
Binary files a/heartbeat-app/src/main/res/mipmap-xhdpi/ic_launcher.webp and b/heartbeat-app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/heartbeat-app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/heartbeat-app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
index 7b03281af..c6f1f8626 100644
Binary files a/heartbeat-app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp and b/heartbeat-app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ
diff --git a/heartbeat-app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/heartbeat-app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
index ab3920437..411c34d97 100644
Binary files a/heartbeat-app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and b/heartbeat-app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/heartbeat-app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/heartbeat-app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
index 8292ceca6..b380b68fb 100644
Binary files a/heartbeat-app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and b/heartbeat-app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/heartbeat-app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/heartbeat-app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
index 666ee6b6d..b0f1eb1e7 100644
Binary files a/heartbeat-app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp and b/heartbeat-app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ
diff --git a/heartbeat-app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/heartbeat-app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
index 056a46fc8..0b0d969ae 100644
Binary files a/heartbeat-app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and b/heartbeat-app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/heartbeat-app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/heartbeat-app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
index 6a38715b9..db65f726a 100644
Binary files a/heartbeat-app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and b/heartbeat-app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/heartbeat-app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/heartbeat-app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
index 03637e160..babb70b5a 100644
Binary files a/heartbeat-app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp and b/heartbeat-app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ
diff --git a/heartbeat-app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/heartbeat-app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
index c4720b439..555cc60c0 100644
Binary files a/heartbeat-app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and b/heartbeat-app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/heartbeat-app/src/main/res/raw/fake_data.json b/heartbeat-app/src/main/res/raw/fake_data.json
new file mode 100644
index 000000000..0cb19f247
--- /dev/null
+++ b/heartbeat-app/src/main/res/raw/fake_data.json
@@ -0,0 +1,468 @@
+{
+ "onboarding": {
+ "displayStatus": {
+ "compatLevel": "1.0",
+ "questionId": "q123",
+ "questionType": "form",
+ "surveyToken": "token_ABC123",
+ "stepNumber": "1",
+ "progress": 0,
+ "surveyProviderId": "provider_XYZ",
+ "surveySectionId": "section_001",
+ "surveySystemName": "onboarding_survey",
+ "sessionToken": "session_98765",
+ "sessionStatus": "question",
+ "resumeToken": "resume_456",
+ "resumeTimeoutMillis": "30000",
+ "styleSheetName": "default_theme",
+ "pageTitle": "Welcome to Onboarding",
+ "locale": "en-US",
+ "showBack": false
+ },
+ "question": {
+ "title1": "\n
Welcome to Stanford Heartbeat Study!
",
+ "terminal": false,
+ "fields": [
+ {
+ "fieldId": "instructions",
+ "type": "heading",
+ "label": "Please click the 'Continue' button to start the screening survey.
"
+ }
+ ]
+ }
+ },
+ "assessmentSteps": [
+ {
+ "displayStatus": {
+ "compatLevel": "1.0",
+ "questionId": "q123",
+ "questionType": "form",
+ "surveyToken": "token_ABC123",
+ "stepNumber": "2",
+ "progress": 14,
+ "surveyProviderId": "provider_XYZ",
+ "surveySectionId": "section_001",
+ "surveySystemName": "onboarding_survey",
+ "sessionToken": "session_98765",
+ "sessionStatus": "question",
+ "resumeToken": "resume_456",
+ "resumeTimeoutMillis": "30000",
+ "styleSheetName": "default_theme",
+ "pageTitle": "Welcome to Onboarding",
+ "locale": "en-US",
+ "showBack": false
+ },
+ "question": {
+ "title1": "Based on your answers we would like to consider you for this study. Please provide your contact information:",
+ "fields": [
+ {
+ "fieldId": "10:0:first_name",
+ "type": "text",
+ "label": "First Name",
+ "required": true
+ },
+ {
+ "fieldId": "10:1:middle_name",
+ "type": "text",
+ "label": "Middle Name"
+ },
+ {
+ "fieldId": "10:2:last_name",
+ "type": "text",
+ "label": "Last Name",
+ "required": true
+ },
+ {
+ "fieldId": "10:3:email",
+ "type": "text",
+ "label": "Email Address",
+ "required": true
+ },
+ {
+ "fieldId": "10:4:home_phone",
+ "type": "text",
+ "label": "Home Phone (with area code)"
+ },
+ {
+ "fieldId": "10:5:mobile_phone",
+ "type": "text",
+ "label": "Mobile Phone (with area code)",
+ "required": true
+ },
+ {
+ "fieldId": "10:6:sms_ok",
+ "type": "radios",
+ "required": true,
+ "values": [
+ {
+ "id": "1",
+ "label": "Yes, I agree to receive research-related contact."
+ },
+ {
+ "id": "0",
+ "label": "No, I do not want to receive research-related contact."
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "displayStatus": {
+ "compatLevel": "1.0",
+ "questionId": "q123",
+ "questionType": "form",
+ "surveyToken": "token_ABC123",
+ "stepNumber": "3",
+ "progress": 29,
+ "surveyProviderId": "provider_XYZ",
+ "surveySectionId": "section_001",
+ "surveySystemName": "onboarding_survey",
+ "sessionToken": "session_98765",
+ "sessionStatus": "question",
+ "resumeToken": "resume_456",
+ "resumeTimeoutMillis": "30000",
+ "styleSheetName": "default_theme",
+ "pageTitle": "Welcome to Onboarding",
+ "locale": "en-US",
+ "showBack": true
+ },
+ "question": {
+ "title1": "Please enter your preferred mailing address.",
+ "fields": [
+ {
+ "fieldId": "30:0:address1",
+ "type": "text",
+ "label": "Address Line 1",
+ "required": true
+ },
+ {
+ "fieldId": "30:1:address2",
+ "type": "text",
+ "label": "Address Line 2"
+ },
+ {
+ "fieldId": "30:2:city",
+ "type": "text",
+ "label": "City",
+ "required": true
+ },
+ {
+ "fieldId": "30:3:state",
+ "type": "dropdown",
+ "label": "State",
+ "required": true,
+ "values": [
+ {
+ "id": "1",
+ "label": "Alabama"
+ },
+ {
+ "id": "2",
+ "label": "Alaska"
+ },
+ {
+ "id": "3",
+ "label": "Arizona"
+ },
+ {
+ "id": "4",
+ "label": "Arkansas"
+ },
+ {
+ "id": "5",
+ "label": "California"
+ },
+ {
+ "id": "6",
+ "label": "Colorado"
+ }
+ ]
+ },
+ {
+ "fieldId": "30:4:zip",
+ "type": "text",
+ "label": "Zip Code",
+ "required": true
+ }
+ ]
+ }
+ },
+ {
+ "displayStatus": {
+ "compatLevel": "1.0",
+ "questionId": "q123",
+ "questionType": "form",
+ "surveyToken": "token_ABC123",
+ "stepNumber": "4",
+ "progress": 43,
+ "surveyProviderId": "provider_XYZ",
+ "surveySectionId": "section_001",
+ "surveySystemName": "onboarding_survey",
+ "sessionToken": "session_98765",
+ "sessionStatus": "question",
+ "resumeToken": "resume_456",
+ "resumeTimeoutMillis": "30000",
+ "styleSheetName": "default_theme",
+ "pageTitle": "Welcome to Onboarding",
+ "locale": "en-US",
+ "showBack": true
+ },
+ "question": {
+ "title1": "Please tell us your sex at birth
\n\nSex refers to a set of biological attributes in humans and animals. It is associated with different biological\nand physiological characteristics of males and females, such as reproductive organs, chromosomes, hormones, etc.\nWe need this information to make sure that we are being inclusive of people of different sexes.\n
",
+ "fields": [
+ {
+ "fieldId": "34:0:birth_sex",
+ "type": "radios",
+ "label": "",
+ "required": true,
+ "values": [
+ {
+ "id": "1",
+ "label": "Female"
+ },
+ {
+ "id": "2",
+ "label": "Male"
+ },
+ {
+ "id": "0",
+ "label": "Prefer not to say"
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "displayStatus": {
+ "compatLevel": "1.0",
+ "questionId": "q123",
+ "questionType": "form",
+ "surveyToken": "token_ABC123",
+ "stepNumber": "5",
+ "progress": 57,
+ "surveyProviderId": "provider_XYZ",
+ "surveySectionId": "section_001",
+ "surveySystemName": "onboarding_survey",
+ "sessionToken": "session_98765",
+ "sessionStatus": "question",
+ "resumeToken": "resume_456",
+ "resumeTimeoutMillis": "30000",
+ "styleSheetName": "default_theme",
+ "pageTitle": "Welcome to Onboarding",
+ "locale": "en-US",
+ "showBack": true
+ },
+ "question": {
+ "title1": "Do you have any of the below health conditions? Please select all that apply.",
+ "fields": [
+ {
+ "fieldId": "45:0:health1",
+ "type": "checkboxes",
+ "label": "",
+ "required": true,
+ "values": [
+ {
+ "id": "1",
+ "label": "High blood pressure"
+ },
+ {
+ "id": "2",
+ "label": "Diabetes"
+ },
+ {
+ "id": "3",
+ "label": "Atherosclerosis, a condition in which fatty deposits build up in the walls of the arteries"
+ },
+ {
+ "id": "4",
+ "label": "Heart problems for which you were admitted to a hospital"
+ },
+ {
+ "id": "0",
+ "label": "None of the above"
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "displayStatus": {
+ "compatLevel": "1.0",
+ "questionId": "q123",
+ "questionType": "form",
+ "surveyToken": "token_ABC123",
+ "stepNumber": "6",
+ "progress": 71,
+ "surveyProviderId": "provider_XYZ",
+ "surveySectionId": "section_001",
+ "surveySystemName": "onboarding_survey",
+ "sessionToken": "session_98765",
+ "sessionStatus": "question",
+ "resumeToken": "resume_456",
+ "resumeTimeoutMillis": "30000",
+ "styleSheetName": "default_theme",
+ "pageTitle": "Welcome to Onboarding",
+ "locale": "en-US",
+ "showBack": true
+ },
+ "question": {
+ "title1": "Please enter your year of birth.
\nWe need this information because some studies are only suitable for people above or below\na certain age.
",
+ "fields": [
+ {
+ "fieldId": "32:0:birth_year",
+ "type": "number",
+ "label": "",
+ "required": true,
+ "min": "1900",
+ "max": "2024"
+ }
+ ]
+ }
+ },
+ {
+ "displayStatus": {
+ "compatLevel": "1.0",
+ "questionId": "q123",
+ "questionType": "form",
+ "surveyToken": "token_ABC123",
+ "stepNumber": "7",
+ "progress": 8,
+ "surveyProviderId": "provider_XYZ",
+ "surveySectionId": "section_001",
+ "surveySystemName": "onboarding_survey",
+ "sessionToken": "session_98765",
+ "sessionStatus": "question",
+ "resumeToken": "resume_456",
+ "resumeTimeoutMillis": "30000",
+ "styleSheetName": "default_theme",
+ "pageTitle": "Welcome to Onboarding",
+ "locale": "en-US",
+ "showBack": true
+ },
+ "question": {
+ "title1": "This is an exemplary question to showcase a text area",
+ "fields": [
+ {
+ "fieldId": "text_area_field_id",
+ "type": "textArea",
+ "label": "Enter a long text in here",
+ "required": true
+ }
+ ]
+ }
+ },
+ {
+ "displayStatus": {
+ "compatLevel": "1.0",
+ "questionId": "q123",
+ "questionType": "form",
+ "surveyToken": "token_ABC123",
+ "stepNumber": "8",
+ "progress": 81,
+ "surveyProviderId": "provider_XYZ",
+ "surveySectionId": "section_001",
+ "surveySystemName": "onboarding_survey",
+ "sessionToken": "session_98765",
+ "sessionStatus": "question",
+ "resumeToken": "resume_456",
+ "resumeTimeoutMillis": "30000",
+ "styleSheetName": "default_theme",
+ "pageTitle": "Welcome to Onboarding",
+ "locale": "en-US",
+ "showBack": true
+ },
+ "question": {
+ "title1": "Please select the date that would be suitable for you to conduct the study.",
+ "fields": [
+ {
+ "fieldId": "32:0:birth_year",
+ "type": "datePicker",
+ "label": "",
+ "required": true,
+ "min": "1900",
+ "max": "2024"
+ }
+ ]
+ }
+ },
+ {
+ "displayStatus": {
+ "compatLevel": "1.0",
+ "questionId": "q123",
+ "questionType": "form",
+ "surveyToken": "token_ABC123",
+ "stepNumber": "9",
+ "progress": 100,
+ "surveyProviderId": "provider_XYZ",
+ "surveySectionId": "section_001",
+ "surveySystemName": "onboarding_survey",
+ "sessionToken": "session_98765",
+ "sessionStatus": "question",
+ "resumeToken": "resume_456",
+ "resumeTimeoutMillis": "30000",
+ "styleSheetName": "default_theme",
+ "pageTitle": "Welcome to Onboarding",
+ "locale": "en-US",
+ "showBack": true
+ },
+ "question": {
+ "title1": "STANFORD UNIVERSITY CONSENT
TO PARTICIPATE IN THE STANFORD HEARTBEAT STUDY
\n\n TITLE: | STANFORD HEARTBEAT STUDY |
\n PROTOCOL NO.: | 75132 |
\n SPONSOR: | Janssen Research and Development LLC |
\n PROTOCOL DIRECTOR: | \n Marco Perez, MD 300 Pasteur Drive, Stanford, CA 94305, USA\n |
\n CONTACT: | (650)-307-7878 |
\n
\n\n\n You are invited to participate in the Stanford Heartbeat Study. This registry connects volunteers for \n Atrial Fibrillation research. If you wish to revoke your authorization, contact:\n
\nMarco Perez, MD
300 Pasteur Drive, Stanford, CA 94305, USA\nPersonal Information Used: Contact info, demographics, medical history, and optional \n smartphone data (GPS, PPG, ECG).
\nData Access: Stanford University, study staff, regulatory bodies, and the study sponsor.
\nAuthorization Expiry: December 31, 2075, or study completion.
\nDo you provide your authorization to use your health information for research?
",
+ "terminal": true,
+ "fields": [
+ {
+ "fieldId": "22:0:consent_info",
+ "type": "radios",
+ "label": "",
+ "required": true,
+ "values": [
+ {
+ "label": "Yes, I provide my authorization.",
+ "id": "1"
+ },
+ {
+ "label": "No, I do not provide my authorization.",
+ "id": "0"
+ }
+ ]
+ },
+ {
+ "fieldId": "22:1:consent_info_name",
+ "type": "text",
+ "label": "Print Name of Adult Participant",
+ "required": true
+ },
+ {
+ "fieldId": "25:25",
+ "type": "heading",
+ "label": "Do you provide your consent to take part in the Stanford Heartbeat Study?
"
+ },
+ {
+ "fieldId": "25:0:consent",
+ "type": "radios",
+ "label": "",
+ "required": true,
+ "values": [
+ {
+ "label": "Yes, I provide my consent.",
+ "id": "1"
+ },
+ {
+ "label": "No, I do not provide my consent.",
+ "id": "0"
+ }
+ ]
+ },
+ {
+ "fieldId": "25:1:consent_name",
+ "type": "text",
+ "label": "Print Name of Adult Participant",
+ "required": true
+ }
+ ]
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/modules/account/src/main/res/values/strings.xml b/modules/account/src/main/res/values/strings.xml
index 0029a4a80..3906d1f6f 100644
--- a/modules/account/src/main/res/values/strings.xml
+++ b/modules/account/src/main/res/values/strings.xml
@@ -13,8 +13,6 @@
Show password
Forgot Password?
Don\'t have an Account yet?
- OK
- Cancel
Create a new Account
Please fill out the details below to create your new account.
E-Mail Address