Skip to content

Align Questionnaire Catalog with Grove FHIR - #47

Open
PSchmiedmayer wants to merge 31 commits into
lukas/study-variantsfrom
feature/grove-questionnaire-contract
Open

PSchmiedmayer wants to merge 31 commits into
lukas/study-variantsfrom
feature/grove-questionnaire-contract

Conversation

@PSchmiedmayer

@PSchmiedmayer PSchmiedmayer commented Aug 30, 2026 •

Copy link
Copy Markdown
Collaborator

♻️ Current situation & Problem

The Questionnaire catalog predates the current Grove FHIR contract. Its localized resources use obsolete profile metadata, nonstandard context coding, legacy Quantity extensions, and structural defaults that no longer validate cleanly. The catalog also has no executable guarantee that English and Spanish definitions preserve the same canonical and answer contract or that Grove can import and export every Questionnaire.

Localized instruments were also published as separate resources under one url|version, which the Grove FHIR contract (SchmiedmayerLab/grove-fhir#42) now forbids: one instrument is one multilingual Questionnaire.

⚙️ Release Notes

  • Align all 28 localized Questionnaires with the Grove Questionnaire profile and stable My Heart Counts canonical URLs.
  • Declare every Questionnaire active, version 0.1.0, with the standard semantic-version algorithm.
  • Replace legacy fixed-unit and numeric-bound extensions with questionnaire-unitOption and the SDC Quantity bounds.
  • Correct usage-context and item-control coding, remove invalid page controls, duplicate nested element ids, empty metadata, and redundant default flags.
  • Pin Grove 050ba883b2fdea6a91d93d2405e4121ca9a736cf (Disable lowered deployment targets by default Grove#116), including the FHIR APIs and standard deployment targets, while the coordinated repositories land.
  • Export one multilingual Questionnaire per instrument: the en-US base with es-US translation extensions, merged from the per-locale sources, which stay the authoring format.
  • Localize the Spanish HeartRisk units and vital-signs category, and drop the WHO-5 test Markdown that showed English copy to Spanish participants.
  • Build the Linux leg with --build-system native until Swift 6.4.x ships the fix for [SwiftBuild] Dependencies of conditionally excluded deps get compiled swiftlang/swift-package-manager#10538.
  • Add Grove Questionnaire import/export dependencies to the test target only.
  • Bump studyRevision from 44 to 48.

📚 Documentation

The validated Questionnaire resources remain the authoritative catalog. The README describes the per-locale sources, the multilingual export, and the rule that any translation change needs a new version.

✅ Testing

  • swift test passes, including Grove diagnostics, import, and export for every localized Questionnaire.
  • Contract tests verify canonical uniqueness, profile, version, status, semantic-version metadata, item hierarchy, fixed Quantity semantics, and English/Spanish parity.
  • Strict SwiftLint passes with no violations.
  • The deterministic Grove Questionnaire validator passes all 28 resources.
  • The official HL7 FHIR Validator accepts all 28 resources against the current Grove Questionnaire package.
  • Against Grove 66f0a88e and grove-fhir 9c5eff4: 8 tests pass on macOS and on Linux (native build system); the export yields 14 merged Questionnaires whose every translation matches its source, and grove-fhir's paired and official validators accept them together with an English HeartRisk and a Spanish GAD-7 response.

Code of Conduct & Contributing Guidelines

By creating and submitting this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

@coderabbitai

coderabbitai Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 7b7682be-107f-4bfb-8d75-1844cf162d75


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.

PSchmiedmayer added a commit to SchmiedmayerLab/.github that referenced this pull request Sep 23, 2026
### ♻️ Current situation & Problem

`swift-test.yml` builds with a plain `swift build` before `swift test`,
and its only passthrough, `test_flags`, reaches `swift test` alone.
A caller therefore cannot pass options both commands must share, such as
a build system or compiler flags.

This is needed now because Swift 6.4.0's default build system compiles
targets that are only reachable through an inactive platform condition
([swiftlang/swift-package-manager#10538](swiftlang/swift-package-manager#10538)).
On Linux, consumers of Grove fail in `GroveKeychainStorage` (`no such
module 'Security'`) until the fix, already backported in
[#10556](swiftlang/swift-package-manager#10556),
ships in a 6.4.x release.
With `build_flags: '--build-system native'` they can build until then.

### ⚙️ Release Notes

- Add a `build_flags` input to `swift-test.yml`, passed to both `swift
build` and `swift test`; it defaults to empty, so existing callers are
unchanged.
- Clarify that `test_flags` is passed to `swift test` only.

### 📚 Documentation

The input descriptions and the Run Swift Tests section of the README
explain which flags go where.

### ✅ Testing

`actionlint` passes, and the flag expansion was checked for an empty, a
single and a multi-flag value.
The first callers are SchmiedmayerLab/MyHeartCounts-StudyDefinitions#47
and SchmiedmayerLab/MyHeartCounts-iOS#204 once this is released.

### Code of Conduct & Contributing Guidelines

- [x] I agree to follow the [Code of
Conduct](https://github.com/SchmiedmayerLab/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/SchmiedmayerLab/.github/blob/main/CONTRIBUTING.md).
@lukaskollmer
lukaskollmer changed the base branch from main to lukas/study-variants September 27, 2026 15:39
@lukaskollmer
lukaskollmer added this pull request to stack #51 September 28, 2026 05:52
@lukaskollmer
lukaskollmer self-requested a review September 28, 2026 06:06
…G/MyHeartCounts-StudyDefinitions into feature/grove-questionnaire-contract

# Conflicts:
#	.github/workflows/verify-study-bundle.yml
#	Package.swift
#	README.md
#	Sources/MHCStudyDefinitionExporter/Study.swift
#	Tests/MHCStudyDefinitionExporterTests/MHCStudyDefinitionExporterTests.swift
@lukaskollmer
lukaskollmer marked this pull request as ready for review September 28, 2026 06:54
@lukaskollmer lukaskollmer mentioned this pull request Sep 28, 2026
1 task done

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants