+ All Categories
Home > Documents > HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S....

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S....

Date post: 19-Dec-2015
Category:
View: 225 times
Download: 3 times
Share this document with a friend
Popular Tags:
140
HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.com/download/implementation_mechanics.ppt Full source: www.ringholm.com/download/ implementation_mechanics.ppt
Transcript
Page 1: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

V3 Software Implementation

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

Full source: www.ringholm.com/download/ implementation_mechanics.ppt

Page 2: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. 2

René Spronk M.Sc. FHL7

HL7/IHE roles:•Co-chair of the international HL7 RIMBAA Working Group•Co-chair of various Committees, HL7 Germany, HL7 Netherlands•Contributor to the IHE Laboratory Technical Framework•HL7 Fellow, 2011

Trainer / Senior Consultant Ringholm bvHaarlem, the Netherlands

Tel. +31 (0)318 589 789Fax: +31 (0)318 548 090

eMail: [email protected]: http://www.Ringholm.com

Page 3: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Key Objectives

Understand some architectural approaches and techniques for v3 Implementation

Discuss some technologies and tools available to implement v3 specifications

Show some of the ‘best practices’ collected by the HL7 RIMBAA Workgroup

Page 4: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Overall Agenda

Introduction XML Serialization In memory object processing Persistence Mapping v2 to v3 (optional) Implementation Tools User Interfaces (optional)

01/01/20114

Page 5: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

HL7 v3 Implementation –

an introduction

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

An Introduction

Page 6: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Agenda – Introduction section

HL7 v3 modeling/HDF – bottom up MIF and the origins of schema

Conformance/validation principles RIMBAA Technology Matrix

6

Page 7: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

An introduction

HL7 v3 modeling / HDF

-bottom up-

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

Page 8: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

XM

L exam

ple

8

XML ITS

DT R1

Page 9: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

HL7 v3: Model Refinement

9

ITS(serialization format

of instances)

R-MIM / SIMSerializable Model

PharmacyClinical

Documents

D-MIM / DIMDomain Model

RIMRIM

Stable model,Domain agnostic

Refinement of

Refinement of

Page 10: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. 10

RIM – Abstract Data Model

Page 11: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Notes

Core of all information models: Data Type specification

Behavioral (dynamic) model: Interactions, initial/response exchanges between 2

applications

Service layer, contractual issues, -work in progress in HL7 v3-

11

Page 12: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

An introduction

MIF – Model Interchange Format

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

Page 13: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

MIF

The Model Interchange Format (MIF) a set of XML formats used to support the storage

and exchange of HL7 version 3 artefacts the pre-publication format of HL7 v3 artefacts

used by tooling. the formal definition of the HL7 metamodel.

MIF can be transformed into derived forms such as UML/XMI, OWL, or XML schema.

13

Page 14: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

MIF documents:

Requirements-analysis related structures. Static model related structures. Dynamic model related structures. Infrastructure related structures:

including data types, and vocabulary

Structures related to testing Conformance-related HL7 structures Publication related structures

14

Page 15: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Derived forms

15

Page 16: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.16

MIF: How Is It Defined? (1)

mif-core-base

mif-model-static-serializedmif-model-static-flat

mif-model-staticBase

mif-core-staticBase

mif-model-datatype

mif-core-enumerations

Core

Vocabulary

Data type

xhtml1-strict

xml

mif-model-requirements mif-model-publication

mif-model-crossReference

mif-model-package

mif-model-interface

mif-model-dynamic mif-model-documentation

mif-COMPLETE

mif-model-static-derived

mif-core-patterns

mif-model-testing

mif-model-vocabulary

mif-model-conformance

mif-core-changes

Mark-up

xhtml-special.ent xhtml-symbol.ent

xhtml-lat1.ent

MIF 2.1 - June 13, 2008

mif-model-annotationLibrary

Static

Dynamic

Interface

Stable Beta Draft

Other

A set of XML schemas (+ Schematron):

Page 17: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.17

MIF: How Is It Defined? (2)

The XML schemas define the MIF language constructs as types, with the meaning of the types explained informally in annotations:

Page 18: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Why MIF instead of UML?

MIF is a single unified metamodel that spans all HL7 artifacts. The metamodel is maintained and under the sole control of HL7. The metamodel represents all HL7 artifacts in a consistent fashion.

There will always be a "newer" and "better" technology out there, but there is currently no alternative metamodel representation that covers all of HL7's metamodel.

18

Page 19: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

An introduction

ITSs and

the origins of HL7 Schema

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

Page 20: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

ITS – Implementable Technology Specification

An ITS specifies how instances of HL7 SIMs should be ‘transmitted’ Serialization, deserialization, encoding syntax

