Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move consenting setup to a consent manager #47

Closed
p2 opened this issue May 12, 2015 · 12 comments
Closed

Move consenting setup to a consent manager #47

p2 opened this issue May 12, 2015 · 12 comments

Comments

@p2
Copy link
Member

p2 commented May 12, 2015

Code used to setup and configure consenting could be moved to a new consent manager class. This would free up the app delegate and allow for easy customization by subclassing. For simple tie in to the app, AppCore may ask the app delegate, which should be adhering to a new consent manager provider protocol, for the consent manager.

cf. #41

@p2
Copy link
Member Author

p2 commented May 12, 2015

I have started work on this on https://github.com/chb/AppCore/tree/feature/consent_manager

@jwe-apple
Copy link
Member

I'm skeptical about this component but willing to be convinced. What does it add to what's in ResearchKit, apart from a file format and/or helpers for locating files on disk relative to the configuration?

@p2
Copy link
Member Author

p2 commented May 12, 2015

@jwe-apple It allows to drop in a JSON file and some resources (especially those nice videos created for the sample apps), write a bit of code and stand up the whole consenting flow. That is very useful to have IMHO.

I don't know how much that's worth, for now I'm just trying to fish it out of the bowl so I can use it standalone.

@jwe-apple
Copy link
Member

Hm. Base ResearchKit supports loading consent from a JSON file using ORKESerialization. And it actually does all the video presentation. I'd almost rather you tried using the ResearchKit stuff directly, and we can fix that if it doesn't fill your needs.

@p2
Copy link
Member Author

p2 commented May 12, 2015

@jwe-apple Guess I spent too much time in AppCore! I'll take a closer look at bare ResearchKit and will update here.

@p2
Copy link
Member Author

p2 commented May 12, 2015

@jwe-apple Is there an update on the status of moving ORKESerialization into RK?

@jwe-apple
Copy link
Member

Make a good argument ;-)

@p2
Copy link
Member Author

p2 commented May 18, 2015

There's still some consenting logic dispersed over a few APCConsentXy classes and APCEligibleViewController. If we can instantiate a consenting ORKTask from file and maybe add a manager object – or similar – to ResearchKit, we could indeed tease this apart and move it out of AppCore. Let me take a closer look.

@jwe-apple
Copy link
Member

@p2 Sure, thanks!

@jwe-apple jwe-apple reopened this May 29, 2015
@p2
Copy link
Member Author

p2 commented May 29, 2015

Still working on this, have been busy with backend aspects.

@p2
Copy link
Member Author

p2 commented Jul 24, 2015

As it stands currently, APCAppDelegate has a huge method to deserialize the consent task from JSON and instantiate ORKConsentSectionType instances – which is only used in -[APCProfileViewController showConsentSlides] to review consent slides after enrolling. A copy of the same huge method lives in APCConsentTask to instantiate itself. This has been consolidated on the feature branch.

The other part is the eligibility check and the logic afterwards, which to date is not handled by ResearchKit. People wanting to re-use the eligibility view controller and the “yes you're eligible, join now” and “no you can't join” views – with the former starting the consent task handled by ResearchKit – currently must use APCAppDelegate. The consent manager would alleviate this. Subclassing the manager would allow to customize the behaviors that currently are put into the initialization dictionary (kReviewConsentActionPDF and co).

In the meantime, this is what I'm using in our app. To handle the whole flow with ResearchKit alone we'd need:

  • JSON deserialization in ResearchKit:master.
  • A view controller that takes a list of eligibility criteria, then routes either to consenting or a "not eligible" view controller.
  • APCConsentTask has overridden stepAfterStep:withResult: and does some gymnastics there; could probably be recreated with a navigable task, which if it can be deserialized from JSON removes the need for the subclass.

@p2
Copy link
Member Author

p2 commented Aug 14, 2015

Closing as we've moved away from AppCore for this.

@p2 p2 closed this as completed Aug 14, 2015
Erin-Mounts added a commit to Erin-Mounts/AppCore that referenced this issue Jan 21, 2016
Enable localization of onboarding HTML content
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

No branches or pull requests

2 participants