Apple ResearchKit now available on Progress Health Cloud

Apple ResearchKit now available on Progress Health Cloud

January 24, 2017 0 Comments
Kinvey-HealthCloud

As the leading HIPAA compliant Enterprise Health cloud, we are proud to announce the release of the Beta version of our Apple ResearchKit SDK to help developers accelerate the delivery of HIPAA compliant medical research apps.

ResearchKit is Apple’s iOS framework for medical research apps. From Apple’s ResearchKit page:

ResearchKit is an open source framework introduced by Apple that allows researchers and developers to create powerful apps for medical research. Easily create visual consent flows, real-time dynamic active tasks, and surveys using a variety of customizable modules that you can build upon and share with the community.

ResearchKit provides developers with a broad range of UI and model classes that make it easy to build workflows specific to medical research apps. ResearchKit leaves the responsibility of persistence and synchronization of data to the developer. This is where Kinvey comes in.

Kinvey provides a HIPAA compliant app cloud delivering a serverless backend for mHealth apps, as well as SDKs that interface with the platform and add client side capabilities such as caching, user management, data synchronization, etc. We integrated our iOS SDK with ResearchKit, so that developers have a toolkit to quickly spin up research apps that are backed by a compliant backend. The outcome of our integration is KinveyResearchKit, an SDK wrapper to ResearchKit that augments ResearchKit classes with Kinvey functionality.

Getting Started

Kinvey’s ResearchKit integration is available in our open source github repository. The repo contains the “KinveyResearchKit” wrapper SDK and a sample called “ORKCatalog”.

The Getting Started section of the README describes how to set up the codebase and test it out.

How it Works

The KinveyResearchKit SDK contains classes that wrap ResearchKit and augment it with Kinvey functionality. The KinveyResearchKit SDK has two main components:

Model Wrappers (subclasses of Result)

These classes add property mapping and transformations, as described in our Data Store guide, to the ResearchKit model classes. These wrapper classes enable you to use all of ResearchKit’s Result subclasses with the full range of Kinvey Data Store functionality, including caching and sync. The code below shows a data store created to save TaskResult objects to the backend. You can find this code in the ResultViewController class in ORKCatalog:

1. lazy var resultStore = DataStore.collection(.network)
2. ...
3.
4. resultStore.save(taskResult) { savedResult, error in
5. ...
6. }

Login Flow

The KinveyResearchKit SDK extends the classes that implement the login workflow in ResearchKit. These subclasses add logic to manage users in the Kinvey backend. All the key user operations such as signup, login, logout, email verification, etc. are integrated with Kinvey’s user store. The LoginStepViewController class adds Kinvey login capabilities to the ResearchKit ORKLoginStepViewController class, as shown in the snippet below.

1. open class LoginStepViewController: ORKWaitStepViewController {
2.
3. open override func viewDidAppear(_ animated: Bool) {
4. super.viewDidAppear(animated)
5. ...
6. User.login(username: email, password: password) { user, error in
7. if user != nil {
8. //user logged in to Kinvey
9. self.goForward()
10. } else {
11. //handle login errors
12. }
13. }
14. }

Using KinveyResearchKit in Your Own Project

To illustrate how you can start using KinveyResearchKit in your own app projects, we modified Apple’s ORKCatalog sample and made it a Kinvey-backed app. We made the following changes:

  • Added framework dependencies to Kinvey and KinveyResearchKit.
  • Added code in the AppDelegate to initialize Kinvey and login a user (as described in our Getting Started guide).
  • Created a DataStoreto save ORKResult objects to Kinvey. For every ORKResult, setting the resultproperty also saves the result to Kinvey (refer to the Data Store guide for details on how to save data to Kinvey)

What’s Next

We love to hear from developers about what they’re building and where they’d like us to improve. Our ResearchKit integration is open source, and we welcome your contributions and feedback. Feel free to get in touch with us through github or Kinvey support.

Here are some things we have on our roadmap:

tejas-ranade

Tejas Ranade

Tejas is a Director of Software Engineering at Progress. He leads the team responsible for Kinvey SDKs, which enable developers to write rich, fast, modern apps on a wide variety of client platforms. He has helped build products in the mobile and web platform space for the past 10 years. You can find him on Twitter and GitHub.

Comments
Comments are disabled in preview mode.
Topics
 
 
Latest Stories in
Your Inbox
Subscribe
More From Progress
New_Mobile_Dev_Ebook_Progress_Website_Thumbail
The New Mobile Development Landscape
Download Whitepaper
 
IDC Spotlight Sitefinity Thumbnail
Choosing the Right Digital Experience Platform to Improve Business Outcomes
Download Whitepaper
 
TheFastestWayToBuildMobileAppsArtboard-2
The Fastest Way to Build Mobile Apps With Cloud Data
Watch Webinar