update studies - #18
Conversation
📝 WalkthroughWalkthroughThe change enables the Spezi dependency’s Sequence Diagram(s)sequenceDiagram
participant StudyCatalog as Study.allStudies
participant PedCardioStudy
participant StudyTasks as Study tasks
participant Questionnaires as SpeziQuestionnaire
StudyCatalog->>PedCardioStudy: Includes pediatric cardiology study
PedCardioStudy->>StudyTasks: Configures sequential tasks
PedCardioStudy->>Questionnaires: Adds feedback and health surveys
sequenceDiagram
participant SpineAI
participant SpineAITasks as SpineAI tasks
participant Questionnaires as SpeziQuestionnaire
SpineAI->>SpineAITasks: Configures four tasks
SpineAITasks->>Questionnaires: Presents post-intervention and post-assessment surveys
Possibly related PRs
Mergeability Score: 🟡 Moderate · up to The PedCardio post-intervention questionnaire mixes agreement wording with frequency response options, so participants may answer the same statements using different criteria and produce non-comparable study data. Merge should wait until the protocol-approved response scale and any required N/A option are aligned. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@PlainlyShared/Sources/PlainlyStudyDefinitions/PedCardioStudy.swift`:
- Around line 138-263: Update postInterventionQuestions so the introduction and
every .scale task consistently use the single protocol-approved
agreement/disagreement response scale. Remove or revise the conflicting “Always,
Often, Sometimes, Never” wording, preserve the required N/A option, and replace
frequencyOptions with the matching agreement-scale options for all questions.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: e143e177-c53f-487e-96af-5f8e6e6aef98
📒 Files selected for processing (5)
Plainly.xcodeproj/project.pbxprojPlainlyShared/Sources/PlainlyStudyDefinitions/AllStudies.swiftPlainlyShared/Sources/PlainlyStudyDefinitions/PedCardioStudy.swiftPlainlyShared/Sources/PlainlyStudyDefinitions/SpineAI.swiftPlainlyShared/Tests/PlainlySharedTests/StudyTests.swift
| private let postInterventionQuestions: [Questionnaire.Task] = [ | ||
| .instructional( | ||
| """ | ||
| Please complete the survey below. | ||
| Thank you! | ||
|
|
||
| Below are some statements that people sometimes make when they talk about their health. Please indicate how much you agree or disagree with each statement as it applies to you personally by circling your answer. Your answers should be what is true for you and not just what you think others want you to say. | ||
|
|
||
| If the statement does not apply to you, select N/A. (All questions are assessed with Always, Often, Sometimes, Never) | ||
|
|
||
| Please answer these questions based on how you feel **with access to an application** like Plainly. | ||
| """ | ||
| ), | ||
| .scale( | ||
| "When all is said and done, I am the person who is responsible for taking care of my / my child’s health", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "Taking an active role in my/ my child’s health care is the most important thing that affects my health and ability to function", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I know what each of my/ my child’s prescribed medications do and what the major or common side effects are", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I am confident that I can tell my/ my child’s health care provider/ doctor concerns I have even when he or she does not ask", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I am confident that I can tell whether I/ my child need to go get medical care to go to the doctor or whether I can take care of a health problem", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I am confident I can help prevent or reduce problems associated with my/ my child’s health", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I know the lifestyle changes like diet and exercise that are recommended for my/ my child’s health condition", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I am confident that I/ my child can follow through on medical treatments I/ my child may need to do at home", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I am confident that I can take actions that will help prevent or minimize some symptoms or problems associated with my/ my child’s health condition", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I am confident that I/ my child can follow through on medical recommendations my/ my child’s health care provider makes, such as changing my diet or doing regular exercise", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I understand the nature and causes of my/ my child’s health condition(s)", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I know the different medical treatment options available for my/ my child’s health condition", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I have / My child has been able to maintain (keep up with) lifestyle changes that I have/ my child has made for my/ my child’s health, like eating right or exercising", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I know how to prevent further problems with my/ my child’s health", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I know about the self-treatments for my/ my child’s health condition", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I have made the changes in my/ my child’s lifestyle like diet and exercise that are recommended for my/ my child’s health condition", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I am confident I can figure out solutions when new problems arise with my/ my child’s health", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I am able to handle symptoms of my/ my child’s health condition on my own at home", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I am confident that I/ my child can maintain lifestyle changes, like eating right and exercising, even during times of stress", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I am able to handle problems of my/ my child’s health condition on my own at home", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I am confident I can keep my/ my child’s health problems from interfering with the things I/ my child want(s) to do", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "Maintaining the lifestyle changes that are recommended for my/ my child’s health condition is too hard on a daily basis", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I understand the trajectory of my child’s condition and why they need lifelong cardiology care.", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I know what symptoms for which I should call my child’s cardiologist immediately.", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I understand why my child needs or needed surgery to correct their heart lesion", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I understand what future surgeries/interventions, if any, may be required.", | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| #"I now find the language and abbreviations (e.g., "VSD," "echo," "cath") used in my child's medical chart easier to navigate"#, | ||
| options: .frequencyOptions | ||
| ), | ||
| .scale( | ||
| "I can confidently describe my child’s heart lesion", | ||
| options: .frequencyOptions | ||
| ) | ||
| ] |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Use one response scale for the post-intervention questionnaire.
The introduction asks participants to rate agreement or disagreement. It then directs them to use “Always, Often, Sometimes, Never.” The questionnaire tasks also use frequencyOptions.
Participants can apply different response criteria to the same statements. This can produce non-comparable study data. Align the instructions and every question with the protocol-approved response scale, including the stated N/A option if required.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@PlainlyShared/Sources/PlainlyStudyDefinitions/PedCardioStudy.swift` around
lines 138 - 263, Update postInterventionQuestions so the introduction and every
.scale task consistently use the single protocol-approved agreement/disagreement
response scale. Remove or revise the conflicting “Always, Often, Sometimes,
Never” wording, preserve the required N/A option, and replace frequencyOptions
with the matching agreement-scale options for all questions.
There was a problem hiding this comment.
@florenceheinkelein-ops @lukaskollmer Good to double-check things here; N/A option is not available? Comment might not be bad.
PSchmiedmayer
left a comment
There was a problem hiding this comment.
Happy to see this merged once IRB alignment is checked & all AI feedback is addressed/resolved. Thanks @lukaskollmer & @florenceheinkelein-ops 🚀
♻️ Current situation & Problem
n/a
⚙️ Release Notes
📚 Documentation
n/a
✅ Testing
some
Code of Conduct & Contributing Guidelines
By creating and submitting this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: