Skip to content

C3-PRO/c3-pro-ios-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C3-PRO

This is the iOS framework, written in Swift, for our C3-PRO research framework.

Combining 🔥 FHIR and ResearchKit, usually for data storage into i2b2, this framework allows you to use FHIR Questionnaire resources directly with ResearchKit and will return FHIR QuestionnaireResponse that you can send to your server. In addition, a FHIR Contract resource can be used to carry trial eligibility requirements and define content to be shown during consenting. Subsequently, the contract can be “signed” with a FHIR Patient resource and returned to your server, indicating consent.

There are additional utilities for encryption, geolocation, de-identification and data queueing that go well with a research app. These are individual modules, meaning you can use only the parts you need. See below for what's included.

Usage

Taking a pure Swift approach, you will not be able to use this framework with Objective-C alone. Instead, you can use Swift code in your app, using a mix and match approach, to connect the C3-PRO components to the Objective-C bits in your app. See below for important Swift and FHIR version considerations.

⤵️ Installation
📱 Sample App
📖 Technical Documentation

import C3PRO

Versions

The master branch requires Xcode 8 and should always be compatible with the latest released version. It's on Swift 3.2 and FHIR STU-3.

The develop branch may contain new developments and have different requirements, it's currently on Swift 3 and FHIR 3.0.0 (STU-3).

See the releases tab for previous releases, for newer versions look for feature/x branches.

See CHANGELOG.md for updates. This framework combines several versioned technologies, here's an overview over what's included:

Version Swift ResearchKit FHIR  
2.0 3.2 1.5 3.0.0 STU-3
1.9 3.0 1.4 1.6.0 STU-3 Ballot
1.8 3.0 1.4 1.0.2 DSTU-2
1.2 2.2 1.3 1.4.0 not supported
1.1 2.2 1.3 1.0.2
1.0.1 2.2 1.3 1.0.2
1.0 2.0-2.2 1.3 1.0.2

Modules

The framework consists of several modules that complement each other.

Study Introduction

Shows the well-known “Welcome to my study” screens that allows users to inform themselves before joining your study.
➔ Study Intro

Eligibility & Consent

Using a FHIR Contract resource representing the consent document, can render eligibility questions and the consenting workflow.
➔ Consent

Questionnaires

Enables use of a FHIR Questionnaire resource as direct input to a ResearchKit survey task and return the encoded answers as a FHIR resource. Also serves as return format of activity data collected on the phone.
➔ Questionnaire

DataQueue

DataQueue is a FHIR server implementation used to move FHIR resources, created on device, to a FHIR server, without the need for user interaction nor -confirmation.
➔ DataQueue

ProfileManager, Users & Tasks

A collection of classes and protocols that make it easier to enroll, link and withdraw users from a research app. DataQueue is a FHIR server implementation used to move FHIR resources, created on device, to a FHIR server, without the need for user interaction nor -confirmation.
➔ Profile & User

HealthKit & CoreMotion (Activity Data)

ActivityReporter implementations for HealthKit and CoreMotion. The latter includes persistence of activity data past the 7 days iOS default. Extensions to HealthKit classes to easily query for samples and to represent quantities in FHIR.
➔ HealthKit

System Service Permissions

Facilities to request permission to send notifications, access HealthKit and others. These can be integrated into the Consent flow.
➔ SystemServices
➔ Notifications

Encryption

AES and RSA encryption facilities that come in handy. These work with facilities officially exposed by iOS, meaning you don't need to add OpenSSL to your app.
➔ Encryption

De-Identification & Geocoder

Helps creating de-identified patient resources, consistent with HIPAA Safe Harbor guidelines, with birthdate and ZIP (determined by Geocoder) truncated accordingly.
➔ DeIdentifier

Localization

The framework uses NSLocalizedString on the C3PRO table name, meaning it's looking at the C3PRO.strings file for string localization. There is an extension on String so we can simply use "My Text".c3_localized in code. If you're looking for localizable strings in code, search for this variable.

License

This work is Apache 2 licensed. Be sure to take a look at the NOTICE.txt file, and don't forget to also add the licensing information of the submodules somewhere in your product: