Top Banner
A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH
31

A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Jan 17, 2018

Download

Documents

Lucas Greene

One Project, Many Goals Technical, Non-technical –A general increase in level of national IT expenditure –Centralised contracts and purchasing –Hardware and Infrastructure (eg networking) –Modernising existing systems PAS upgrades, PACS full national rollout
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

A Method for Applying Graphical Templates to HL7

CDA

Rik SmithiesChair HL7 UK

NProgram Ltd, NHS CFH

Page 2: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Introduction• The English National Programme for IT (NPfIT)

• A project being delivered by:NHS Connecting for Health

• Multi-billion Pound project

• Not the only health IT work in the UK– Other regional national programmes, private sector– some domains not covered

Page 3: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

One Project, Many Goals

• Technical, Non-technical

– A general increase in level of national IT expenditure

– Centralised contracts and purchasing

– Hardware and Infrastructure (eg networking)

– Modernising existing systems • PAS upgrades, PACS full national rollout

Page 4: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

One Project, Many Goals– New national systems and integration projects

• Messaging “Spine”• National referral and booking system• National electronic medication prescription system• Relocation of records between GPs• National Summary Care Record• etc

– Innovative standards based technology to support these

Page 5: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Early Stages

• Integration Projects – need messaging• Early work concentrated on machine

processed data– Patient demographics

national database, application synchronise at every patient event

– Electronic medication prescriptions– Booking of Hospital Appointments– Lossless transfer of GP records as patients

change Doctor.

Page 6: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Statistics, August 2008

V3 messages in England, from http://www.connectingforhealth.nhs.uk/

- 10 million electronic bookings/referrals placed, messaged in V3

- Over 100 million electronic prescriptions(Several V3 messages per prescription)

- 240,000 complete medical records transferred from one GP to another, via fully structured V3 message

- 160,000 medical summaries uploaded to the NHS central record

All non-CDA V3, although medical summaries very CDA-like

Page 7: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Message Design

• First messages designed using traditional HL7 V3 process

• Later, a need to produce more document-like messages– CDA the obvious choice– Good fit with existing V3 messages and

processes– Wanted to re-use components

and investment in staff knowledge and tools

Page 8: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Message Design Process

• “Traditional” V3 methodology followed• R-MIMs (“Visios”) and CMETs created, shared,

re-used• Implementation guides produced

– 30+ iterations over several years– Using graphical layout– Look and feel, as well as procedure, became familiar

to CFH and to suppliers– Not unlike the HL7 Ballot Pack (no coincidence!)

Page 9: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

HL7 Modelling Overview• V3 is reference model based

– one RIM to rule them all (apologies to J.R.R. Tolkien)

The 6 RIM backbone classes

Page 10: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Modelling Principles

• V3 models are built up directly from RIM components– and from CMETs (common elements) – which are themselves built from the RIM

• Although this is a bottom-up construction process, the underlying method is always one of a series of restrictions downwards from the RIM

• Everything is a “constraint”

Page 11: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Modelling Example

Attributes now moreconstrained, in clone classes0..* has become 1..1Multiplicities of relationship isunconstrained, zero to many

Attributes are unconstrainedstraight from the RIM

Note there are now more participations even though the model is a constraint on the original.

Original was 0..*.

3 of 1..1 is more constrained.

Page 12: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

“Unrolling” and “Constraint”

• Previous slide showed that models can be “unrolled” to derive new models.

• In effect, pieces can be added on.– New “clone” classes can be added

• This is consistent with continual constraint downwards.

• There is actually little freedom to change things - as it should be.

Page 13: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

CDA• CDA is an HL7 V3 model (and supporting

methodology) that has been developed from the RIM as described.

• Importantly, it is designed to be used as is, with no further derivation at model level.

• The model is always constrained for the specific use case, but “cloning” to add new classes is not allowed.

• This is a more strict approach than other V3 models.

Page 14: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

CDA Methodology

• CDA implementation guides document how the existing classes are to be used.

• No new classes are derived, or unrolled.• This gives consistent element names in

the XML.• Hence a single XSLT stylesheet can

display all CDA documents.• This gives the greatest portability of CDA

documents.

Page 15: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

