declarative health - cityehrsteven/talks/2019/10-04-declarative/citye… · open source,...

42
1 / 42 Declarative Health - cityEHR John Chelsom Seven Informatics Ltd [email protected]

Upload: others

Post on 27-Sep-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

1 / 42

Declarative Health - cityEHR

John ChelsomSeven Informatics [email protected]

Page 2: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

2 / 42

Declarative Health - cityEHR

Electronic Health Records Using XML

Open Source, Model-Driven, XML Health Records

XML Health Records Using XForms

Page 3: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

3

Electronic Health Records Using XML

Page 4: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

4 / 42

Patient Data in Healthcare

Personalised medicine is revolutionizing treatments for

cancer

diabetes

rheumatoid arthritis

...

Research requires (amongst other things) rich, structured data

– ideally, gathered in routine clinical care

XML provides an excellent mechanism for representing clinical data using standards such as HL7 CDA and ISO-13606

Page 5: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

5 / 42

Case Notes

• Case Notes was an Enterprise Java application for Electronic Health Records (EHR)

• First live installation at Oxford Radcliffe Hospital in 1999 (still running there in 2019)

• Chosen as the base system for the Summary Care Records system in England in 2003

• Implemented using non-standard XML vocabularies, and a relational database

• > £5m investment

• > 100 person years effort

Page 6: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

6 / 42

National Programme for IT

• Case Notes was scaled up to 55 million patients

• Systems integrators LogicCMG and BT

• Clustered Oracle database and Java hardware accelerators

• Estimated 90 – 100 Tb database

• 1Tb storage in BT's data centre cost approx £100k

• Total budget was £100m's

• Infrastructure cost was > £5 per patient

Page 7: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

7 / 42

Failure of EHR

The National Programme for IT failed – as a result of top-down design, poor quality products, feasting frenzy for systems integrators and consultants

It failed to deliver its ambitious objectives, but also set the the whole UK Health Informatics industry back a decade

We continue to spend £100m's on poor quality systems (not just in the UK)

I dream of the day when we can offer an EHR system which is

– Free (as in freedom of speech and free beer)

– Completely based on open standards

– Configured by clinicians to hold the information they need

– Massively scalable

– Deployable by a schoolboy

Page 8: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

8 / 42

Raspberry Pi Beowulf Cluster

In 2018, my son (then aged 14) deployed the open source cityEHR

On a cluster of 16 Raspberry Pi 3s

To demonstrate scalability of XML health records on commodity hardware

Page 9: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

9 / 42

EHR_Extract

Folder 1 Folder 2 Folder n

Composition

Section

Section Entry

ElementElementElement

ElementElement

Cluster

ElementElementElement

ElementElementCluster

• ISO-13606 standard

• Started as a European standards activity, adopted by ISO

• Defines the general structure of a health record (amongst other things)

Structure of a Health Record

Page 10: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

10 / 42

Entry

Section

Folder

EHR_Extract

Cluster

Element

Composition

Structure of a Health Record

Page 11: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

11 / 42

Clinical Statement

12080

Normal These data carry no meaning. In ISO-13606, data items are modelled as Element, and grouped as Cluster

The Clinical Statement is the lowest level of modelling that carries useful clinical context.

It is the point in the model at which data becomes information.

In ISO-13606 the Clinical Statement is modelled as Entry.

Page 12: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

12 / 42

HL7 Clinical Document Architecture

Page 13: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

13 / 42

XML Health Record

Page 14: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

14 / 42

XML Health Record

Page 15: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

15 / 42

XML Health Record

Page 16: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

16

Open Source, Model-Driven, XML Health Records

Page 17: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

17 / 42

• A base Information Architecture provides the building blocks

• Clinicians create clinical Information Models for their own systems

• The System Configuration is generated from the Information Model

• The runtime EHR system operates using the System Configuration

– views of the patient record

– search criteria

– data collection forms

– clinical messages

– (pathways, orders, prescriptions)

Model-Driven EHR

Page 18: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

18 / 42

• Standards based

• Clinician led

• Ontology models

Information Architecture

Information Architecture

OntologyOntology

OWL (XML)

ISO 13606HL7 CDA

OWL (XML)

ISO 13606HL7 CDA

Information Model

Information Model

Clinical Coding

Clinical Data Sets

Clinical Coding

Clinical Data Sets

OWL (XML)

SNOMED CTICD-10LOINCdm+d

OWL (XML)

SNOMED CTICD-10LOINCdm+d

Art

efa

ctIm

ple

men

tsS

tan

dard

s

System Configuration

System Configuration

Messages

