Skip to content

update studies - #18

Open
lukaskollmer wants to merge 3 commits into
mainfrom
lukas/add-studies
Open

update studies#18
lukaskollmer wants to merge 3 commits into
mainfrom
lukas/add-studies

Conversation

@lukaskollmer

Copy link
Copy Markdown
Collaborator

♻️ Current situation & Problem

n/a

⚙️ Release Notes

  • adds the PedCardio study
  • updates the SpineAI study

📚 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:

@lukaskollmer lukaskollmer self-assigned this Aug 13, 2026
@lukaskollmer lukaskollmer added the enhancement New feature or request label Aug 13, 2026
@github-project-automation github-project-automation Bot moved this to In Progress in MyHeartCounts Aug 13, 2026
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change enables the Spezi dependency’s default trait and registers pedCardioStudy in Study.allStudies. It adds a pediatric cardiology study with six tasks, GPT-5.5, disabled retrieval, and multiple questionnaires. It also adds four chat and questionnaire tasks to SpineAI, including post-intervention and post-assessment surveys. Tests cover inference settings and chat availability for both studies.

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
Loading
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
Loading

Possibly related PRs

Mergeability Score: 🟡 Moderate · up to 0627a

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)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title relates to the study changes but is too generic to identify the added PedCardio study or updated SpineAI study. Use a specific title such as "Add PedCardio study and update SpineAI study".
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description identifies the PedCardio and SpineAI study changes and is related to the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7262d37 and 0627a41.

📒 Files selected for processing (5)
  • Plainly.xcodeproj/project.pbxproj
  • PlainlyShared/Sources/PlainlyStudyDefinitions/AllStudies.swift
  • PlainlyShared/Sources/PlainlyStudyDefinitions/PedCardioStudy.swift
  • PlainlyShared/Sources/PlainlyStudyDefinitions/SpineAI.swift
  • PlainlyShared/Tests/PlainlySharedTests/StudyTests.swift

Comment on lines +138 to +263
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
)
]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@florenceheinkelein-ops @lukaskollmer Good to double-check things here; N/A option is not available? Comment might not be bad.

@PSchmiedmayer PSchmiedmayer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to see this merged once IRB alignment is checked & all AI feedback is addressed/resolved. Thanks @lukaskollmer & @florenceheinkelein-ops 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants