Skip to content

Commit

Permalink
Merge branch 'main' into graceDev
Browse files Browse the repository at this point in the history
  • Loading branch information
PSchmiedmayer committed May 14, 2024
2 parents 68177f5 + 3165d7f commit 72c416d
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 112 deletions.
4 changes: 0 additions & 4 deletions OwnYourData.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -151,7 +150,6 @@
2FE5DC2F29EDD7CA004B9AB4 /* Consent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Consent.swift; sourceTree = "<group>"; };
2FE5DC3029EDD7CA004B9AB4 /* HealthKitPermissions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HealthKitPermissions.swift; sourceTree = "<group>"; };
2FE5DC3129EDD7CA004B9AB4 /* OnboardingFlow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnboardingFlow.swift; sourceTree = "<group>"; };
2FE5DC3229EDD7CA004B9AB4 /* InterestingModules.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InterestingModules.swift; sourceTree = "<group>"; };
2FE5DC3429EDD7CA004B9AB4 /* Welcome.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Welcome.swift; sourceTree = "<group>"; };
2FE5DC3E29EDD7ED004B9AB4 /* FeatureFlags.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeatureFlags.swift; sourceTree = "<group>"; };
2FE5DC3F29EDD7EE004B9AB4 /* StorageKeys.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StorageKeys.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -305,7 +303,6 @@
children = (
2FE5DC3129EDD7CA004B9AB4 /* OnboardingFlow.swift */,
2FE5DC3429EDD7CA004B9AB4 /* Welcome.swift */,
2FE5DC3229EDD7CA004B9AB4 /* InterestingModules.swift */,
2FE5DCAC29EE6107004B9AB4 /* AccountOnboarding.swift */,
2F42EA0D2B91CD7100D88DB7 /* OpenAIAPIKey.swift */,
2FE5DC2F29EDD7CA004B9AB4 /* Consent.swift */,
Expand Down Expand Up @@ -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 */,
Expand Down
2 changes: 0 additions & 2 deletions OwnYourData/Account/AccountSetupHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions OwnYourData/ClinicalTrials/ClinicalTrialsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import OpenAPIClient
import SpeziViews
import SwiftUI


struct ClinicalTrialsView: View {

Check failure on line 15 in OwnYourData/ClinicalTrials/ClinicalTrialsView.swift

View workflow job for this annotation

GitHub Actions / SwiftLint / SwiftLint

File Types Order Violation: A 'main_type' should not be placed amongst the file type(s) 'supporting_type' (file_types_order)
@State private var viewState: ViewState = .idle
@State private var trials: [TrialDetail] = []
Expand All @@ -23,6 +24,7 @@ struct ClinicalTrialsView: View {
// Create a CLGeocoder instance to convert zip code to coordinates
private let geocoder = CLGeocoder()

Check warning on line 25 in OwnYourData/ClinicalTrials/ClinicalTrialsView.swift

View check run for this annotation

Codecov / codecov/patch

OwnYourData/ClinicalTrials/ClinicalTrialsView.swift#L25

Added line #L25 was not covered by tests


var body: some View {
NavigationStack {
content
Expand Down Expand Up @@ -202,6 +204,7 @@ struct ClinicalTrialsView: View {
}

Check warning on line 204 in OwnYourData/ClinicalTrials/ClinicalTrialsView.swift

View check run for this annotation

Codecov / codecov/patch

OwnYourData/ClinicalTrials/ClinicalTrialsView.swift#L158-L204

Added lines #L158 - L204 were not covered by tests
}


struct TrialView: View {
let trial: TrialDetail
@Binding var isCollapsedDescription: Bool
Expand Down Expand Up @@ -229,6 +232,7 @@ struct TrialView: View {
}

Check warning on line 232 in OwnYourData/ClinicalTrials/ClinicalTrialsView.swift

View check run for this annotation

Codecov / codecov/patch

OwnYourData/ClinicalTrials/ClinicalTrialsView.swift#L212-L232

Added lines #L212 - L232 were not covered by tests
}


enum FetchingError: LocalizedError {
case unknownError

Expand Down
2 changes: 1 addition & 1 deletion OwnYourData/Onboarding/HealthKitPermissions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
54 changes: 0 additions & 54 deletions OwnYourData/Onboarding/InterestingModules.swift

This file was deleted.

1 change: 0 additions & 1 deletion OwnYourData/Onboarding/OnboardingFlow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ struct OnboardingFlow: View {
var body: some View {
OnboardingStack(onboardingFlowComplete: $completedOnboardingFlow) {
Welcome()
InterestingModules()

if !FeatureFlags.disableFirebase {
AccountOnboarding()
Expand Down
12 changes: 6 additions & 6 deletions OwnYourData/Onboarding/Welcome.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
44 changes: 43 additions & 1 deletion OwnYourData/Resources/ConsentDocument.md
Original file line number Diff line number Diff line change
@@ -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 [email protected]


54 changes: 12 additions & 42 deletions OwnYourData/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"sourceLanguage" : "en",
"strings" : {
"Access Your Health Records" : {
"Access to Your Health Records" : {

},
"ACCOUNT_SUBTITLE" : {
"localizations" : {
"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. "
}
}
}
Expand All @@ -19,9 +19,6 @@
},
"Add Document" : {

},
"Add Relevant Documents" : {

},
"Apple Health App" : {

Expand All @@ -31,24 +28,18 @@
},
"Close" : {

},
"Control what you share and who you share it with." : {

},
"Could not load the consent document" : {

},
"Details" : {
"Data Sharing" : {

},
"Discover Clinical Trials" : {
"Details" : {

},
"Documents" : {

},
"Download Your Records" : {

},
"Enter Distance (mi)" : {

Expand All @@ -73,18 +64,15 @@
"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."
}
}
}
},
"Find clinical trials supported by the National Cancer Institute." : {

},
"Grant Access" : {

},
"Grant permission to OwnYourData to access your health records" : {
"Grant permission to OwnYourData to access your health records." : {

},
"Health Data Access\nPermission" : {
Expand All @@ -95,7 +83,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."
}
}
}
Expand Down Expand Up @@ -141,9 +129,6 @@
},
"Please refer to the individual repository links for packages without license labels." : {

},
"Register" : {

},
"Repository Link" : {

Expand All @@ -153,29 +138,14 @@
},
"Resource Settings" : {

},
"Scan important records with the camera on your phone to complete your records." : {

},
"Search ClinicalTrials.gov to find the right trial for you." : {

},
"Search Distance (e.g. 100)" : {

},
"Search for Active Trials" : {

},
"Select your health system(s) and download your health records to your phone." : {

},
"Share FHIR Resources" : {

},
"Share Your Data" : {

},
"Share your health data easily with those that need it." : {
"Share your data with trial coordinators." : {

},
"Step Content ..." : {
Expand All @@ -190,10 +160,10 @@
"The OwnYourData App Icon" : {

},
"These are the steps to OwnYourData \nand connect with trials that matter." : {
"This project is licensed under the MIT License." : {

},
"This project is licensed under the MIT License." : {
"Trial Matching" : {

},
"Update Search" : {
Expand All @@ -202,10 +172,10 @@
"Use HealthKit Resources" : {

},
"We help you connect to your Health System(s) to download your records." : {
"We automatically match you to active trials." : {

},
"We respect your privacy. All data storage and sharing happens directly from your phone." : {
"We help you securely access your health records" : {

},
"Welcome,\n%@" : {
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 72c416d

Please sign in to comment.