ResearchKit / ResearchKit/ResearchKit

Using ORKConsentDocument in ResearchKit 2.1

Open
#1,340 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Objective-C
Stars
5.7k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Hi! I'm having trouble using the new consent format in ResearchKit 2.1. I'm not able to customize the consent sections I want to display (i.e. datause, overview, etc.). This is what I originally had with ResearchKit 2.0 in a ConsentDocument.swift file:

class ConsentDocument: ORKConsentDocument {

override init() {
    super.init() // initialized consent doc
    
    let sectionTypes: [ORKConsentSectionType] =
        ORKConsentSectionType.overview,
        ORKConsentSectionType.dataGathering,
        ORKConsentSectionType.privacy,
        ORKConsentSectionType.withdrawing
    ]

I was able to iterate through sectionTypes in this same file and populate each of the sections with text like this:

    var type_index:Int
    type_index = 0
    for sectionType in sectionTypes {
        // populate sections document with each of the section types we listed  under section types
        let section = ORKConsentSection(type: sectionType)
        section.summary = summary_array[type_index]
        section.content = content_array[type_index]
        sections?.append(section)
        type_index+=1
    }

Any advice on how to convert this over into ResearchKit 2.1? Thank you!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ConsentDocument.swift and compare the shown ResearchKit 2.0 ORKConsentDocument and ORKConsentSection usage against the ResearchKit 2.1 APIs. Determine how the selected sections and their summary/content are meant to be configured in 2.1; done means a documented migration path or working equivalent that displays only the requested sections.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.