SlideShare a Scribd company logo
1 of 20
Download to read offline
Indivo iOS
framework
Goals


• Drop-in to existing Cocoa projects
• Provide a low entry barrier into PHR
• Make Indivo a viable choice for App developers
  who want to move their users’ data into the cloud
The framework


• Handles authentication (OAuth)
• Provides Indivo objects (automatic XML handling)
• Knows where an object comes from (REST paths)
• Provides messaging functionality
Handling OAuth


• Class INServerCall to encapsulate requests
• Uses MPOAuth, an OSS OAuth framework for
  iOS, transparently
‣ OAuth is handled for you
From Schema to Cocoa

• The developer should not have to deal with XML
  serialization/deserialization
‣ Provide classes for all Indivo document types
• We have to write Objective-C classes for all types
‣ A generator creates Cocoa classes from Indivo’s
  XSD and SDMJ schemas
Self-aware objects


• Document objects know their record
• Records know their server
• Framework knows the server actions
‣ REST methods can be inferred for all tasks
iOS framework
 Abstract logic into Cocoa objects


           selectRecord:

Server                      Record

         addDocumentOfClass:
         fetchReportsOfClass:


                                       push:

                                Docs   replace:
                                       archive:
                                       ...
App Flow
                             Setup


    server = [IndivoServer serverWithDelegate:self];




#define kIndivoFrameworkServerURL      @“http://10.17.20.127:8000”
#define kIndivoFrameworkUIServerURL    @“http://10.17.20.127:8001”

#define kIndivoFrameworkAppId          @“medsample@apps.indivo.org”
#define kIndivoFrameworkConsumerKey    @“nkd8cg02mgo34sntkao9”
#define kIndivoFrameworkConsumerSecret @“1acgk9804wkmraoceu02”
App Flow
                          Logging in


[server selectRecord:^{    }];




server.activeRecord
App Flow
              Adding a medication

Medication *med = [record addDocument:Medication];

med.drugName = [INCodedValue new];

med.drugName.title = @“Tylenol”;

med.drugName.system ...




                 [med push:^{   }];
App Flow
                Sending a message


[med.activeRecord sendMessage:@“New medication added”
                     withBody:@“See medlist app”

                       ofType:INMessageTypePlaintext
                     severity:INMessageSeverityMedium
                  attachments:nil
                     callback:^{ }];
Integrating Indivo Into
     Existing Apps
Growth Charts App
Growth Charts App
                         Data Models

CHPatientSource   selectPatient:^{ }



      CHPatient   ageAtDate:
                  measurementSetsContainingDataTypes:




                  CHMeasurementSet date
                          CHMeasurement value
                          CHMeasurement value
                          CHMeasurement value
Growth Charts App
                     Local Data Source




• Override selectPatient:
 • Instantiate   a CHPatient
 • Read   CSV data as measurement sets
Growth Charts App
                     Indivo Data Source

• Call Indivo’s selectRecord: method
• Within the callback block:
 • Fetch   patient demographics
 • Create   CHPatient with record demographics
 • Fetch   patient’s vitals
 • Convert    Indivo vitals into measurement sets
Growth Charts App
              Indivo-Enabled (read-only)


• 2 lines + app setup file to setup Indivo server
  instance
• 9 lines to convert IndivoRecord to CHPatient
• 21 lines to convert Indivo vitals into
  CHMeasurementSet
Documentation

• Take a look at README.md
• Checkout the sample medication app
• Technical documentation available online:
  http://docs.indivohealth.org/projects/indivo-x-ios-
                 framework/en/latest/
Playing with Medications
Version 2.0 α


  Available with the other Indivo sources from:
  https://github.com/chb/IndivoFramework-ios
Checkout branch dev_two (tag hackathon_2012)

More Related Content

What's hot

Programming web application
Programming web applicationProgramming web application
Programming web application
aspnet123
 
Msdn Workflow Services And Windows Server App Fabric
Msdn Workflow Services And Windows Server App FabricMsdn Workflow Services And Windows Server App Fabric
Msdn Workflow Services And Windows Server App Fabric
Juan Pablo
 

What's hot (17)

Programming web application
Programming web applicationProgramming web application
Programming web application
 