Forms

Views

Messages

Forms

Views

HL7 v2/v3HL7 CDA

SNOMED CTXFormsXHTML

PDF

HL7 v2/v3HL7 CDA

SNOMED CTXFormsXHTML

PDF

Clinical System

Clinical System

Electronic Health Records

Electronic Health Records

XML

HL7 CDA

SNOMED CT

ISO 13606

XML

HL7 CDA

SNOMED CT

ISO 13606

Standards/Clinician/Ontology-Driven EHR

Page 19: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

19 / 42

< D e c l a r a t i o n > < C l a s s I R I = " # I S O - 1 3 6 0 6 : E n t r y " / > < / D e c l a r a t i o n > < D e c l a r a t i o n > < N a m e d I n d i v i d u a l I R I = " # I S O - 1 3 6 0 6 : E n t r y : B M D D a t a " / > < / D e c l a r a t i o n > < C l a s s A s s e r t i o n > < C l a s s I R I = " # I S O - 1 3 6 0 6 : E n t r y " / > < N a m e d I n d i v i d u a l I R I = " # I S O - 1 3 6 0 6 : E n t r y : B M D D a t a " / > < / C l a s s A s s e r t i o n > < D a t a P r o p e r t y A s s e r t i o n > < D a t a P r o p e r t y I R I = " # h a s D i s p l a y N a m e " / > < N a m e d I n d i v i d u a l I R I = " # I S O - 1 3 6 0 6 : E n t r y : B M D D a t a " / > < L i t e r a l x m l : l a n g = " e n - g b " > D X A S c a n R e s u l t s < / L i t e r a l > < / D a t a P r o p e r t y A s s e r t i o n >

< O b j e c t P r o p e r t y A s s e r t i o n > < O b j e c t P r o p e r t y I R I = " # h a s C o n t e n t " / > < N a m e d I n d i v i d u a l I R I = " # I S O - 1 3 6 0 6 : E n t r y : B M D D a t a " / > < N a m e d I n d i v i d u a l I R I = " # I S O - 3 6 0 6 : E l e m e n t : B M D M e a s u r e m e n t " / > < / O b j e c t P r o p e r t y A s s e r t i o n > < O b j e c t P r o p e r t y A s s e r t i o n > < O b j e c t P r o p e r t y I R I = " # h a s C o n t e n t " / > < N a m e d I n d i v i d u a l I R I = " # I S O - 1 3 6 0 6 : E n t r y : B M D D a t a " / > < N a m e d I n d i v i d u a l I R I = " # I S O - 1 3 6 0 6 : E l e m e n t : T S c o r e " / > < / O b j e c t P r o p e r t y A s s e r t i o n > < O b j e c t P r o p e r t y A s s e r t i o n > < O b j e c t P r o p e r t y I R I = " # h a s C o n t e n t " / > < N a m e d I n d i v i d u a l I R I = " # I S O - 1 3 6 0 6 : E n t r y : B M D D a t a " / > < N a m e d I n d i v i d u a l I R I = " # I S O - 1 3 6 0 6 : E l e m e n t : Z S c o r e " / > < / O b j e c t P r o p e r t y A s s e r t i o n >

EHR Ontology Model

Page 20: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

20 / 42

cityEHR - Clinician-led Development

• Clinicians create clinical models for their own systems

• Using the cityEHR architectural model

Page 21: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

21 / 42

Information Model – Spreadsheet Input

Clinicians can create their own information models using a spreadsheet

Converted to an OWL/XML ontology when imported to cityEHR

Page 22: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

22 / 42

Generating XForms

Information Architecture

Information Architecture

Information Model

Information Model

Art

efa

ct System Configuration

System Configuration

Clinical System

Clinical System

ArchitectureOntology

OWL/XML

ModelOntology

OWL/XML

SpreadsheetODFXML

Transform

XSLT

Transform

XSLT

TemplateHL7 CDA

XML

RecordHL7 CDA

XML

RecordOntology

OWL/XML

Transform

XSLT

Transform

XSLT

XForm

Page 23: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

23

XML Health RecordsUsing XForms

Page 24: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

24 / 42

cityEHR Platform

• cityEHR is built using open source software

• An enterprise-scale health records system

• Following research at City University, London

• Distributed under the LGPL license

IntegrationInterfaces

Access Control

OrbeonModel View Controller Framework

eXist Native XML Database

Tom

cat

App

licat

ion

Ser

ver

Mirt

h C

onne

ctIn

tegr

atio

n/M

ess

agin

g E

ngin

e

Application Logic

OrbeonXForms

User Interfaces Service Interfaces

