Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Getting Started with ResearchKit
Getting Started with ResearchKit

Getting Started with ResearchKit: Enter the era of medical research using mobile devices with the help of this guide on ResearchKit!

Arrow left icon
Profile Icon Balachandran Profile Icon Cessna
Arrow right icon
€18.99 per month
Paperback Feb 2016 136 pages 1st Edition
eBook
€8.99 €29.99
Paperback
€37.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Balachandran Profile Icon Cessna
Arrow right icon
€18.99 per month
Paperback Feb 2016 136 pages 1st Edition
eBook
€8.99 €29.99
Paperback
€37.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€8.99 €29.99
Paperback
€37.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. €18.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Getting Started with ResearchKit

Chapter 1. Getting Started

On March 9, 2015, Apple introduced ResearchKit, a software framework that facilitates the development of health and clinical-based research applications for iOS. Doctors and researchers will be able to collect larger quantities of data frequently and with greater accuracy through the applications built with ResearchKit. The ultimate goal is to increase the research community's knowledge on diseases that could potentially lead to medical breakthroughs in the treatment of the studied diseases.

In conjunction with ResearchKit's announcement, Apple announced and released five ResearchKit-based applications. These applications are as follows:

  1. Asthma Health: This is developed by Mount Sinai in order to study asthma triggers and help participants self-manage their asthma. This application makes heavy use of ResearchKit's survey capabilities and custom tasks.
  2. mPower: This is developed by the University of Rochester and Sage Bionetworks in order to study the variability in the symptoms of Parkinson's disease. This application utilizes ResearchKit's two-finger tapping, short walk, spatial-span memory, and custom tasks.
  3. GlucoSuccess: This is developed by Massachusetts General Hospital to study how diet, physical activity, and medications affect blood glucose levels for participants with type 2 diabetes. This application utilizes ResearchKit's survey capability and custom tasks.
  4. Share the Journey: This is developed by the Dana-Farber Cancer Institute, UCLA Fielding School of Public Health, Penn Medicine, and Sage Bionetworks to study the long-term effects of chemotherapy used in the treatment of breast cancer. This application utilizes ResearchKit's survey and custom tasks.
  5. MyHeart Counts: This is developed by Stanford Medicine and the University of Oxford in order to study how a participant's lifestyle affects the risk of cardiovascular disease. This application utilizes ResearchKit's fitness-check task and surveys, and custom tasks.

The five initial ResearchKit-based applications shared similar user experience. Using a common application core that's independent of ResearchKit, these applications had a common on-boarding process to enroll new participants in the study, an activity list to present tasks that the researchers wish the participants to carry out, and a dashboard to present the results of the previously carried out tasks. Additionally, these applications used the same backend service to establish accounts, download task schedules and surveys, and upload the collected data in a secure manner.

Apple has open sourced all of the initial ResearchKit applications, and the application core that provides additional services and capabilities beyond these features of ResearchKit.

Note

Links to the source code, documentation, and other information can be found on www.apple.com/researchkit and www.researchkit.org; the source code is hosted directly on GitHub at https://github.com/researchkit.

The open source applications serve as an example for researchers to undertake the development of their own ResearchKit-based applications. As examples, there are differences between these applications and the ones available from the App Store. In general, copyright material has been removed along with the cryptographic credentials that enable the applications to upload data to the researcher's servers.

What is ResearchKit?

At its core, ResearchKit orchestrates the administering of tasks and recording of the results from each step of the task. ResearchKit's tasks are segregated into modules: surveys, informed consent, and active tasks. Surveys are questionnaires that prompt the participant to answer to a set of questions for the purpose of recording information that can be used for statistical analysis. Surveys support a variety of question types and answer formats. The informed consent module provides the basic mechanism that is necessary to conduct informed consent visually. Active tasks provide the framework that is necessary to allow applications to develop tasks for the participant. On its announcement, ResearchKit was shipped with a number of predefined tasks, as follows:

  1. Fitness check: The participant is asked to walk for a specified duration while recording data from various sensors. If the heart-rate data is available at the conclusion of the task, the user is asked to sit down for a duration and the data recording continues.
  2. Short Walk: The participant is asked to walk a short distance while data from the accelerometer and pedometer data is being recorded.
  3. Audio recording: The participant is asked to record the sound that they make.
  4. Finger tapping: The participant is asked to tap two targets on the screen as touch activity and accelerometer data is being recorded.
  5. Spatial-span memory: The participant is asked to participate in a game-like task that tests their ability to repeat a pattern of increasing length.

Subsequent chapters will go to greater depths on how to use the predefined activities provided by ResearchKit and construct new active tasks.

Privacy

In a clinical research application, nothing is more important than the privacy of the user's personal information. Whether this information resides in a device or during transmittal to a data-collection server, personal health information must be safeguarded at each step. Information in the device must be protected irrespective of whether the application operating in the foreground, background, or not executing at all. If the information is transmitted to a data-collection server, it must be safeguarded during transmission. Safeguarding data in transit includes protecting the data during transmission as well as ensuring that the data is going to the correct destination.

Safeguarding of personal health information is the responsibility of the application. ResearchKit provides little capability in this regard other than to ensure classes that may contain user information compile with the NSSecureCoding protocol. The following security and privacy-related issues must be considered by the application developer:

  • The Data Protection service is the default level of protection for data files stored in the device by the iOS application.
  • The Data Protection level for directories that may contain the uploaded data in the background.
  • The protection of files containing the data that may be uploaded. The data to be uploaded will need additional levels of protection than those offered by the Data Protection service.
  • The authentication of the endpoint where data will be uploaded.

Identification, authentication, and authorization

Identification, authentication, and authorization are the key concepts in information security. Identification is simply claiming you are somebody. Authentication is proving that you are who you say you are. Authorization is where an authority gives you the permission to carry out a specific task or set of tasks. It is highly likely that these concepts will come into play for a ResearchKit-based application, considering that the application may record, transmit, and display sensitive information about the participant.

ResearchKit does not provide any support for identification, authentication, or authorization; it is up to the application developer to implement the required functionality. Depending on the requirements of an application, the developer may need to implement features to identify and authenticate a participant for both the iOS device and web services (for example, data collection service). Identifying and authenticating to a device is to ensure that the right person is using the application. Identifying and authenticating to a web service is to ensure that the data is only collected from consented individuals.

For devices with Touch ID, Apple's fingerprint recognition feature, an application developer may use this technology to identify and authenticate a participant to the device. Available in all iOS devices, Apple's keychain technology may be used to store log-on credential for any web services. Once a participant has been authenticated to the device, the application may retrieve the web services' credentials from the keychain.

Informed consent

Informed consent is a standard practice for health providers and clinical researchers in providing health care or conducting clinical research; it is not a concept specific to ResearchKit. Obtaining informed consent from participants, prior to enrolling them in a clinical study, is to ensure that the permission has been given and the participant has a clear understanding of the facts, implications, and consequences of their participation in the study. As such, informed consent and its constituents are a vast topic that is beyond the scope of this book.

ResearchKit provides the mechanism that is necessary to present the informed consent document to the participant as an animated sequence of pages as well as the document in its totality. Each page may have more information that presents more details on the page's topic. ResearchKit comes with a number of predefined sections, as shown in the following:

  • Overview
  • Data gathering
  • Privacy
  • Data use
  • Time commitment
  • Surveys
  • Tasks
  • Withdrawal

The informed consent module includes the ability to record the participant's signature if that is required by a study's informed consent process. This is not a digital signature (that is, verifiable and irrevocable) and ResearchKit has no provisions to collect such signatures. It's the application developer's responsibility to provide support for digital signature, if required by the study protocol.

Informed consent is a ResearchKit task. As such, it may be extended in order to comply with the requirements of the study. For example, the consent process for some of the initial ResearchKit applications presents a comprehension quiz that the participants were required to pass in order to be deemed consented.

Relationship with HealthKit

