diff --git a/Intake.xcodeproj/project.pbxproj b/Intake.xcodeproj/project.pbxproj index 31169f8..3d4bcd3 100644 --- a/Intake.xcodeproj/project.pbxproj +++ b/Intake.xcodeproj/project.pbxproj @@ -16,7 +16,6 @@ 2F4FC8D729EE69D300BFFE26 /* MockUpload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F4FC8D629EE69D300BFFE26 /* MockUpload.swift */; }; 2F5E32BD297E05EA003432F8 /* IntakeDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F5E32BC297E05EA003432F8 /* IntakeDelegate.swift */; }; 2F6025CB29BBE70F0045459E /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2F6025CA29BBE70F0045459E /* GoogleService-Info.plist */; }; - 2F65B44E2A3B8B0600A36932 /* NotificationPermissions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F65B44D2A3B8B0600A36932 /* NotificationPermissions.swift */; }; 2FA0BFED2ACC977500E0EF83 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 2FA0BFEC2ACC977500E0EF83 /* Localizable.xcstrings */; }; 2FB099AF2A875DF100B20952 /* FirebaseAuth in Frameworks */ = {isa = PBXBuildFile; productRef = 2FB099AE2A875DF100B20952 /* FirebaseAuth */; }; 2FB099B12A875DF100B20952 /* FirebaseFirestore in Frameworks */ = {isa = PBXBuildFile; productRef = 2FB099B02A875DF100B20952 /* FirebaseFirestore */; }; @@ -24,7 +23,6 @@ 2FB099B62A875E2B00B20952 /* HealthKitOnFHIR in Frameworks */ = {isa = PBXBuildFile; productRef = 2FB099B52A875E2B00B20952 /* HealthKitOnFHIR */; }; 2FBD738C2A3BD150004228E7 /* SpeziScheduler in Frameworks */ = {isa = PBXBuildFile; productRef = 2FBD738B2A3BD150004228E7 /* SpeziScheduler */; }; 2FC3439029EE6346002D773C /* SocialSupportQuestionnaire.json in Resources */ = {isa = PBXBuildFile; fileRef = 2FE5DC5529EDD811004B9AB4 /* SocialSupportQuestionnaire.json */; }; - 2FC3439129EE6349002D773C /* AppIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = 2FE5DC2A29EDD78D004B9AB4 /* AppIcon.png */; }; 2FC3439229EE634B002D773C /* ConsentDocument.md in Resources */ = {isa = PBXBuildFile; fileRef = 2FE5DC2C29EDD78E004B9AB4 /* ConsentDocument.md */; }; 2FC975A82978F11A00BA99FE /* Home.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FC975A72978F11A00BA99FE /* Home.swift */; }; 2FE5DC2629EDD38A004B9AB4 /* Contacts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FE5DC2529EDD38A004B9AB4 /* Contacts.swift */; }; @@ -64,6 +62,7 @@ 5661552E2AB854C000209B80 /* PackageHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5661552D2AB854C000209B80 /* PackageHelper.swift */; }; 5680DD392AB8983D004E6D4A /* PackageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5680DD382AB8983D004E6D4A /* PackageCell.swift */; }; 56F6F2A02AB441930022FE5A /* ContributionsList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56F6F29F2AB441930022FE5A /* ContributionsList.swift */; }; + 637BE1D52B572B4800EA19C6 /* Questionnaire.json.license in Resources */ = {isa = PBXBuildFile; fileRef = 637BE1D42B572B4800EA19C6 /* Questionnaire.json.license */; }; 653A2551283387FE005D4D48 /* Intake.swift in Sources */ = {isa = PBXBuildFile; fileRef = 653A2550283387FE005D4D48 /* Intake.swift */; }; 653A255528338800005D4D48 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 653A255428338800005D4D48 /* Assets.xcassets */; }; 653A256228338800005D4D48 /* IntakeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 653A256128338800005D4D48 /* IntakeTests.swift */; }; @@ -74,6 +73,7 @@ A9D83F962B083794000D0C78 /* SpeziFirebaseAccountStorage in Frameworks */ = {isa = PBXBuildFile; productRef = A9D83F952B083794000D0C78 /* SpeziFirebaseAccountStorage */; }; A9DFE8A92ABE551400428242 /* AccountButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9DFE8A82ABE551400428242 /* AccountButton.swift */; }; A9FE7AD02AA39BAB0077B045 /* AccountSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9FE7ACF2AA39BAB0077B045 /* AccountSheet.swift */; }; + ACAA47812B571C800032D21F /* Questionnaire.json in Resources */ = {isa = PBXBuildFile; fileRef = ACAA47802B571C7F0032D21F /* Questionnaire.json */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -101,13 +101,11 @@ 2F4FC8D629EE69D300BFFE26 /* MockUpload.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockUpload.swift; sourceTree = ""; }; 2F5E32BC297E05EA003432F8 /* IntakeDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntakeDelegate.swift; sourceTree = ""; }; 2F6025CA29BBE70F0045459E /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; - 2F65B44D2A3B8B0600A36932 /* NotificationPermissions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationPermissions.swift; sourceTree = ""; }; 2FA0BFEC2ACC977500E0EF83 /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = ""; }; 2FAEC07F297F583900C11C42 /* Intake.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Intake.entitlements; sourceTree = ""; }; 2FC94CD4298B0A1D009C8209 /* Intake.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = Intake.xctestplan; sourceTree = ""; }; 2FC975A72978F11A00BA99FE /* Home.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Home.swift; sourceTree = ""; }; 2FE5DC2529EDD38A004B9AB4 /* Contacts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Contacts.swift; sourceTree = ""; }; - 2FE5DC2A29EDD78D004B9AB4 /* AppIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = AppIcon.png; sourceTree = ""; }; 2FE5DC2C29EDD78E004B9AB4 /* ConsentDocument.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = ConsentDocument.md; sourceTree = ""; }; 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 = ""; }; @@ -132,6 +130,7 @@ 5661552D2AB854C000209B80 /* PackageHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PackageHelper.swift; sourceTree = ""; }; 5680DD382AB8983D004E6D4A /* PackageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PackageCell.swift; sourceTree = ""; }; 56F6F29F2AB441930022FE5A /* ContributionsList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContributionsList.swift; sourceTree = ""; }; + 637BE1D42B572B4800EA19C6 /* Questionnaire.json.license */ = {isa = PBXFileReference; lastKnownFileType = text; path = Questionnaire.json.license; sourceTree = ""; }; 653A254D283387FE005D4D48 /* Intake.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Intake.app; sourceTree = BUILT_PRODUCTS_DIR; }; 653A2550283387FE005D4D48 /* Intake.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Intake.swift; sourceTree = ""; }; 653A255428338800005D4D48 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -142,6 +141,7 @@ A9720E422ABB68CC00872D23 /* AccountSetupHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountSetupHeader.swift; sourceTree = ""; }; A9DFE8A82ABE551400428242 /* AccountButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountButton.swift; sourceTree = ""; }; A9FE7ACF2AA39BAB0077B045 /* AccountSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountSheet.swift; sourceTree = ""; }; + ACAA47802B571C7F0032D21F /* Questionnaire.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Questionnaire.json; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -230,7 +230,6 @@ 2FE5DCAC29EE6107004B9AB4 /* AccountOnboarding.swift */, 2FE5DC2F29EDD7CA004B9AB4 /* Consent.swift */, 2FE5DC3029EDD7CA004B9AB4 /* HealthKitPermissions.swift */, - 2F65B44D2A3B8B0600A36932 /* NotificationPermissions.swift */, ); path = Onboarding; sourceTree = ""; @@ -242,7 +241,9 @@ 2FA0BFEC2ACC977500E0EF83 /* Localizable.xcstrings */, 2FE5DC2C29EDD78E004B9AB4 /* ConsentDocument.md */, 2FE5DC2A29EDD78D004B9AB4 /* AppIcon.png */, + ACAA47802B571C7F0032D21F /* Questionnaire.json */, 2FE5DC5529EDD811004B9AB4 /* SocialSupportQuestionnaire.json */, + 637BE1D42B572B4800EA19C6 /* Questionnaire.json.license */, ); path = Resources; sourceTree = ""; @@ -523,10 +524,12 @@ files = ( 2FC3439229EE634B002D773C /* ConsentDocument.md in Resources */, 2FC3439129EE6349002D773C /* AppIcon.png in Resources */, + 637BE1D52B572B4800EA19C6 /* Questionnaire.json.license in Resources */, 653A255528338800005D4D48 /* Assets.xcassets in Resources */, 2FC3439029EE6346002D773C /* SocialSupportQuestionnaire.json in Resources */, 2FA0BFED2ACC977500E0EF83 /* Localizable.xcstrings in Resources */, 2F6025CB29BBE70F0045459E /* GoogleService-Info.plist in Resources */, + ACAA47812B571C800032D21F /* Questionnaire.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -602,7 +605,6 @@ A9FE7AD02AA39BAB0077B045 /* AccountSheet.swift in Sources */, 653A2551283387FE005D4D48 /* Intake.swift in Sources */, 2FE5DC3629EDD7CA004B9AB4 /* HealthKitPermissions.swift in Sources */, - 2F65B44E2A3B8B0600A36932 /* NotificationPermissions.swift in Sources */, 5661552E2AB854C000209B80 /* PackageHelper.swift in Sources */, 27FA29902A388E9B009CAC45 /* ModalView.swift in Sources */, 2FE5DC2629EDD38A004B9AB4 /* Contacts.swift in Sources */, diff --git a/Intake/Contacts/Contacts.swift b/Intake/Contacts/Contacts.swift index 99a9404..8691811 100644 --- a/Intake/Contacts/Contacts.swift +++ b/Intake/Contacts/Contacts.swift @@ -16,12 +16,12 @@ struct Contacts: View { let contacts = [ Contact( name: PersonNameComponents( - givenName: "Leland", - familyName: "Stanford" + givenName: "Oliver O.", + familyName: "Aalami" ), - image: Image(systemName: "figure.wave.circle"), // swiftlint:disable:this accessibility_label_for_image - title: "University Founder", - description: String(localized: "LELAND_STANFORD_BIO"), + image: Image("ProfilePicture"), // swiftlint:disable:this accessibility_label_for_image + title: "CLINICAL PROFESSOR, SURGERY - VASCULAR SURGERY", + description: String(localized: "OLIVER_AALAMI_BIO"), organization: "Stanford University", address: { let address = CNMutablePostalAddress() @@ -29,18 +29,19 @@ struct Contacts: View { address.state = "CA" address.postalCode = "94305" address.city = "Stanford" - address.street = "450 Serra Mall" + address.street = "300 Pasteur Dr" + address.subAdministrativeArea = "Rm H3640 MC 5308" return address }(), contactOptions: [ - .call("+1 (650) 723-2300"), - .text("+1 (650) 723-2300"), - .email(addresses: ["contact@stanford.edu"]), + .call("+1 (650) 725-5227"), + .text("+1 (650) 725-5227"), + .email(addresses: ["aalami@stanford.edu"]), ContactOption( image: Image(systemName: "safari.fill"), // swiftlint:disable:this accessibility_label_for_image title: "Website", action: { - if let url = URL(string: "https://stanford.edu") { + if let url = URL(string: "https://profiles.stanford.edu/oliver-aalami") { UIApplication.shared.open(url) } } diff --git a/Intake/IntakeDelegate.swift b/Intake/IntakeDelegate.swift index 5c8ab9f..6d7023c 100644 --- a/Intake/IntakeDelegate.swift +++ b/Intake/IntakeDelegate.swift @@ -75,9 +75,24 @@ class IntakeDelegate: SpeziAppDelegate { private var healthKit: HealthKit { HealthKit { - CollectSample( - HKQuantityType(.stepCount), - deliverySetting: .anchorQuery(.afterAuthorizationAndApplicationWillLaunch) + CollectSamples( + [ + HKClinicalType(.allergyRecord), + HKClinicalType(.clinicalNoteRecord), + HKClinicalType(.conditionRecord), + HKClinicalType(.coverageRecord), + HKClinicalType(.immunizationRecord), + HKClinicalType(.labResultRecord), + HKClinicalType(.medicationRecord), + HKClinicalType(.procedureRecord), + HKClinicalType(.vitalSignRecord) + ], + predicate: HKQuery.predicateForSamples( + withStart: Date.distantPast, + end: nil, + options: .strictEndDate + ), + deliverySetting: .anchorQuery(saveAnchor: false) ) } } diff --git a/Intake/Onboarding/NotificationPermissions.swift b/Intake/Onboarding/NotificationPermissions.swift deleted file mode 100644 index ef25899..0000000 --- a/Intake/Onboarding/NotificationPermissions.swift +++ /dev/null @@ -1,77 +0,0 @@ -// -// This source file is part of the Intake based on the Stanford Spezi Template Application project -// -// SPDX-FileCopyrightText: 2023 Stanford University -// -// SPDX-License-Identifier: MIT -// - -import SpeziOnboarding -import SpeziScheduler -import SwiftUI - - -struct NotificationPermissions: View { - @Environment(IntakeScheduler.self) private var scheduler - @Environment(OnboardingNavigationPath.self) private var onboardingNavigationPath - - @State private var notificationProcessing = false - - - var body: some View { - OnboardingView( - contentView: { - VStack { - OnboardingTitleView( - title: "NOTIFICATION_PERMISSIONS_TITLE", - subtitle: "NOTIFICATION_PERMISSIONS_SUBTITLE" - ) - Spacer() - Image(systemName: "bell.square.fill") - .font(.system(size: 150)) - .foregroundColor(.accentColor) - .accessibilityHidden(true) - Text("NOTIFICATION_PERMISSIONS_DESCRIPTION") - .multilineTextAlignment(.center) - .padding(.vertical, 16) - Spacer() - } - }, actionView: { - OnboardingActionsView( - "NOTIFICATION_PERMISSIONS_BUTTON", - action: { - do { - notificationProcessing = true - // Notification Authorization is not available in the preview simulator. - if ProcessInfo.processInfo.isPreviewSimulator { - try await _Concurrency.Task.sleep(for: .seconds(5)) - } else { - try await scheduler.requestLocalNotificationAuthorization() - } - } catch { - print("Could not request notification permissions.") - } - notificationProcessing = false - - onboardingNavigationPath.nextStep() - } - ) - } - ) - .navigationBarBackButtonHidden(notificationProcessing) - // Small fix as otherwise "Login" or "Sign up" is still shown in the nav bar - .navigationTitle(Text(verbatim: "")) - } -} - - -#if DEBUG -#Preview { - OnboardingStack { - NotificationPermissions() - } - .previewWith { - IntakeScheduler() - } -} -#endif diff --git a/Intake/Onboarding/OnboardingFlow.swift b/Intake/Onboarding/OnboardingFlow.swift index a4e9210..c36f292 100644 --- a/Intake/Onboarding/OnboardingFlow.swift +++ b/Intake/Onboarding/OnboardingFlow.swift @@ -20,8 +20,6 @@ struct OnboardingFlow: View { @AppStorage(StorageKeys.onboardingFlowComplete) private var completedOnboardingFlow = false - @State private var localNotificationAuthorization = false - private var healthKitAuthorization: Bool { // As HealthKit not available in preview simulator @@ -49,14 +47,7 @@ struct OnboardingFlow: View { if HKHealthStore.isHealthDataAvailable() && !healthKitAuthorization { HealthKitPermissions() } - - if !localNotificationAuthorization { - NotificationPermissions() - } } - .task { - localNotificationAuthorization = await scheduler.localNotificationAuthorization - } .interactiveDismissDisabled(!completedOnboardingFlow) } } diff --git a/Intake/Resources/AppIcon.png b/Intake/Resources/AppIcon.png deleted file mode 100644 index 7414dd9..0000000 Binary files a/Intake/Resources/AppIcon.png and /dev/null differ diff --git a/Intake/Resources/Assets.xcassets/AccentColor.colorset/Contents.json b/Intake/Resources/Assets.xcassets/AccentColor.colorset/Contents.json index eb87897..7d89167 100644 --- a/Intake/Resources/Assets.xcassets/AccentColor.colorset/Contents.json +++ b/Intake/Resources/Assets.xcassets/AccentColor.colorset/Contents.json @@ -1,6 +1,33 @@ { "colors" : [ { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0.640", + "green" : "0.238", + "red" : "0.053" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0.910", + "green" : "1.000", + "red" : "0.685" + } + }, "idiom" : "universal" } ], diff --git a/Intake/Resources/Assets.xcassets/AppIcon.appiconset/AppIcon.png b/Intake/Resources/Assets.xcassets/AppIcon.appiconset/AppIcon.png index 7414dd9..c485b0a 100644 Binary files a/Intake/Resources/Assets.xcassets/AppIcon.appiconset/AppIcon.png and b/Intake/Resources/Assets.xcassets/AppIcon.appiconset/AppIcon.png differ diff --git a/Intake/Resources/Assets.xcassets/ProfilePicture.imageset/Contents.json b/Intake/Resources/Assets.xcassets/ProfilePicture.imageset/Contents.json new file mode 100644 index 0000000..feec583 --- /dev/null +++ b/Intake/Resources/Assets.xcassets/ProfilePicture.imageset/Contents.json @@ -0,0 +1,24 @@ +{ + "images" : [ + { + "filename" : "ProfilePicture.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "localizable" : true + } +} diff --git a/Intake/Resources/Assets.xcassets/ProfilePicture.imageset/Contents.json.license b/Intake/Resources/Assets.xcassets/ProfilePicture.imageset/Contents.json.license new file mode 100644 index 0000000..db20e1c --- /dev/null +++ b/Intake/Resources/Assets.xcassets/ProfilePicture.imageset/Contents.json.license @@ -0,0 +1,5 @@ +This source file is part of the Intake based on the Stanford Spezi Template Application project + +SPDX-FileCopyrightText: 2023 Stanford University + +SPDX-License-Identifier: MIT \ No newline at end of file diff --git a/Intake/Resources/Assets.xcassets/ProfilePicture.imageset/ProfilePicture.png b/Intake/Resources/Assets.xcassets/ProfilePicture.imageset/ProfilePicture.png new file mode 100644 index 0000000..5307a0c Binary files /dev/null and b/Intake/Resources/Assets.xcassets/ProfilePicture.imageset/ProfilePicture.png differ diff --git a/Intake/Resources/Assets.xcassets/ProfilePicture.imageset/ProfilePicture.png.license b/Intake/Resources/Assets.xcassets/ProfilePicture.imageset/ProfilePicture.png.license new file mode 100644 index 0000000..db20e1c --- /dev/null +++ b/Intake/Resources/Assets.xcassets/ProfilePicture.imageset/ProfilePicture.png.license @@ -0,0 +1,5 @@ +This source file is part of the Intake based on the Stanford Spezi Template Application project + +SPDX-FileCopyrightText: 2023 Stanford University + +SPDX-License-Identifier: MIT \ No newline at end of file diff --git a/Intake/Resources/Assets.xcassets/ProfilePicture.png b/Intake/Resources/Assets.xcassets/ProfilePicture.png new file mode 100644 index 0000000..5307a0c Binary files /dev/null and b/Intake/Resources/Assets.xcassets/ProfilePicture.png differ diff --git a/Intake/Resources/Assets.xcassets/ProfilePicture.png.license b/Intake/Resources/Assets.xcassets/ProfilePicture.png.license new file mode 100644 index 0000000..db20e1c --- /dev/null +++ b/Intake/Resources/Assets.xcassets/ProfilePicture.png.license @@ -0,0 +1,5 @@ +This source file is part of the Intake based on the Stanford Spezi Template Application project + +SPDX-FileCopyrightText: 2023 Stanford University + +SPDX-License-Identifier: MIT \ No newline at end of file diff --git a/Intake/Resources/Localizable.xcstrings b/Intake/Resources/Localizable.xcstrings index c6de8a8..53b3cce 100644 --- a/Intake/Resources/Localizable.xcstrings +++ b/Intake/Resources/Localizable.xcstrings @@ -161,7 +161,7 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "This onboarding step allows you to customize the onboarding flow to explain how the application uses the HealhtKit data and allows a user to cusomize the selection." + "value" : "Intake will use your different types of your health records in order to most effectively aid you with your intake form." } } } @@ -171,7 +171,7 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "Spezi can access data from HealthKit using the HealthKitDataSource module." + "value" : "Intake would like to access to your health records to fill out your intake form." } } } @@ -200,16 +200,6 @@ } } }, - "LELAND_STANFORD_BIO" : { - "localizations" : { - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Amasa Leland Stanford (March 9, 1824 – June 21, 1893) was an American industrialist and politician. [...] He and his wife Jane were also the founders of Stanford University, which they named after their late son.\n[https://en.wikipedia.org/wiki/Leland_Stanford]" - } - } - } - }, "LICENSE_INFO_TITLE" : { "localizations" : { "en" : { @@ -291,7 +281,17 @@ } }, "Other important questions." : { - + + }, + "OLIVER_AALAMI_BIO" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Dr. Oliver O. Aalami is a Clinical Professor of Surgery at Stanford University and a vascular surgeon based in Palo Alto, California. He is affiliated with Stanford Health Care and the VA Palo Alto Health Care System.\nDr. Aalami is also the Director of Biodesign for Digital Health at the Stanford Byers Center for Biodesign. He co-founded Spezi (formerly CardinalKit) and is passionate about clinically validating smartphone and smartwatch sensors in patients with cardiovascular disease." + } + } + } }, "PROJECT_LICENSE_DESCRIPTION" : { "localizations" : { @@ -303,6 +303,26 @@ } } }, + "QUESTIONNAIRE_DESCRIPTION" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Please fill out the Questionnaire every day." + } + } + } + }, + "QUESTIONNAIRE_TITLE" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Questionnaire" + } + } + } + }, "Repository Link" : { "localizations" : { "en" : { @@ -386,6 +406,7 @@ } }, "TASK_SOCIAL_SUPPORT_QUESTIONNAIRE_DESCRIPTION" : { + "extractionState" : "stale", "localizations" : { "en" : { "stringUnit" : { @@ -396,6 +417,7 @@ } }, "TASK_SOCIAL_SUPPORT_QUESTIONNAIRE_TITLE" : { + "extractionState" : "stale", "localizations" : { "en" : { "stringUnit" : { diff --git a/Intake/Resources/Questionnaire.json b/Intake/Resources/Questionnaire.json new file mode 100644 index 0000000..75c7b10 --- /dev/null +++ b/Intake/Resources/Questionnaire.json @@ -0,0 +1 @@ +{"title":"task4","resourceType":"Questionnaire","language":"en-US","status":"draft","publisher":"Stanford Biodesign Digital Health","meta":{"profile":["http://spezi.health/fhir/StructureDefinition/sdf-Questionnaire"],"tag":[{"system":"urn:ietf:bcp:47","code":"en-US","display":"English"}]},"useContext":[{"code":{"system":"http://hl7.org/fhir/ValueSet/usage-context-type","code":"focus","display":"Clinical Focus"},"valueCodeableConcept":{"coding":[{"system":"urn:oid:2.16.578.1.12.4.1.1.8655","display":"task4"}]}}],"contact":[{"name":"http://spezi.health"}],"subjectType":["Patient"],"url":"http://spezi.health/fhir/questionnaire/ea57e7df-e569-4fec-83d1-5e43a1944c84","item":[{"linkId":"d59fac04-c9e6-4c27-82c1-e3010cc619c8","type":"group","item":[{"linkId":"dbb5b89e-f632-4a9e-8cd0-7ab9fddaaf82","type":"string","text":"Full name","required":true},{"linkId":"5529c3f4-a025-4761-ad03-748a39a14f88","type":"date","text":"Date of birth\n","required":true},{"linkId":"c0c696c2-2ff6-4e84-d808-e5a148151d5a","type":"string","text":"Address","required":true},{"linkId":"3003a9b3-bf1b-4bff-82ff-c4f1c4887e39","type":"group","text":"Contact details","item":[{"linkId":"0eb19e90-16f1-4e4e-8ef5-aea6cddc961f","type":"string","text":"Email address","required":true},{"linkId":"96187243-4eec-439c-8058-f97cb76755ba","type":"integer","text":"Phone number","required":true}],"required":false},{"linkId":"5e3f3873-9651-47cf-a652-51008976e95f","type":"choice","text":"Gender","required":false,"answerOption":[{"valueCoding":{"id":"262c1a93-637a-4e18-d71b-926e0972d4a7","code":"Male","system":"urn:uuid:69e068eb-23d1-4d83-a06f-a8de531ccf65","display":"Male"}},{"valueCoding":{"id":"7864f936-ef73-48df-ff3c-cf99af7f757e","code":"Female","system":"urn:uuid:69e068eb-23d1-4d83-a06f-a8de531ccf65","display":"Female"}},{"valueCoding":{"id":"7dd6248b-1053-4bb4-8f0f-f46d8a8b2118","code":"Non-binary","system":"urn:uuid:69e068eb-23d1-4d83-a06f-a8de531ccf65","display":"Non-binary"}},{"valueCoding":{"id":"10c21c81-de9a-49bb-8cea-e8554222ff57","code":"Prefer-not-to-respond","system":"urn:uuid:69e068eb-23d1-4d83-a06f-a8de531ccf65","display":"Prefer not to respond"}}]},{"linkId":"b70ae8b1-33ea-4ab6-f246-0b245edfaf27","type":"choice","text":"Marital status","required":true,"answerOption":[{"valueCoding":{"id":"789ef8ab-fd5a-44c5-fefd-26d410abb854","code":"single","system":"urn:uuid:278980b7-9374-4d67-80b8-cadfcc1840b9","display":"Single"}},{"valueCoding":{"id":"887e02ab-d5f6-4539-9afc-83a547183cf0","code":"married","system":"urn:uuid:278980b7-9374-4d67-80b8-cadfcc1840b9","display":"Married"}},{"valueCoding":{"id":"ed865440-844b-4bec-9034-31065e44163e","code":"divorced","system":"urn:uuid:278980b7-9374-4d67-80b8-cadfcc1840b9","display":"Divorced"}},{"valueCoding":{"id":"38777e8c-b04b-4887-99d2-c089770a66b0","code":"widowed","system":"urn:uuid:278980b7-9374-4d67-80b8-cadfcc1840b9","display":"Widowed"}},{"valueCoding":{"id":"3bb0baaa-47f2-4973-8f8b-98ec380e450c","code":"seperated","system":"urn:uuid:278980b7-9374-4d67-80b8-cadfcc1840b9","display":"Seperated"}}]},{"linkId":"00a0f56a-6e7c-4a5c-81d8-fd6896b4ec57","type":"string","text":"Occupation","required":false}],"required":false,"text":"Personal and Demographic Information\n"},{"linkId":"588aa772-5a60-4ef4-9ba1-1230adab30a9","type":"group","text":"Emergency Contact Details\n","item":[{"linkId":"644b6519-69c7-4a46-b410-e0161e38a265","type":"string","text":"Name of emergency contact","required":true},{"linkId":"b2c91cf9-d276-4700-801c-8e6b3783f60e","type":"choice","text":"Relationship to the patient","required":false,"answerOption":[{"valueCoding":{"id":"96b2fa2e-079a-4a08-8105-535a444f42b7","code":"parent","system":"urn:uuid:4280c02b-ecb4-4450-b0af-017a9e86d5f6","display":"Parent"}},{"valueCoding":{"id":"023f6fcc-9502-4cbb-c911-4d04e7f48168","code":"friend","system":"urn:uuid:4280c02b-ecb4-4450-b0af-017a9e86d5f6","display":"Friend"}},{"valueCoding":{"id":"52c22ef3-80e0-445c-8413-0b77e521fc5e","code":"guardian","system":"urn:uuid:4280c02b-ecb4-4450-b0af-017a9e86d5f6","display":"Guardian"}},{"valueCoding":{"id":"03917d67-4b8d-40d4-f1f5-5ecbebcebe77","code":"extended-family","system":"urn:uuid:4280c02b-ecb4-4450-b0af-017a9e86d5f6","display":"Extended family"}}]},{"linkId":"959d8df6-b56c-4f5d-8176-2872b4408bb0","type":"group","text":"Contact details\n","item":[{"linkId":"1d82a12a-314f-44fe-8e11-aeb4121b8939","type":"string","text":"Email address","required":false},{"linkId":"ee4e79bf-2eae-4411-d742-f2f8a124d400","type":"integer","text":"Phone number","required":false}],"required":false}],"required":false},{"linkId":"2dfcf2f3-5941-4527-8ccc-ce190fe2ac4a","type":"group","text":"Reason for Visit","item":[{"linkId":"f30a0478-a14d-4e88-87f9-42d6e924d8a1","type":"string","text":"Chief complaint?","required":false},{"linkId":"87decc51-b6ca-4d81-9a24-9b40d937fc9a","type":"string","text":"Past Medical History","required":false},{"linkId":"522dec16-6823-474d-f403-44b6a52a5e33","type":"string","text":"Past Surgical History","required":false},{"linkId":"af2c11d6-3e6f-4089-adf0-03c859e75287","type":"group","text":"Medications","item":[{"linkId":"cb70cd3e-d349-4973-9385-1d5c7bef75f1","type":"string","text":"Medication name","required":false},{"linkId":"932ebee8-ed58-4857-8b0c-bc90e5aed0e7","type":"string","text":"Dose with units (eg: 10mg)","required":false},{"linkId":"eecdbe05-76e1-4e15-840a-e81b9969c34c","type":"string","text":"Route (eg: by mouth, topical, injection, etc.)","required":false}],"required":false},{"linkId":"33bab683-6459-4934-8b98-a3dd271411f3","type":"group","text":"Allergies","item":[{"linkId":"4c9412a5-dd3e-45fd-d1d8-98c43f604b1d","type":"string","text":"Allergen","required":false},{"linkId":"d52057e5-b8ce-42a7-8d21-987aa6957795","type":"string","text":"Reaction type (eg: rash, anaphylaxis, etc.)","required":false}],"required":false}],"required":false}]} \ No newline at end of file diff --git a/Intake/Resources/Questionnaire.json.license b/Intake/Resources/Questionnaire.json.license new file mode 100644 index 0000000..d9041c7 --- /dev/null +++ b/Intake/Resources/Questionnaire.json.license @@ -0,0 +1,6 @@ + +This source file is part of the Intake based on the Stanford Spezi Template Application project + +SPDX-FileCopyrightText: 2023 Stanford University + +SPDX-License-Identifier: MIT diff --git a/Intake/Schedule/IntakeScheduler.swift b/Intake/Schedule/IntakeScheduler.swift index c373719..bd8a56f 100644 --- a/Intake/Schedule/IntakeScheduler.swift +++ b/Intake/Schedule/IntakeScheduler.swift @@ -30,15 +30,15 @@ extension IntakeScheduler { } return Task( - title: String(localized: "TASK_SOCIAL_SUPPORT_QUESTIONNAIRE_TITLE"), - description: String(localized: "TASK_SOCIAL_SUPPORT_QUESTIONNAIRE_DESCRIPTION"), + title: String(localized: "QUESTIONNAIRE_TITLE"), + description: String(localized: "QUESTIONNAIRE_DESCRIPTION"), schedule: Schedule( start: Calendar.current.startOfDay(for: Date()), repetition: .matching(dateComponents), end: .numberOfEvents(365) ), notifications: true, - context: IntakeTaskContext.questionnaire(Bundle.main.questionnaire(withName: "SocialSupportQuestionnaire")) + context: IntakeTaskContext.questionnaire(Bundle.main.questionnaire(withName: "Questionnaire")) ) } diff --git a/README.md b/README.md index 19918e7..7c8e6a3 100644 --- a/README.md +++ b/README.md @@ -8,19 +8,26 @@ SPDX-License-Identifier: MIT --> -# Intake +# CS342 2024 Intake -This repository contains the Intake. -The Intake 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). +[![Build and Test](https://github.com/CS342/2024-Intake/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/CS342/2024-Intake/actions/workflows/build-and-test.yml) +[![codecov](https://codecov.io/gh/CS342/2024-Intake/graph/badge.svg?token=4sfQqouZCe)](https://codecov.io/gh/CS342/2024-Intake) +[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10521599.svg)](https://doi.org/10.5281/zenodo.10521599) -> [!NOTE]  -> Do you want to learn more about the Stanford Spezi Template Application and how to use, extend, and modify this application? Check out the [Stanford Spezi Template Application documentation](https://stanfordspezi.github.io/SpeziTemplateApplication) +This repository contains the CS342 2024 Intake application. +The CS342 2024 Intake application 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] +> Do you want to try out the CS342 2024 Intake application? You can download it to your iOS device using [TestFlight](https://testflight.apple.com/join/Yp0Y24xT)! -## Intake Features +## CS342 2024 Intake Features *Provide a comprehensive description of your application, including figures showing the application. You can learn more on how to structure a README in the [Stanford Spezi Documentation Guide](https://swiftpackageindex.com/stanfordspezi/spezi/documentation/spezi/documentation-guide)* +> [!NOTE] +> Do you want to learn more about the Stanford Spezi Template Application and how to use, extend, and modify this application? Check out the [Stanford Spezi Template Application documentation](https://stanfordspezi.github.io/SpeziTemplateApplication) + ## Contributing diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index c031e25..0000000 --- a/codecov.yml +++ /dev/null @@ -1,40 +0,0 @@ -# -# This source file is part of the Intake based on the Stanford Spezi Template Application project -# -# SPDX-FileCopyrightText: 2023 Stanford University -# -# SPDX-License-Identifier: MIT -# - -codecov: - branch: main - require_ci_to_pass: true -comment: - behavior: default - layout: reach,diff,flags,files,footer - require_changes: false -coverage: - precision: 2 - range: - - 70.0 - - 90.0 - round: up - status: - patch: - default: - target: auto - threshold: 5.0 - project: - default: - target: auto - threshold: 5.0 -ignore: -- ^IntakeUITests.* -- ^IntakeTests.* -parsers: - gcov: - branch_detection: - conditional: true - loop: true - macro: false - method: false