The most commonly used ITS is the “XML ITS” Alternatives: RIM serialization ITS (“RIM ITS”),

Green CDA

20

Page 21: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

RepositoryRepository

MIFMIF

MIF transform toXML based ITS schemas

XML SchemasXML SchemasR-MIMR-MIM

XSLTXSLT

MIFMIFMIFMIF

PubsPubs

XSLTXSLT

Page 22: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

MIF Example: E_NonPersonLivingSubject

22

Other attributes

Page 23: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

MIF Header

23

Page 24: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

MIF classes/associations (snippet)

24

Page 25: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

MIF v. XML-based ITS

XML provides a syntax only An XML based ITS defines the set of

valid XML instances for a given message type no schema can do this

Download informative schemas with the v3 Ballot Package Normative Edition schemas as a reference

Page 26: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Generated XML-Schema for BirthPlace (snippet, XML ITS 1.1)

26

XML ITS

Page 27: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

An introduction

Conformance and Validation

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

Page 28: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

A “Valid” v3 instance..

Complies with the requirements as defined by the HL7 v3 information model Conformance indicator, cardinality, vocabulary

Complies with additional (“contractual”) requirements Template definitions, business rules

28

Page 29: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Attribute/AssociationConformance Levels

Conformance indicator: Optional: MAY be present, MAY be

processed, allows for nullFlavors Required*: SHOULD be present, SHALL be supported by

sender/receiver, SHALL be sent if known, allows nullFlavors Mandatory yes/no:

Mandatory*: SHALL be present, SHALL be processed/supported by sender/receiver, no nullFlavors

29

Page 30: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.30

Vocabulary: Value Sets Attribute is linked to

Concept Domain The concept domain is

(UV Realm) represented by a value set.

The value set is based on a coding system.

AdministrativeGender

(Concept Domain)

The gender of a person used for administrative purposes (as opposed to clinical gender)

Personname: EN [0..*]

administrativeGenderCode: CE CWE <= AdministrativeGender

(Value Set – Universal Realm)OID 2.16.840.1.113883.19.11.1

M, F, UN

IAGC Release 2

(Coding System)OID 2.16.840.1.113883.19.1

M, F, UN, X, B

Page 31: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. 31

R-MIM (SIM).. and a Template (LIM)

Notes: • Template model must be a valid constraint on the R-MIM

-- An instance would not be able to conform to both if the above doesn’t hold true

• Reminder: Clone names of classes carry no semantics (they are irrelevant)

Page 32: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Constraint Language

To express additional constraints OCL, ADL, Gello No solution has been formally adopted

Typical (OCL) example: The Person object should have either an id or a

name context Person

inv: id.hasContent or name.hasContent

32

Page 33: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. 33

Example: „Valid“ CDA Document

1. Validates against the published XML Schema XML Schema based validation tool

2. Validates against the abstract CDA model specification

Use a MIF (specification of the abstract model) based validation tool, includes conformance and vocabulary validation

3. Validates against requirements / templates as specified in implementation guides

Mostly: a XML Schematron based validation tool; could be MIF/OCL based

Page 34: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

An introduction

RIMBAA Technology Matrix

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

Page 35: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. 35

RIM - Abstract Data Model

Page 36: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

The RIM is “abstract”

The same “instance” of information can be shared via different information interoperability paradigms

E.g. lab results can be shared via (electronic) documents (v3 Clinical Document

Architecture) via V3 lab messages via Web Services with v3 payloads

..or they can be imported In a RIM Based Application (RIMBAA)

Page 37: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

RIMBAA

Use of V3 artefacts

Page 38: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

PersistentRepresentation

PersistentRepresentation

ObjectRepresentation

ObjectRepresentation

SerializedRepresentation

SerializedRepresentation

RIM

Con

stra

ined

In

form

atio

n M

odel

RIM

Con

stra

ined

In

form

atio

n M

odel

RIM

(gen

eric

)M

odel

RIM

(gen

eric

)M

odel

App

licat

ion

spec

ific

Mod

el

App

licat

ion

spec

ific

Mod

el

RIMBAA Technology Matrix

Page 39: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Overall Agenda

Introduction XML Serialization In memory object processing Persistence Mapping v2 to v3 (optional) Implementation Tools User Interfaces (optional)

01/01/201139

Page 40: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

XML Serialization

About the HL7 v3 XML Schema

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

Page 41: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Two XML-based ITSs

XML ITS 1.1 Has been in use since the

beginnings of HL7 v3 Based on serialization of

an R-MIM (SIM) XML elements names

based on clone/business names for classes as used in the R-MIM

Separate schema for each and every R-MIM (SIM)

RIM ITS New (2010) Based on serialization of

the RIM XML element names

based on the RIM core class names.

One single schema for all RIM-based models; 50 classes.

Page 42: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

XML ITS example<component typeCode="COMP">

<commonObservationEvent classCode="OBS" moodCode="EVN”

<templateId root='2.16.840.1.113883.10.20.1.24'/>

<code code="8302-2" codeSystem="2.16.840.1.113883.6.1" displayName="Lichaamslengte“>

<statusCode code="completed"/>

<effectiveTime value="200907011346" />

<value xsi:type="PQ" value="90" unit="cm" />

<subject typeCode="SBJ" contextControlCode="OP">

<patient classCode="PAT">

<patientPerson classCode="PSN“

determinerCode="INSTANCE">

<name>ROELOFSEN, TOM</name>

Page 43: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

RIM ITS example<rim-graph xmlns="urn:hl7-org:v3-rim"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0226"

xmlns:sbad=“urn:oid:2.16.840.1.113883.10.20.1.24” >

<outboundRelationship xsi:type="ActRelationship" assocName="subject" cloneName="Subject2" contextControlCode="AN" typeCode="SUBJ" contextConductionInd="false"> <target xsi:type="SubstanceAdministration"

classCode="SBADM" moodCode="RQO“

templates=“sbad:root” > <id root=""/> <code code="DRUG" codeSystem=""/> <participation xsi:type="Participation"

contextControlCode="OP" typeCode="DIR"> <role xsi:type="Role" assocName="medication"

cloneName="Medication" classCode="ADMM"> <player xsi:type="ManufacturedMaterial“

assocName="administerableMedicine" classCode="MMAT" determinerCode="KIND">

<code code="" codeSystem="?"/>

Page 44: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

PersistentRepresentation

PersistentRepresentation

ObjectRepresentation

ObjectRepresentation

SerializedRepresentation

SerializedRepresentation

RIM

Con

stra

ined

In

form

atio

n M

odel

RIM

Con

stra

ined

In

form

atio

n M

odel

RIM

(gen

eric

)M

odel

RIM

(gen

eric

)M

odel

App

licat

ion

spec

ific

Mod

el

App

licat

ion

spec

ific

Mod

el

ITSs - RIMBAA Technology Matrix

Note:RIM ITS

Note:XML ITS

Page 45: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Using HL7 v3 Schemas

HL7 produces informative XML Schema Definitions (XSD) for all v3 messages

There are no normative XML schema (current workitem) normative schema are being

discussed Things to understand

An XML document that satisfies Schema validation is not necessarily a valid HL7 v3 Message/Document

Page 46: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

XML ITS Schema - Abstract Models

In v3, Element Names are derived from the permitted structural codes No meaning is lost if you strip all element names

from HL7v3 XML <Foo classCode=“PSN”>..</Foo> is the semantic

equivalent of <Person classCode=“PSN”>..</Person>

However, most XML tools are useless if you strip all element names from a document. First generation implementations will use XML element

names, later systems will be driven off the structural vocabulary (classCode, moodCode, typeCode.. )

Model Driven Architectures / Code Generation

XML ITS

Page 47: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

XML Schema what are schemas bad at

No ambiguous content models allowed Problem for model-XML mapping (requires use of

clone class names in XML instances) No conditional constraints

cannot have an element that may either have a nullFlavour, or a set of attributes

Date+Time types are a mess HL7 uses short ISO dates (without validation)

Code list validation Only for small (enumerated) code lists

Friendly messages when validation fails

Page 48: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

XML Serialization

Serialization/Deserialization

(using XML techniques)

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

Page 49: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Parsing and ValidationUsing XML Techniques

Serialized Message to Application Object Streaming API

SAX, XmlReader for efficient parsing of XML instances

Stripping out of those parts one needs only, skipping all other content

DOM, XPath Total control on XML processing In memory object which represents all of

the XML contents

Page 50: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Parsing and ValidationUsing XML Techniques

Page 51: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Normalization

HL7 v3Message

SchemaValidation

HL7Rules

HL7

HL7 v3Schema

ImplementationSpecific

MessageParsing

ExtendedValidation

InformationModel

ApplicationRules

ClinicalRepository

Page 52: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

TransformationUsing XML Techniques

Serialized Message to/from other serialized model: XSLT 1.1, XSLT 2.0, EXSLT

Every platform has multiple implementations of XSLT for XML transformations• Saxon, .NET Framework, JAXP…

Cascade XSLT transformations to simplify and flatten the instances

XQuery XML Query Language for procedural XML

processing Several XQuery implementations are avaliable,

refer to W3C XQuery home page (over 50 listed)

Page 53: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

SerializationUsing a template

Simply fill in the blanks to create message Use XPATH for inbound models Ignorant of V3 data model and XML

