From 3165d7fc628e831936814e23869e3ad6911de04c Mon Sep 17 00:00:00 2001 From: Oliver Aalami Date: Mon, 13 May 2024 23:26:28 -0700 Subject: [PATCH] UI text updates + Removal of an onboarding view + updated consent (#21) # *Name of the PR* ## :recycle: Current situation & Problem *Link any open issues or pull requests (PRs) related to this PR. Please ensure that all non-trivial PRs are first tracked and discussed in an existing GitHub issue or discussion.* ## :gear: Release Notes *Add a bullet point list summary of the feature and possible migration guides if this is a breaking change so this section can be added to the release notes.* *Include code snippets that provide examples of the feature implemented or links to the documentation if it appends or changes the public interface.* ## :books: Documentation *Please ensure that you properly document any additions in conformance to [Spezi Documentation Guide](https://github.com/StanfordSpezi/.github/blob/main/DOCUMENTATIONGUIDE.md).* *You can use this section to describe your solution, but we encourage contributors to document your reasoning and changes using in-line documentation.* ## :white_check_mark: Testing *Please ensure that the PR meets the testing requirements set by CodeCov and that new functionality is appropriately tested.* *This section describes important information about the tests and why some elements might not be testable.* ### Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md): - [ ] I agree to follow the [Code of Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md). --- OwnYourData.xcodeproj/project.pbxproj | 4 -- OwnYourData/Account/AccountSetupHeader.swift | 2 - .../Onboarding/HealthKitPermissions.swift | 2 +- .../Onboarding/InterestingModules.swift | 54 ------------------- OwnYourData/Onboarding/OnboardingFlow.swift | 1 - OwnYourData/Onboarding/Welcome.swift | 12 ++--- OwnYourData/Resources/ConsentDocument.md | 44 ++++++++++++++- OwnYourData/Resources/Localizable.xcstrings | 29 +++++----- README.md | 2 +- 9 files changed, 67 insertions(+), 83 deletions(-) delete mode 100644 OwnYourData/Onboarding/InterestingModules.swift diff --git a/OwnYourData.xcodeproj/project.pbxproj b/OwnYourData.xcodeproj/project.pbxproj index 2fb8206..65b6062 100644 --- a/OwnYourData.xcodeproj/project.pbxproj +++ b/OwnYourData.xcodeproj/project.pbxproj @@ -55,7 +55,6 @@ 2FE5DC3529EDD7CA004B9AB4 /* Consent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FE5DC2F29EDD7CA004B9AB4 /* Consent.swift */; }; 2FE5DC3629EDD7CA004B9AB4 /* HealthKitPermissions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FE5DC3029EDD7CA004B9AB4 /* HealthKitPermissions.swift */; }; 2FE5DC3729EDD7CA004B9AB4 /* OnboardingFlow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FE5DC3129EDD7CA004B9AB4 /* OnboardingFlow.swift */; }; - 2FE5DC3829EDD7CA004B9AB4 /* InterestingModules.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FE5DC3229EDD7CA004B9AB4 /* InterestingModules.swift */; }; 2FE5DC3A29EDD7CA004B9AB4 /* Welcome.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FE5DC3429EDD7CA004B9AB4 /* Welcome.swift */; }; 2FE5DC4029EDD7EE004B9AB4 /* FeatureFlags.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FE5DC3E29EDD7ED004B9AB4 /* FeatureFlags.swift */; }; 2FE5DC4129EDD7EE004B9AB4 /* StorageKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FE5DC3F29EDD7EE004B9AB4 /* StorageKeys.swift */; }; @@ -151,7 +150,6 @@ 2FE5DC2F29EDD7CA004B9AB4 /* Consent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Consent.swift; sourceTree = ""; }; 2FE5DC3029EDD7CA004B9AB4 /* HealthKitPermissions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HealthKitPermissions.swift; sourceTree = ""; }; 2FE5DC3129EDD7CA004B9AB4 /* OnboardingFlow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnboardingFlow.swift; sourceTree = ""; }; - 2FE5DC3229EDD7CA004B9AB4 /* InterestingModules.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InterestingModules.swift; sourceTree = ""; }; 2FE5DC3429EDD7CA004B9AB4 /* Welcome.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Welcome.swift; sourceTree = ""; }; 2FE5DC3E29EDD7ED004B9AB4 /* FeatureFlags.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeatureFlags.swift; sourceTree = ""; }; 2FE5DC3F29EDD7EE004B9AB4 /* StorageKeys.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StorageKeys.swift; sourceTree = ""; }; @@ -305,7 +303,6 @@ children = ( 2FE5DC3129EDD7CA004B9AB4 /* OnboardingFlow.swift */, 2FE5DC3429EDD7CA004B9AB4 /* Welcome.swift */, - 2FE5DC3229EDD7CA004B9AB4 /* InterestingModules.swift */, 2FE5DCAC29EE6107004B9AB4 /* AccountOnboarding.swift */, 2F42EA0D2B91CD7100D88DB7 /* OpenAIAPIKey.swift */, 2FE5DC2F29EDD7CA004B9AB4 /* Consent.swift */, @@ -648,7 +645,6 @@ 2F42E9F22B91BBF300D88DB7 /* HowItWorks.swift in Sources */, 2FE5DC3A29EDD7CA004B9AB4 /* Welcome.swift in Sources */, 2F42E9DE2B91BB2500D88DB7 /* PDFView.swift in Sources */, - 2FE5DC3829EDD7CA004B9AB4 /* InterestingModules.swift in Sources */, 2F38F3A02BE805090002E7D5 /* NICTrialsAPIDateFormatter.swift in Sources */, 2F42E9F42B91BBF300D88DB7 /* Instructions.swift in Sources */, 2F42EA112B91CF6F00D88DB7 /* ResourceSelection.swift in Sources */, diff --git a/OwnYourData/Account/AccountSetupHeader.swift b/OwnYourData/Account/AccountSetupHeader.swift index 570e993..048c064 100644 --- a/OwnYourData/Account/AccountSetupHeader.swift +++ b/OwnYourData/Account/AccountSetupHeader.swift @@ -26,8 +26,6 @@ struct AccountSetupHeader: View { .padding(.bottom, 8) if account?.signedIn ?? false, case .generic = setupState { Text("You signed in with the following account:") - } else { - Text("We respect your privacy. All data storage and sharing happens directly from your phone.") } } .multilineTextAlignment(.center) diff --git a/OwnYourData/Onboarding/HealthKitPermissions.swift b/OwnYourData/Onboarding/HealthKitPermissions.swift index dddebe6..2b6606d 100644 --- a/OwnYourData/Onboarding/HealthKitPermissions.swift +++ b/OwnYourData/Onboarding/HealthKitPermissions.swift @@ -24,7 +24,7 @@ struct HealthKitPermissions: View { VStack { OnboardingTitleView( title: "Health Data Access\nPermission", - subtitle: "Grant permission to OwnYourData to access your health records" + subtitle: "Grant permission to OwnYourData to access your health records." ) Spacer() Image(systemName: "heart.text.square.fill") diff --git a/OwnYourData/Onboarding/InterestingModules.swift b/OwnYourData/Onboarding/InterestingModules.swift deleted file mode 100644 index 1b2034b..0000000 --- a/OwnYourData/Onboarding/InterestingModules.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// This source file is part of the OwnYourData based on the Stanford Spezi Template Application project -// -// SPDX-FileCopyrightText: 2023 Stanford University -// -// SPDX-License-Identifier: MIT -// - -import SpeziOnboarding -import SwiftUI - - -struct InterestingModules: View { - @Environment(OnboardingNavigationPath.self) private var onboardingNavigationPath - - - var body: some View { - SequentialOnboardingView( - title: "How It Works", - subtitle: "These are the steps to OwnYourData \nand connect with trials that matter.", - content: [ - SequentialOnboardingView.Content( - title: "Download Your Records", - description: "Select your health system(s) and download your health records to your phone." - ), - SequentialOnboardingView.Content( - title: "Add Relevant Documents", - description: "Scan important records with the camera on your phone to complete your records." - ), - SequentialOnboardingView.Content( - title: "Discover Clinical Trials", - description: "Find clinical trials supported by the National Cancer Institute." - ), - SequentialOnboardingView.Content( - title: "Share Your Data", - description: "Control what you share and who you share it with." - ) - ], - actionText: "Register", - action: { - onboardingNavigationPath.nextStep() - } - ) - } -} - - -#if DEBUG -#Preview { - OnboardingStack { - InterestingModules() - } -} -#endif diff --git a/OwnYourData/Onboarding/OnboardingFlow.swift b/OwnYourData/Onboarding/OnboardingFlow.swift index 363f576..cd4f905 100644 --- a/OwnYourData/Onboarding/OnboardingFlow.swift +++ b/OwnYourData/Onboarding/OnboardingFlow.swift @@ -33,7 +33,6 @@ struct OnboardingFlow: View { var body: some View { OnboardingStack(onboardingFlowComplete: $completedOnboardingFlow) { Welcome() - InterestingModules() if !FeatureFlags.disableFirebase { AccountOnboarding() diff --git a/OwnYourData/Onboarding/Welcome.swift b/OwnYourData/Onboarding/Welcome.swift index 51f48e2..a56c93c 100644 --- a/OwnYourData/Onboarding/Welcome.swift +++ b/OwnYourData/Onboarding/Welcome.swift @@ -24,24 +24,24 @@ struct Welcome: View { Image(systemName: "apps.iphone") .accessibilityHidden(true) }, - title: "Access Your Health Records", - description: "We help you connect to your Health System(s) to download your records." + title: "Access to Your Health Records", + description: "We help you securely access your health records" ), OnboardingInformationView.Content( icon: { Image(systemName: "shippingbox.fill") .accessibilityHidden(true) }, - title: "Search for Active Trials", - description: "Search ClinicalTrials.gov to find the right trial for you." + title: "Trial Matching", + description: "We automatically match you to active trials." ), OnboardingInformationView.Content( icon: { Image(systemName: "list.bullet.clipboard.fill") .accessibilityHidden(true) }, - title: "Share Your Data", - description: "Share your health data easily with those that need it." + title: "Data Sharing", + description: "Share your data with trial coordinators." ) ], actionText: "Learn More", diff --git a/OwnYourData/Resources/ConsentDocument.md b/OwnYourData/Resources/ConsentDocument.md index 5f9df6f..81ab5f9 100644 --- a/OwnYourData/Resources/ConsentDocument.md +++ b/OwnYourData/Resources/ConsentDocument.md @@ -1 +1,43 @@ -Spezi can render consent documents in the markdown format: This is a *markdown* **example**. +**Consent for OwnYourData Application** + +**Introduction** +Welcome to OwnYourData. To provide you with the best experience and services, we need your consent to access your health records and match them with clinical trials listed in the NCI Clinical Trial Search database. + +**Purpose** +The purpose of accessing your health records is to identify suitable clinical trials that may benefit you based on your health data. + +**Data Security** +* **Encryption**: All data pulled from the EHR via the FHIR API will reside on your mobile device and be encrypted both in flight and at rest. Any data generated and aggregated in the application is stored locally using an Apple Keychain-based encryption. Data sent to the cloud-based LLM is encrypted in flight. +* **No Sharing Without Permission**: Only minimal data will be shared with the API, and no data sharing or processes will be performed without your explicit permission. If you agree to participate in a clinical trial, only the necessary information will be shared with the trial organizers. + +**Data Storage** +* Your patient data is stored in the Apple Health app. +* Users are currently responsible for providing an OpenAI account for cloud-based services. + +**Withdrawal of Consent** +You can withdraw your consent at any time by adjusting your settings in the application or by contacting our support team. + +**Privacy Policy** +1. **Information We Collect** + We collect personal health information that you provide or authorize us to access. This includes medical history, current medications, and other relevant health data. + +2. **How We Use Your Information** + * **Clinical Trial Matching**: To match your health records with clinical trials in the NCI Clinical Trial Search database. + * **Service Improvement**: To improve our services and provide you with better matches. + +3. **Data Security** + We implement industry-standard security measures to protect your information. This includes encryption of data both in transit and at rest. + +4. **Data Sharing** + Your data will not be shared with any third party without your explicit consent. If you agree to participate in a clinical trial, only the necessary information will be shared with the trial organizers. + +5. **Your Rights** + * **Access**: You have the right to access your data at any time. + * **Correction**: You can correct any inaccuracies in your data. + * **Deletion**: You can request the deletion of your data. + * **Withdrawal**: You can withdraw your consent and stop using the app at any time. + +6. **Contact Us** + If you have any questions or concerns about our privacy practices or your data, please contact our support team at alexa.aalmai@gmail.com + + diff --git a/OwnYourData/Resources/Localizable.xcstrings b/OwnYourData/Resources/Localizable.xcstrings index fe9e74e..7a25936 100644 --- a/OwnYourData/Resources/Localizable.xcstrings +++ b/OwnYourData/Resources/Localizable.xcstrings @@ -1,7 +1,7 @@ { "sourceLanguage" : "en", "strings" : { - "Access Your Health Records" : { + "Access to Your Health Records" : { }, "ACCOUNT_SUBTITLE" : { @@ -9,7 +9,7 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "Create an account with OwnYourData so we can help you. We don't see or store any of your health data. We only store your name and email address." + "value" : "Create an account with OwnYourData. \n\nOur app was built to keep your data secure and protect your privacy. Your data is encrypted and you are always in control of your health information. " } } } @@ -37,6 +37,9 @@ }, "Could not load the consent document" : { + }, + "Data Sharing" : { + }, "Discover Clinical Trials" : { @@ -61,7 +64,7 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "We're here to help you find cancer trials that are supported by the National Cancer Institute.\n\nWe noticed that you haven't saved any health records on your phone yet.\n\nPlease follow the instructions to connect to retrieve your health records from your provider: [Apple Support - View health records on your iPhone or iPod touch](https://support.apple.com/en-us/HT208680).\n\nYou can find a list of supported institutions at [Apple Support - Institutions that support health records on iPhone and iPod touch](https://platform.openai.com/account/api-keys).\n\nIf you can see your health records in the Apple Health app, please ensure that OwnYourData has access to your health records in the Apple Health App. You can find these settings in the privacy section of your profile in Apple Health." + "value" : "Find National Cancer Institute supported trials.\n\nWe noticed that you haven't saved any health records on your phone yet.\n\nPlease follow the instructions to retrieve your health records: [Apple Support - View health records on your iPhone or iPod touch](https://support.apple.com/en-us/HT208680).\n\nYou can find a list of supported institutions at [Apple Support - Institutions that support health records on iPhone and iPod touch](https://platform.openai.com/account/api-keys).\n\nPlease ensure that OwnYourData has access to your health records in the Apple Health App. You can find these settings in the privacy section of your profile in Apple Health." } } } @@ -72,7 +75,7 @@ "Grant Access" : { }, - "Grant permission to OwnYourData to access your health records" : { + "Grant permission to OwnYourData to access your health records." : { }, "Health Data Access\nPermission" : { @@ -83,7 +86,7 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "You can decide what health records should be available to the OwnYourData application. We use these health records to automatically provide you insights about your diagnosis and match you with clinical trials. The health data may be sent to third party providers like OpenAI for processing." + "value" : "You have complete control of what records you share with OwnYourData. We use this information to provide insights about your diagnosis and match you to trials." } } } @@ -141,12 +144,6 @@ }, "Scan important records with the camera on your phone to complete your records." : { - }, - "Search ClinicalTrials.gov to find the right trial for you." : { - - }, - "Search for Active Trials" : { - }, "Select your health system(s) and download your health records to your phone." : { @@ -157,7 +154,7 @@ "Share Your Data" : { }, - "Share your health data easily with those that need it." : { + "Share your data with trial coordinators." : { }, "Step Content ..." : { @@ -177,11 +174,17 @@ }, "This project is licensed under the MIT License." : { + }, + "Trial Matching" : { + }, "Use HealthKit Resources" : { }, - "We help you connect to your Health System(s) to download your records." : { + "We automatically match you to active trials." : { + + }, + "We help you securely access your health records" : { }, "We respect your privacy. All data storage and sharing happens directly from your phone." : { diff --git a/README.md b/README.md index 677ff07..460855f 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ SPDX-License-Identifier: MIT # OwnYourData -This repository contains the OwnYourData. +This repository contains the OwnYourData app. The OwnYourData is using the [Spezi](https://github.com/StanfordSpezi/Spezi) ecosystem and builds on top of the [Stanford Spezi Template Application](https://github.com/StanfordSpezi/SpeziTemplateApplication). > [!NOTE]