Introduce to PredictionIO
Introduce to PredictionIOIntroduce to PredictionIO
Introduce to PredictionIO
 
Ipro Enterprise Log Utility
Ipro Enterprise Log UtilityIpro Enterprise Log Utility
Ipro Enterprise Log Utility
 
Redux data flow with angular
Redux data flow with angularRedux data flow with angular
Redux data flow with angular
 
Cloud native programming model comparison
Cloud native programming model comparisonCloud native programming model comparison
Cloud native programming model comparison
 
servlet programming
servlet programmingservlet programming
servlet programming
 
Getting your data in and out of elasticsearch: let me count the ways
Getting your data in and out of elasticsearch: let me count the waysGetting your data in and out of elasticsearch: let me count the ways
Getting your data in and out of elasticsearch: let me count the ways
 
Creating EPiServer Usage Reports
Creating EPiServer Usage ReportsCreating EPiServer Usage Reports
Creating EPiServer Usage Reports
 
APIs, APIs Everywhere!
APIs, APIs Everywhere!APIs, APIs Everywhere!
APIs, APIs Everywhere!
 
SharePoint Conference 2018 - APIs, APIs everywhere!
SharePoint Conference 2018 - APIs, APIs everywhere!SharePoint Conference 2018 - APIs, APIs everywhere!
SharePoint Conference 2018 - APIs, APIs everywhere!
 
Understanding AJAX
Understanding AJAXUnderstanding AJAX
Understanding AJAX
 
Msdn Workflow Services And Windows Server App Fabric
Msdn Workflow Services And Windows Server App FabricMsdn Workflow Services And Windows Server App Fabric
Msdn Workflow Services And Windows Server App Fabric
 
Introducing asp.net core mvc web application
Introducing asp.net core mvc web applicationIntroducing asp.net core mvc web application
Introducing asp.net core mvc web application
 
Dicoding Developer Coaching #20: Android | Apa itu Content Provider?
Dicoding Developer Coaching #20: Android | Apa itu Content Provider?Dicoding Developer Coaching #20: Android | Apa itu Content Provider?
Dicoding Developer Coaching #20: Android | Apa itu Content Provider?
 
Js il 2013 breeze.js
Js il 2013 breeze.jsJs il 2013 breeze.js
Js il 2013 breeze.js
 
Ajax Introduction
Ajax IntroductionAjax Introduction
Ajax Introduction
 
Dev308
Dev308Dev308
Dev308
 

Viewers also liked

iOS Architecture
iOS ArchitectureiOS Architecture
iOS Architecture
Jacky Lian
 
iOS Platform & Architecture
iOS Platform & ArchitectureiOS Platform & Architecture
iOS Platform & Architecture
krishguttha
 

Viewers also liked (10)

1sbc100122c0202 ch04
1sbc100122c0202 ch041sbc100122c0202 ch04
1sbc100122c0202 ch04
 
"Architecting and testing large iOS apps: lessons from Facebook". Adam Ernst,...
"Architecting and testing large iOS apps: lessons from Facebook". Adam Ernst,..."Architecting and testing large iOS apps: lessons from Facebook". Adam Ernst,...
"Architecting and testing large iOS apps: lessons from Facebook". Adam Ernst,...
 
ios basics
ios basicsios basics
ios basics
 
MVVM on iOS
MVVM on iOSMVVM on iOS
MVVM on iOS
 
Multiplatform App Architecture
Multiplatform App ArchitectureMultiplatform App Architecture
Multiplatform App Architecture
 
iOS Architecture
iOS ArchitectureiOS Architecture
iOS Architecture
 
MVVM & RxSwift
MVVM & RxSwiftMVVM & RxSwift
MVVM & RxSwift
 
iOS App Architecture
iOS App ArchitectureiOS App Architecture
iOS App Architecture
 
Layer architecture of ios (1)
Layer architecture of ios (1)Layer architecture of ios (1)
Layer architecture of ios (1)
 
iOS Platform & Architecture
iOS Platform & ArchitectureiOS Platform & Architecture
iOS Platform & Architecture
 

Similar to the Indivo X iOS Framework

Smart-Indivo App Challenge Webinar
Smart-Indivo App Challenge WebinarSmart-Indivo App Challenge Webinar
Smart-Indivo App Challenge Webinar
health2dev
 
