indivo ios framework

36
Indivo iOS Framework Pascal B Pfiffner Kenneth D Mandl Intelligent Health Laboratory Children's Hospital Informatics Program Boston Children's Hospital Harvard Medical School

Upload: amia

Post on 07-Nov-2014

46 views

Category:

Documents


3 download

DESCRIPTION

2013 Summit on Clinical Research Informatics

TRANSCRIPT

Page 1: Indivo iOS Framework

Indivo iOS FrameworkPascal B PfiffnerKenneth D MandlIntelligent Health LaboratoryChildren's Hospital Informatics ProgramBoston Children's HospitalHarvard Medical School

Page 2: Indivo iOS Framework

Writing medical apps

Medical Data

Page 3: Indivo iOS Framework

Connecting medical apps

• To some sources you just can’t connect – EHRs

• To other sources you can – but it’s a ton of work

• What we need is low hacktivation energy

➔ Frameworks

Page 4: Indivo iOS Framework

IndivoPersonally Controlled Health Record

Page 5: Indivo iOS Framework

Indivo PCHR

• Full-featured backend for personally controlled health record (PCHR) data

• App platform with an extensive API

• Comes with a substitutable front end

• Open Source (github.com/chb)

➔ Patient portal for research projects

Page 6: Indivo iOS Framework
Page 7: Indivo iOS Framework

Why a patient portal?

• Key technology for engaging patients

• Valuable source of data for phenotype and outcomes

• A channel for providing value back to the patient, to facilitate recruitment and retention

• Efficient method for obtaining low-cost, timely data

• A means for patients to manage their own consents for research

Page 8: Indivo iOS Framework

Indivo deployments

• Boston Children’s Hospital – genomics research

• CARRAnet – rheumatologic childhood diseases

• Harvard IBD network – intestinal bowel disease

• TuAnalyze – diabetes network

• Wake Forest School of Medicine – DICOM sharing

Page 9: Indivo iOS Framework

Why Mobile?

Page 10: Indivo iOS Framework
Page 11: Indivo iOS Framework
Page 12: Indivo iOS Framework

bdconf Dallas, Sep 2012

Mobile

• 35% of Americans have no internet access at home

• hispanic: 49%, blacks: 51%, w/ disabilities: 59%

• 20% have no desktop internet access at all

• hispanic: 32%, blacks: 29%, w/ disabilities: 46%, w/o diploma: 57%

• Mobile internet use: 31% (2009) ➔ 55% (2012)

• 31% of all Americans only or mostly use the internet on their phones

Page 13: Indivo iOS Framework

If your services are not available on mobile devices, they

do not existfor those people

”Karen McGrane

Page 14: Indivo iOS Framework

Writing Indivo Apps

Page 15: Indivo iOS Framework

All you need to do is…

• Perform an OAuth handshake

• Determine correct REST paths

• Deserialize incoming XML or JSON

• Correctly serialize outgoing XML or JSON

Page 16: Indivo iOS Framework

All you need to do is…

• Perform an OAuth handshake

• Determine correct REST paths

• Deserialize incoming XML or JSON

• Correctly serialize outgoing XML or JSON

lather, rinse, repeat

Page 17: Indivo iOS Framework

Goals

1. High quality mobile experience for Indivo users

2. Framework for easier development of patient-facing apps

Page 18: Indivo iOS Framework

• Python client: web apps

• iOS framework: iOS (mobile)

Page 19: Indivo iOS Framework

iOS framework

• Handles authentication (OAuth)

• Knows where an object comes from (REST paths)

• Knows Indivo objects’ anatomy (XML handling)

Page 20: Indivo iOS Framework

AuthenticationOAuth

Page 21: Indivo iOS Framework

App Developer

selectRecord:

callback is called and "activeRecord" property is ready

User

Taps a connect button

Selects a record

Logs in

Approves app

Framework

request app starting page

receives callback with record id

requests request token

receives access token

displays HTML in embedded web view

receives verifier

receives request token

asks to authorize the token

requests access token

displays HTML in embedded web view

Indivo X

returns HTML for either login screen or a record list

returns record id upon record selection

returns request token

authorizes app and approves request token

returns access token

app previously authorized?

YESNO

Page 22: Indivo iOS Framework

Handling OAuth

• Server call class to encapsulate all requests

• All OAuth signing is done transparently

• Knows when user interaction (login and App approval) is needed and provides a UI

➔ Authentication is handled for you

Page 23: Indivo iOS Framework

App flow

[indivo selectRecord:^{ }];

indivo.activeRecord

Page 24: Indivo iOS Framework

Object HandlingREST paths & serialization

Page 25: Indivo iOS Framework

From schema to Cocoa

• The developer should not have to deal with XML serialization/deserialization

➔ Provide Cocoa classes for all Indivo data models

• We have to write Objective-C classes for all types

• Indivo’s data models can be extended, what about those?

➔ Include a generator that creates Cocoa classes from Indivo’s data models

Page 26: Indivo iOS Framework

Self-aware objects

• Document objects know their record

• Records know their server

• Framework knows the object actions

➔ REST methods can be inferred for all tasks

Page 27: Indivo iOS Framework

Abstract logic into Cocoa objects

Server Record addDocumentOfClass:

fetchReportsOfClass:

selectRecord:

Docspush:

replace:

archive:

...

Page 28: Indivo iOS Framework

Integrating Indivo into Existing AppsPediatric Growth Charts

Page 29: Indivo iOS Framework

Example: growth data

Page 30: Indivo iOS Framework

Example: growth data

Page 31: Indivo iOS Framework

Growth charts app

• Standalone iOS growth charts app

• Built modular with extendability in mind, but started with only a local “data source”

➔ Indivo-enable the app

Page 32: Indivo iOS Framework

Integrating Indivo

• Select child ➔ call Indivo’s selectRecord: method

• Create child instance with Indivo demographics

• Convert Indivo vitals into app format data sets

Page 33: Indivo iOS Framework

Indivo-enabled (read-only)

Growth charts app

• Add Indivo framework

• 2 lines (+credentials) to setup Indivo server instance

• 9 lines to convert Indivo record to app’s child object

• 21 lines to convert Indivo vitals into app’s measurement set objects

Page 34: Indivo iOS Framework

SMARTOutlook

Page 35: Indivo iOS Framework

iOS framework

• Released with SMART 0.6

• Write apps that run against EHR data

• Same convenience™ as the Indivo framework

• Sister Android framework in the works