StanfordBDHG / ResearchKitOnFHIR

HL7 FHIR Structured Data Capture with ResearchKit on iOS
https://swiftpackageindex.com/StanfordBDHG/ResearchKitOnFHIR/documentation
MIT License
13 stars 2 forks source link

Fixed translation of required Form questions #73

Closed Supereg closed 8 months ago

Supereg commented 8 months ago

Fixed translation of required Form questions

:recycle: Current situation & Problem

As reported in #71 the requiredness of groups is not correctly mapped to ResearchKit Forms. There are two mistakes here:

  1. The isOptional property of the individual ORKFormItem is invested (this controls if the "Continue" button is rendered enabled or disabled)
  2. The isOptional property of the ORKFormStep is never set (controls the appearance of the "Skip" button).

:gear: Release Notes

:books: Documentation

Added inline docs to explain the different semantics of the two isOptional properties.

:white_check_mark: Testing

Added UI tests to verify this behavior. Our existing Form Example FHIR questionnaire had a Form with 3 question out of which 2 are required. We ensure that the Skip button doesn't show up and the Next Button is only enabled once all the required question are answered.

Code of Conduct & Contributing Guidelines

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

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 83.81%. Comparing base (7f65fe3) to head (e3aa12f).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/StanfordBDHG/ResearchKitOnFHIR/pull/73/graphs/tree.svg?width=650&height=150&src=pr&token=A9IUX2PFCL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordBDHG)](https://app.codecov.io/gh/StanfordBDHG/ResearchKitOnFHIR/pull/73?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordBDHG) ```diff @@ Coverage Diff @@ ## main #73 +/- ## ========================================== - Coverage 89.35% 83.81% -5.53% ========================================== Files 9 9 Lines 732 741 +9 ========================================== - Hits 654 621 -33 - Misses 78 120 +42 ``` | [Files](https://app.codecov.io/gh/StanfordBDHG/ResearchKitOnFHIR/pull/73?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordBDHG) | Coverage Δ | | |---|---|---| | [...RToResearchKit/QuestionnaireItem+ResearchKit.swift](https://app.codecov.io/gh/StanfordBDHG/ResearchKitOnFHIR/pull/73?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordBDHG#diff-U291cmNlcy9SZXNlYXJjaEtpdE9uRkhJUi9GSElSVG9SZXNlYXJjaEtpdC9RdWVzdGlvbm5haXJlSXRlbStSZXNlYXJjaEtpdC5zd2lmdA==) | `78.86% <100.00%> (-11.51%)` | :arrow_down: | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/StanfordBDHG/ResearchKitOnFHIR/pull/73/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordBDHG) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/StanfordBDHG/ResearchKitOnFHIR/pull/73?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordBDHG). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordBDHG) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/StanfordBDHG/ResearchKitOnFHIR/pull/73?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordBDHG). Last update [7f65fe3...e3aa12f](https://app.codecov.io/gh/StanfordBDHG/ResearchKitOnFHIR/pull/73?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordBDHG). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordBDHG).