ewd.js on fhir - m/gatewaygradvs1.mgateway.com/download/ewdjs-vistanovo.pdf · ewd.js on fhir rob...
TRANSCRIPT
EWD.js on FHIR
Rob TweedM/Gateway Developments Ltd
Twitter: @rtweedEmail: [email protected]
http://www.mgateway.comWednesday, 12 March 14
VistA
CachéOr GT.M
EWD.js Architecture
Mumps:- Language- Database
Exceptional NoSQL Database- high performance- highly scalable- hierachical- projectable in many ways
- key/value- graph- object- relational- document
Wednesday, 12 March 14
VistA
CachéOr GT.M
EWD.js Architecture
Mumps:- Language- DatabaseWhat language as a replacement?- popular- similar good parts to Mumps language- quick & easy to develop in- natural fit with database
Wednesday, 12 March 14
VistA
CachéOr GT.M
EWD.js Architecture
Mumps:- Language- Database
JavaScript- hugely popular and still growing- interpreted- dynamic- un-typed- perfect fit with database
- JSON = document database
Wednesday, 12 March 14
VistA
CachéOr GT.M
EWD.jsinterfaces
Node.js(server-sideJavaScript)
EWD.js Architecture
Wednesday, 12 March 14
VistA
CachéOr GT.M
EWD.jsinterfaces
Node.js(server-sideJavaScript)
HTTP(S)(Interactive
Applications)
EWD.js Architecture
Wednesday, 12 March 14
EWD.jsinterfaces
Node.js(server-sideJavaScript)
VistA
CachéOr GT.M
HTTP(S)(Interactive
Applications)
WebSockets(Interactive
Applications)
EWD.js Architecture
Wednesday, 12 March 14
EWD.jsinterfaces
Node.js(server-sideJavaScript)
HTTP(S)(Interactive
Applications)
WebSockets(Interactive
Applications)VistA
CachéOr GT.MHTTP(S)
(WebServices)
EWD.js Architecture
Wednesday, 12 March 14
EWD.jsinterfaces
Node.js(server-sideJavaScript)
HTTP(S)(Interactive
Applications)
WebSockets(Interactive
Applications)VistA
CachéOr GT.MHTTP(S)
(WebServices)
Security
EWD.js Architecture
Wednesday, 12 March 14
EWD.jsinterfaces
Node.js(server-sideJavaScript)
HTTP(S)(Interactive
Applications)
WebSockets(Interactive
Applications) VistA
CachéHTTP(S)
(WebServices)
Official InterS
ystems Interface M
odule
Security
EWD.js Architecture
Wednesday, 12 March 14
EWD.jsinterfaces
Node.js(server-sideJavaScript)
HTTP(S)(Interactive
Applications)
WebSockets(Interactive
Applications) VistA
GT.MHTTP(S)
(WebServices)
NodeM
: Open S
ource reverse-engineer
Security
EWD.js Architecture
Wednesday, 12 March 14
EWD.jsinterfaces
Node.js(server-sideJavaScript)
HTTP(S)(Interactive
Applications)
WebSockets(Interactive
Applications) VistA
CachéHTTP(S)
(WebServices)
Official InterS
ystems Interface M
odule
ewdG
lobals:JS
ON
abstraction of Mum
ps Globals
Security
EWD.js Architecture
Wednesday, 12 March 14
EWD.jsinterfaces
Node.js(server-sideJavaScript)
HTTP(S)(Interactive
Applications)
WebSockets(Interactive
Applications) VistA
CachéHTTP(S)
(WebServices)
Official InterS
ystems Interface M
odule
ewdG
lobals:JS
ON
abstraction of Mum
ps Globals
Mumps Globals
Security
EWD.js Architecture
Wednesday, 12 March 14
EWD.jsinterfaces
Node.js(server-sideJavaScript)
HTTP(S)(Interactive
Applications)
WebSockets(Interactive
Applications) VistA
CachéHTTP(S)
(WebServices)
Official InterS
ystems Interface M
odule
ewdG
lobals:JS
ON
abstraction of Mum
ps Globals
Mumps Globals
Mumps Functions
Security
EWD.js Architecture
Wednesday, 12 March 14
EWD.jsinterfaces
Node.js(server-sideJavaScript)
HTTP(S)(Interactive
Applications)
WebSockets(Interactive
Applications) VistA
CachéHTTP(S)
(WebServices)
Official InterS
ystems Interface M
odule
ewdG
lobals:JS
ON
abstraction of Mum
ps Globals
Mumps Globals
FileMan APIs
Mumps Functions
Security
EWD.js Architecture
Wednesday, 12 March 14
EWD.jsinterfaces
Node.js(server-sideJavaScript)
HTTP(S)(Interactive
Applications)
WebSockets(Interactive
Applications) VistA
CachéHTTP(S)
(WebServices)
Official InterS
ystems Interface M
odule
ewdG
lobals:JS
ON
abstraction of Mum
ps Globals
Mumps Globals
FileMan APIs
Mumps Functions
Security
EWD.js Architecture
Wednesday, 12 March 14
EWD.jsinterfaces
Node.js(server-sideJavaScript)
HTTP(S)(Interactive
Applications)
WebSockets(Interactive
Applications) VistA
CachéHTTP(S)
(WebServices)
Official InterS
ystems Interface M
odule
ewdG
lobals:JS
ON
abstraction of Mum
ps Globals
Mumps Globals
FileMan APIs
Mumps Functions
Security
User B
ack-end Application logic
(JavaScript)
EWD.js Architecture
Wednesday, 12 March 14
EWD.jsinterfaces
Node.js(server-sideJavaScript)
HTTP(S)(Interactive
Applications)
WebSockets(Interactive
Applications) VistA
CachéHTTP(S)
(WebServices)
Official InterS
ystems Interface M
odule
ewdG
lobals:JS
ON
abstraction of Mum
ps Globals
Mumps Globals
FileMan APIs
Mumps Functions
Security
User B
ack-end Application logic
(JavaScript)
EWD.js Architecture
Wednesday, 12 March 14
EWD.jsinterfaces
Node.js(server-sideJavaScript)
HTTP(S)(Interactive
Applications)
WebSockets(Interactive
Applications) VistA
CachéHTTP(S)
(WebServices)
Official InterS
ystems Interface M
odule
ewdG
lobals:JS
ON
abstraction of Mum
ps Globals
Mumps Globals
FileMan APIs
Mumps Functions
Security
User B
ack-end Application logic
(JavaScript)
EWD.js Architecture
Wednesday, 12 March 14
EWD.jsinterfaces
Node.js(server-sideJavaScript)
HTTP(S)(Interactive
Applications)
WebSockets(Interactive
Applications) VistA
GT.MHTTP(S)
(WebServices)
ewdG
lobals:JS
ON
abstraction of Mum
ps Globals
Mumps Globals
FileMan APIs
Mumps Functions
Security
User B
ack-end Application logic
(JavaScript)
NodeM
: Open S
ource reverse-engineer
EWD.js Architecture
Wednesday, 12 March 14
EWD.js Architecture
27
100% StatelessAll activity handled by a small number of processes
Pre-forked, constantly-running
Wednesday, 12 March 14
Secured Web Services
• HTTP(S) Web Services built-in• Need to prevent a free-for-all• Uses same security as Amazon Web
Services– eg for SimpleDB
29
Wednesday, 12 March 14
Secured Web Services
EWD.jsServer
Registered users/clients
Access Id+
Secure Key
Wednesday, 12 March 14
Secured Web Services
EWD.jsServer
Registered users/clients
Sent toUser /client
Access Id+
Secure Key
Wednesday, 12 March 14
Secured Web Services
EWD.jsServer
Registered users/clients
User/Client
HTTP Request
×tamp=xxxxxxxx&accessId=rob12345
Wednesday, 12 March 14
Secured Web Services
EWD.jsServer
Registered users/clients
User/Client
HTTP Request
Normalised
Create HMAC-SHA-256 digestusing secret key
Add:&signature=xxxxxxxxxxxxxxxx
Wednesday, 12 March 14
Secured Web Services
EWD.jsServer
Registered users/clients
User/Client
Signed HTTP Request
Web S
erviceInterface
Wednesday, 12 March 14
Secured Web Services
EWD.jsServer
Registered users/clients
User/Client
HTTP Request Processing
Remove &signature=xxxx
Normalise request
Extract accessId from request
Web S
erviceInterface
Wednesday, 12 March 14
Secured Web Services
EWD.jsServer
Registered users/clients
User/Client
HTTP Request Processing
Remove &signature=xxxx
Normalise request
Extract accessId from request
Get secret key for Access Id
Web S
erviceInterface
Wednesday, 12 March 14
Secured Web Services
EWD.jsServer
Registered users/clients
User/Client
HTTP Request Processing
Remove &signature=xxxx
Normalise request
Extract accessId from request
Get secret key for Access Id
Generate HMAC-SHA256 digest
Web S
erviceInterface
Wednesday, 12 March 14
Secured Web Services
EWD.jsServer
Registered users/clients
User/Client
HTTP Request Processing
Remove &signature=xxxx
Normalise request
Extract accessId from request
Get secret key for Access Id
Generate HMAC-SHA256 digest
- Match?
Web S
erviceInterface
Wednesday, 12 March 14
Secured Web Services
EWD.jsServer
Registered users/clients
User/Client
HTTP Request Processing
Remove &signature=xxxx
Normalise request
Extract accessId from request
Get secret key for Access Id
Generate HMAC-SHA256 digest
- Match?
- Don't Match?
Web S
erviceInterface
Wednesday, 12 March 14
Secured Web Services
EWD.jsServer
Registered users/clients
Access Id+
Secure Key+
AllowedApplications/
Modules
Wednesday, 12 March 14
REST
• Growing requirement in healthcare– many projects/initiatives in VA based on
REST-ful interfaces to VistA– HL7 FHIR
• REST is a key part of the standard
42
Wednesday, 12 March 14
REST
• Growing requirement in healthcare– many projects/initiatives in VA based on
REST-ful interfaces to VistA– HL7 FHIR
• REST is a key part of the standard– EWD.js doesn’t support REST
• implement REST interface?
43
Wednesday, 12 March 14
REST
• Growing requirement in healthcare– many projects/initiatives in VA based on
REST-ful interfaces to VistA– HL7 FHIR
• REST is a key part of the standard– EWD.js doesn’t support REST
• implement REST interface?• instead, separate EWD REST Server
– Node.js module: Restify» de facto standard REST implementation for Node.js» tried, tested, stable, fast» customisable! 44
Wednesday, 12 March 14
EWDREST Server
(Node.jsrestify)
FHIRREST
Requests
EWD.jsServer VistA
Web S
ervice Interface
Wednesday, 12 March 14
EWDREST Server
(Node.jsrestify)
FHIRREST
Requests
EWD.jsServer VistA
Web S
ervice Interface
Access Id+
Secret Key+
Application List
Registered users/clients
Wednesday, 12 March 14
EWDREST Server
(Node.jsrestify)
FHIRREST
Requests
EWD.jsServer VistA
Web S
ervice Interface
URL Re-writing:
REST requests rewrittenAs EWD.js HTTP WebService Requests
Wednesday, 12 March 14
EWDREST Server
(Node.jsrestify)
FHIRREST
Requests
EWD.jsServer VistA
Web S
ervice Interface
ThenDigitally-signed
beforetransmission
URL Re-writing:
REST requests rewrittenAs EWD.js HTTP WebService Requests
Wednesday, 12 March 14
EWDREST Server
(Node.jsrestify)
FHIRREST
Requests
EWD.jsServer VistA
Web S
ervice Interface
No Change requiredTo EWD.js
Wednesday, 12 March 14
URL Re-Router• Get Observations for patient 1234 from EC2 server• http://192.168.1.2:8081/fhir/ec2/patient/@1234/observation
• Get Observations for patient 1234 from Oroville server• http://192.168.1.2:8081/fhir/oroville/patient/@1234/observation
50
Wednesday, 12 March 14
REST Server(Node.jsrestify)
FHIRREST
Requests
SecureEWD.jsWeb ServiceRequest
EWD.jsServer
VistA
EWD.jsServer
VistAor otherMumpssystem
Message Router& URL Rewriter
Wednesday, 12 March 14
VistA
PatientCCDA(XML)
PatientCCDA(JSON)
EWD.js / Node.js
File
_setDocument()
Stored in Mumps DB
George Lilly’swork
Wednesday, 12 March 14
JSON-formatted CCDAStored in Mumps
Or MongoDB
getVitals():JSON-format
Josh Mandel’sBlue-button logic
Adapted for EWD.js
EWD.js
getObservation(): HL7 FHIR JSON-format
Forwarded to FHIR REST Server
VistA
getVitals(): HL7 FHIR
JSON-format
Mumps functionAPI wrapper
EWD.jsBack-end
FHIRModule
Wednesday, 12 March 14
REST Server(Node.jsrestify)
FHIRREST
Requests
SecureEWD.js
Web ServiceRequests
EWD.jsServer
GT.M:CCDA
Database
EWD.jsServer
GlobalsDB
EWD.jsServer
GT.M
Blood-pressureApplication
George Lilly’s Rackspace Server
Rob’s EC2 Server
VistA
FHIR Module
FHIR Module
Wednesday, 12 March 14
REST Server(Node.jsrestify)
FHIRREST
Requests
SecureEWD.js
Web ServiceRequests
EWD.jsServer
GT.M:CCDA
Database
EWD.jsServer
GlobalsDB
EWD.jsServer
GT.M
Blood-pressureApplication
George Lilly’s Rackspace Server
Rob’s EC2 Server
VistAMy HouseS.E England
My HouseS.E England
RackspaceCloud USA
AmazonCloud USA
YouUSA? FHIR Module
FHIR Module
Wednesday, 12 March 14
Try it
• https://www.mgateway.com:38080/ewd/FHIRDemo/index.html
• Username: rob• Password: secret
• Note: not designed for use with IE!– use Chrome, Firefox or Safari
56
Wednesday, 12 March 14
REST Server(Node.jsrestify)
FHIRREST
Requests
EWD.jsServer
GT.M:CCDA
Database
EWD.jsServer
GlobalsDB
George Lilly’s Rackspace Server
Rob’s EC2 Server
VistA
HL7 FHIRObservation
FHIR Module
FHIR Module
Wednesday, 12 March 14
REST Server(Node.jsrestify)
FHIRREST
Requests
EWD.jsServer
GT.M:CCDA
Database
EWD.jsServer
GlobalsDB
George Lilly’s Rackspace Server
Rob’s EC2 Server
VistA
HL7 FHIRObservation
FHIR Module
FHIR Module
Wednesday, 12 March 14
VistA
ESB
VSAAdapter
(VMRCA)
VSACalling Service
(VMRCS)
Web Service Interface
RegionalVistA SOAFederatingServicesPlatform(Java)
VistA
VSAAdapter
(VMRCA)
VSACalling Service
(VMRCS)
Web Service Interface
VistA
VSAAdapter
(VMRCA)
VSACalling Service
(VMRCS)
Web Service Interface
RegionalVistA SOAFederatingServicesPlatform(Java)
VSA Architecture as currently proposed
Wednesday, 12 March 14
VistA
VSAAdapter
(VMRCA)
VSACalling Service
(VMRCS)
Web Service Interface
VistA
VSAAdapter
(VMRCA)
VSACalling Service
(VMRCS)
Web Service Interface
VistA
VSAAdapter
(VMRCA)
VSACalling Service
(VMRCS)
Web Service Interface
VSA / VistA Novo potential integration (1)
ServiceInvocation
DataStorageCache
FHIRServices
FHIRRequests/Responses
VistA Novo
Wednesday, 12 March 14
VistA
VSAAdapter
(VMRCA)
VSACalling Service
(VMRCS)
Web Service Interface
RegionalVistA SOAFederatingServicesPlatform(Java)
VistA
VSAAdapter
(VMRCA)
VSACalling Service
(VMRCS)
Web Service Interface
VistA
VSAAdapter
(VMRCA)
VSACalling Service
(VMRCS)
Web Service Interface
RegionalVistA SOAFederatingServicesPlatform(Java)
VSA / VistA Novo potential integration (2)
ServiceInvocation
DataStorageCache
FHIRServices
FHIRRequests/Responses
VistA Novo
Wednesday, 12 March 14
VistA
ESB
VSAAdapter
(VMRCA)
VSACalling Service
(VMRCS)
Web Service Interface
RegionalVistA SOAFederatingServicesPlatform(Java)
VistA
VSAAdapter
(VMRCA)
VSACalling Service
(VMRCS)
Web Service Interface
VistA
VSAAdapter
(VMRCA)
VSACalling Service
(VMRCS)
Web Service Interface
RegionalVistA SOAFederatingServicesPlatform(Java)
VSA / VistA Novo potential integration (3)
ServiceInvocation
DataStorageCache
FHIRServices
FHIRRequests/Responses
VistA Novo
Wednesday, 12 March 14
VistA
EWD.js-compatibleVSA
Interface(Mumps wrapper
function)
EWD.js / VSA Integration – step 1
VSA Wizard
Add new output optionfrom wizard that creates
a Mumps wrapper functionthat conforms with EWD.js
approach
Wednesday, 12 March 14
VistA
EWD.js/VSAAdapter
VistA
VistA EWD.js(Node.js)
HTTP WebService
Interface EWD RESTServer(Node.js)
FHIRparser
EWD.js(Node.js)
HTTP WebService
Interface
FHIRparser
EWD.js(Node.js)
HTTP WebService
Interface
FHIRparser
FHIRRequests/Responses
SignedHTTPSRequests
EWD.js / VSA VistA Novo Equivalent (1)
EWD.js/VSAAdapter
EWD.js/VSAAdapter
Wednesday, 12 March 14
VistA
EWD.js/VSAAdapter
VistA
VistA EWD.js(Node.js)
HTTP WebService
Interface
EWD RESTServer(Node.js)
FHIRparser
EWD.js(Node.js)
HTTP WebService
Interface
FHIRparser
EWD.js(Node.js)
HTTP WebService
Interface
FHIRparser
FHIRRequests/Responses
SignedHTTPSRequests
EWD.js / VSA VistA Novo Equivalent (2)Regionalised
EWD RESTServer(Node.js)
FHIRRequests/Responses
EWD.js/VSAAdapter
EWD.js/VSAAdapter
Wednesday, 12 March 14
VistA
EWD.js/VSAAdapter
VistA
VistA EWD.js(Node.js)
HTTP WebService
Interface
EWD RESTServer(Node.js)
FHIRparser
EWD.js(Node.js)
HTTP WebService
Interface
FHIRparser
EWD.js(Node.js)
HTTP WebService
Interface
FHIRparser
FHIRRequests/Responses
SignedHTTPSRequests
EWD.js / VSA VistA Novo Equivalent (3)Redundant
EWD RESTServer(Node.js)
FHIRRequests/Responses
EWD.js/VSAAdapter
EWD.js/VSAAdapter
Wednesday, 12 March 14
VistA
EWD.js/VSAAdapter
VistA
VistA EWD.js(Node.js)
HTTP WebService
Interface
FHIRparser
EWD.js(Node.js)
HTTP WebService
Interface
FHIRparser
EWD.js(Node.js)
HTTP WebService
Interface
FHIRparser
EWD.js / VSA VistA Novo Equivalent (4)Using ESB
EWD RESTServer(Node.js)
FHIRRequests/Responses
ESBEWD.js/VSAAdapter
EWD.js/VSAAdapter
Wednesday, 12 March 14
VistA
EWD.js/VSAAdapter
VistA
VistA EWD.js(Node.js)
HTTP WebService
Interface
FHIRparser
EWD.js(Node.js)
HTTP WebService
Interface
FHIRparser
EWD.js(Node.js)
HTTP WebService
Interface
FHIRparser
EWD.js / VSA VistA Novo Equivalent (5)Using ESB
EWD RESTServer(Node.js)
FHIRRequests/Responses
ESBEWD.js/VSA
Adapter
EWD.js/VSAAdapter
Wednesday, 12 March 14
Try it all out
• Christopher Edwards (OSEHRA)– VistA Installer
• VistA up and running in 30 minutes• includes EWD.js and EWD REST Server
– fully installed, configured and running– example applications– example REST services
• Full details:• http://www.osehra.org/blog/ewdjs-and-vista-ready-use-30-minutes
70
Wednesday, 12 March 14
More security details
• Detailed summary of EWD.js security for:– interactive (WebSocket) applications;– HTTP-based Web Services– REST
• Read:• http://robtweed.wordpress.com/2014/03/10/ewd-js-application-web-service-and-rest-security/
71
Wednesday, 12 March 14
EWD.js on FHIR
Copy of slides:http://gradvs1.mgateway.com/download/EWDjs-VistANovo.pdf
Rob TweedM/Gateway Developments Ltd
Twitter: @rtweedEmail: [email protected]
Wednesday, 12 March 14