set message ={<patientPerson> <id root="2.16.578.1.34.1000.1" extension=“$PAT_ID"/> <name use="L">

<given> $PAT_FIRSTNAME</given><given> $PAT_MIDDLE</given><family> $PAT_FAMILY</family>

</name> <administrativeGenderCode code=“$PAT_GENDER"

codeSystem="2.16.840.1.113883.5.1"/> <birthTime value=“$PAT_BIRTHDATE"/></patientPerson>}

Page 54: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

SerializationUsing a template

Use only when variability is low, when a few messages/documents need to be supported

Beware of exceptions: nullFlavor instead of code Variable has no value:

<name></name> is valid XML, but it isn’t valid in a V3 XML instance (1)

<Act code=“” codeSystem=“1.2.3”/> isn’t valid in a V3 XML instance

Page 55: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

XML Serialization

XML Based conformance/validation

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

Page 56: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Parsing and ValidationUsing XML Techniques

XML Schema Validation HL7 provides informative schemas for first-pass

message validation Not sufficient for full validation

Schematron, RELAX NG Better than XSD as validating messages, but still

not widely used no HL7-provided schematron (although could be

generated from MIF) May be provided by the author of an

implementation guide Validating Stylesheet

Produces “human readable” errors

Page 57: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Schematron is a …

Rules-based validation language A way to test XML documents A way to specify and test assertions about

patterns in XML documents A cool report generator

Page 58: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Reasons to Use Schematron

Business/operating rules that other constraint languages can’t enforce

Different requirements for different stages of the document lifecycle

Local or temporary constraints (not in base schema)

Unusual (but not illegal) variation No schema Ad hoc querying and discovery

Page 59: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

A Short Example Schematron ...in a CDA instance

Schematron

<rule context="hl7:typeId"> <assert role="error“ test="@extension='POCD_HD000040'"> ClinicalDocument.typeId (2.16.840.1.113883.2.4.6.10.35.3) @extension SHALL have value POCD_HD000040 static </assert>

<assert role="error" test="@root='2.16.840.1.113883.1.3'"> ClinicalDocument.typeId (2.16.840.1.113883.2.4.6.10.35.3) @root SHALL have value 2.16.840.1.113883.1.3 static </assert></rule>

<typeId extension="POCD_HD000040" root="2.16.840.1.113883.1.3"/>

Page 60: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Schematron – Example (v3 Messages)

60

Page 61: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Overall Agenda

Introduction XML Serialization In memory object processing Persistence Mapping v2 to v3 (optional) Implementation Tools User Interfaces (optional)

01/01/201161

Page 62: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

In-memory object processing

Class Generators

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

Page 63: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Model Driven Software Development (MDD)

Image credits: Johan den Haan, Mendix.nl

Model Generate

Page 64: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

MDD - Application Generation

Software application

Software application

Generic Software Components-Terminology-Data types

Generic Software Components-Terminology-Data types

PersistenceDatabase

RIM RIM

Page 65: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Class-based Parsing

Class generators – XML Schema driven Every major development platform provides tools

to generate classes from XML Schemas E.g. JAXB, .NET Framework/Mono (XSD.EXE), XML

Beans…

Class Generators – Model driven Model Driven Software development

environments allow classes to be generated from (UML-) models

E.g. MARC Everest API Generator (XML ITS/RIM ITS)

Page 66: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Class-Based ParsingUsing Coding Techniques

Page 67: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Model based code generation

Full (abstract) model specification is stored in a model repository (RoseTree) Abstract model is expressed as a MIF (Model

Interchange Format) file MIF can be transformed to less expressive XML

Schema

Code generation MIF (to alternate model representation, e.g. UML) to

code (e.g. MDHT) XML Schema to code (e.g. JAXB xjc)

Page 68: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Code Generation

MIF Based Code Generation

68

Page 69: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

MIF Based Code Generator

Full (abstract) model specification is stored in a model repository (RoseTree) Abstract model is expressed as a MIF file – including

GELLO/OCL expressions and (DCM derived) Template definitions

Code (class) generation MIF - the code generator has to be aware of the

structure of the MIF UML/EMF (derived from the MIF) - the code generator

has to know UML/EMF, including the v3 specific extensions

Page 70: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

MIF v. Derived model

MIF Normative (full) specification

of a v3 model, inclusive of documentation

Full validation support No cross-industry tools for

class generation MIF based class generators

are being created: MRC-HI Everest, OHT

Derived (e.g. UML, Schema) Derived (lossy)

specification of v3 model

Cross-industry tools for code generation

70

Page 71: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Programming Components

71

CMETMIF

WrapperMIFs

Reusable components

DatatypesCustom code

codeTargetModelMIF

TargetModelDSL

Terminology server API + data

Code generationModel transform

VocabMIF

Ser

ializ

atio

n

XM

L e

nco

din

g/d

eco

din

g

Page 72: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Data Types – custom code Custom library with support for v3 data

types Mostly: ISO data types, patched to support data types

R1 as well Relationship with Terminology Server (C* data types) Needs custom coding: data types MIF is abstract.

Mohawk (.net) and OHT (Java) contain such libraries Or use datatypes.xsd as the basis for development

72

Page 73: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Serialization – XML En/DeCoding

Serialization engine Serialize RIM structures according to HL7 rules

XML En/DeCoding Encoding of a serialized graph Rules as specified by the ITS (e.g. XML ITS, RIM

ITS)

73

Page 74: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Code Generation

Schema Based Code Generation

74

Page 75: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Schema based code generation

Advantage: wide availability of tools Serious disadvantage: XMl schema

language isn’t powerful enough to express all model requirements

Disadvantage when validating templates (in-memory, not on serialized format): Templates are expressed in MIF, there is no Schema version.

75

Page 76: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Schema's serve multiple masters

Schema’s serve more than one purpose design validation contract code generation

those purposes often need different Schema’s For code generation:

+ simplicity, readability

- reuseability, composability

Slide courtesy of: Marc de Graauw

Page 77: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

The HL7v3 Schema’s

XML ITS Example:QUPA_IN101102UV01 Get Person Demographics Query

MCCI_MT000300UV01 COCT_MT040203UV01

COCT_MT150003UV03 COCT_MT030203UV02

MFMI_MT700711 COCT_MT090300UV01

COCT_MT150000UV02• COCT_MT070000UV01

COCT_MT710000UV01 COCT_MT150003UV03 COCT_MT070000UV01

• COCT_MT710000UV01 COCT_MT090100

COCT_MT150000UV02• COCT_MT070000UV01

COCT_MT710000UV01 COCT_MT150003UV03 COCT_MT070000UV01

• COCT_MT710000UV01 COCT_MT090003

COCT_MT150003UV03 MCAI_MT900001

QUPA_MT101102_V01 QUPA_MT101101_V01

Slide courtesy of: Marc de Graauw

..and: voc, datatypes, infrastructureRoot

XML ITS

Page 78: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Remove ‘includes’ from v3 Schema’s

Schema’s should be readable tools can solve this but they make you dependent on the tool

Therefore: flatten the Schema’s remove all includes put included schema’s where they belong

For readability: make the Schema resemble the instance

Readable Schema’s generate readable code!Slide courtesy of: Marc de Graauw

XML ITS

Page 79: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

SOAP

Transmission Wrapper

Control Wrapper

Payload Data

ANY

ANY

ANY

Slide courtesy of: Marc de Graauw

XML ITS

Page 80: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

The XML ITS HL7v3 Schema’s

Not very readable without Schema editor not practically feasible

Generated from database Fix them with XSLT or other:

Flatten the Schema’s Remove unneeded datatype hierarchies Layer the Schema’s Replace all CMET flavors by a generic CMET flavor

Makes the Schema’s much more readable Generates simpler code

Slide (modified) courtesy of: Marc de Graauw

XML ITS

Page 81: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

RIM ITS Schema

Essentially 1 core schema with 50 classes Generated classes will process any RIM ITS

instance Content validation to be done within application, not

at the XML level

Additional MIF based code generation probably required Processing of RIM-based object trees almost

always requires knowledge of the structure of templates (SIM, LIM)

81

RIM ITS

Page 82: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Example use-case: E-Novation

1. Serialized messages mapped to in-memory message objects (JAXB, code generation)

2. Application (business-) objects mapped to relational database (Hibernate ORM)

3. Custom code: mapping of message objects to application objects

Page 83: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Example use-case: JAXB

There is no direct link between Payload ControlAct Message

From Object(s) to DOM in 3 separate steps

From DOM to Object in 3 steps (in reverse order)

<<POJO>>

Payload

<<POJO>>

ControlAct

<<POJO>>

Message

Any

Any

<<DOM>>

Payload

Marshaller.marshal(payload)

<<DOM>>

ControlAct

Marshaller.marshal(controlAct)

<<DOM>>

Message

Marshaller.marshal(message)

Page 84: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Example use-case: JAXB

Page 85: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

E-Novation example: message object

Page 86: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Overall Agenda

Introduction XML Serialization In memory object processing Persistence Mapping v2 to v3 (optional) Implementation Tools User Interfaces (optional)

01/01/201186

Page 87: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Persistence

Overview

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

Page 88: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Database models (Relational)

88

RIM

LDM

PDM

RIM or RIM-based model:Conceptual Data Model

Logical Data Model•Not DBMS specific, no tables, no keys

Physical Data Model•DBMS specific, tables, keys

ORM – Object Relational Mapping

Page 89: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Conceptual Data model - RIM

Enormous flexibility, at the cost of a very abstract structure. makes enforcement of data integrity rules very difficult making it

necessary to rely on stored procedures and application logic to enforce rules.

Low number of tables less programming work, easier to learn, easier to add new

functionality. More data in each table, need to tune queries.

Main use-case: If you're creating a data store for ad-hoc queries, mining

and exploration of all sorts of data from all sorts of different sources

89

Page 90: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Persistence

Persisting Data Types

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

Page 91: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Data Types

At a lower level, the data types are complex to support. Complex data types

Helper classes, or UDTs Abstract data types

Specialize; or use helper classes Collection data types

Helper classes

91

Page 92: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Normalization – Helper Classes

92

Page 93: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Data Type expansion – Helper Classes

93

Page 94: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Watch for “Table Explosion”..

94

Page 95: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

CV with R1/R2 relations

95

Page 96: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Example: RIM persistence -OntoReason / MD Anderson

96

Page 97: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Overall Agenda

Introduction XML Serialization In memory object processing Persistence Mapping v2 to v3 (optional) Implementation Tools User Interfaces (optional)

01/01/201197

Page 98: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

HL7 version 3

Mapping v2 to v3 (optional)

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

Page 99: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. 99

Representation of „Reality“ in a standard

Dynamic: a subset of all „business cycle trigger events“

Static: a subset of the objects and attributes which play a role

Page 100: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. 100

Migration scenario

Extensively document the HL7 v2 messages Identify the corresponding HL7 v3

interactions Create a mapping

Syntax Semantic: Granularity, Vocabulary Dynamic model (trigger events)

Page 101: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. 101

Key Step: Version 2 Message Profiles

Registration OID

Use Case Model

Dynamic Definition

Static Definition

Application Role

Vendor Scenario

Interaction Model

Messagev2.x

Message Structure

Site Interface Info

Vendor Interface Info

Version 2 Implementation

Version 2 Message Profile („Version 3 Ready“)

Version 3 Implementation

Message Profiling (Analysis)

prop

rieta

ry,

ad-h

oc

docu

men

tatio

n

Page 102: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. 102

„Granularity“ of v3

The dynamic model in v3 is different than in v2: Trigger Events occur at different points in the business process. v3 v2.x: Multiple v3 trigger events map to a v2

event The static v3 models are „more granular“

than v2.x v3 v2.x: details get lost v2.x v3: missing information – if filled by

defaults: significant risk of faulty interpretation

Page 103: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. 103

Concepts

Does v3 contain the same concepts as v2 ? The RIM supports all administrative, financial and

clinical concepts as present in v2. Therefore v3 is from a functional perspective fully backwards compatible with v2.

There is however not a guaranteed 1-to-1 mapping between fields or datatypes in v2 and classes/attributes in v3.

Page 104: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. 104

Migration scenario - revisited

Avoid using mapping as a migration scenario If you have to rely on a translation:

Best practice recommendation1. Extensively document the HL7 v2 messages

2. Identify the corresponding HL7 v3 interactions

3. Create a mapping (syntax, semantic) Kludge: (as a vendor) extend HL7 v2 messages

with Z-segments [missing data & additional granularity] to allow for a translation to v3.

Page 105: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Overall Agenda

Introduction XML Serialization In memory object processing Persistence Mapping v2 to v3 (optional) Implementation Tools User Interfaces (optional)

01/01/2011105

Page 106: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

HL7 version 3

Implementation Tools

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

Page 107: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Implementation Tools (Nov.2011)

Tools that directly suport the software development process: MIF based class/code generators (e.g. MDHT. Everest, JavaSIG) MIF based database schema generator (e.g. MGRID)) MIF based UI generators ISO Datatypes library CTS products (e.g. Mayo Clinic's LexEVS , Apelon DTS) Mapping tools (e.g. Open Mapping Software)

Tools that support software developers: Testing tools (e.g. Instance Editor, MDHT) Code Documentation Generators

Tools that are used by analysts/providers: Model (static/dynamic/UIs/..) Driven application development tools (e.g.

PHI Technology) Model Driven Documentation generators (e.g. PHI Technology)

107

Page 108: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

OHT (Open Health Tools)

To assemble and/or develop a comprehensive harmonized tool suite to enable the definition, development and deployment of interoperable Electronic Health Records.

http://www.openhealthtools.org/

108

Page 109: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

HL7 version 3

Tools: MDHT

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

www.cdatools.org

Page 110: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

MDHT (part of OHT)

Management/definition of templates Generating Java code from CDA (CDA only)

model inclusive of templates Generation of documentation

.net version – seeking cooperation

110

Page 111: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

MDHT Inputs & Outputs

DomainModel MDHTMDHT

Add Custom Validations & Constraints

Add Custom Validations & Constraints

Java API(Source Code)

Java API(Source Code)

Validation CodeGeneration

Validation CodeGeneration

Implementation Guide(s)

Implementation Guide(s)

Page 112: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Constraints – DSL for Templating

112

Page 113: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

CDA Template Models

MDHT are currently working on implementations of the following CDA-based document types: Continuity of Care Document (CCD) IHE Content Profiles HITSP C32 Patient Summary Public Health Case Report (PHCR) IHE Lab Report Document HITSP C74 Personal Health Monitoring Report Essential Hypertension

Page 114: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

MDHT Architecture

E M F

Eclipse Modeling Framewo

rk

Includes EMF Core, EMF.Edit,

EMF.Codegen &

Validation Framework

DITA Document generation

Includes generation of DITA

xml files

Document Publishing

Includes generating

documents using DITA-OT

Custom ToolsIncludes

• UML Table Editor• New Project Wizards• New CDA templates• Property Editors

JAVA Classes Includes generating Java source code for

models and the constraints

HL7 CoreIncludes V3 datatype support, MIF-> UML

support, HDF

CDAIncludes

• CDA Support• CDA Templates• HITSP & IHE models

Validation SuiteIncludes testing instances of CDA and non-

CDA models.

MDHT

Terminology Services

Includes support for terminology sets

Model to

Model

Transformation

IncludesDomain

Model to implemen

tation models.

Page 115: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

HL7 version 3

Tools: Everest

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

http://everest.marc-hi.ca/

Page 116: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

MARC-Hi Everest Framework

Mohawk College (a Canadian university) has created a .net API-generator based on MIF (supports all of v3).

Java port planned for Q2 2012.

116

D

Page 117: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Optimizer

Optimizer

From MIF to Code

MIF 2.1.xMIF 2.1.x

GPMR

GPMR

C#C#

Java

Java

HTMLHTML

XSL/

XSD

XSL/

XSD

CORRepo.CORRepo.

.DLL.DLL

.HTM.HTM

.JAR.JAR

.XSL / .XSD.XSL / .XSD

REST/

JSON

REST/

JSON

.js .js

Page 118: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

MARC-Hi Everest – From MIF to Instance

ApplicationCode

ApplicationCode

MIF v2MIF v2

Use Structures

Use Structures No ITS?

Create

Create

<PRPA_IN1012..

<id root=“”

<PRPA_IN1012..

<id root=“”

XML ITS1.0 with DT R1D

Page 119: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

UV Support

NE2008 (since GPMR 0.9.x) *_HD*.*mif files should be removed

NE2009 / NE2010 HTML renderer works on Patched MIF files in quirks

mode Missing Several CMET definitions in DEFN IFC file Templating issue with several Interactions

CDAr2 (NE2010) (since GPMR 1.1.x)

Page 120: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Milestones

Q4 2011 – jEverest CTP (Community Tech. Preview) Formatters RMIM Structures GPMR Patches

Q1 2012 – Release Candidate 3 Everest .NET:

CDA Support Datatypes R2 Support

jEverest : Connectors

Q2 2012 – Release of Everest 1.0 jEverest + Everest + GPMR Bundles Documentation for jEverest

Page 121: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

HL7 version 3

Tools: Instance Editor

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

http://hl7book.net/index.php?title=Eclipse_Instance_Editor

Page 122: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Instance Editor

Instance Editor (mostly used for CDA) This tool provides context aware editing and

interactive validation for CDA documents. The tool includes the best available validation for the data types.

XML editor look-and-feel

122

Page 123: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Eclipse CDA Editor tool

123

Page 124: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. 124

Undetected error.

Page 125: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Overall Agenda

Introduction XML Serialization In memory object processing Persistence Mapping v2 to v3 (optional) Implementation Tools User Interfaces (optional)

01/01/2011125

Page 126: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

HL7 version 3

User Interfaces

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

Page 127: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

User Interfaces There are two (extreme) options:

Run time: Dynamically (at run time) generate the UI based on a CIM/LIM-like definition

need to do some pre-formatting, otherwise the generated layout may be quite nonsensical for the human user

Development time: Define the UI first; bind elements in the UI to RO/CO/AO classes/attributes.

127

Page 128: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

User Interface - Development

UI integration with templates (LIM): commonality is one of the key reasons for using RIM start with the generic controls, make them work,

bolt them together, less generic as you go up the data stack.

128

Page 129: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Each Observation pattern will have a UI● BL will have a label and a Yes, No answer● PQ will have a label and a number input field with a

unit behind it● CD with a valueset of <4 will have a label and list of

items as radio buttons● CD with a valueset of >=4 and <32 will have a list● CD with a valueset of >1000 will have a Google

Search● etc.

Page 130: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

MS CUI Clinical Noting in Forms Guidance

Page 131: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Model Driven User Interfaces

Personname: EN [0..*]

administrativeGenderCode: CE

(Value Set – Universal Realm)

M, F, UN

IAGC Release 2

(Coding System)OID 2.16.840.1.113883.19.1

M, F, UN, X, B

CE data type: (code, codeSystem) OR (nullFlavor)

MaleFemaleUndifferentiatedUnknown

Sex:

Person Demographics

•HL7 version 3 has an elaborate terminology model. •Based on HL7 (and ISO) data types

Page 132: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Example: UMCG

132

Page 133: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Example: UMCG

133

Page 134: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Example: UMCG

134

Page 135: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

HL7 version 3

Summary

Slide contents published under the Creative Commons / Attribute-Share Alike licenseSource: www.ringholm.com/download/implementation_mechanics.ppt

Page 136: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Recommendations

Never rely solely on XML schema At the least, use Schematron

MIF based code generation should be used for any non-trivial projects Tools like MDHT and Everest

Don’t rely on a generic v2->v3 mapping Use RIM based persistence

For use-cases which require its flexibility and ‘future-proofness’

01/01/2011136

Page 137: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Recommended reading (1/3)

http://www.ringholm.com/docs/03060_en_HL7_MIF.htm (Whitepaper/video about MIF)

http://www.ringholm.com/docs/03100_en.htm (The RIMBAA technology matrix) (v3 standard publication) // Foundation / Core Principles / Special topics on

Implementation and Representation (v3 standard publication) // Foundation / Model Interchange Format http://wiki.hl7.org/index.php?title=XML_ITS , http://wiki.hl7.org/index.php?

title=RIM_ITS, http://wiki.hl7.org/index.php?title=ITS http://en.wikipedia.org/wiki/Schematron (Wikipedia on Schematron) http://www.schematron.com/overview.html (Schematron overview) http://wiki.hl7.org/index.php?title=Migration_from_HL7_v2_to_HL7_v3 http://openmapsw.com/ (Open Mapping software toolkit) http://wiki.hl7.org/index.php?title=Software_Implementation_of_CDA (best

Practices document: implementation of CDA) http://wiki.hl7.org/index.php?title=MIF_based_code_generation (MIF based code

