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

Add support for multiple selection questions #64

Closed vishnuravi closed 1 year ago

vishnuravi commented 1 year ago

Add support for multiple selection questions

:recycle: Current situation & Problem

Currently, only a single choice can be selected for a multiple choice question. However, many questionnaires have questions that allow users to select multiple options simultaneously. This answer format is supported by the HL7 SDC Implementation Guide using the check-box UI control code with the questionnaire-item-control extension.

:bulb: Proposed solution

Updates ResearchKitOnFHIR to recognize the check-box code when using the questionnaire-item-control extension and render a question that allows the user to select multiple choices. All selected choices are included as answers in the resulting QuestionnaireResponse.

Code of Conduct & Contributing Guidelines

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

vishnuravi commented 1 year ago

To do:

codecov[bot] commented 1 year ago

Codecov Report

Merging #64 (47f0025) into main (f728c67) will increase coverage by 2.14%. The diff coverage is 95.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #64      +/-   ##
==========================================
+ Coverage   87.63%   89.76%   +2.14%     
==========================================
  Files           9        9              
  Lines         719      732      +13     
==========================================
+ Hits          630      657      +27     
+ Misses         89       75      -14     
Files Changed Coverage Δ
...tOnFHIR/ResearchKitToFHIR/ORKTaskResult+FHIR.swift 94.27% <94.29%> (+9.14%) :arrow_up:
...RToResearchKit/QuestionnaireItem+ResearchKit.swift 90.37% <100.00%> (+0.19%) :arrow_up:

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f728c67...47f0025. Read the comment docs.