CDA Implementation Guides• Guides constrain the model with statements

about restrictions for that context• eg. “Use only these codes”, “don’t use this class”• Guides tend to have a narrative, documentary

format• Easy for non-technical staff to produce• Can make use of compilable “structured text”,

giving ability to machine check the rules• A powerful and successful approach, but

nevertheless different from other V3 techniques

Page 16: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Graphical Methodology

• “Graphical” constraints are well supported by V3 tools (Visio etc.)

• Can draw RIM-based models, generate XSD and documentation in a common format.

• Can include “library” CMETs defined elsewhere

Page 17: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Differing Processes

• Models that constrain and refine others have different XML names from the original

• Not allowed in CDA• Differing tools and philosophies are

inconvenient for organisations using both CDA and non-CDA V3 messaging.

Page 18: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

A Combined Methodology

• CDA cannot be re-modelled directly• An indirect approach is needed• HL7 Templates are the key• “Template” is an overused word in the

software world…• An HL7 Template is an additional

constraint to be used with another model• A layering is implied

Page 19: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Ways to extend a model

Looping arrow allows extending this model here

Page 20: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Extended in-place

Page 21: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Another way to extend this…

Page 22: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

…create another model

eg. “BloodPressure”eg. “systolic”

eg. “diastolic”

eg. “position”

Page 23: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Complete model is 2 models - master and template.

Original model is left unchanged (could be CDA)

Extra modelling done in parallel

Page 24: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Secondary Model

• The resulting model is a combination of the two models.

• This is not dissimilar to constraining CDA with textual statements. A secondary model is being described.

• Documents/messages must conform to both models.

• The secondary model (template) must naturally be compatible with the first.

Page 25: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Template Class Names

• The template will have some non-CDA class names.

• It may have CDA “Observations” renamed to “systolicBP” and “diastolicBP”

• XSD generated will not match CDA and so cannot be used directly

• In fact the message elements must conform to 2 classes at once – the inherent CDA class, and the template class.

Page 26: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Element Names

• Validating against 2 models implies knowing which extra model applies at each point of the XML

• A simple method is to use the “templateId” HL7 attribute in the document

• TemplateId acts as like a secondary class name in the instance. It is allowed on any class

• “This class (also) conforms to template class X”

Page 27: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Two Stage Validation

• A 2 stage modelling is followed by a 2 stage validation

• Class instances have 2 names. The normal XML name, plus another in the templateId.

• An XSLT transform can rename the instance so the templateId (“systolicBP”) is put into to the actual class name

Page 28: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Example TransformationOriginal document:

<ClinicalDocument><Observation>

<templateId extension=“MyTemplate.systolicBP> <!-- redundant name -->

<code displayName=“Systolic Blood Pressure”/>

becomes, after transformation into a validation-only document:

<ClinicalDocument><systolicBP>

<code displayName=“Systolic Blood Pressure”/>

This will then validate against a schema file that includes “MyTemplate.xsd”.

Page 29: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Validation CDA Model• XSD validation works on a whole document, not

a fragment.• A master CDA-like model needs to be created.• CDA is re-drawn in Visio• The templates are inserted at the appropriate

positions, by using them as CMETs.• This model is what CDA would be like if it could

be extended directly.• The resulting single XSD can validate a true

CDA instance once it has been “name transformed”.

Page 30: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Method Summary • All document instances are true CDA

• CDA constraints are modelled in Visio as graphical templates

• These are for documentation and for validation

• Templates are assembled into a new CDA-like validation model (in Visio)

• “templateIds” say which templates are being used

• The document is still true CDA– will validate against the CDA schema– will display with the CDA stylesheet – can conform to any other written CDA implementation guide

• As an optional step, a template aware application can transform the document and validate against the templates

Page 31: A Method for Applying Graphical Templates to HL7 CDA Rik Smithies Chair HL7 UK NProgram Ltd, NHS CFH.

Conclusion• Familiar graphical techniques can work with CDA

• The key is a 2 level modelling, using Templates

• The method involves only existing HL7 tools and a simple stylesheet

• This method has been put to use in the UK and is the standard way that CDA is modelled in NHS Connecting for Health

• Thanks to those at NHS CFH and HL7 who helped develop these methods.