fhir server, swiss knife in your architecture · 2019. 3. 21. · •sql •depends on specific...

39
HL7®, FHIR® and the flame Design mark are the registered trademarks of Health Level Seven International and are used with permission. Amsterdam, 14-16 November | @HL7 @FirelyTeam | #fhirdevdays18 | www.fhirdevdays.com FHIR Server, Swiss knife in your Architecture Christiaan Knaap

Upload: others

Post on 24-Nov-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

HL7®, FHIR® and the flame Design mark are the registered trademarks of Health Level Seven International and are used with permission.

Amsterdam, 14-16 November | @HL7 @FirelyTeam | #fhirdevdays18 | www.fhirdevdays.com

FHIR Server, Swiss knife in your Architecture

Christiaan Knaap

Page 2: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

The Question

A FHIR Server

What functions does it have?

What could I use that for?

Page 3: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Audience

• High level

• Architects

• Integrators

• No code involved

Page 4: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Speaker

• Christiaan Knaap

• Firely

• 20 yr IT dev / analist / architect

• Lead dev of Vonk FHIR Server

[email protected]

• Zulip

Page 5: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Agenda

• What is a FHIR Server?

• Functions on the knife

• Types of knifes servers

• Use cases

• Questions (and maybe answers)

Page 6: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

What is a FHIR Server

A FHIR REST server is any software that implements the FHIR APIs and uses FHIR resources to exchange data. From <http://www.hl7.org/implement/standards/fhir/overview-arch.html>

Page 7: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

FHIR Server definition

Any software

that implements

all or several

parts of the

FHIR RESTful API

Page 8: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Experiment

• FHIR Specification • http.html

• search.html

• Public testing servers

http://wiki.hl7.org/index.php?title=Publicly_Available_FHIR_Servers_for_testing

• CheatSheet!

Page 9: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

What’s all in the Server Knife?

Page 10: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Storage

• FHIR is for Interoperability

• FHIR Server adds Storage of Resources: • Granular, but self contained

• Define a Canonical Data Model

• No standard mapping to relational model

• Native query language • JSON query capabilities

• SQL

• Depends on specific Server implementation

Page 11: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Storage models

Resource

Type, id, version

JSON

Search index

name

value

JSON Query Full Text Index

Page 12: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

CRUD

• Create

• Read

• Update

• Delete

• Conditional

• Patch

Page 13: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Search

• Search API

• Predefined parameters

• Custom parameters

• _filter, _query

• GraphQL

{{url}}/Patient?_has:Group:member:_id=102&organization.name=ACME&birthdate=gt1982

Page 14: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

History, versioning

• Assign versions

• Keep version history • on update and delete

• Read past versions

• At point in time • _at

• Read history of resource(s) • _since

• Auditable

Page 15: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Validation

• Validation code is in API’s • .NET, Java, Delphi

• Types of validation • structural • rules (‘invariants’) • terminology bindings • core / derived profiles

• Server adds • validation as a service - $validate • profile administration • terminology services

Page 16: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Custom operations

• Questionnaire/$populate

• Patient/$match

• Claim/$submit

• Server framework for implementing your own

Page 17: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Subscription

• POST a Subscription

• Criteria on your interests

• Get notified on new matches

• Note: not yet on deletes

Page 18: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Terminology

• Register CodeSystem and ValueSet resources

• Use them for Validation

• Use them for Search • :in, :not-in :above, :below

• Terminology operations • $lookup, $expand, ...

• Simple vs Complex • administrativeGender vs SnomedCT

Page 19: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Messaging

• Expressed in resources • Bundle

• MessageHeader

• $process-message • very generic

• implementation in plugin

• FHIR Server as • receiver

• message store

Page 20: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Authorization

• No authorization in FHIR itself

• SMART on FHIR: • OpenID Connect (constrains OAuth2)

• Claims per resourcetype

• Read/write

• Other authorization model? • Still leverage the canonical model

• Server plugin model

• Identity Server • can be in the package, but is not FHIR

Page 21: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Auditing

• Provenance • where did data originate

• who is responsible for it

• it is a resource

• AuditEvent • who did what when

• retrospective

• also a resource

• Both can be stored & queried

Page 22: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Bulk Data Export

• Get whole patient records • just like $everything

• For groups of patients

• In files of ndjson format

• Still in draft, but maturing

Page 23: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

SQL on FHIR

• Use well known SQL to query FHIR Resources

• Requires a reduced view on the data

• Very early stages

Page 24: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Mapping

• V2 support in some

• FHIR Mapping Language • early stages, little support

• Custom mapping in Facade

Page 25: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

CapabilityStatement /metadata

• Describes capabilities

• Types of resources

• RESTful operations

• Search parameters

• Software properties

Page 26: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Types of servers

• Generic • All resources, most of the API

• Specific • Domain specific

• A few resource types, special operations

• Facade • On top of existing datastructures

• Cloud • Also generic

• Tailored to vendors cloud offering

Page 27: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Use cases

• Clinical Data Repository

• Research and analytics

• App platform

• External reporting

• CDS Hooks

Page 28: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Clinical Data Repository

Page 29: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Clinical Data Repository

source

consumer

source source

Page 30: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Clinical Data Repository consumer

Page 31: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Clinical Data Repository - functions

• Search / read • utilize Terminology

• History / versioning

• Validation

• Authorization

• Subscriptions • Trigger?

• Bulk Data

Page 32: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Research and analytics

• Enabled by the Clinical Data Repo

• Bulk data export • use in e.g. Apache Spark

• SQL on FHIR • FHIR Server – on derived model

• Facade – source may already be fit for SQL

Page 33: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

Extensions

• Resource can be extended

• Hard task for query and analysis

• Code for extensions of interest • specific tables/columns/structures

• custom search parameters

• Pass through the rest generically

• Create derived representations • e.g. analysis model

Page 34: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

App platform

Page 35: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

App platform - functions

• CRUD

• Search

• Validation

• Authorization • also as consent

• Custom operations • supporting your app

Page 36: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

External data reporting

source consumer

Page 37: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

External data reporting - functions

• Search

• History, versioning

• Validation

• Subscription

• Mapping

• Bulk Data Export

Page 38: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index

CDS Hooks

EHR

EHR backend

CDS Card

launch

additional resources

sync

additional resources

Page 39: FHIR Server, Swiss knife in your Architecture · 2019. 3. 21. · •SQL •Depends on specific Server implementation . Storage models Resource Type, id, version JSON Search index