2010 08-26-smart-architecture
2010 08-26-smart-architecture2010 08-26-smart-architecture
2010 08-26-smart-architecture
CHIP
 

Similar to the Indivo X iOS Framework (20)

Evolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di PalmaEvolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
 
MongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDBMongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDB
 
MongoDB.local Berlin: App development in a Serverless World
MongoDB.local Berlin: App development in a Serverless WorldMongoDB.local Berlin: App development in a Serverless World
MongoDB.local Berlin: App development in a Serverless World
 
Netfx4
Netfx4Netfx4
Netfx4
 
MongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB.local Sydney: Evolving your Data Access with MongoDB StitchMongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
 
Smart-Indivo App Challenge Webinar
Smart-Indivo App Challenge WebinarSmart-Indivo App Challenge Webinar
Smart-Indivo App Challenge Webinar
 
Easy integration of Bluemix services with your applications
Easy integration of Bluemix services with your applicationsEasy integration of Bluemix services with your applications
Easy integration of Bluemix services with your applications
 
[WSO2Con Asia 2018] Patterns for Building Streaming Apps
[WSO2Con Asia 2018] Patterns for Building Streaming Apps[WSO2Con Asia 2018] Patterns for Building Streaming Apps
[WSO2Con Asia 2018] Patterns for Building Streaming Apps
 
Back to [Jaspersoft] Basics: Rest API 101
Back to [Jaspersoft] Basics: Rest API 101Back to [Jaspersoft] Basics: Rest API 101
Back to [Jaspersoft] Basics: Rest API 101
 
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
 
Build12 factorappusingmp
Build12 factorappusingmpBuild12 factorappusingmp
Build12 factorappusingmp
 
2010 08-26-smart-architecture
2010 08-26-smart-architecture2010 08-26-smart-architecture
2010 08-26-smart-architecture
 
PowerApps, the Developer Story: Build an API to Integrate Corporate Data
PowerApps, the Developer Story: Build an API to Integrate Corporate DataPowerApps, the Developer Story: Build an API to Integrate Corporate Data
PowerApps, the Developer Story: Build an API to Integrate Corporate Data
 
Server Side Swift - AppBuilders 2017
Server Side Swift - AppBuilders 2017Server Side Swift - AppBuilders 2017
Server Side Swift - AppBuilders 2017
 
SRV421 Deep Dive with AWS Mobile Services
SRV421 Deep Dive with AWS Mobile ServicesSRV421 Deep Dive with AWS Mobile Services
SRV421 Deep Dive with AWS Mobile Services
 
MongoDB World 2018: Evolving your Data Access with MongoDB Stitch
MongoDB World 2018: Evolving your Data Access with MongoDB StitchMongoDB World 2018: Evolving your Data Access with MongoDB Stitch
MongoDB World 2018: Evolving your Data Access with MongoDB Stitch
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014
 
Community call: Develop multi tenant apps with the Microsoft identity platform
Community call: Develop multi tenant apps with the Microsoft identity platformCommunity call: Develop multi tenant apps with the Microsoft identity platform
Community call: Develop multi tenant apps with the Microsoft identity platform
 
Multi cloud appcustomscale-appgroups-slideshare
Multi cloud appcustomscale-appgroups-slideshareMulti cloud appcustomscale-appgroups-slideshare
Multi cloud appcustomscale-appgroups-slideshare
 
what is context API and How it works in React.pptx
what is context API and How it works in React.pptxwhat is context API and How it works in React.pptx
what is context API and How it works in React.pptx
 

More from Children's Hospital Informatics Program

More from Children's Hospital Informatics Program (6)

Secondary Use of Healthcare Data for Translational Research
Secondary Use of Healthcare Data for Translational ResearchSecondary Use of Healthcare Data for Translational Research
Secondary Use of Healthcare Data for Translational Research
 
Intro: Indivo X 2012 Users' Conference
Intro: Indivo X 2012 Users' ConferenceIntro: Indivo X 2012 Users' Conference
Intro: Indivo X 2012 Users' Conference
 
SMART Architecture and Application Development Overview
SMART Architecture and Application Development OverviewSMART Architecture and Application Development Overview
SMART Architecture and Application Development Overview
 
