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

PICS ASSIGNMENT 1 TASK 4: added and modified questionnaire #3

Merged
merged 10 commits into from
Jan 22, 2024
4 changes: 4 additions & 0 deletions PICS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
653A2551283387FE005D4D48 /* PICS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 653A2550283387FE005D4D48 /* PICS.swift */; };
653A255528338800005D4D48 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 653A255428338800005D4D48 /* Assets.xcassets */; };
653A256228338800005D4D48 /* PICSTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 653A256128338800005D4D48 /* PICSTests.swift */; };
741110F22B5767DF00DFC79E /* PROM-Questionnaire.json in Resources */ = {isa = PBXBuildFile; fileRef = 741110F12B5767DE00DFC79E /* PROM-Questionnaire.json */; };
9733CFC62A8066DE001B7ABC /* SpeziOnboarding in Frameworks */ = {isa = PBXBuildFile; productRef = 2FE5DC8029EDD91D004B9AB4 /* SpeziOnboarding */; };
9739A0C62AD7B5730084BEA5 /* FirebaseStorage in Frameworks */ = {isa = PBXBuildFile; productRef = 9739A0C52AD7B5730084BEA5 /* FirebaseStorage */; };
97D73D6A2AD860AD00B47FA0 /* SpeziFirebaseStorage in Frameworks */ = {isa = PBXBuildFile; productRef = 97D73D692AD860AD00B47FA0 /* SpeziFirebaseStorage */; };
Expand Down Expand Up @@ -137,6 +138,7 @@
653A256128338800005D4D48 /* PICSTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PICSTests.swift; sourceTree = "<group>"; };
653A256728338800005D4D48 /* PICSUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PICSUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
653A258928339462005D4D48 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
741110F12B5767DE00DFC79E /* PROM-Questionnaire.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "PROM-Questionnaire.json"; sourceTree = "<group>"; };
A9720E422ABB68CC00872D23 /* AccountSetupHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountSetupHeader.swift; sourceTree = "<group>"; };
A9DFE8A82ABE551400428242 /* AccountButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountButton.swift; sourceTree = "<group>"; };
A9FE7ACF2AA39BAB0077B045 /* AccountSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountSheet.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -235,6 +237,7 @@
2FE5DC2D29EDD792004B9AB4 /* Resources */ = {
isa = PBXGroup;
children = (
741110F12B5767DE00DFC79E /* PROM-Questionnaire.json */,
653A255428338800005D4D48 /* Assets.xcassets */,
2FA0BFEC2ACC977500E0EF83 /* Localizable.xcstrings */,
2FE5DC2C29EDD78E004B9AB4 /* ConsentDocument.md */,
Expand Down Expand Up @@ -523,6 +526,7 @@
653A255528338800005D4D48 /* Assets.xcassets in Resources */,
2FC3439029EE6346002D773C /* SocialSupportQuestionnaire.json in Resources */,
2FA0BFED2ACC977500E0EF83 /* Localizable.xcstrings in Resources */,
741110F22B5767DF00DFC79E /* PROM-Questionnaire.json in Resources */,
2F6025CB29BBE70F0045459E /* GoogleService-Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
2 changes: 1 addition & 1 deletion PICS.xcodeproj/xcshareddata/xcschemes/PICS.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<CommandLineArguments>
<CommandLineArgument
argument = "--disableFirebase"
isEnabled = "YES">
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--showOnboarding"
Expand Down
28 changes: 26 additions & 2 deletions PICS/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -388,22 +388,46 @@
}
}
},
"TASK_PROM_QUESTIONNAIRE_DESCRIPTION" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Please fill out the Patient-Reported Outcome Measures Assessment (PROM) questionnaire every 2 weeks."
}
}
}
},
"TASK_PROM_QUESTIONNAIRE_TITLE" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Patient-Reported Outcome Measures Assessment (PROM) Questionnaire"
}
}
}
},
"TASK_SOCIAL_SUPPORT_QUESTIONNAIRE_DESCRIPTION" : {
"extractionState" : "stale",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Please fill out the Social Support Questionnaire every day."
"value" : "Please fill out the Patient-Reported Outcome Measures Assessment (PROM) questionnaire every day."
}
}
}
},
"TASK_SOCIAL_SUPPORT_QUESTIONNAIRE_TITLE" : {
"extractionState" : "stale",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Social Support Questionnaire"
"value" : "Patient-Reported Outcome Measures Assessment (PROM) Questionnaire"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions PICS/Resources/PROM-Questionnaire.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"title":"PROM Questionnaire - PICS","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":"PROM Questionnaire - PICS"}]}}],"contact":[{"name":"http://spezi.health"}],"subjectType":["Patient"],"url":"http://spezi.health/fhir/questionnaire/c71a1dda-e3a2-41d1-930e-6c2186dd3498","contained":[{"url":"http://spezi.health/fhir/ValueSet/Predefined","resourceType":"ValueSet","id":"1101","version":"1.0","name":"urn:oid:1101","title":"Yes / No","status":"draft","publisher":"NHN","compose":{"include":[{"system":"urn:oid:2.16.578.1.12.4.1.1101","concept":[{"code":"1","display":"Yes"},{"code":"2","display":"No"}]}]}}],"item":[{"linkId":"634455a7-f236-41be-87e9-9bc09d7f2afb","type":"display","text":"Completion Instructions:\nPlease complete this questionnaire at a similar time each day.\nAnswer each question based on your experiences and feelings today.\nYour daily input is valuable in monitoring your health and adjusting your treatment as needed.","required":false},{"linkId":"10b65f3b-64fe-467c-87e1-66b992219bbe","type":"group","text":"General Health","item":[{"linkId":"3cf6e8c2-35f2-4550-81d1-152b85a22ece","type":"choice","required":true,"text":"How would you rate your overall health today?","answerOption":[{"valueCoding":{"id":"e62c6558-959f-46e5-97d7-7ecc95e482db","code":"1","system":"urn:uuid:4c11aa39-c234-4943-82a6-08351d8226b1","display":"1"}},{"valueCoding":{"id":"b765f098-96e7-4bc1-8e6e-8e65b736e4fd","code":"2","system":"urn:uuid:4c11aa39-c234-4943-82a6-08351d8226b1","display":"2"}},{"valueCoding":{"id":"4002a98a-9974-4a73-93a8-50f7f69759e2","code":"3","system":"urn:uuid:4c11aa39-c234-4943-82a6-08351d8226b1","display":"3"}},{"valueCoding":{"id":"d9dd9cee-4689-4b38-d399-d60b3088dda8","code":"4","system":"urn:uuid:4c11aa39-c234-4943-82a6-08351d8226b1","display":"4"}},{"valueCoding":{"id":"e069ed46-6de8-40c8-d2bd-a0271750c716","code":"5","system":"urn:uuid:4c11aa39-c234-4943-82a6-08351d8226b1","display":"5"}}]},{"linkId":"ebcd4e00-975a-4664-82f9-f540fcc92f95","type":"integer","text":"How many hours of sleep did you get last night?","required":true}],"required":false},{"linkId":"a947bfd0-c605-4413-96be-ed574b2cf300","type":"group","text":"Physical Health","item":[{"linkId":"ac507846-bdda-4aa3-8617-a1082cf85651","type":"choice","text":"Do you have any muscle weakness?","required":true,"answerValueSet":"#1101"},{"linkId":"ccbddcda-2d1f-4617-9be2-6e28711ff3ac","type":"text","text":"Are there any physical activities you find difficult to perform? (List All)","required":false},{"linkId":"3f4d19f8-6851-439d-840e-8fb95b7342dd","type":"choice","text":"Have you experienced any difficulty in hearing today?","required":true,"answerValueSet":"#1101"},{"linkId":"30ff4f73-c526-4d2d-ce99-668daea01c58","type":"choice","required":true,"text":"Have you experienced any problems in your vision today?","answerValueSet":"#1101"},{"linkId":"3d2316e3-4d4a-4910-816a-918cb751200d","type":"choice","text":"Have you experienced any difficulty in swallowing today?","required":true,"answerValueSet":"#1101"}],"required":false},{"linkId":"7f7c8e10-0792-41d0-bffd-9825b24807a1","type":"group","item":[{"linkId":"d8b16623-430e-45c9-9b6a-a70e76fd20c4","type":"choice","text":"How would you rate your memory and concentration today? (Scale: 1 [Very Poor] - 5 [Excellent])","required":true,"answerOption":[{"valueCoding":{"id":"f70058db-7035-4943-b6cd-98e5b89cad06","code":"1","system":"urn:uuid:0d03bf56-b57a-4cbb-8144-4252c03ede22","display":"1"}},{"valueCoding":{"id":"df8e09da-3fde-46ce-9dd2-6ca9c36fe14f","code":"2","system":"urn:uuid:0d03bf56-b57a-4cbb-8144-4252c03ede22","display":"2"}},{"valueCoding":{"id":"1920e802-6122-4fe8-9598-1b996b1c0cb9","code":"3","system":"urn:uuid:0d03bf56-b57a-4cbb-8144-4252c03ede22","display":"3"}},{"valueCoding":{"id":"f4f675bf-13ae-43c3-eda9-b64a8f2c8fc8","code":"4","system":"urn:uuid:0d03bf56-b57a-4cbb-8144-4252c03ede22","display":"4"}},{"valueCoding":{"id":"6f1cc957-a420-4c92-9617-141442013990","code":"5","system":"urn:uuid:0d03bf56-b57a-4cbb-8144-4252c03ede22","display":"5"}}]},{"linkId":"34330709-4d58-426d-8178-ab8bf27dd580","type":"choice","required":true,"text":"Are you feeling more anxious today compared to yesterday? ","answerValueSet":"#1101"}],"required":false,"text":"Cognitive and Emotional Well-Being"},{"linkId":"eb95fb60-183d-465c-a97f-713414367f09","type":"group","text":"Activity and Mobility","item":[{"linkId":"d6341353-915a-44cd-80b6-a7c9dad59c98","type":"choice","text":"Were you able to perform your daily activities more easily, less easily, or about the same as yesterday?","required":false,"answerOption":[{"valueCoding":{"id":"5d274933-737a-46f1-9cfc-ac0f5a2a598a","code":"more-easily","system":"urn:uuid:fac410d3-1fc9-472e-88ac-c454b2ca3eea","display":"More Easily"}},{"valueCoding":{"id":"1c819c05-935d-4a63-ab4a-f73e694a7e1c","code":"about-the-same","system":"urn:uuid:fac410d3-1fc9-472e-88ac-c454b2ca3eea","display":"About the Same"}},{"valueCoding":{"id":"952f45d5-d500-4553-8033-0ae61de509a7","code":"less-easily","system":"urn:uuid:fac410d3-1fc9-472e-88ac-c454b2ca3eea","display":"Less Easily"}}]},{"linkId":"c3602179-0e9e-44e1-a874-8087117fa604","type":"choice","text":"Did you require assistance with any activities today that you didn't need help with yesterday?","required":false,"answerValueSet":"#1101"}],"required":false},{"linkId":"c0334867-4b87-4df2-8989-2c5723895459","type":"display","text":"Thank you for taking today's questionnaire! Please take this questionnaire at the same scheduled time tomorrow!","required":false}]}
6 changes: 6 additions & 0 deletions PICS/Resources/PROM-Questionnaire.json.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

This source file is part of the PICS based on the Stanford Spezi Template Application project

SPDX-FileCopyrightText: 2023 Stanford University

SPDX-License-Identifier: MIT
6 changes: 3 additions & 3 deletions PICS/Schedule/PICSScheduler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ extension PICSScheduler {
}

return Task(
title: String(localized: "TASK_SOCIAL_SUPPORT_QUESTIONNAIRE_TITLE"),
description: String(localized: "TASK_SOCIAL_SUPPORT_QUESTIONNAIRE_DESCRIPTION"),
title: String(localized: "TASK_PROM_QUESTIONNAIRE_TITLE"),
description: String(localized: "TASK_PROM_QUESTIONNAIRE_DESCRIPTION"),
schedule: Schedule(
start: Calendar.current.startOfDay(for: Date()),
repetition: .matching(dateComponents),
end: .numberOfEvents(365)
),
notifications: true,
context: PICSTaskContext.questionnaire(Bundle.main.questionnaire(withName: "SocialSupportQuestionnaire"))
context: PICSTaskContext.questionnaire(Bundle.main.questionnaire(withName: "PROM-Questionnaire"))
)
}

Expand Down