Apple promotes HealthKit as a technology that allows iOS applications providing health and fitness services to share data with each other. Effectively, HealthKit is a system-wide, health-specific database with developer services that allow the applications to read and write health data to HealthKit. Given the sensitivity of the data stored in the HealthKit repository, HealthKit will request permission from the user for each requested category of information and whether or not the application is allowed to read or write data of the requested category.

ResearchKit and HealthKit are separate but related technologies. ResearchKit utilizes HealthKit in a variety of ways. ResearchKit tasks may require access to information stored in HealthKit in order to present appropriate feedback to the participant or record such information for statistical analysis. A ResearchKit task may write information to HealthKit (for example, a participant's weight, blood pressure, and so on) after obtaining the participant's permission. Additionally, ResearchKit uses HealthKit to perform unit conversion on the data that is captured from various sensors or read from HealthKit.

Features not provided by ResearchKit

A ResearchKit-based application may need additional features beyond those provided by ResearchKit. The initial set of ResearchKit-based application provide the following capabilities:

  • Backend services: In order to be of any use, the recorded data must be transmitted somewhere for analysis. The initial ResearchKit-based applications used a service from a non-profit organization, Sage Bionetworks.
  • User feedback of completed tasks: Appropriate levels of feedback to the user create engaging applications that encourages the user to continue using the application. This increases the likelihood of continued data streams from the participants.
  • Data security and privacy: Applications must safeguard a participant's personal information by applying the appropriate level data and communication security.
  • Passive data collection: Depending on the nature of the research study, it may be beneficial for the application to collect data in the background without direct participant involvement. For example, using location tracking at a low frequency, an application can obtain relative displacements and use it as a measure of socialization.
  • Task scheduling: A study may want tasks performed at different frequencies and quantities.

The anatomy of a ResearchKit-based application

The five initial ResearchKit-based applications share a common software architecture. One based on a layered architecture using common software components in order to provide a similar user experience and application functionality. While ResearchKit offers a wealth of opportunities for different types of research applications, the following figure describes a generic architecture that's common to what the initial ResearchKit-based application employed. Using a layered architecture and common components, a developer may create the basis for a family of applications. Such a framework could be used to address the needs for multiple applications at a reduced cost and increased software quality, as shown in the following diagram:

The anatomy of a ResearchKit-based application

The figure describes a generic architecture that can form the basis of a ResearchKit-based application. Using a layered approach, the architecture has features described in the following paragraphs.

A central Data Model that services the needs for the upper layers and components. This layer includes the following components:

  • A data upload component that is responsible to upload data, track the success or failure of the upload attempts, retry failed upload attempts, and clean up the data that has been successfully uploaded.
  • A data download component that either periodically or on-demand, downloads new task schedules, survey contents, and news about the study that the researchers desire to share with participant.
  • A data archiving component that packages the data to be uploaded to the studies backend server or other destinations. This component can support one or more formats. A key feature of this component is to ensure the confidentiality of the data prior to uploading it to the data collection service. The five initial ResearchKit-based applications used the Cryptographic Message Syntax (RFC 5652) in order to wrap the data for safeguarding.
  • One or more passive data collector components. With the participant's explicit permission, these components could collect the data from the various sensors on the device and then trigger a data upload. For example, in order to determine whether the participants were socializing or homebound, a number of the initial ResearchKit-based applications collected relative displacement of the device location. Relative displacement allows the researchers to determine socialization, while avoiding collecting sensitive location data.

An on-boarding process will be common for ResearchKit-based applications. During this process, the applications could present background information about the study, collect any required demographic information, and perform the consent process (a ResearchKit-based activity). This layer includes the following components:

  • A consent process component that performs the informed-consent process. ResearchKit supports this activity and provides many features to shape this feature.
  • A service signup component, if it is necessary for the participant to provide some kind of login credential or identity with a data collection service.
  • For applications that retrieve data from HealthKit, a HealthKit permissions component could inform the participant in one place as to which data will be collected and why. This would be an excellent place to allow the participant to opt out of the collection for one or more HealthKit parameters.

Given the potential sensitive nature of ResearchKit-based applications, the identity and authentication of the application user as a study participant should always be determined prior to allowing a user to use the application. As a variety of data, events, time triggers, and so on could be input in to the authentication process, this component may best be implemented as a state machine.

Once a user has been authenticated (gone through the on-boarding process and authenticated), the heart of this theoretical application's user interface is the dashboard. The dashboard layer includes the following components:

  • A to-do activities component that displays a list of activities that the researchers wish the study participants to accomplish. These activities can include ResearchKit-based tasks (for example, surveys) or custom tasks that do not employ ResearchKit. An example of the latter would be a news component, where the researchers share ongoing information about the study in general.
  • A task results component, where the application shares the results or summary of the results for completed tasks. If task-aggregated results are available (either baked in the application or downloaded via the data download complement), the application could inform the participant how they are performing with respect to the study's population norm.
  • A preference component that allows the participant to customize the application to serve their need. This would be an excellent place to allow the participant to opt out or opt in to the collection of specific data parameters. Additionally, this component could serve as the vehicle to allow the participants to withdraw from the study.

The top component in this layered architecture is the user interface component. This component provides the heart and soul from a user's experience point of view. This component will also address any branding requirements levied by the research institution.

Summary

In this chapter, you were introduced to ResearchKit framework and the different aspects of a ResearchKit-based application.

In the next chapter, we will write a simple Hello World ResearchKit-based application.

Left arrow icon Right arrow icon

Key benefits

  • Create a simple clinical research app using most aspects of ResearchKit
  • Build a simple survey with various data types with the results printed on the screen.
  • A step-by-step guide introducing Apple's ResearchKit and techniques to incorporate it into various apps.

Description

ResearchKit is an open source software development framework from Apple that lets you easily create mobile applications for clinical research studies. ResearchKit provides you the ability to orchestrate the administration of tasks and recording of the results. ResearchKit provides tasks in order to perform informed consent, active tasks, and surveys. Starting with the basics of the ResearchKit framework, this books walks you through the steps of creating iOS applications that could serve as the basis of a clinical research mobile app. This book will introduce readers to ResearchKit and how to turn your iPhone into into a clinical research tool. The book will start off by installing and building the research framework in line with the researcher's needs; during this, the reader will learn to embed ResearchKit in the application and create a small task. After this, the book will go a little deeper into creating modules for surveys, consents, and so on. The book will also cover the various aspects of privacy and security with regard to participant data, and how to build dashboards for visualizing medical data and results in line with the researcher's requirements: data backends, JSON serialization and deserialization, and so on. Readers will be able to fully utilize ResearchKit for medical research, will be able to get more and more patients to participate in their surveys, and will gain insights from the surveys using the dashboards created.

Who is this book for?

This book is aimed at medical researchers with basic iOS coding knowledge and iOS developers looking to create clinical research apps.

What you will learn

  • Learn to create customized consent form
  • Get introduced to two backend services: a simple backend server using Sinatra and Sage Bridge
  • Build a custom task (a conditional survey example) and a navigable task
  • Get an Overview of ResearchKit s open source repository and App Core
  • Interaction with the hardware of the device including the gyro and the motion sensors
  • Learn the basics of this revolutionary technology
  • Get introduced to the barebones app and learn to write your first code

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Feb 18, 2016
Length: 136 pages
Edition : 1st
Language : English
ISBN-13 : 9781785889172
Category :
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. €18.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Feb 18, 2016
Length: 136 pages
Edition : 1st
Language : English
ISBN-13 : 9781785889172
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 104.97
Learning Javascript Robotics
€24.99
Getting Started with ResearchKit
€37.99
Vulkan Cookbook
€41.99
Total 104.97 Stars icon
Banner background image

Table of Contents

9 Chapters
1. Getting Started Chevron down icon Chevron up icon
2. ResearchKit Hello World Chevron down icon Chevron up icon
3. Building Surveys Chevron down icon Chevron up icon
4. ResearchKit Informed Consent Chevron down icon Chevron up icon
5. Active Tasks Chevron down icon Chevron up icon
6. Navigable and Custom Tasks Chevron down icon Chevron up icon
7. Backend Service Chevron down icon Chevron up icon
8. Where to Go from Here Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.