generation)

01/01/2011137

Page 138: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Recommended reading (2/3)

http://wiki.hl7.org/index.php?title=Schema_based_code_generation (Schema based code generation)

http://www.healthintersections.com.au/?p=769 (Blog: everything you didn’t want to know about GTS)

http://www.healthintersections.com.au/?p=707 (Blogpost: intervals [IVL_T] and boundary imprecision)

http://www.healthintersections.com.au/?p=705 (Blogpost: what content can ED contain?)

http://www.healthintersections.com.au/?p=592 (Blogpost: how do you put tablets into PQ.units ?)

http://www.healthintersections.com.au/?p=257 (Blogpost: NullFlavor) http://www.hl7.tv/Data_Types.html (Video/presentation: Datatypes R2 - what’s

changed?) (v3 standard publication) // Foundation / Core Principles / Types / Data Type

Flavors (v3 standard publication) // Foundation / Refinement Constraint and Localization /

Localization / Data Types Specialization Constraints

01/01/2011138

Page 139: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Recommended Reading (3/3)

http://wiki.hl7.org/index.php?title=RIM_Based_Persistence (work in progress, contains links to other pages)

http://en.wikipedia.org/wiki/Object-relational_mapping (ORM resource) http://sourceforge.net/search/?q=object+AND+relational+AND+mapping (ORM

resource) http://sharptoolbox.com/Category74089b0a-1105-4389-b1db-eedf27e20cfb.aspx (ORM

resource) http://wiki.hl7.org/index.php?title=ORM_best_practices

http://tl7.intelliware.ca/validateMessage.faces (TL7 message validator) http://www.openhealthtools.org/ http://www.cdatools.org (MDHT) http://everest.marc-hi.ca/ (MARC-HI Everest toolkit) http://hl7book.net/index.php?title=Eclipse_Instance_Editor (Instance Editor) http://support.phitechnology.it/wiki (PHI application development tools) See http://wiki.hl7.org/index.php?title=User_Interface_for_RIMBAA_Applications for

discussion and references.

01/01/2011139

Page 140: HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office. V3 Software Implementation Slide contents.

HL7 and Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.

Any Questions ?

Or: post your question/suggestions via•HL7 Wiki: http://bit.ly/d7tSsL •E-mail [email protected]•Twitter: @Ringholm


Recommended