Copyright © 2016 M/Gateway Developments Ltd
From Hack Days to Production
The QEWD Health It Platform
Rob TweedDirector, M/Gateway Developments Ltd
Twitter: @rtweed
Copyright © 2016 M/Gateway Developments Ltd
Some of the Problems
• NHS budgets stretched• NHS resources under pressure• Digital healthcare an essential solution• Inflexibility and Cost of Mega-Suites
Copyright © 2016 M/Gateway Developments Ltd
NHS Hack Days
• Lots of enthusiasm• Lots of people willing to help• Lots of great ideas
• But solutions aren't:– Scalable for production– Technically suitable for production
Copyright © 2016 M/Gateway Developments Ltd
NHSX
• Exciting and sensible vision• Setting standards and strategy
– Open Source– Security– NHS App– Re-usable common technologies and services
Copyright © 2016 M/Gateway Developments Ltd
Key Infrastructure Components
NHSLogin
OpenId ConnectProvider
Master PatientIndex /
Demographics
GP SystemsGP SystemsGP SystemsGP SystemsEHRsEHRsEHRsEHRs
PHRsPHRsPHRs
NHS App
Copyright © 2016 M/Gateway Developments Ltd
Key Infrastructure Components
NHSLogin
OpenId ConnectProvider
Master PatientIndex /
Demographics
GP SystemsGP SystemsGP SystemsGP SystemsEHRsEHRsEHRsEHRs
PHRsPHRsPHRs
NHS App
Feral SystemsFeral SystemsFeral SystemsFeral Systems
Copyright © 2016 M/Gateway Developments Ltd
Interconnection?
Copyright © 2016 M/Gateway Developments Ltd
Key Requirements• Modular, component-based solution
– Re-usable and re-purposable• Open Source "black boxes"
– Limited number of mainstream technologies• Ideally just 1
– Interconnectable– Secure– Work on Windows, Linux, OS X– Easy data interchange
• Including inevitable transformation
Copyright © 2016 M/Gateway Developments Ltd
Data Standards, Open Technology
• FHIR• OpenEHR
– Peer-reviewed archetypes and standard templates
– Open Source specification– Open Source platforms now available
• Eg EtherCIS
• User authentication/SSO– OpenID Connect (OIDC)
Copyright © 2016 M/Gateway Developments Ltd
QEWD Platform• Open Source modular API and application server platform• JavaScript / Node.js• Highly scalable, high-performance architecture• Embedded Open Source NoSQL database for JSON persistence
and session management• Dockerised "black box"
– Windows, Linux, OS X, hardware independent• QEWD modules can be interconnected as MicroServices• "JSON everywhere"• Secured using:
– JSON Web Tokens (JWT)– OIDC
Copyright © 2016 M/Gateway Developments Ltd
QEWD MicroServices
MicroService
User Interface(browser)
Orchestrator
MicroService MicroService
Each is a QEWD Docker Container
Each can be customized to providespecific behavior
- self-contained functionality; or- interface to another system
Copyright © 2016 M/Gateway Developments Ltd
QEWD MicroServices
MicroService
User Interface(browser)
Orchestrator
MicroService MicroService
Interconnections secured using JWTs
WebSockets
HTTP(S)REST
WebSockets
Copyright © 2016 M/Gateway Developments Ltd
QEWD MicroServices
MicroService
User Interface(browser)
Orchestrator
MicroService MicroService
MicroServices can alsointeroperate
WebSockets
HTTP(S)REST
WebSockets
Copyright © 2016 M/Gateway Developments Ltd
QEWD HIT Example
NHSLogin
OpenId ConnectProvider
QEWD-BasedMPI /
DemographicsFHIR Server
OpenEHR(EtherCIS)
PHR(PulseTile)
QEWD-BasedOrchestrator
QEWD-BasedOIDC Client
QEWD-BasedOpenEHRInterfaceService
Copyright © 2016 M/Gateway Developments Ltd
Login: Get OIDC Redirection Info
NHSLogin
OpenId ConnectProvider
QEWD-BasedMPI /
DemographicsFHIR Server
OpenEHR(EtherCIS)
PHR(PulseTile)
QEWD-BasedOrchestrator
QEWD-BasedOIDC Client
QEWD-BasedOpenEHRInterfaceService
Copyright © 2016 M/Gateway Developments Ltd
User authenticates on NHS Login
NHSLogin
OpenId ConnectProvider
QEWD-BasedMPI /
DemographicsFHIR Server
OpenEHR(EtherCIS)
PHR(PulseTile)
QEWD-BasedOrchestrator
QEWD-BasedOIDC Client
QEWD-BasedOpenEHRInterfaceService
Copyright © 2016 M/Gateway Developments Ltd
User redirected back to Orchestrator
NHSLogin
OpenId ConnectProvider
QEWD-BasedMPI /
DemographicsFHIR Server
OpenEHR(EtherCIS)
PHR(PulseTile)
QEWD-BasedOrchestrator
QEWD-BasedOIDC Client
QEWD-BasedOpenEHRInterfaceService
+ idToken
Copyright © 2016 M/Gateway Developments Ltd
JWT created, includes idToken
NHSLogin
OpenId ConnectProvider
QEWD-BasedMPI /
DemographicsFHIR Server
OpenEHR(EtherCIS)
PHR(PulseTile)
QEWD-BasedOrchestrator
QEWD-BasedOIDC Client
QEWD-BasedOpenEHRInterfaceService
Copyright © 2016 M/Gateway Developments Ltd
Interact / integrate info
NHSLogin
OpenId ConnectProvider
QEWD-BasedMPI /
DemographicsFHIR Server
OpenEHR(EtherCIS)
PHR(PulseTile)
QEWD-BasedOrchestrator
QEWD-BasedOIDC Client
QEWD-BasedOpenEHRInterfaceService
+JWT+JWT
+JWT
Copyright © 2016 M/Gateway Developments Ltd
FHIR v OpenEHR etc?
• QEWD Platform turns it into a JSON transformation exercise
• qewd-transform-json– JSON syntax for specifying JSON
transformations• FHIR to/from OpenEHR
– Re-usable standard templates• UI format to/from OpenEHR
Copyright © 2016 M/Gateway Developments Ltd
OpenEHR "Rosetta Stone" format
• "Flat JSON"– But unflattened into standard JSON
• Every OpenEHR system:– Allows data to be input as Flat JSON– Can output data as Flat JSON– Can be interrogated to find out the Flat JSON
format for any template
Copyright © 2016 M/Gateway Developments Ltd
OpenEHR "Rosetta Stone"
TransformationTemplate
JSON
FHIRAllergyIntolerance
ResourceJSON
OpenEHRAllergy
Template"Flat JSON"
Copyright © 2016 M/Gateway Developments Ltd
Allergies OpenEHR to FHIR{"resourceType": "AllergyIntolerance","identifier": [{"system": "http://ethercis.org/compositionId","value": "{{adverse_reaction_list._uid}}"
}],"onset": "=> getDate(start_time)","recordedDate": "=> getDate(start_time)","recorder": {"reference": "Practitioner/id","display": "{{adverse_reaction_list['composer|name']}}"
},"patient": {"reference": "Patient/{{patientId}}","display": "{{patientName}}"
},"substance": {"coding": [{"system": "http://snomed.info/sct","code": "{{adverse_reaction_list.allergies_and_adverse_reactions.adverse_reaction_risk[0]['causative_agent|code']}}","display": "{{adverse_reaction_list.allergies_and_adverse_reactions.adverse_reaction_risk[0]['causative_agent|value']}}"
}]
},"status": "active","type": "allergy","category": "other","reaction": [{"substance": {"coding": [{"system": "http://snomed.info/sct","code": "{{adverse_reaction_list.allergies_and_adverse_reactions.adverse_reaction_risk[0]['causative_agent|code']}}","display": "{{adverse_reaction_list.allergies_and_adverse_reactions.adverse_reaction_risk[0]['causative_agent|value']}}"
}],"text": "{{adverse_reaction_list.allergies_and_adverse_reactions.adverse_reaction_risk[0]['causative_agent|value']}}"
},"certainty": "confirmed","manifestation": [{"coding": [{"system": "http://snomed.info/sct","code": "{{adverse_reaction_list.allergies_and_adverse_reactions.adverse_reaction_risk[0].reaction_details.manifestation[0]['|code']}}","display": "{{adverse_reaction_list.allergies_and_adverse_reactions.adverse_reaction_risk[0].reaction_details.manifestation[0]['|value']}}"
}],"text": "{{adverse_reaction_list.allergies_and_adverse_reactions.adverse_reaction_risk[0].reaction_details.manifestation[0]['|value']}}"
}],"description": "{{adverse_reaction_list.allergies_and_adverse_reactions.adverse_reaction_risk[0].reaction_details.manifestation[0]['|value']}}"
}],"note": "{{adverse_reaction_list.allergies_and_adverse_reactions.adverse_reaction_risk[0].reaction_details.comment}}"
}
Copyright © 2016 M/Gateway Developments Ltd
Allergies OpenEHR to FHIR"substance": {
"coding": [{
"system": "http://snomed.info/sct","code": "{{adverse_reaction_list.allergies_and_adverse_reactions.adverse_reaction_risk[0]['causative_agent|code']}}","display": "{{adverse_reaction_list.allergies_and_adverse_reactions.adverse_reaction_risk[0]['causative_agent|value']}}"
}]
}
{"adverse_reaction_list": {"allergies_and_adverse_reactions": {"adverse_reaction_risk": [{"causative_agent|code": "304270095","causative_agent|value": "Erythromycin","causative_agent|terminology": "SNOMED-CT",
Copyright © 2016 M/Gateway Developments Ltd
Solves a major OpenEHR Issue• AQL to get data out• Flat JSON to put data in• No obvious similarity• Needed expert input• Major learning curve barrier
• Now all you need to know is the Template Id• QEWD looks after the rest
Copyright © 2016 M/Gateway Developments Ltd
OpenEHR "Rosetta Stone"
TransformationTemplate
JSON
FHIRAllergyIntolerance
ResourceJSON
OpenEHRAllergy
Template"Flat JSON"
Simple formatfor UIJSON
TransformationTemplate
JSON
Copyright © 2016 M/Gateway Developments Ltd
OpenEHR "Rosetta Stone"
TransformationTemplate
JSON
FHIRAllergyIntolerance
ResourceJSON
OpenEHRAllergy
Template"Flat JSON"
Other SystemProprietary
JSON
TransformationTemplate
JSON
Copyright © 2016 M/Gateway Developments Ltd
Hack Days?• The QEWD platform can be used to create a
usable hacking environment– Just a set of Docker containers
• Dockerised version of EtherCIS is also available• QEWD-based OIDC Provider container can be
used to simulate NHS Login• Can even run QEWD Containers on Raspberry
Pis!
Copyright © 2016 M/Gateway Developments Ltd
Hack Days
• Applications developed at Hack Days are no longer throw-away ideas
• Can be built on using the same platform tocreate enterprise-scale solutions that will interoperate with anything else using the platform
Copyright © 2016 M/Gateway Developments Ltd
Key Infrastructure Components
NHSLogin
OpenId ConnectProvider
Master PatientIndex /
Demographics
GP SystemsGP SystemsGP SystemsGP SystemsEHRsEHRsEHRsEHRs
PHRsPHRsPHRs
NHS App
Feral SystemsFeral SystemsFeral SystemsFeral Systems
Copyright © 2016 M/Gateway Developments Ltd
Key Infrastructure ComponentsNHSLogin
OpenId ConnectProvider
LHCREFHIR Server
DSS Discovery
FHIROther EHRsVia FHIR
OpenEHR
PHR -PulseTile
NHS App
HackDaySystems
OpenEHR &QEWD