You are previewing Getting Started with ResearchKit.
O'Reilly logo
Getting Started with ResearchKit

Book Description

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

About This Book

  • 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.

  • Who This Book Is 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

  • In Detail

    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.

    Style and approach

    A hands-on guide with ample screenshots for you to follow and learn about ResearchKit. Each topic is explained sequentially and placed in context so that you can get a better understanding of every step in the process of creating clinical research apps.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at If you purchased this book elsewhere, you can visit and register to have the code file.

    Table of Contents

    1. Getting Started with ResearchKit
      1. Table of Contents
      2. Getting Started with ResearchKit
      3. Credits
      4. About the Authors
      5. About the Reviewers
        1. Support files, eBooks, discount offers, and more
          1. Why subscribe?
          2. Free access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Getting Started
        1. What is ResearchKit?
          1. Privacy
        2. Identification, authentication, and authorization
        3. Informed consent
        4. Relationship with HealthKit
          1. Features not provided by ResearchKit
        5. The anatomy of a ResearchKit-based application
        6. Summary
      9. 2. ResearchKit Hello World
        1. Hello World App
          1. Create project
          2. Checkout ResearchKit from GitHub
          3. Import ResearchKit
          4. Enable Data Protection
          5. Hello World!
        2. Introducing Softwareitis
        3. Summary
      10. 3. Building Surveys
        1. ResearchKit object model
          1. Tasks and steps
          2. Task view controller and results
        2. Building surveys
          1. Instruction step
          2. Question step
          3. Form step
          4. Considerations for real-world surveys
        3. BONUS: Appearance customization
        4. Summary
      11. 4. ResearchKit Informed Consent
        1. Consent document
        2. Visual consent step
        3. Consent review step
        4. Consent sharing
        5. Consent process
        6. Obtaining results
        7. Summary
      12. 5. Active Tasks
        1. Active tasks
          1. Short walk task
            1. Sample code
            2. Results
            3. Screenshot
          2. Two-finger tapping interval task
            1. Sample code
            2. Results
            3. Screenshot
          3. Fitness task
            1. Sample code
            2. Results
            3. Screenshot
          4. Spatial memory task
            1. Sample Code
            2. Results
            3. Screenshot
          5. Sustained phonation task
            1. Sample code
            2. Results
            3. Screenshot
          6. Data formats
          7. Pedometer data
          8. Location data
          9. Device motion data
          10. Accelerometer data
          11. Audio data
        2. Summary
      13. 6. Navigable and Custom Tasks
        1. Navigable ordered tasks
        2. Custom tasks
        3. Summary
      14. 7. Backend Service
        1. Why is backend service needed?
          1. Security and privacy
          2. Introduction to Sage Bionetworks and the Bridge service
          3. Introduction to sample ResearchKit backend server
          4. Serialization of task results
            1. The serialization of survey responses
            2. Serialization of file results
        2. Summary
      15. 8. Where to Go from Here
        1. Restoring tasks
          1. Graphs and charts
            1. Pie chart
            2. Line graph
            3. Discrete graph
          2. Scheduling
            1. Cron expressions
            2. APCSchedule Expression
          3. Safeguarding Data-in-transit
          4. A theoretical architecture for ResearchKit-based applications
            1. Presentation layer
            2. Business logic layer
            3. Data substrate layer
          5. Online ResearchKit resource
        2. Summary
      16. Index