Indivo as a Personally-Controlled Research Platform for Chronic Disease Regis...
Indivo as a Personally-Controlled Research Platform for Chronic Disease Regis...Indivo as a Personally-Controlled Research Platform for Chronic Disease Regis...
Indivo as a Personally-Controlled Research Platform for Chronic Disease Regis...
 
2012 User's Conference SMART-Indivo Integration
2012 User's Conference SMART-Indivo Integration2012 User's Conference SMART-Indivo Integration
2012 User's Conference SMART-Indivo Integration
 
2012 User's Conference Indivo Updates
2012 User's Conference Indivo Updates2012 User's Conference Indivo Updates
2012 User's Conference Indivo Updates
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

the Indivo X iOS Framework

  • 2. Goals • Drop-in to existing Cocoa projects • Provide a low entry barrier into PHR • Make Indivo a viable choice for App developers who want to move their users’ data into the cloud
  • 3. The framework • Handles authentication (OAuth) • Provides Indivo objects (automatic XML handling) • Knows where an object comes from (REST paths) • Provides messaging functionality
  • 4. Handling OAuth • Class INServerCall to encapsulate requests • Uses MPOAuth, an OSS OAuth framework for iOS, transparently ‣ OAuth is handled for you
  • 5. From Schema to Cocoa • The developer should not have to deal with XML serialization/deserialization ‣ Provide classes for all Indivo document types • We have to write Objective-C classes for all types ‣ A generator creates Cocoa classes from Indivo’s XSD and SDMJ schemas
  • 6. Self-aware objects • Document objects know their record • Records know their server • Framework knows the server actions ‣ REST methods can be inferred for all tasks
  • 7. iOS framework Abstract logic into Cocoa objects selectRecord: Server Record addDocumentOfClass: fetchReportsOfClass: push: Docs replace: archive: ...
  • 8. App Flow Setup server = [IndivoServer serverWithDelegate:self]; #define kIndivoFrameworkServerURL @“http://10.17.20.127:8000” #define kIndivoFrameworkUIServerURL @“http://10.17.20.127:8001” #define kIndivoFrameworkAppId @“medsample@apps.indivo.org” #define kIndivoFrameworkConsumerKey @“nkd8cg02mgo34sntkao9” #define kIndivoFrameworkConsumerSecret @“1acgk9804wkmraoceu02”
  • 9. App Flow Logging in [server selectRecord:^{ }]; server.activeRecord
  • 10. App Flow Adding a medication Medication *med = [record addDocument:Medication]; med.drugName = [INCodedValue new]; med.drugName.title = @“Tylenol”; med.drugName.system ... [med push:^{ }];
  • 11. App Flow Sending a message [med.activeRecord sendMessage:@“New medication added” withBody:@“See medlist app”
 ofType:INMessageTypePlaintext severity:INMessageSeverityMedium attachments:nil callback:^{ }];
  • 12. Integrating Indivo Into Existing Apps
  • 14. Growth Charts App Data Models CHPatientSource selectPatient:^{ } CHPatient ageAtDate: measurementSetsContainingDataTypes: CHMeasurementSet date CHMeasurement value CHMeasurement value CHMeasurement value
  • 15. Growth Charts App Local Data Source • Override selectPatient: • Instantiate a CHPatient • Read CSV data as measurement sets
  • 16. Growth Charts App Indivo Data Source • Call Indivo’s selectRecord: method • Within the callback block: • Fetch patient demographics • Create CHPatient with record demographics • Fetch patient’s vitals • Convert Indivo vitals into measurement sets
  • 17. Growth Charts App Indivo-Enabled (read-only) • 2 lines + app setup file to setup Indivo server instance • 9 lines to convert IndivoRecord to CHPatient • 21 lines to convert Indivo vitals into CHMeasurementSet
  • 18. Documentation • Take a look at README.md • Checkout the sample medication app • Technical documentation available online: http://docs.indivohealth.org/projects/indivo-x-ios- framework/en/latest/
  • 20. Version 2.0 α Available with the other Indivo sources from: https://github.com/chb/IndivoFramework-ios Checkout branch dev_two (tag hackathon_2012)