RESTful Web ServicesWeb Browser

Postgres SQL Database

XML

XSLT

XQueryOrbeon

XML Pipelines

Page 25: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

25 / 42

XForms – REST – XQuery

• An XRX application – XForms – REST – XQuery

• Open source, Enterprise Java

• But no Java code

• 100% Declarative Application

Page 26: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

26 / 42

Dynamic XForms User Interface

XML

HL7 CDA

Composition

XForm (xhtml)

XForms Model

XForms Controls

<head>

</head>

<body>

</body>

Controls depend on the XML instance

Can create directly in XForms

But cannot support arbitrary levels of nesting (for sections and clusters)

Instance

Page 27: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

27 / 42

Generating XForms in a Pipeline

Generate XForm

XSLTCreate Content

Get FormGet CDA XML

Get Template

Include Content

Cached?

Composition Type

Serialize to Browser

Cache?Cache Formyes

yes

no

no

XMLHL7 CDA

Composition

XFormTemplate

XForm

Page 28: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

28 / 42

cityEHR Electronic Health Records System

• Web-based EHR

• Open standards

• Clinician led

• One click deployment

• Enterprise scale

Page 29: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

29 / 42

Dashboard – Cross Patient Information

• Execute any database query (configurable)

• Summary of results

• Charts (Bar, Pie, Dial)

Page 30: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

30 / 42

Finding Patients

• Patient search

• Linked to entries in designated CDA registration documents

• Completely configurable

• Recently accessed (from audit log)

• From clinic lists

• From in-patient lists

Page 31: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

31 / 42

Full Historic Record

• Full list of stored CDA documents

• From migrated data

• From messages

• Or from input data

Page 32: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

32 / 42

Annotating the Historic Record

• Add annotations to historic data

• Configurable structure of annotations

• Stored as HL7 CDA

• Linked to subject document

• With notification to InTray

Page 33: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

33 / 42

Clinical Data Entry

• All data relationships and behaviour are defined in the information model

• Conditional sections, entries, clusters, elements

• Calculated values (elements)

• Multiple entries

• Pre-filled entries

• Default values

• Constraints

• Hints

• Supporting information

• Required values

• Layout

• Rendition

• Reference data look-up

Page 34: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

34 / 42

Graphical Input of ISO-13606 Entry

• Link any image with an ISO-13606 entry

• Define an image map, linking to ISO-13606 elements

• Data input is though click on the image

• Only affects the rendition of the entry

– All other aspects of the data are identical to form-based renditions

Page 35: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

35 / 42

Graphical Input of Multiple Entries

• Link any image with an ISO-13606 entry

• Define an image map, linking to one ISO-13606 element

• Data input is though click on the image

• Each click adds a new entry to the record

• Only affects the rendition of the entry

– All other aspects of the data are identical to form-based renditions

Page 36: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

36 / 42

Charts of Historic Data

• Available for recognised data patterns

• For an longitudinal data sets

• Generated as SVG graphics

• As trends or interval plots

– Laboratory test results

– Start and stop dates for medications

Page 37: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

37 / 42

Letters – Integrated Part of the Record

• Created as CDA documents

• Using same modelling tools as other documents

• Stored as HL7 CDA

• Printed (exported) as

– PDF

– MS Word

Page 38: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

38 / 42

Secondary Uses of Clinical Data

• Cohort search using terms built from the data dictionary

• Use entry/element in clinical context

• Combine cohorts

• Export cohorts, with specified data sets

• as HL7 CDA

• as spreadsheet

• (anonymised)

Page 39: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

39 / 42

Care Pathways as CDA Documents

• Pathways modelled as CDA documents

• Using same modelling tools as other documents

• Stored as HL7 CDA

• In progress

• and when complete

• forms part of the record

Page 40: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

40 / 42

In-Tray – Collaboration for Care Teams

• List of notifications for the user

• Can be actions in pathways

• Or annotations on events

• Click directly through to the patient record

Page 41: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

41 / 42

NHS Implementations

• Ponseti database – club foot clinics

– Chelsea and Westminster

– Manchester Children's Hospital

• ORCHID – clinical data for biobank

– Nottingham University Hospital

• Elfin – pathways for fracture prevention

– Nuffield Orthopaedic Centre, Oxford

Page 42: Declarative Health - cityEHRsteven/Talks/2019/10-04-declarative/cityE… · Open Source, Model-Driven, XML ... (EHR) • First live installation at Oxford Radcliffe Hospital in 1999

John ChelsomSeven Informatics [email protected]

13th – 18th September 2020

xmlsummerschool.com