23.04.2015 Views

Unofficial Developer’s Guide to CDA/CCD on Mirth Connect

This is a preview version of the book. The full book, with all related files, is available at - http://ccdonmirth.shamilpublishing.com This book introduces readers to free-ware and open source HL7 Interface Engine called Mirth Connect to the point that readers are confident enough to start building their own healthcare data exchange interfaces and transforming HL7 messages to HL7 Clinical Document Architecture (CDA) / Continuity of Care Document (CCD) documents.

This is a preview version of the book. The full book, with all related files, is available at - http://ccdonmirth.shamilpublishing.com

This book introduces readers to free-ware and open source HL7 Interface Engine called Mirth Connect to the point that readers are confident enough to start building their own healthcare data exchange interfaces and transforming HL7 messages to HL7 Clinical Document Architecture (CDA) / Continuity of Care Document (CCD) documents.

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Shamil Nizamov<br />

<str<strong>on</strong>g>Unofficial</str<strong>on</strong>g> <str<strong>on</strong>g>Developer’s</str<strong>on</strong>g> <str<strong>on</strong>g>Guide</str<strong>on</strong>g> <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

<str<strong>on</strong>g>CDA</str<strong>on</strong>g>/<str<strong>on</strong>g>CCD</str<strong>on</strong>g> <strong>on</strong> <strong>Mirth</strong> C<strong>on</strong>nect*<br />

* - Preview Editi<strong>on</strong>


Copyright Page<br />

Copyright © 2014-2015 by Shamil Nizamov<br />

Cover image copyright © 2013 by Shamil Nizamov<br />

All rights reserved. No part of the c<strong>on</strong>tents of this book may be reproduced or<br />

transmitted in any form or by any means without the written permissi<strong>on</strong> of the author.<br />

<strong>Mirth</strong> C<strong>on</strong>nect is a trademark of <strong>Mirth</strong> Corporati<strong>on</strong>. HL7, <str<strong>on</strong>g>CDA</str<strong>on</strong>g>, <str<strong>on</strong>g>CCD</str<strong>on</strong>g> and Health Level<br />

Seven are registered trademarks of Health Level Seven Internati<strong>on</strong>al. All other marks are<br />

property of their respective owners.<br />

Any rights not expressly granted herein are reserved.<br />

The companies, organizati<strong>on</strong>s, products, domain names, email addresses, logos, people,<br />

places, and/or data menti<strong>on</strong>ed herein in examples are fictitious. No associati<strong>on</strong> with any<br />

real company, organizati<strong>on</strong>, product, domain name, email address, logo, pers<strong>on</strong>, place,<br />

or data is intended or should be inferred.<br />

This book expresses the author’s views and opini<strong>on</strong>s. The informati<strong>on</strong> c<strong>on</strong>tained in this<br />

book is provided without any express, statu<str<strong>on</strong>g>to</str<strong>on</strong>g>ry, or implied warranties. The author, <strong>Mirth</strong><br />

Corporati<strong>on</strong>, Health Level Seven Internati<strong>on</strong>al, resellers and distribu<str<strong>on</strong>g>to</str<strong>on</strong>g>rs will NOT be held<br />

liable for any damages caused or alleged <str<strong>on</strong>g>to</str<strong>on</strong>g> be caused either directly or indirectly by this<br />

book.<br />

This is a preview editi<strong>on</strong> of the book. The full versi<strong>on</strong> is available <strong>on</strong>ly at -<br />

http://ccd<strong>on</strong>mirth.shamilpublishing.com<br />

Introducti<strong>on</strong> 2


C<strong>on</strong>tents<br />

PART 1<br />

GETTING STARTED<br />

Chapter 1 <strong>Mirth</strong> C<strong>on</strong>nect Basics................................................................................................ 13<br />

Installati<strong>on</strong> ............................................................................................................... 13<br />

<strong>Mirth</strong> C<strong>on</strong>nect Administra<str<strong>on</strong>g>to</str<strong>on</strong>g>r .................................................................................... 14<br />

Channels .................................................................................................................. 15<br />

C<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>rs............................................................................................................... 16<br />

Filters ...................................................................................................................... 17<br />

Transformers............................................................................................................ 17<br />

Scripts...................................................................................................................... 18<br />

Chapter 2 What is a <str<strong>on</strong>g>CCD</str<strong>on</strong>g>?......................................................................................................... 20<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g> Development Approach ..................................................................................... 20<br />

Templates ................................................................................................................ 22<br />

Summary ................................................................................................................. 24<br />

Chapter 3 System Integrati<strong>on</strong> Requirements ............................................................................ 26<br />

Abstracti<strong>on</strong> Layer ..................................................................................................... 26<br />

System Integrati<strong>on</strong> Requirements.............................................................................. 29<br />

Testing ..................................................................................................................... 31<br />

Summary ................................................................................................................. 33<br />

Chapter 4 Transforming Data with <strong>Mirth</strong> C<strong>on</strong>nect ..................................................................... 35<br />

Scenario Overview .................................................................................................... 36<br />

Design C<strong>on</strong>siderati<strong>on</strong>s............................................................................................... 38<br />

Summary ................................................................................................................. 40<br />

PART II<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g> BUILDER SERVER IMPLEMENTATION<br />

Chapter 5 Query Sender Channel.............................................................................................. 42<br />

Summary Tab ........................................................................................................... 42<br />

Source C<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r ..................................................................................................... 43<br />

Destinati<strong>on</strong>s C<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r............................................................................................. 45<br />

Summary ................................................................................................................. 49<br />

Chapter 6 <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder Channel – Header ................................................................................. 50<br />

3 Introducti<strong>on</strong>


Summary Tab ........................................................................................................... 51<br />

Source C<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r ..................................................................................................... 52<br />

Destinati<strong>on</strong>s C<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r............................................................................................. 54<br />

Code Templates........................................................................................................ 63<br />

Global Scripts .......................................................................................................... 65<br />

Channel Implementati<strong>on</strong> Verificati<strong>on</strong> ........................................................................ 65<br />

Summary ................................................................................................................. 66<br />

Chapter 7 <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder Channel – Allergies ............................................................................... 68<br />

Destinati<strong>on</strong>s C<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r............................................................................................. 69<br />

Code Templates........................................................................................................ 76<br />

Global Scripts ........................................................................................................... 78<br />

Channel Implementati<strong>on</strong> Verificati<strong>on</strong>......................................................................... 79<br />

Summary ................................................................................................................. 80<br />

Chapter 8 <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder Channel – Medicati<strong>on</strong>s ......................................................................... 81<br />

Destinati<strong>on</strong>s C<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r............................................................................................. 83<br />

Global Scripts ........................................................................................................... 89<br />

Channel Implementati<strong>on</strong> Verificati<strong>on</strong>......................................................................... 90<br />

Summary ................................................................................................................. 90<br />

Chapter 9 <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder Channel – Problems .............................................................................. 91<br />

Destinati<strong>on</strong>s C<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r............................................................................................. 92<br />

Global Scripts ........................................................................................................... 97<br />

Channel Implementati<strong>on</strong> Verificati<strong>on</strong> ........................................................................ 98<br />

Summary ................................................................................................................. 98<br />

Chapter 10 <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder Channel - Results................................................................................. 100<br />

Destinati<strong>on</strong>s C<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r........................................................................................... 101<br />

Global Scripts ......................................................................................................... 106<br />

Channel Implementati<strong>on</strong> Verificati<strong>on</strong>....................................................................... 107<br />

Summary ............................................................................................................... 107<br />

PART III<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g> VALIDATION<br />

Chapter 11 <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Validati<strong>on</strong> Tools .............................................................................................. 110<br />

XML Schema Validati<strong>on</strong>........................................................................................... 110<br />

Introducti<strong>on</strong> 4


Schematr<strong>on</strong> Validati<strong>on</strong>............................................................................................ 111<br />

MIF Validati<strong>on</strong> ........................................................................................................ 113<br />

C<strong>on</strong>formance Validati<strong>on</strong>.......................................................................................... 113<br />

Summary ............................................................................................................... 114<br />

Chapter 12 <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Validati<strong>on</strong> Au<str<strong>on</strong>g>to</str<strong>on</strong>g>mati<strong>on</strong> .................................................................................... 115<br />

XML Schema Validati<strong>on</strong>........................................................................................... 116<br />

Schematr<strong>on</strong> Validati<strong>on</strong>............................................................................................ 119<br />

Summary ............................................................................................................... 124<br />

Book Resources.............................................................................................................................. 125<br />

APPENDICES<br />

A: <str<strong>on</strong>g>CCD</str<strong>on</strong>g> <strong>Mirth</strong> Templates .......................................................................................... 127<br />

B: Code Templates .................................................................................................. 130<br />

C: HL7v2 Test Messages .......................................................................................... 133<br />

D: XSLT files ............................................................................................................ 134<br />

E: Archive C<strong>on</strong>tent .................................................................................................. 140<br />

5 Introducti<strong>on</strong>


Introducti<strong>on</strong><br />

Introducti<strong>on</strong><br />

As <strong>Mirth</strong> Corporati<strong>on</strong> says <strong>on</strong> their web-site, “<strong>Mirth</strong> C<strong>on</strong>nect is the Swiss Army knife of<br />

healthcare integrati<strong>on</strong> engines, specifically designed for HL7 message integrati<strong>on</strong>. It<br />

provides the necessary <str<strong>on</strong>g>to</str<strong>on</strong>g>ols for developing, testing, deploying, and m<strong>on</strong>i<str<strong>on</strong>g>to</str<strong>on</strong>g>ring interfaces.<br />

And because it’s open source, you get all of the advantages of a large community of users<br />

with commercial quality support.”<br />

In additi<strong>on</strong>, “The 2014 HL7 Interface Technology Survey Results” show that <strong>Mirth</strong> C<strong>on</strong>nect<br />

is <strong>on</strong>e of the fastest growing healthcare messaging platforms due <str<strong>on</strong>g>to</str<strong>on</strong>g> its open-source<br />

paradigm, and robust functi<strong>on</strong>ality for HL7 messaging and X12 documents. <strong>Mirth</strong><br />

C<strong>on</strong>nect also speeds up the development of interfaces for data exchange across different<br />

formats and diverse healthcare systems envir<strong>on</strong>ment.<br />

This book describes versi<strong>on</strong> 3.x of <strong>Mirth</strong> C<strong>on</strong>nect <str<strong>on</strong>g>to</str<strong>on</strong>g> the point that reader are c<strong>on</strong>fident<br />

enough <str<strong>on</strong>g>to</str<strong>on</strong>g> start building their own healthcare data exchange interfaces and transforming<br />

HL7 messages <str<strong>on</strong>g>to</str<strong>on</strong>g> <str<strong>on</strong>g>CDA</str<strong>on</strong>g>/<str<strong>on</strong>g>CCD</str<strong>on</strong>g> documents.<br />

As you read this book, you will be implementing a fictitious <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder Server. Each<br />

c<strong>on</strong>necti<strong>on</strong> point (channel and destinati<strong>on</strong>) is explained in a separate chapter, which in<br />

turn provides step-by-step instructi<strong>on</strong>s <strong>on</strong> how <str<strong>on</strong>g>to</str<strong>on</strong>g> create and code data transformati<strong>on</strong><br />

rules.<br />

This book is written using <strong>Mirth</strong> C<strong>on</strong>nect versi<strong>on</strong> 3.1.1.7461. C<strong>on</strong>sequently, other releases<br />

may include new features, and features used in this book may change or disappear. You<br />

may also notice differences between screen shots provided in the book and those you<br />

see when using <strong>Mirth</strong> C<strong>on</strong>nect.<br />

Who is this book for?<br />

I wrote this book primarily for applicati<strong>on</strong> developers and system integra<str<strong>on</strong>g>to</str<strong>on</strong>g>rs who have<br />

found the <strong>on</strong>line <strong>Mirth</strong> C<strong>on</strong>nect documentati<strong>on</strong> lacking and needed a guidebook that<br />

covers <str<strong>on</strong>g>to</str<strong>on</strong>g>pics in a more detailed and organized way.<br />

A book of this size cannot cover every feature in <strong>Mirth</strong> C<strong>on</strong>nect v3.x; c<strong>on</strong>sequently, I<br />

assume you already have some familiarity with its main comp<strong>on</strong>ents, functi<strong>on</strong>s and use.<br />

Introducti<strong>on</strong> 6


Assumpti<strong>on</strong><br />

This book assumes that you are dealing with applicati<strong>on</strong>s that use message-oriented<br />

middleware products and expects that you have at least a minimal understanding of<br />

Web service technologies including, but not limited <str<strong>on</strong>g>to</str<strong>on</strong>g>, XML, XML Schemas, XPath and<br />

XSL Transformati<strong>on</strong>.<br />

Before you start reading this book, you should have a basic knowledge of <strong>Mirth</strong> C<strong>on</strong>nect<br />

development paradigm, JavaScript, Java and E4X objects; and are familiar with operating<br />

system envir<strong>on</strong>ment variable settings.<br />

You should also have basic knowledge of HL7, the standard that is being used <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

exchange healthcare data, both versi<strong>on</strong> 2 and versi<strong>on</strong> 3. I assume you also familiar with<br />

Clinical Document Architecture (<str<strong>on</strong>g>CDA</str<strong>on</strong>g>) and, hopefully, C<strong>on</strong>tinuity of Care Document<br />

(<str<strong>on</strong>g>CCD</str<strong>on</strong>g>).<br />

Who should not read this book?<br />

As menti<strong>on</strong>ed earlier, the purpose of this book is <str<strong>on</strong>g>to</str<strong>on</strong>g> provide the reader with a high-level<br />

overview of the capabilities and features in <strong>Mirth</strong> C<strong>on</strong>nect v3.x. This book is not intended<br />

<str<strong>on</strong>g>to</str<strong>on</strong>g> be a step-by-step comprehensive guide or substitute of any kind for training and<br />

certificati<strong>on</strong> programs provided by <strong>Mirth</strong> Corporati<strong>on</strong>.<br />

This book is also not a tu<str<strong>on</strong>g>to</str<strong>on</strong>g>rial <strong>on</strong> a specific messaging or middleware technology such<br />

Model Driven Health Tools (MDHT) or <strong>Mirth</strong> <str<strong>on</strong>g>CDA</str<strong>on</strong>g>PI. All examples included in this book<br />

are for illustrative purposes <strong>on</strong>ly. If you are interested in learning more about a specific<br />

technology or product, please refer <str<strong>on</strong>g>to</str<strong>on</strong>g> <strong>on</strong>e of the many <strong>on</strong>-line resources, or trainings<br />

and certificati<strong>on</strong>s provided by <strong>Mirth</strong> Corporati<strong>on</strong> or its affiliates.<br />

This book does not cover any specific installati<strong>on</strong>, c<strong>on</strong>figurati<strong>on</strong>, deployment or<br />

m<strong>on</strong>i<str<strong>on</strong>g>to</str<strong>on</strong>g>ring activities for system administra<str<strong>on</strong>g>to</str<strong>on</strong>g>rs.<br />

Errata and Book Support<br />

I have made every effort <str<strong>on</strong>g>to</str<strong>on</strong>g> ensure the accuracy of this book and its compani<strong>on</strong> c<strong>on</strong>tent.<br />

If you find an error, please report through email - mirthc<strong>on</strong>nect@isarp.com<br />

7 Introducti<strong>on</strong>


Warning and Disclaimer<br />

The purpose of this book is <str<strong>on</strong>g>to</str<strong>on</strong>g> educate and entertain. Every effort has been made <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

make this book as complete and accurate as possible, but no warranty or fitness is<br />

implied.<br />

The informati<strong>on</strong> is provided <strong>on</strong> an “as is” basis. The author shall have neither liability nor<br />

resp<strong>on</strong>sibility <str<strong>on</strong>g>to</str<strong>on</strong>g> any pers<strong>on</strong> or entity for any loss or damage caused, or alleged <str<strong>on</strong>g>to</str<strong>on</strong>g> be<br />

caused, directly or indirectly by the informati<strong>on</strong> c<strong>on</strong>tained in this book or from the use of<br />

software menti<strong>on</strong>ed in this book. The informati<strong>on</strong>, methods and techniques described by<br />

the author are based <strong>on</strong> his own experience. They may not work for you and no<br />

recommendati<strong>on</strong> is made <str<strong>on</strong>g>to</str<strong>on</strong>g> follow the same course of acti<strong>on</strong>. No representati<strong>on</strong> is made<br />

that following the advice in this book will work in your case.<br />

The author is not an employee or representative of <strong>Mirth</strong> Corporati<strong>on</strong> and never has<br />

been, and author’s views and opini<strong>on</strong>s are not necessarily those of <strong>Mirth</strong> Corporati<strong>on</strong>.<br />

This book is not based <strong>on</strong> trainings or certificati<strong>on</strong>s provided by <strong>Mirth</strong> Corporati<strong>on</strong> or its<br />

affiliates.<br />

This book c<strong>on</strong>tains links <str<strong>on</strong>g>to</str<strong>on</strong>g> third-party websites that are not under the c<strong>on</strong>trol of the<br />

author, and the author is not resp<strong>on</strong>sible for the c<strong>on</strong>tent of any linked site. If you access<br />

a third-party website menti<strong>on</strong>ed in this book, you do so at your own risk. The author<br />

provides these links <strong>on</strong>ly as a c<strong>on</strong>venience, and the inclusi<strong>on</strong> of the link does not imply<br />

that the author endorses or accepts any resp<strong>on</strong>sibility for the c<strong>on</strong>tent of those thirdparty<br />

sites.<br />

Furthermore, this book c<strong>on</strong>tains informati<strong>on</strong> <strong>on</strong> the subject <strong>on</strong>ly up <str<strong>on</strong>g>to</str<strong>on</strong>g> the publicati<strong>on</strong><br />

date.<br />

Acknowledgements<br />

Like most books, this guide has been a l<strong>on</strong>g time in the making. I would like <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

acknowledge every<strong>on</strong>e who has assisted in this project. I could not have d<strong>on</strong>e this<br />

without you.<br />

I’d like <str<strong>on</strong>g>to</str<strong>on</strong>g> thank Philip Helger for his c<strong>on</strong>tributi<strong>on</strong> <str<strong>on</strong>g>to</str<strong>on</strong>g> the development of the open-source<br />

Schematr<strong>on</strong> valida<str<strong>on</strong>g>to</str<strong>on</strong>g>r.<br />

My biggest thanks go <str<strong>on</strong>g>to</str<strong>on</strong>g> Wayne Zafft, who was incredibly gracious with his time and<br />

effort in reviewing the final versi<strong>on</strong> of the book.<br />

Introducti<strong>on</strong> 8


Roadmap<br />

This book is divided in<str<strong>on</strong>g>to</str<strong>on</strong>g> three parts:<br />

Part I provides an introducti<strong>on</strong> <str<strong>on</strong>g>to</str<strong>on</strong>g> <strong>Mirth</strong> C<strong>on</strong>nect and a high-level overview of the <str<strong>on</strong>g>CCD</str<strong>on</strong>g><br />

document paradigm.<br />

• Chapter 1, <strong>Mirth</strong> C<strong>on</strong>nect Basics<br />

Introduces <strong>Mirth</strong> C<strong>on</strong>nect at a high level, provides an overview of the channel<br />

architecture implemented in <strong>Mirth</strong> C<strong>on</strong>nect, walks the reader through the creati<strong>on</strong><br />

and c<strong>on</strong>figurati<strong>on</strong> of a simple channel.<br />

• Chapter 2, What is <str<strong>on</strong>g>CCD</str<strong>on</strong>g><br />

Provides an overview of the C<strong>on</strong>tinuity of Care Document or <str<strong>on</strong>g>CCD</str<strong>on</strong>g>, the XML-based<br />

markup standard intended <str<strong>on</strong>g>to</str<strong>on</strong>g> specify the encoding, structure, and semantics of a<br />

patient summary clinical document for exchange.<br />

• Chapter 3, Systems Integrati<strong>on</strong> Requirements<br />

Provides a brief overview of system design and systems integrati<strong>on</strong> requirements <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

dem<strong>on</strong>strate the complexity of a typical HL7 based integrati<strong>on</strong> project.<br />

• Chapter 4, Transforming Data within <strong>Mirth</strong> C<strong>on</strong>nect<br />

Introduces a typical scenario as it is defined in the HL7v3 Normative Editi<strong>on</strong>, presents<br />

the implementati<strong>on</strong> plan for the rest of the book and walks through the required<br />

comp<strong>on</strong>ents.<br />

Part II focuses <strong>on</strong> the implementati<strong>on</strong> of an imaginary but complete <str<strong>on</strong>g>CCD</str<strong>on</strong>g> document<br />

generating server.<br />

• Chapter 5, Query Sender Channel<br />

Walks the reader through the implementati<strong>on</strong> of the first channel in a chain that<br />

serves as an interface <str<strong>on</strong>g>to</str<strong>on</strong>g> send HL7v2 messages and handle acknowledgements.<br />

• Chapter 6, <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder Channel - Header<br />

Explains the implementati<strong>on</strong> of a channel that plays the major role in this project. The<br />

chapter shows how <str<strong>on</strong>g>to</str<strong>on</strong>g> establish a MLLP c<strong>on</strong>necti<strong>on</strong> <str<strong>on</strong>g>to</str<strong>on</strong>g> other channels, how <str<strong>on</strong>g>to</str<strong>on</strong>g> filter<br />

messages based <strong>on</strong> some criteria and transform part of the inbound messages <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

form the <str<strong>on</strong>g>CCD</str<strong>on</strong>g> header.<br />

9 Introducti<strong>on</strong>


• Chapter 7, <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder Channel - Allergies<br />

Expands functi<strong>on</strong>ality of the <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder channel by adding a required segment <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

the <str<strong>on</strong>g>CCD</str<strong>on</strong>g> document. Shows a simple transformati<strong>on</strong> pattern using <strong>Mirth</strong> mapping and<br />

XSL transformati<strong>on</strong>.<br />

• Chapter 8, <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder Channel - Medicati<strong>on</strong>s<br />

C<strong>on</strong>tinues implementati<strong>on</strong> of required secti<strong>on</strong> level templates. Shows iterati<strong>on</strong>s and<br />

mapping of multiple segments.<br />

• Chapter 9, <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder Channel - Problems<br />

C<strong>on</strong>tinues implementati<strong>on</strong> of required secti<strong>on</strong> level templates. Shows iterati<strong>on</strong>s and<br />

mapping of multiple segments.<br />

• Chapter 10, <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder Channel - Results<br />

Shows how <str<strong>on</strong>g>to</str<strong>on</strong>g> iterate through segment groups each of which may c<strong>on</strong>tain repeating<br />

segments. This chapter c<strong>on</strong>cludes implementati<strong>on</strong> of the <str<strong>on</strong>g>CCD</str<strong>on</strong>g> document.<br />

Part III is dedicated <str<strong>on</strong>g>to</str<strong>on</strong>g> verificati<strong>on</strong> of the <str<strong>on</strong>g>CCD</str<strong>on</strong>g> document implementati<strong>on</strong>.<br />

• Chapter 11, <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Validati<strong>on</strong> Tools<br />

Introduces a message verificati<strong>on</strong> process using different <str<strong>on</strong>g>to</str<strong>on</strong>g>ols and methods such as<br />

XML schema validati<strong>on</strong>, MIF validati<strong>on</strong>, Schematr<strong>on</strong> validati<strong>on</strong> and c<strong>on</strong>formance<br />

review. Lists some open source <str<strong>on</strong>g>to</str<strong>on</strong>g>ols and <str<strong>on</strong>g>to</str<strong>on</strong>g>olkits that readers may use <str<strong>on</strong>g>to</str<strong>on</strong>g> build and<br />

test HL7v3 and <str<strong>on</strong>g>CDA</str<strong>on</strong>g> interfaces.<br />

• Chapter 12, <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Validati<strong>on</strong> Au<str<strong>on</strong>g>to</str<strong>on</strong>g>mati<strong>on</strong><br />

Walks the reader through the implementati<strong>on</strong> of the XML Schema and Schematr<strong>on</strong><br />

valida<str<strong>on</strong>g>to</str<strong>on</strong>g>r scripts using open-source libraries.<br />

Appendices include:<br />

• Archive C<strong>on</strong>tent<br />

Lists folders and files included in the archive provided with the book.<br />

• <str<strong>on</strong>g>CCD</str<strong>on</strong>g> <strong>Mirth</strong> Templates<br />

Shows all outbound templates used by the <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder channel’s destinati<strong>on</strong>s.<br />

• Code Templates<br />

Shows all mapping functi<strong>on</strong>s defined as Code Templates functi<strong>on</strong>s.<br />

• XSL transformati<strong>on</strong> files<br />

Introducti<strong>on</strong> 10


Shows the XSLT file c<strong>on</strong>tent used <str<strong>on</strong>g>to</str<strong>on</strong>g> build <str<strong>on</strong>g>CCD</str<strong>on</strong>g> segment templates.<br />

• HL7v2 samples<br />

Lists ADT_A28 and ORU_R01 message samples.<br />

11 Introducti<strong>on</strong>


PART I – GETTING STARTED<br />

Getting Started<br />

CHAPTER 1<br />

CHAPTER 2<br />

CHAPTER 3<br />

CHAPTER 4<br />

<strong>Mirth</strong> C<strong>on</strong>nect Basics<br />

What is <str<strong>on</strong>g>CCD</str<strong>on</strong>g>?<br />

System Integrati<strong>on</strong> Requirements<br />

Transforming Data with <strong>Mirth</strong> C<strong>on</strong>nect<br />

PART I – GETTING STARTED 12


CHAPTER 1 <strong>Mirth</strong> C<strong>on</strong>nect Basics<br />

<strong>Mirth</strong> C<strong>on</strong>nect Basics<br />

T<br />

his chapter outlines the <strong>Mirth</strong> C<strong>on</strong>nect installati<strong>on</strong> procedure and basic c<strong>on</strong>cepts. All<br />

examples in this book are based <strong>on</strong> the Windows versi<strong>on</strong> of <strong>Mirth</strong> C<strong>on</strong>nect v3.1,<br />

available for downloading at http://www.mirthcorp.com/community/downloads<br />

Make sure your computer meets minimum system requirements before you start:<br />

• Oracle JRE versi<strong>on</strong> 1.6 or higher;<br />

• 1 GB of RAM is recommended;<br />

• A web browser.<br />

Installati<strong>on</strong><br />

You can install <strong>Mirth</strong> C<strong>on</strong>nect in either of two ways based <strong>on</strong> which package you<br />

downloaded or which package is available <strong>on</strong> the website. In <strong>on</strong>e case, the package is an<br />

archive of all files and classes you need <str<strong>on</strong>g>to</str<strong>on</strong>g> run <strong>Mirth</strong> C<strong>on</strong>nect <strong>on</strong> your computer. You<br />

simply unzip and copy the package <str<strong>on</strong>g>to</str<strong>on</strong>g> an appropriate folder, for example <str<strong>on</strong>g>to</str<strong>on</strong>g> C:\Program<br />

Files\<strong>Mirth</strong> C<strong>on</strong>nect\. In the other case, there is a GUI based wizard that you start <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

go through the steps in the installati<strong>on</strong>. The installati<strong>on</strong> process itself is quite straight<br />

forward.<br />

Both methods install <strong>Mirth</strong> C<strong>on</strong>nect Server, <strong>Mirth</strong> C<strong>on</strong>nect Server Manager, <strong>Mirth</strong><br />

C<strong>on</strong>nect Administra<str<strong>on</strong>g>to</str<strong>on</strong>g>r and <strong>Mirth</strong> C<strong>on</strong>nect Command Line Interface. During the<br />

installati<strong>on</strong> you have <str<strong>on</strong>g>to</str<strong>on</strong>g> decide which port is used by the <strong>Mirth</strong> C<strong>on</strong>nect Server. The<br />

default is 8080 for unsecure communicati<strong>on</strong> and 8443 for the SSL c<strong>on</strong>necti<strong>on</strong>. You can<br />

change the ports later using the <strong>Mirth</strong> C<strong>on</strong>nect Server Manager, if necessary.<br />

To verify the installati<strong>on</strong>:<br />

• Launch the <strong>Mirth</strong> C<strong>on</strong>nect Server either through the <strong>Mirth</strong> C<strong>on</strong>nect Server Manager<br />

or the <strong>Mirth</strong> C<strong>on</strong>nect Command Line;<br />

• Open the web browser and type localhost:8080 in the address bar;<br />

• Click the Access Secure Site but<str<strong>on</strong>g>to</str<strong>on</strong>g>n in Web Dashboard Sign In launch page;<br />

• Type admin for the user name and repeat admin as the password, click Sign in.<br />

If you see the Dashboard statistics page with, most likely, no channels available, you have<br />

successfully installed <strong>Mirth</strong> C<strong>on</strong>nect and are ready <str<strong>on</strong>g>to</str<strong>on</strong>g> c<strong>on</strong>tinue. If not, refer <str<strong>on</strong>g>to</str<strong>on</strong>g> <strong>Mirth</strong><br />

C<strong>on</strong>nect 3.1 User <str<strong>on</strong>g>Guide</str<strong>on</strong>g> written by “the same <strong>Mirth</strong> technical experts who developed the<br />

software” available at - http://info.mirth.com/C<strong>on</strong>nect_Documentati<strong>on</strong>_Download.html<br />

13 PART I – GETTING STARTED


C<strong>on</strong>figurati<strong>on</strong><br />

The <strong>Mirth</strong> C<strong>on</strong>nect Server Manager can be used as a single point <str<strong>on</strong>g>to</str<strong>on</strong>g> launch <strong>Mirth</strong><br />

C<strong>on</strong>nect Service, c<strong>on</strong>figure ports, allocate memories, and <str<strong>on</strong>g>to</str<strong>on</strong>g> establish database<br />

c<strong>on</strong>necti<strong>on</strong>s. However, a fully-fledged c<strong>on</strong>figurati<strong>on</strong> descripti<strong>on</strong> is bey<strong>on</strong>d the scope of<br />

this book.<br />

As a recommended opti<strong>on</strong>, add a path <str<strong>on</strong>g>to</str<strong>on</strong>g> the \cus<str<strong>on</strong>g>to</str<strong>on</strong>g>m-lib folder in the operating<br />

system’s CLASSPATH envir<strong>on</strong>ment variable. This is the folder where you put Java classes,<br />

libraries and other required files that <strong>Mirth</strong> should be working with.<br />

If any applicati<strong>on</strong> <strong>on</strong> your computer or firewall uses ports 8080 or 8443 you can either<br />

change <strong>Mirth</strong>’s ports by using <strong>Mirth</strong> C<strong>on</strong>nect Server Manager or by manually modifying<br />

the c<strong>on</strong>figurati<strong>on</strong> file located in \c<strong>on</strong>f\mirth.properties. D<strong>on</strong>’t forget <str<strong>on</strong>g>to</str<strong>on</strong>g> restart the<br />

<strong>Mirth</strong> C<strong>on</strong>nect Server or Service <str<strong>on</strong>g>to</str<strong>on</strong>g> activate your changes.<br />

<strong>Mirth</strong> C<strong>on</strong>nect Administra<str<strong>on</strong>g>to</str<strong>on</strong>g>r<br />

The <strong>Mirth</strong> C<strong>on</strong>nect Administra<str<strong>on</strong>g>to</str<strong>on</strong>g>r is a Java applicati<strong>on</strong> that, by default, is not explicitly<br />

installed <strong>on</strong> a local computer in a distributed envir<strong>on</strong>ment. It is downloaded from the<br />

<strong>Mirth</strong> C<strong>on</strong>nect Server. This ensures the <strong>Mirth</strong> C<strong>on</strong>nect Administra<str<strong>on</strong>g>to</str<strong>on</strong>g>r matches the versi<strong>on</strong><br />

of the <strong>Mirth</strong> C<strong>on</strong>nect Server being used.<br />

To download the <strong>Mirth</strong> C<strong>on</strong>nect Administra<str<strong>on</strong>g>to</str<strong>on</strong>g>r:<br />

• Start <strong>Mirth</strong> C<strong>on</strong>nect Server if it is not already running as a service;<br />

• Open the web browser;<br />

• Type localhost:8080 in the address bar;<br />

• Click Launch <strong>Mirth</strong> C<strong>on</strong>nect Administra<str<strong>on</strong>g>to</str<strong>on</strong>g>r in the <strong>Mirth</strong> C<strong>on</strong>nect Administra<str<strong>on</strong>g>to</str<strong>on</strong>g>r launch<br />

page;<br />

• Click Ok <str<strong>on</strong>g>to</str<strong>on</strong>g> open webstart.jnlp;<br />

• Type admin for the user name and repeat admin as the password in the <strong>Mirth</strong><br />

C<strong>on</strong>nect Login pop-up window, then click Login.<br />

If everything is d<strong>on</strong>e correctly, each time you login, you will see the Dashboard as the<br />

initial screen. The Dashboard displays two informati<strong>on</strong> panels:<br />

• Channels status and statistics – shows the number of messages Received, Filtered,<br />

Queued, Sent, and Errored. The left sidebar of the Dashboard has tasks panel, with<br />

menu opti<strong>on</strong>s related <str<strong>on</strong>g>to</str<strong>on</strong>g> your current activity. For example, when you are developing<br />

a channel, menu opti<strong>on</strong>s such as Refresh, Send Messages, and Remove All Messages<br />

PART I – GETTING STARTED 14


Channels<br />

are displayed. These menu items can be also accessed by right clicking <strong>on</strong> a channel<br />

name in the Channel List.<br />

• Logs – Server Log, C<strong>on</strong>necti<strong>on</strong> Log and Global Maps. The Server Log is used <str<strong>on</strong>g>to</str<strong>on</strong>g> debug<br />

channel development. Double-clicking <strong>on</strong> a Server Log entry brings a pop-up<br />

window where you can view and copy the entire log entry c<strong>on</strong>tent. The Server Log is<br />

s<str<strong>on</strong>g>to</str<strong>on</strong>g>red by <strong>Mirth</strong> C<strong>on</strong>nect Server in the database; closing and opening the <strong>Mirth</strong><br />

C<strong>on</strong>nect Administra<str<strong>on</strong>g>to</str<strong>on</strong>g>r brings back all entries not explicitly purged. To clear the<br />

Server Log click Clear Displayed Log under the Server Log or C<strong>on</strong>necti<strong>on</strong> Log area.<br />

Familiarize yourself with other navigati<strong>on</strong> items and tabs since this is the main <str<strong>on</strong>g>to</str<strong>on</strong>g>ol used<br />

<str<strong>on</strong>g>to</str<strong>on</strong>g> develop and c<strong>on</strong>figure channels throughout this book.<br />

The Channel is an essential part of <strong>Mirth</strong> C<strong>on</strong>nect and can be seen as <strong>on</strong>e-<str<strong>on</strong>g>to</str<strong>on</strong>g>-many<br />

abstract unidirecti<strong>on</strong>al pipes that decouple comp<strong>on</strong>ents from each other <str<strong>on</strong>g>to</str<strong>on</strong>g> transfer<br />

healthcare data between two or more applicati<strong>on</strong>s. The channel architecture<br />

implemented in <strong>Mirth</strong> C<strong>on</strong>nect can divide a large message processing task in<str<strong>on</strong>g>to</str<strong>on</strong>g> a<br />

sequence of smaller independent steps. This affords developers the flexibility for<br />

dependency, maintenance and/or performance. Some of the processing tasks can even<br />

be external <str<strong>on</strong>g>to</str<strong>on</strong>g> <strong>Mirth</strong> C<strong>on</strong>nect and developed independently.<br />

FIGURE 1-1 <strong>Mirth</strong> C<strong>on</strong>nect abstract channel architecture<br />

In general, each channel c<strong>on</strong>sists of inbound and outbound C<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>rs, Filters and<br />

Transformers. The c<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r that receives inbound messages from the Sending<br />

Applicati<strong>on</strong> is called the Source. Similarly, the c<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r that sends outbound messages<br />

15 PART I – GETTING STARTED


is called the Destinati<strong>on</strong>. From the Source c<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r, data is passed through the channel,<br />

where filters and transformers perform operati<strong>on</strong>s <strong>on</strong> the data, for example, routing a<br />

message <str<strong>on</strong>g>to</str<strong>on</strong>g> <strong>on</strong>e or another Destinati<strong>on</strong>s c<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r and transforming the data<br />

representati<strong>on</strong>. Deciding each channel’s tasks is when wearing an analyst's hat comes<br />

in<str<strong>on</strong>g>to</str<strong>on</strong>g> play.<br />

Before you create a new channel, you need <str<strong>on</strong>g>to</str<strong>on</strong>g> elicit the following requirements:<br />

• Type of Applicati<strong>on</strong> the channel reads data from (Source c<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r type);<br />

• Type of Applicati<strong>on</strong> the channel sends data <str<strong>on</strong>g>to</str<strong>on</strong>g> (Destinati<strong>on</strong> c<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r type);<br />

• Type and format of the inbound message;<br />

• Type and format of the outbound message(s);<br />

• Mapping table(s) between inbound and outbound messages (Transformati<strong>on</strong>).<br />

C<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>rs<br />

In terms of Enterprise Integrati<strong>on</strong>, the c<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r is a Message Endpoint that specifies a<br />

particular way or, more accurately, a particular pro<str<strong>on</strong>g>to</str<strong>on</strong>g>col <strong>Mirth</strong> C<strong>on</strong>nect should use <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

communicate with an external applicati<strong>on</strong> or another <strong>Mirth</strong> C<strong>on</strong>nect channel.<br />

<strong>Mirth</strong> C<strong>on</strong>nect supports sending and receiving messages over a variety of c<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>rs<br />

listed here in no particular order:<br />

• TCP/MLLP;<br />

• Database (MySQL, PostgreSQL, Oracle, Microsoft SQL Server, ODBC);<br />

• File (local file system and network shares);<br />

• PDF and RTF documents;<br />

• JMS;<br />

• HTTP (note that HTTPS is not supported in the free versi<strong>on</strong>);<br />

• SMTP;<br />

• SOAP (over HTTP).<br />

The c<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r that receives the data is called a Reader, for example the MLLP Reader.<br />

The c<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r that sends the data is called a Writer, the Database Writer is an example.<br />

C<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r types are c<strong>on</strong>figured under Source and Destinati<strong>on</strong>s tabs of the channel.<br />

Obviously, some settings are comm<strong>on</strong> across all c<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>rs while others are unique <str<strong>on</strong>g>to</str<strong>on</strong>g> a<br />

specific c<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r type.<br />

You can develop your own c<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r if you need <strong>on</strong>e that is not shipped with the <strong>Mirth</strong><br />

C<strong>on</strong>nect installati<strong>on</strong> package, e.g., HTTPS c<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>r. However, this is out of scope of this<br />

book.<br />

PART I – GETTING STARTED 16


Filters<br />

In a real world scenario, when numerous applicati<strong>on</strong>s and channels are c<strong>on</strong>nected, a<br />

channel may receive messages from several sources and may process these messages<br />

differently, based <strong>on</strong> the message type or other criteria.<br />

There are two paradigms for addressing this requirement, a Router and a Filter:<br />

• Router c<strong>on</strong>nects <str<strong>on</strong>g>to</str<strong>on</strong>g> multiple outbound channels. The key benefit of the Router is that<br />

the decisi<strong>on</strong> criteria for the destinati<strong>on</strong>(s) of a message are maintained in a single<br />

locati<strong>on</strong>.<br />

• Filter, this is what <strong>Mirth</strong> C<strong>on</strong>nect uses, is built in<str<strong>on</strong>g>to</str<strong>on</strong>g> a message processing mechanism<br />

and determines whether or not the message should be processed. The Filter inspects<br />

message properties (segments or elements) without removing the message from the<br />

message queue. If the message cannot be c<strong>on</strong>sumed by this particular pipe, it is<br />

returned <str<strong>on</strong>g>to</str<strong>on</strong>g> the queue unchanged for another pipe <str<strong>on</strong>g>to</str<strong>on</strong>g> filter or process.<br />

Filters can be as simple as comparing specific elements against a hard coded value or as<br />

complex as a scripting language routine. Filters can also be omitted allowing all<br />

messages <str<strong>on</strong>g>to</str<strong>on</strong>g> pass through. Some routing capabilities have been introduced in <strong>Mirth</strong><br />

C<strong>on</strong>nect v3.1 by using a "destinati<strong>on</strong>Set". If a destinati<strong>on</strong> is removed from the<br />

destinati<strong>on</strong> set, this destinati<strong>on</strong> will not receive the message.<br />

If a single channel needs <str<strong>on</strong>g>to</str<strong>on</strong>g> process more than <strong>on</strong>e type of message, you can create any<br />

number of separate pipes – Destinati<strong>on</strong>s - and specify n<strong>on</strong>e, <strong>on</strong>e or more filters for each<br />

pipe.<br />

Transformers<br />

More often than not, messages are sent between legacy systems, cus<str<strong>on</strong>g>to</str<strong>on</strong>g>m applicati<strong>on</strong>s<br />

and third-party soluti<strong>on</strong>s, each of which is built around a proprietary data model. Even<br />

systems that claim <str<strong>on</strong>g>to</str<strong>on</strong>g> support a single standard may place specific requirements <strong>on</strong> data<br />

format and c<strong>on</strong>tent. If we could bring all legacy systems <str<strong>on</strong>g>to</str<strong>on</strong>g> a single format when a new<br />

business requirement is proposed, we would avoid c<strong>on</strong>versi<strong>on</strong> issues. Unfortunately, for<br />

most legacy systems, data format, c<strong>on</strong>tent or data sequence changes are difficult and<br />

risky, and simply not feasible.<br />

How do we communicate data using different formats then? <strong>Mirth</strong> C<strong>on</strong>nect does this in a<br />

message Transformer that translates <strong>on</strong>e data format in<str<strong>on</strong>g>to</str<strong>on</strong>g> another. As a result, a<br />

destinati<strong>on</strong> applicati<strong>on</strong> can receive messages it understands and which can be processed<br />

and s<str<strong>on</strong>g>to</str<strong>on</strong>g>red in the applicati<strong>on</strong>’s internal data format.<br />

17 PART I – GETTING STARTED


Scripts<br />

<strong>Mirth</strong> C<strong>on</strong>nect allows message transformati<strong>on</strong> <str<strong>on</strong>g>to</str<strong>on</strong>g> occur at different levels and <str<strong>on</strong>g>to</str<strong>on</strong>g> chain<br />

message transformers <str<strong>on</strong>g>to</str<strong>on</strong>g> achieve a required result.<br />

Supported transformers are:<br />

• Message Builder maps segments of the inbound message <str<strong>on</strong>g>to</str<strong>on</strong>g> segments in the<br />

outbound message.<br />

• Mapper maps segments of the inbound message <str<strong>on</strong>g>to</str<strong>on</strong>g> internal <strong>Mirth</strong> C<strong>on</strong>nect variables.<br />

These variables may be used later.<br />

• External Script, as the name suggests, employs external JavaScript routines <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

transform or map the data.<br />

• XSLT Step utilizes the XSL transformati<strong>on</strong>.<br />

• JavaScript, al<strong>on</strong>g with External Script, is where flexibility comes in<str<strong>on</strong>g>to</str<strong>on</strong>g> play. Here any<br />

type of (Rhino) Java Script and Java code can be used.<br />

Channels also support unique features called Scripts <str<strong>on</strong>g>to</str<strong>on</strong>g> enhance message processing<br />

logic. Scripts apply <str<strong>on</strong>g>to</str<strong>on</strong>g> a channel itself and all messages that are passing through.<br />

These scripts are:<br />

• Deploy script is executed each time <strong>Mirth</strong> C<strong>on</strong>nect Server starts or a channel is<br />

redeployed. This is the best place <str<strong>on</strong>g>to</str<strong>on</strong>g> initialize variables or create class objects.<br />

• Attachment script deals with a message in a native format and allows extracting part<br />

of the message <str<strong>on</strong>g>to</str<strong>on</strong>g> s<str<strong>on</strong>g>to</str<strong>on</strong>g>re as an attachment or <str<strong>on</strong>g>to</str<strong>on</strong>g> irrevocably modify a message.<br />

• Preprocessor script also allows handling each message in a native format before<br />

<strong>Mirth</strong> C<strong>on</strong>nect starts translating it in<str<strong>on</strong>g>to</str<strong>on</strong>g> the internal format, which is XML.<br />

• Filter & Transformer scripts are the main places for handling the inbound and<br />

outbound messages.<br />

• Resp<strong>on</strong>se script, as the name suggests, handles the resp<strong>on</strong>se sent by a destinati<strong>on</strong>.<br />

• Postprocessor script is executed after the message has been successfully sent.<br />

• Undeploy script is launched each time <strong>Mirth</strong> C<strong>on</strong>nect Server s<str<strong>on</strong>g>to</str<strong>on</strong>g>ps. This is the place<br />

<str<strong>on</strong>g>to</str<strong>on</strong>g>, for example, release memory that was allocated for the classes used by the<br />

channel.<br />

<strong>Mirth</strong> C<strong>on</strong>nect uses JavaScript as a scripting language with the ability <str<strong>on</strong>g>to</str<strong>on</strong>g> extend it by calls<br />

of external Java classes. The latter may be <strong>on</strong>e of those included <str<strong>on</strong>g>to</str<strong>on</strong>g> the <strong>Mirth</strong> installati<strong>on</strong><br />

package or user defined.<br />

Besides the channel level, <strong>Mirth</strong> C<strong>on</strong>nect employs Global Scripts that play the same role<br />

as channel scripts and help in separating the business logic. They have the same Deploy,<br />

PART I – GETTING STARTED 18


Undeploy, Preprocessor and Postprocessor scripts; the <strong>on</strong>ly difference is that they apply <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

all channels.<br />

This c<strong>on</strong>cludes <strong>Mirth</strong> C<strong>on</strong>nect introducti<strong>on</strong> secti<strong>on</strong>. To find out more, you may refer <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

numerous web resources, including trainings and books provided by <strong>Mirth</strong> Corporati<strong>on</strong>.<br />

You may find it helpful <str<strong>on</strong>g>to</str<strong>on</strong>g> read “<str<strong>on</strong>g>Unofficial</str<strong>on</strong>g> <strong>Mirth</strong> C<strong>on</strong>nect v3.x <str<strong>on</strong>g>Developer’s</str<strong>on</strong>g> <str<strong>on</strong>g>Guide</str<strong>on</strong>g>“ eBook<br />

which covers <strong>Mirth</strong> C<strong>on</strong>nect basics and advanced <str<strong>on</strong>g>to</str<strong>on</strong>g>pics in greater details.<br />

This eBook is available at - http://mirthc<strong>on</strong>nect.shamilpublishing.com<br />

19 PART I – GETTING STARTED


CHAPTER 2 What is <str<strong>on</strong>g>CCD</str<strong>on</strong>g>?<br />

What is <str<strong>on</strong>g>CCD</str<strong>on</strong>g>?<br />

T<br />

he C<strong>on</strong>tinuity of Care Document or <str<strong>on</strong>g>CCD</str<strong>on</strong>g>, is an XML-based markup standard intended<br />

<str<strong>on</strong>g>to</str<strong>on</strong>g> specify the encoding, structure, and semantics of a patient summary clinical<br />

document for exchange. (Wiki) From the standard development perspective “the<br />

C<strong>on</strong>tinuity of Care Document is a joint effort of HL7 Internati<strong>on</strong>al and ASTM. <str<strong>on</strong>g>CCD</str<strong>on</strong>g> fosters<br />

interoperability of clinical data by allowing physicians <str<strong>on</strong>g>to</str<strong>on</strong>g> send electr<strong>on</strong>ic medical<br />

informati<strong>on</strong> <str<strong>on</strong>g>to</str<strong>on</strong>g> other providers without loss of meaning and enabling improvement of<br />

patient care. <str<strong>on</strong>g>CCD</str<strong>on</strong>g> is an implementati<strong>on</strong> guide for sharing C<strong>on</strong>tinuity of Care Record (CCR)<br />

patient summary data using the HL7 Versi<strong>on</strong> 3 Clinical Document Architecture (<str<strong>on</strong>g>CDA</str<strong>on</strong>g>),<br />

Release 2.” (HL7 <str<strong>on</strong>g>CCD</str<strong>on</strong>g> page)<br />

Basically, what has been d<strong>on</strong>e is the HL7 Clinical Document Architecture (<str<strong>on</strong>g>CDA</str<strong>on</strong>g>) is taken<br />

as a document markup standard and c<strong>on</strong>strained by the ASTM C<strong>on</strong>tinuity of Care Record<br />

(or CCR also referred <str<strong>on</strong>g>to</str<strong>on</strong>g> as ASTM E2369-05) data sets in<str<strong>on</strong>g>to</str<strong>on</strong>g> specific headers and<br />

templates. The resulting semantic equivalent was called the C<strong>on</strong>tinuity of Care<br />

Document. In the U.S., this specificati<strong>on</strong> has been refined further by U.S. federal<br />

incentives known as Meaningful Use stages 1 and 2.<br />

Prerequisites<br />

In case of any discrepancies found in this book, implementers must follow the<br />

c<strong>on</strong>formance requirements of <str<strong>on</strong>g>CDA</str<strong>on</strong>g> and <str<strong>on</strong>g>CCD</str<strong>on</strong>g>. You should have following specificati<strong>on</strong>s<br />

available:<br />

• HL7v3 Normative Editi<strong>on</strong> - HL7 Clinical Document Architecture, Release 2.0;<br />

• HL7 Implementati<strong>on</strong> <str<strong>on</strong>g>Guide</str<strong>on</strong>g>: <str<strong>on</strong>g>CDA</str<strong>on</strong>g> Release 2 – C<strong>on</strong>tinuity of Care Document (<str<strong>on</strong>g>CCD</str<strong>on</strong>g>).<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g> Development Approach<br />

Besides <str<strong>on</strong>g>CCD</str<strong>on</strong>g> standard specificati<strong>on</strong>s, the <str<strong>on</strong>g>CCD</str<strong>on</strong>g> distributi<strong>on</strong> package includes <str<strong>on</strong>g>CCD</str<strong>on</strong>g> and<br />

core HL7 XML schemas, <str<strong>on</strong>g>CCD</str<strong>on</strong>g> XSLT stylesheets and n<strong>on</strong>-normative examples of<br />

Schematr<strong>on</strong> rules required <str<strong>on</strong>g>to</str<strong>on</strong>g> validate documents.<br />

From a standard developer point of view, the approach used in this book <str<strong>on</strong>g>to</str<strong>on</strong>g> develops<br />

core artifacts for the document-level templates (which is <str<strong>on</strong>g>CCD</str<strong>on</strong>g> in our case) is by taking a<br />

subset of classes defined in the <str<strong>on</strong>g>CDA</str<strong>on</strong>g> R2 R-MIM model and c<strong>on</strong>straining them <str<strong>on</strong>g>to</str<strong>on</strong>g> reflect<br />

the ASTM CCR specificati<strong>on</strong>.<br />

PART I – GETTING STARTED 20


In general these steps are:<br />

• <str<strong>on</strong>g>CDA</str<strong>on</strong>g> document derives its classes and machine-processable meaning from the HL7<br />

Reference Informati<strong>on</strong> Model (RIM) in c<strong>on</strong>juncti<strong>on</strong> with HL7v3 Data Types.<br />

• <str<strong>on</strong>g>CCD</str<strong>on</strong>g> document derives its classes from <str<strong>on</strong>g>CDA</str<strong>on</strong>g> Refined Message Informati<strong>on</strong> Models<br />

(R-MIM).<br />

• <str<strong>on</strong>g>CCD</str<strong>on</strong>g> R-MIM classes are c<strong>on</strong>strained by the ASTM CCR data requirements.<br />

• As <str<strong>on</strong>g>CCD</str<strong>on</strong>g> R-MIM is finalized, the XML schema(s), possibly with other artifacts such as<br />

Model Interchange Format (MIF) files and Hierarchical Message Descrip<str<strong>on</strong>g>to</str<strong>on</strong>g>r (HMD)<br />

views, are generated.<br />

• As the last step, <str<strong>on</strong>g>CCD</str<strong>on</strong>g> XML schema is manually updated <str<strong>on</strong>g>to</str<strong>on</strong>g> include extensi<strong>on</strong>s<br />

required <str<strong>on</strong>g>to</str<strong>on</strong>g> map ASTM CCR comp<strong>on</strong>ents for which there is no suitable mapping in<br />

<str<strong>on</strong>g>CDA</str<strong>on</strong>g> R2.<br />

Schematically this may be represented as Figure 2-1.<br />

FIGURE 2-1 <str<strong>on</strong>g>CCD</str<strong>on</strong>g> development approach<br />

As you can see, the <str<strong>on</strong>g>CCD</str<strong>on</strong>g> R-MIM, derived from the <str<strong>on</strong>g>CDA</str<strong>on</strong>g> R-MIM, follows the same<br />

structure, i.e., it c<strong>on</strong>tains a required header <str<strong>on</strong>g>to</str<strong>on</strong>g> identify the document and participants,<br />

and a body <str<strong>on</strong>g>to</str<strong>on</strong>g> represent a generic structure of a clinical c<strong>on</strong>tent.<br />

21 PART I – GETTING STARTED


This method for creating <str<strong>on</strong>g>CCD</str<strong>on</strong>g> XML schema is based <strong>on</strong> HL7v3 refinement and<br />

localizati<strong>on</strong> mechanism and can be applied <str<strong>on</strong>g>to</str<strong>on</strong>g> any RIM based artifact (messages or<br />

documents).<br />

Templates<br />

The next level of c<strong>on</strong>straint is based <strong>on</strong> logical groupings or patterns defined at the<br />

secti<strong>on</strong>s and entry levels <str<strong>on</strong>g>to</str<strong>on</strong>g> provide specific clinical c<strong>on</strong>text. Thus, as the HL7 NE states:<br />

“The <str<strong>on</strong>g>CDA</str<strong>on</strong>g> specificati<strong>on</strong> is richly expressive and flexible. Document -level, secti<strong>on</strong>-level and<br />

entry-level templates can be used <str<strong>on</strong>g>to</str<strong>on</strong>g> c<strong>on</strong>strain the generic <str<strong>on</strong>g>CDA</str<strong>on</strong>g> specificati<strong>on</strong>.” Such<br />

patterns, called templates, can “comply with a detailed implementati<strong>on</strong> guide that details<br />

the manner in which structured elements are <str<strong>on</strong>g>to</str<strong>on</strong>g> be represented and their intended<br />

interpretati<strong>on</strong> <str<strong>on</strong>g>to</str<strong>on</strong>g> a level sufficient <str<strong>on</strong>g>to</str<strong>on</strong>g> ensure a degree of clinical safety that is appropriate <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

the use case that it is designed <str<strong>on</strong>g>to</str<strong>on</strong>g> address.” (HL7v3 NE)<br />

This approach brings extended flexibility and allows the creati<strong>on</strong> of a wide variety of<br />

templates which still follow the HL7 standard and <str<strong>on</strong>g>CDA</str<strong>on</strong>g> defined structure. If you think this<br />

is not enough, <str<strong>on</strong>g>CDA</str<strong>on</strong>g> allows including both structured and unstructured informati<strong>on</strong> at the<br />

<str<strong>on</strong>g>CDA</str<strong>on</strong>g> Level. The <str<strong>on</strong>g>CDA</str<strong>on</strong>g> specificati<strong>on</strong> distinguishes three incremental levels of c<strong>on</strong>formance<br />

for semantical interoperability.<br />

<str<strong>on</strong>g>CDA</str<strong>on</strong>g> Level 1: The simplest form of <str<strong>on</strong>g>CDA</str<strong>on</strong>g>, also known as <str<strong>on</strong>g>CDA</str<strong>on</strong>g> Level 1, includes the header<br />

and unstructured block where the “N<strong>on</strong>XMLBody class represents a document body that is<br />

in some format other than XML”. (HL7v3 NE) The <str<strong>on</strong>g>CDA</str<strong>on</strong>g> Level 1 is not allowed as defined in<br />

the Meaningful Use initiative.<br />

<str<strong>on</strong>g>CDA</str<strong>on</strong>g> Level 2: Next form is “the <str<strong>on</strong>g>CDA</str<strong>on</strong>g> specificati<strong>on</strong> with secti<strong>on</strong>-level templates applied”.<br />

(HL7v3 NE) Secti<strong>on</strong> level templates are identified by an associated templateID and<br />

represented in XML.<br />

<str<strong>on</strong>g>CDA</str<strong>on</strong>g> Level 3: At this level “the <str<strong>on</strong>g>CDA</str<strong>on</strong>g> specificati<strong>on</strong> with entry-level (and opti<strong>on</strong>ally secti<strong>on</strong>level)<br />

templates applied.” (HL7v3 NE) At this level some secti<strong>on</strong> templates c<strong>on</strong>tain<br />

discrete data elements called <str<strong>on</strong>g>CDA</str<strong>on</strong>g> entries.<br />

Thus, built <strong>on</strong> templates, the <str<strong>on</strong>g>CDA</str<strong>on</strong>g> R2 implementati<strong>on</strong> guide defines nine document-level<br />

templates, where <str<strong>on</strong>g>CCD</str<strong>on</strong>g> is <strong>on</strong>ly <strong>on</strong>e of them (others include C<strong>on</strong>sultati<strong>on</strong> Note, Diagnostic<br />

Imaging Report, Procedure Note, Discharge Summary, etc.). Potentially they may be<br />

represented as separate XML schemas.<br />

PART I – GETTING STARTED 22


Secti<strong>on</strong>-level templates<br />

<str<strong>on</strong>g>CDA</str<strong>on</strong>g> R2 defines more than 65 secti<strong>on</strong>-level templates. Am<strong>on</strong>g these are Allergies,<br />

Encounters, Medicati<strong>on</strong>s, Problem List, etc.<br />

This is schematically 1 shown in Figure 2-2. For simplicity some secti<strong>on</strong>-level templates are<br />

not explicitly shown in the figure but represented with … titles.<br />

<str<strong>on</strong>g>CDA</str<strong>on</strong>g> Secti<strong>on</strong>s<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g> secti<strong>on</strong>s<br />

MU2<br />

Medical<br />

Equipment<br />

...<br />

...<br />

Payers<br />

Allergies<br />

Medicati<strong>on</strong>s<br />

Problems<br />

Advance<br />

Directives<br />

Discharge Diet<br />

...<br />

...<br />

...<br />

Results<br />

C<strong>on</strong>sultati<strong>on</strong> Notes secti<strong>on</strong>s<br />

MU2<br />

Family His<str<strong>on</strong>g>to</str<strong>on</strong>g>ry<br />

Immunizati<strong>on</strong>s<br />

Social His<str<strong>on</strong>g>to</str<strong>on</strong>g>ry<br />

Physical Exam<br />

Present Illness<br />

Past Illness<br />

Reas<strong>on</strong> for<br />

Referral<br />

... Encounters Vital Signs<br />

Plan of Care Reas<strong>on</strong> for Visit General Status ...<br />

... ...<br />

FIGURE 2-2 <str<strong>on</strong>g>CDA</str<strong>on</strong>g> secti<strong>on</strong>-level templates<br />

Document-level templates can exclusively use some secti<strong>on</strong>-level templates and share<br />

others. For each document in US Realm, some subsets of secti<strong>on</strong>-level templates are<br />

manda<str<strong>on</strong>g>to</str<strong>on</strong>g>ry according <str<strong>on</strong>g>to</str<strong>on</strong>g> Meaningful Use Stage 2 (MU2).<br />

Entry-level templates<br />

<str<strong>on</strong>g>CDA</str<strong>on</strong>g> does not s<str<strong>on</strong>g>to</str<strong>on</strong>g>p at the secti<strong>on</strong> level but additi<strong>on</strong>ally defines up <str<strong>on</strong>g>to</str<strong>on</strong>g> <strong>on</strong>e hundred entrylevels<br />

templates. Examples include, Age, Observati<strong>on</strong>, Encounter Diagnosis,<br />

Immunizati<strong>on</strong> Activity, etc.<br />

1 This diagram is for illustrative purpose <strong>on</strong>ly. Any discrepancies depicted in the diagram and in the base<br />

specificati<strong>on</strong>s are inadvertent and in all cases implementers must follow the c<strong>on</strong>formance requirements of <str<strong>on</strong>g>CCD</str<strong>on</strong>g>,<br />

<str<strong>on</strong>g>CDA</str<strong>on</strong>g> and MU2.<br />

23 PART I – GETTING STARTED


Summary<br />

As the name suggests, entry-level templates apply <str<strong>on</strong>g>to</str<strong>on</strong>g> <strong>on</strong>e of the clinical act statements:<br />

Observati<strong>on</strong>, Substance Administrati<strong>on</strong>, Supply, Procedure and so <strong>on</strong>. All entry-level<br />

templates are meant <str<strong>on</strong>g>to</str<strong>on</strong>g> be machine-processable parts of the document.<br />

Some entry-level templates are used exclusively in <strong>on</strong>e type of <str<strong>on</strong>g>CDA</str<strong>on</strong>g> document templates.<br />

For example, Discharge Diet template is used <strong>on</strong>ly in Discharge Summary. Reas<strong>on</strong> for<br />

Referral entry-level template is required <strong>on</strong>ly in Referral Summary (HITSP 2 C48)<br />

document template, etc. Other entry-level templates such as Allergies or Diagnostic<br />

Results are shared am<strong>on</strong>g all <str<strong>on</strong>g>CDA</str<strong>on</strong>g> document level templates.<br />

For illustrative purpose <strong>on</strong>ly, an example of the Body Temperature entry-level template is<br />

given in the code snippet below (see Source 2-1).<br />

SOURCE 2-1 BodyTemperature entry-level template<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

US Realm related <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Implementati<strong>on</strong> <str<strong>on</strong>g>Guide</str<strong>on</strong>g> may recommend additi<strong>on</strong>al secti<strong>on</strong>s for<br />

c<strong>on</strong>veying healthcare data that c<strong>on</strong>forms <str<strong>on</strong>g>to</str<strong>on</strong>g> MU2 requirements. MU2 also applies<br />

additi<strong>on</strong>al c<strong>on</strong>strains <strong>on</strong> all template levels.<br />

This chapter has barely scratched the surface, providing a general overview of <strong>on</strong>e of the<br />

<str<strong>on</strong>g>CDA</str<strong>on</strong>g> family templates called C<strong>on</strong>tinuity of Care Document (<str<strong>on</strong>g>CCD</str<strong>on</strong>g>) which is semantically<br />

equivalent of ASTM C<strong>on</strong>tinuity of Care Record (CCR). Rather than explaining <str<strong>on</strong>g>CCD</str<strong>on</strong>g> in<br />

depth, which requires a book by itself, this secti<strong>on</strong> gives you a basic road map for<br />

exploring and understanding <str<strong>on</strong>g>CCD</str<strong>on</strong>g>.<br />

If you are not familiar with HL7 and HL7v3 in particular, you may start with HL7v3<br />

Normative Editi<strong>on</strong> and move <str<strong>on</strong>g>to</str<strong>on</strong>g>wards Clinical Document Architecture domain. I wrote<br />

another book, called “<str<strong>on</strong>g>Unofficial</str<strong>on</strong>g> Developer's <str<strong>on</strong>g>Guide</str<strong>on</strong>g> <str<strong>on</strong>g>to</str<strong>on</strong>g> HL7v3 Basics 3 ” <str<strong>on</strong>g>to</str<strong>on</strong>g> help you in this<br />

endeavour.<br />

2 HITSP - Healthcare Informati<strong>on</strong> Technology Standards Panel<br />

3 Available <str<strong>on</strong>g>to</str<strong>on</strong>g> download at - http://hl7basics.shamilpublishing.com<br />

PART I – GETTING STARTED 24


Below is a n<strong>on</strong>-exhaustive list of other resources <str<strong>on</strong>g>to</str<strong>on</strong>g> help you educate yourself <strong>on</strong> various<br />

aspects of <str<strong>on</strong>g>CDA</str<strong>on</strong>g> and <str<strong>on</strong>g>CCD</str<strong>on</strong>g>.<br />

Primary Standard is available <strong>on</strong> the HL7.org site. You need <str<strong>on</strong>g>to</str<strong>on</strong>g> register <str<strong>on</strong>g>to</str<strong>on</strong>g> get access.<br />

<str<strong>on</strong>g>CDA</str<strong>on</strong>g>® Release 2;<br />

<str<strong>on</strong>g>CDA</str<strong>on</strong>g> and <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Implementati<strong>on</strong> <str<strong>on</strong>g>Guide</str<strong>on</strong>g>s are also available <strong>on</strong> the HL7.org site.<br />

<br />

<br />

HL7 Implementati<strong>on</strong> <str<strong>on</strong>g>Guide</str<strong>on</strong>g>: <str<strong>on</strong>g>CDA</str<strong>on</strong>g> Release 2 – C<strong>on</strong>tinuity of Care Document<br />

(<str<strong>on</strong>g>CCD</str<strong>on</strong>g>) 4 ;<br />

HL7 Implementati<strong>on</strong> <str<strong>on</strong>g>Guide</str<strong>on</strong>g>: S&I Framework Transiti<strong>on</strong>s of Care Compani<strong>on</strong> <str<strong>on</strong>g>Guide</str<strong>on</strong>g><br />

<str<strong>on</strong>g>to</str<strong>on</strong>g> C<strong>on</strong>solidated-<str<strong>on</strong>g>CDA</str<strong>on</strong>g> for Meaningful Use Stage 2, Release 1 – US Realm;<br />

Additi<strong>on</strong>ally you may find samples of secti<strong>on</strong> and entry level templates.<br />

IHE <str<strong>on</strong>g>CDA</str<strong>on</strong>g> Secti<strong>on</strong> Templates -<br />

wiki.ihe.net/index.php?title=Category:<str<strong>on</strong>g>CDA</str<strong>on</strong>g>_Secti<strong>on</strong>_Templates<br />

Below are listed quite a few books that I found helpful in this <str<strong>on</strong>g>to</str<strong>on</strong>g>pic. If you are not familiar<br />

with HL7 or <str<strong>on</strong>g>CDA</str<strong>on</strong>g> in particular, start with Tim Bens<strong>on</strong>’s book then c<strong>on</strong>tinue with the book<br />

written by Keith Bo<strong>on</strong>e.<br />

<br />

<br />

Principles of Health Interoperability HL7 and SNOMED by Tim Bens<strong>on</strong>.<br />

The <str<strong>on</strong>g>CDA</str<strong>on</strong>g> Book by Keith W. Bo<strong>on</strong>e.<br />

You may also find some technical files. These are provided in the package that is part of<br />

this book:<br />

<br />

N<strong>on</strong>-normative MU2 c<strong>on</strong>strained <str<strong>on</strong>g>CCD</str<strong>on</strong>g> R-MIM diagram in Visio format (for<br />

illustrative purpose <strong>on</strong>ly);<br />

Hierarchical Message Descripti<strong>on</strong>s (HMD) in Excel View derived from the <str<strong>on</strong>g>CCD</str<strong>on</strong>g> R-<br />

MIM (for illustrative purpose <strong>on</strong>ly).<br />

4 Referred in this book as HL7 <str<strong>on</strong>g>CCD</str<strong>on</strong>g>.<br />

25 PART I – GETTING STARTED


CHAPTER 3 Systems Integrati<strong>on</strong> Requirements<br />

System Integrati<strong>on</strong> Requirements<br />

T<br />

his chapter is a brief overview of system design and systems integrati<strong>on</strong> requirements<br />

for implementing the <str<strong>on</strong>g>CDA</str<strong>on</strong>g> based system. If you are more or less familiar with HL7<br />

systems implementati<strong>on</strong> you are free <str<strong>on</strong>g>to</str<strong>on</strong>g> skip it. As you surmise, I have not started<br />

from interoperability in general, or HL7 as a standard, or HL7 Reference Informati<strong>on</strong><br />

Model (RIM) in particular. Undoubtedly, HL7 interoperability is crucial <str<strong>on</strong>g>to</str<strong>on</strong>g> the integrati<strong>on</strong><br />

of clinical health informati<strong>on</strong> systems. It is the corners<str<strong>on</strong>g>to</str<strong>on</strong>g>ne of HL7v3 and may be used as<br />

a key selling point of HL7v3. But my experience shows that focussing <strong>on</strong> interoperability<br />

adds little value for software developers. For them, HL7v3 format, which <str<strong>on</strong>g>CDA</str<strong>on</strong>g> and <str<strong>on</strong>g>CCD</str<strong>on</strong>g><br />

are based <strong>on</strong>, is a fait accompli and the task at hand is <str<strong>on</strong>g>to</str<strong>on</strong>g> implement it.<br />

Abstracti<strong>on</strong> Layers<br />

As a software developer you know that building an enterprise level informati<strong>on</strong> system<br />

requires proper layers of abstracti<strong>on</strong>. N-tier architecture provides a high degree of<br />

decoupling, separating presentati<strong>on</strong>, business logic and data tiers. Informati<strong>on</strong><br />

technology came <str<strong>on</strong>g>to</str<strong>on</strong>g> this soluti<strong>on</strong> after much trial and error. If business needs were stable<br />

such a soluti<strong>on</strong> would not be required. However, <str<strong>on</strong>g>to</str<strong>on</strong>g>day’s business, eHealth in particular,<br />

faces c<strong>on</strong>stant change from new regula<str<strong>on</strong>g>to</str<strong>on</strong>g>ry requirements (e.g., EHR Meaningful Use<br />

stage 1 <str<strong>on</strong>g>to</str<strong>on</strong>g> 3 in the USA), market changes and improvements in operati<strong>on</strong>al processes. To<br />

achieve flexibility, various types of abstracti<strong>on</strong> layers are possible <str<strong>on</strong>g>to</str<strong>on</strong>g> hide the<br />

implementati<strong>on</strong> details of particular functi<strong>on</strong>s and integrate them based <strong>on</strong> their<br />

purpose.<br />

The Abstracti<strong>on</strong> Layer shown in Figure 3-1 hides the complexity of the back-end system,<br />

letting the applicati<strong>on</strong> request the data using well-organized meaningful calls and<br />

without having <str<strong>on</strong>g>to</str<strong>on</strong>g> worry about the actual data locati<strong>on</strong> and structure.<br />

In this diagram, data is s<str<strong>on</strong>g>to</str<strong>on</strong>g>red in the Data Reposi<str<strong>on</strong>g>to</str<strong>on</strong>g>ry. The purpose of it is <str<strong>on</strong>g>to</str<strong>on</strong>g> show that<br />

medical data may be located in different sources: relati<strong>on</strong>al databases, spreadsheets,<br />

documents, flat files and “clouds” as more mobile applicati<strong>on</strong>s emerge.<br />

C<strong>on</strong>sider the noti<strong>on</strong>al flow of data for such a simple system:<br />

1. The Applicati<strong>on</strong> makes a request <str<strong>on</strong>g>to</str<strong>on</strong>g> the Abstracti<strong>on</strong> Layer <str<strong>on</strong>g>to</str<strong>on</strong>g> retrieve the patient<br />

medical informati<strong>on</strong>;<br />

2. The Abstracti<strong>on</strong> Layer makes a request <str<strong>on</strong>g>to</str<strong>on</strong>g> the Data Reposi<str<strong>on</strong>g>to</str<strong>on</strong>g>ry;<br />

PART I – GETTING STARTED 26


3. If data is available, the Data Reposi<str<strong>on</strong>g>to</str<strong>on</strong>g>ry returns it <str<strong>on</strong>g>to</str<strong>on</strong>g> the Abstracti<strong>on</strong> Layer;<br />

4. The Abstracti<strong>on</strong> Layer forms the data in the way the Applicati<strong>on</strong> expects and sends it<br />

<str<strong>on</strong>g>to</str<strong>on</strong>g> the Applicati<strong>on</strong>;<br />

5. The Applicati<strong>on</strong> processes the data and uses it as intended.<br />

FIGURE 3-1 Simple system architecture using an abstracti<strong>on</strong> layer<br />

Even this simple scenario is missing key elements: the alternative and excepti<strong>on</strong> flows are<br />

not shown, leaving the Applicati<strong>on</strong> unaware if data is unavailable for <strong>on</strong>e reas<strong>on</strong> or<br />

another; also, this scenario does not tell if data sources are physically distributed or<br />

hosted <strong>on</strong> different operating systems and/or or data s<str<strong>on</strong>g>to</str<strong>on</strong>g>rage envir<strong>on</strong>ments (e.g.,<br />

databases from different vendors).<br />

What if the Abstracti<strong>on</strong> Layer cannot find the data in the Data Reposi<str<strong>on</strong>g>to</str<strong>on</strong>g>ry? If business<br />

logic allows there will be additi<strong>on</strong>al steps <str<strong>on</strong>g>to</str<strong>on</strong>g> request data from a remote system probably<br />

using <strong>on</strong>e of the HL7 messaging standards.<br />

Figure 3-2 schematically shows an abstract system with added <str<strong>on</strong>g>CCD</str<strong>on</strong>g> document building<br />

capability. If you are not familiar with the HL7 and <str<strong>on</strong>g>CDA</str<strong>on</strong>g> standards, you may w<strong>on</strong>der why<br />

there are several streams (<strong>on</strong>ly four are shown but there may be more), each of which<br />

has its own message transla<str<strong>on</strong>g>to</str<strong>on</strong>g>r and c<strong>on</strong>tent enricher. Also, what data sources are these<br />

two streams are using? We will explore this in following chapters.<br />

You may think of the Abstracti<strong>on</strong> Layer as a Database Access Layer (DAL) that<br />

encapsulates all requests <str<strong>on</strong>g>to</str<strong>on</strong>g> data sources. It may also functi<strong>on</strong> as an Enterprise Service<br />

Bus (ESB) in a message-oriented processing model that supports synchr<strong>on</strong>ous or<br />

asynchr<strong>on</strong>ous communicati<strong>on</strong>s, c<strong>on</strong>tent-based message forwarding and filtering,<br />

transformati<strong>on</strong> functi<strong>on</strong>alities and mapping between different interfaces. Since DALs or<br />

ESBs are often implemented in very different ways, requiring a broad range of specific<br />

functi<strong>on</strong>alities and operating characteristics, I will use the term Abstracti<strong>on</strong> Layer <str<strong>on</strong>g>to</str<strong>on</strong>g> avoid<br />

c<strong>on</strong>fusi<strong>on</strong> with vendor-specific implementati<strong>on</strong>s.<br />

27 PART I – GETTING STARTED


FIGURE 3-2 System architecture with <str<strong>on</strong>g>CDA</str<strong>on</strong>g> builder capability<br />

Assuming a Web Service is used <str<strong>on</strong>g>to</str<strong>on</strong>g> deliver a document, the noti<strong>on</strong>al data flow with<br />

added <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder functi<strong>on</strong>ality may be described as:<br />

1. The Applicati<strong>on</strong> makes a request <str<strong>on</strong>g>to</str<strong>on</strong>g> the Abstracti<strong>on</strong> Layer <str<strong>on</strong>g>to</str<strong>on</strong>g> retrieve the patient<br />

medical informati<strong>on</strong>.<br />

2. The Abstracti<strong>on</strong> Layer makes a request <str<strong>on</strong>g>to</str<strong>on</strong>g> the Data Reposi<str<strong>on</strong>g>to</str<strong>on</strong>g>ry.<br />

3. If data is available, the Data Reposi<str<strong>on</strong>g>to</str<strong>on</strong>g>ry returns it <str<strong>on</strong>g>to</str<strong>on</strong>g> the Abstracti<strong>on</strong> Layer.<br />

4. The Abstracti<strong>on</strong> Layer forms the data in the way the Applicati<strong>on</strong> understands and<br />

sends it <str<strong>on</strong>g>to</str<strong>on</strong>g> the Applicati<strong>on</strong>. The latter sends the data <str<strong>on</strong>g>to</str<strong>on</strong>g> the <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder comp<strong>on</strong>ent.<br />

5. The <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder comp<strong>on</strong>ent, in turn, forms parts of the document, aggregates them<br />

in<str<strong>on</strong>g>to</str<strong>on</strong>g> a single document, wraps the message in a SOAP envelope or other transport<br />

mechanism, and sends it <str<strong>on</strong>g>to</str<strong>on</strong>g> the remote system or s<str<strong>on</strong>g>to</str<strong>on</strong>g>rage.<br />

6. The HL7v3 Receiver comp<strong>on</strong>ent gets the resp<strong>on</strong>se, verifies that the resp<strong>on</strong>se bel<strong>on</strong>gs<br />

<str<strong>on</strong>g>to</str<strong>on</strong>g> this destinati<strong>on</strong>, extracts the payload and passes it <str<strong>on</strong>g>to</str<strong>on</strong>g> the Abstracti<strong>on</strong> Layer.<br />

7. The remote system processes the data and uses it as intended.<br />

Besides typical alternative and excepti<strong>on</strong> flows related <str<strong>on</strong>g>to</str<strong>on</strong>g> communicati<strong>on</strong>, questi<strong>on</strong>s that<br />

left unanswered are:<br />

• If the patient medical informati<strong>on</strong> is not available in the Data Reposi<str<strong>on</strong>g>to</str<strong>on</strong>g>ry, what should<br />

the system do?<br />

PART I – GETTING STARTED 28


• If the local Data Reposi<str<strong>on</strong>g>to</str<strong>on</strong>g>ry c<strong>on</strong>tains data that differs from data in the remote system,<br />

and the local data is older, what should the system do?<br />

• If the remote system asks for a set of data but <str<strong>on</strong>g>CCD</str<strong>on</strong>g> is not capable of c<strong>on</strong>veying such<br />

data <str<strong>on</strong>g>to</str<strong>on</strong>g> fulfil the remote system need, what should the Applicati<strong>on</strong> do?<br />

Such questi<strong>on</strong>s may significantly affect the architecture, implementati<strong>on</strong> and ultimately<br />

the functi<strong>on</strong>ality of the system. Let’s c<strong>on</strong>sider other aspects that may influence the HL7<br />

based system architecture.<br />

System Integrati<strong>on</strong> Requirements<br />

Different types of requirements shape a system’s behavior. Stakeholders (users, sp<strong>on</strong>sors,<br />

clients, etc.), healthcare practiti<strong>on</strong>ers and subject matter experts (SMEs) are typically<br />

good at eliciting all levels (organizati<strong>on</strong>al, system, comp<strong>on</strong>ent) of functi<strong>on</strong>al<br />

requirements. Undoubtedly, developers will be provided with a huge list of functi<strong>on</strong>al<br />

system requirements, probably with a great number of use cases. Presumably, these<br />

requirements are complete, c<strong>on</strong>sistent, unambiguous, feasibly implemented and<br />

verifiable. As such, they provide a c<strong>on</strong>crete basis for the developed system.<br />

Cus<str<strong>on</strong>g>to</str<strong>on</strong>g>mers are usually not interested in seeing how functi<strong>on</strong>al requirements are<br />

implemented. The terms they use <str<strong>on</strong>g>to</str<strong>on</strong>g> describe system functi<strong>on</strong>ality, more often than not,<br />

apply <str<strong>on</strong>g>to</str<strong>on</strong>g> direct or indirect n<strong>on</strong>-functi<strong>on</strong>al requirements (NFR), such as qualities and<br />

c<strong>on</strong>straints. NFRs represent a significant delivery risk <str<strong>on</strong>g>to</str<strong>on</strong>g> a project since neglecting or<br />

improperly dealing with NFRs during the initial requirements elicitati<strong>on</strong> process, or<br />

during the system development lifecycle, leads <str<strong>on</strong>g>to</str<strong>on</strong>g> inaccurate estimati<strong>on</strong> of project’s<br />

scope and efforts. Errors due <str<strong>on</strong>g>to</str<strong>on</strong>g> omitting NFRs or <str<strong>on</strong>g>to</str<strong>on</strong>g> insufficient attenti<strong>on</strong> paid <str<strong>on</strong>g>to</str<strong>on</strong>g> their<br />

analysis are am<strong>on</strong>g the most expensive and difficult problems <str<strong>on</strong>g>to</str<strong>on</strong>g> correct.<br />

Am<strong>on</strong>g a huge list of n<strong>on</strong>-functi<strong>on</strong>al requirements, there are some that affect healthcare<br />

systems integrati<strong>on</strong>. A few, for illustrative purposes, are discussed here <str<strong>on</strong>g>to</str<strong>on</strong>g> show the<br />

c<strong>on</strong>sequences of (not) implementing them. NFRs are listed in no particular order.<br />

Auditability<br />

Auditability is the ability of the system <str<strong>on</strong>g>to</str<strong>on</strong>g> keep the audit logs so that interacti<strong>on</strong>s with<br />

other systems can be inspected. Unlike other communicati<strong>on</strong> systems, HL7 messages<br />

often include sensitive medical informati<strong>on</strong> (also see Security). Meeting the legal<br />

requirements for auditability leads <str<strong>on</strong>g>to</str<strong>on</strong>g> a number of questi<strong>on</strong>s such as what data <str<strong>on</strong>g>to</str<strong>on</strong>g> collect,<br />

how <str<strong>on</strong>g>to</str<strong>on</strong>g> s<str<strong>on</strong>g>to</str<strong>on</strong>g>re it, how <str<strong>on</strong>g>to</str<strong>on</strong>g> prevent unauthorized access <str<strong>on</strong>g>to</str<strong>on</strong>g> audit records, and how <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

maintain data integrity. Depending <strong>on</strong> workflow, the number of messages exchanged by<br />

29 PART I – GETTING STARTED


systems can be significant and the number of transacti<strong>on</strong>s will grow over time. This raises<br />

the issue of predicting hardware capacity growth, particularly if the legal requirement is<br />

<str<strong>on</strong>g>to</str<strong>on</strong>g> keep all communicated messages for several years. Additi<strong>on</strong>al implementati<strong>on</strong><br />

c<strong>on</strong>siderati<strong>on</strong>s arise from backup, disaster recovery plan and retenti<strong>on</strong> period<br />

requirements.<br />

Performance<br />

Performance is <strong>on</strong>e of the most ambiguous runtime n<strong>on</strong>-functi<strong>on</strong>al requirements. The<br />

user expectati<strong>on</strong> is typically characterized as “the system should be fast” and written as “a<br />

transacti<strong>on</strong> should take less than N sec<strong>on</strong>ds <str<strong>on</strong>g>to</str<strong>on</strong>g> complete”. However neither specifies if a<br />

transacti<strong>on</strong> is c<strong>on</strong>sidered complete when a resp<strong>on</strong>se message enters a system, or when<br />

the end-user sees the result of the initial (for example, search query) request. If it is the<br />

latter, does it c<strong>on</strong>sider both the system’s messaging comp<strong>on</strong>ent performance<br />

requirement and system’s user interface performance requirement? If there is another<br />

requirement <str<strong>on</strong>g>to</str<strong>on</strong>g> put mechanisms in<str<strong>on</strong>g>to</str<strong>on</strong>g> place that au<str<strong>on</strong>g>to</str<strong>on</strong>g>mate some levels of c<strong>on</strong>formance<br />

testing of incoming messages, does the original “… N sec<strong>on</strong>ds <str<strong>on</strong>g>to</str<strong>on</strong>g> complete” still apply<br />

during peak hours? If a transacti<strong>on</strong> has timed out, does the original “… N sec<strong>on</strong>ds <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

complete” mean N sec<strong>on</strong>ds <str<strong>on</strong>g>to</str<strong>on</strong>g> successful c<strong>on</strong>clude the transacti<strong>on</strong>, or just N sec<strong>on</strong>ds<br />

before the end-user receives some kind of feedback? Decisi<strong>on</strong>s made here also affect<br />

scalability.<br />

Security<br />

Security in healthcare systems is paramount given the sensitive, pers<strong>on</strong>al informati<strong>on</strong><br />

maintained and communicated and <str<strong>on</strong>g>to</str<strong>on</strong>g> protect from fraud and other breaches. There are<br />

many great books that cover security from different aspects and levels of granularity. If<br />

you are new <str<strong>on</strong>g>to</str<strong>on</strong>g> the healthcare industry, you need <str<strong>on</strong>g>to</str<strong>on</strong>g> know that, besides typical computer<br />

systems security requirements, nati<strong>on</strong>al health sec<str<strong>on</strong>g>to</str<strong>on</strong>g>rs often specify their own security<br />

requirements (e.g., Health Insurance Portability and Accountability Act or HIPAA in the<br />

USA) <str<strong>on</strong>g>to</str<strong>on</strong>g> protect highly sensitive medical informati<strong>on</strong> from fraud and security breaches.<br />

Violati<strong>on</strong>s of such regulati<strong>on</strong>s can lead <str<strong>on</strong>g>to</str<strong>on</strong>g> lawsuits and other enforcement acti<strong>on</strong>s. Even if<br />

not applied directly <str<strong>on</strong>g>to</str<strong>on</strong>g> the <str<strong>on</strong>g>CDA</str<strong>on</strong>g> standard, some of the security rules that HIPAA regulates<br />

are: audit c<strong>on</strong>trols <str<strong>on</strong>g>to</str<strong>on</strong>g> review healthcare system activities, and transmissi<strong>on</strong> security which<br />

includes integrity c<strong>on</strong>trols and encrypti<strong>on</strong>/decrypti<strong>on</strong> during transmissi<strong>on</strong>. Other<br />

countries may apply other internati<strong>on</strong>al and local legislati<strong>on</strong> acts, which can greatly<br />

affect the way HL7 messages are structured, processed or communicated (e.g., Pers<strong>on</strong>al<br />

Health Informati<strong>on</strong> Protecti<strong>on</strong> Act or PHIPA, and Pers<strong>on</strong>al Informati<strong>on</strong> Protecti<strong>on</strong> and<br />

Electr<strong>on</strong>ic Documents Act aka PIPEDA in Canada).<br />

PART I – GETTING STARTED 30


Testing<br />

Transacti<strong>on</strong>al Reliability<br />

Transacti<strong>on</strong>al reliability determines the porti<strong>on</strong> of successfully completed transacti<strong>on</strong>s,<br />

(i.e., number of messages delivered <str<strong>on</strong>g>to</str<strong>on</strong>g>, processed, and returned by a remote system).<br />

Transacti<strong>on</strong>al reliability is measured, from a positive perspective, as service availability,<br />

for example, 99.998%. This metric, however, may affect transacti<strong>on</strong> timeout settings and<br />

performance.<br />

Be it through a waterfall, agile or another approach <str<strong>on</strong>g>to</str<strong>on</strong>g> system development, so<strong>on</strong>er or<br />

later functi<strong>on</strong>al and n<strong>on</strong>-functi<strong>on</strong>al aspects of the system need <str<strong>on</strong>g>to</str<strong>on</strong>g> be tested. You may<br />

already use or be familiar with such widely adopted agile practices as Test-Driven<br />

Development and Behavior-Driven Development aimed at creating reliable and<br />

maintainable code. Whatever testing strategy you choose, they can probably be<br />

categorized as using business-facing and technology-facing test models (introduced by<br />

Brian Marick). On the business-facing side, functi<strong>on</strong>al acceptance testing verifies how the<br />

system is built, including functi<strong>on</strong>ality, capacity, usability, security, modifiability,<br />

availability, etc. The technology-facing tests are comm<strong>on</strong>ly used by developers during<br />

the development process: unit tests, comp<strong>on</strong>ent tests, and deployment tests.<br />

Integrati<strong>on</strong> testing<br />

Integrati<strong>on</strong> testing is especially crucial for a system that communicates with other<br />

systems using different pro<str<strong>on</strong>g>to</str<strong>on</strong>g>cols, or for a system c<strong>on</strong>sisting of loosely coupled<br />

comp<strong>on</strong>ents (units, modules).<br />

Integrati<strong>on</strong> testing is generally performed in these different c<strong>on</strong>texts:<br />

• Test Harness – an envir<strong>on</strong>ment that developers build <str<strong>on</strong>g>to</str<strong>on</strong>g> test the system. It may be<br />

part of unit testing.<br />

• User Acceptance Testing (UAT) envir<strong>on</strong>ment which is as similar <str<strong>on</strong>g>to</str<strong>on</strong>g> a producti<strong>on</strong><br />

envir<strong>on</strong>ment as possible.<br />

• Producti<strong>on</strong> envir<strong>on</strong>ment.<br />

Ideally, you would be provided with a replica of a system that behaves exactly like the<br />

producti<strong>on</strong> system and allows performance, capacity, security and other functi<strong>on</strong>al and<br />

n<strong>on</strong>-functi<strong>on</strong>al requirements <str<strong>on</strong>g>to</str<strong>on</strong>g> be tested. However, in the real world, you will often need<br />

<str<strong>on</strong>g>to</str<strong>on</strong>g> develop such an envir<strong>on</strong>ment <strong>on</strong> your own. It is therefore essential that your<br />

envir<strong>on</strong>ment allows for the testing of unexpected situati<strong>on</strong>s such as network transport<br />

problems, pro<str<strong>on</strong>g>to</str<strong>on</strong>g>col problems and external systems (logic) problems.<br />

31 PART I – GETTING STARTED


Test data<br />

Performing business-facing tests (acceptance testing) and technology-facing tests<br />

(integrati<strong>on</strong> testing and sometimes unit testing) is not possible without test data, which<br />

raises the issue of managing test data.<br />

The test team is often provided with a dump of data from the producti<strong>on</strong> envir<strong>on</strong>ment.<br />

These data usually c<strong>on</strong>sist of three broad groups: test specific data, test reference data<br />

and applicati<strong>on</strong> reference data. For technology-facing tests such as unit tests, the<br />

developer may create a smaller dataset of fake test data that covers all three groups.<br />

Other types, such as acceptance-testing, integrati<strong>on</strong> testing, n<strong>on</strong>-functi<strong>on</strong>al testing need<br />

more sophisticated test data <str<strong>on</strong>g>to</str<strong>on</strong>g> verify desired behavior against the system’s integrati<strong>on</strong><br />

requirements.<br />

Capacity testing unveils the issue of scaling up existing data <str<strong>on</strong>g>to</str<strong>on</strong>g> create sufficient volumes<br />

of representative data for different performance-related test cases.<br />

A key challenge for managing test data in a healthcare systems development<br />

envir<strong>on</strong>ment is <str<strong>on</strong>g>to</str<strong>on</strong>g> comply with current legislati<strong>on</strong>s and regulati<strong>on</strong>s aimed at protecting<br />

the privacy of patient’s pers<strong>on</strong>al demographic and health informati<strong>on</strong> – specifically <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

prevent disclosing either the identity or other attributes of private individuals. This is<br />

where de-identificati<strong>on</strong> comes in<str<strong>on</strong>g>to</str<strong>on</strong>g> play. De-identificati<strong>on</strong> of patients’ informati<strong>on</strong> is<br />

essential where data is disclosed for testing (and also often analytical) use. Deidentificati<strong>on</strong><br />

of health data is an important <str<strong>on</strong>g>to</str<strong>on</strong>g>pic by itself and requires separate books.<br />

Reas<strong>on</strong>s for healthcare data de-identificati<strong>on</strong> include: developers’ lap<str<strong>on</strong>g>to</str<strong>on</strong>g>ps, hard disks or<br />

USB flash drives may be lost or s<str<strong>on</strong>g>to</str<strong>on</strong>g>len; a company may experience "sophisticated<br />

computer security attack" against their servers; and other breaches (recent breach<br />

reports may be found at databreach<str<strong>on</strong>g>to</str<strong>on</strong>g>day.com website). Indeed, media outlets are quick<br />

<str<strong>on</strong>g>to</str<strong>on</strong>g> report data breaches involving (s<str<strong>on</strong>g>to</str<strong>on</strong>g>len) patient health data. Additi<strong>on</strong>ally, many<br />

jurisdicti<strong>on</strong>s have breach notificati<strong>on</strong> laws that requires notificati<strong>on</strong>s <str<strong>on</strong>g>to</str<strong>on</strong>g> be sent <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

regula<str<strong>on</strong>g>to</str<strong>on</strong>g>ry bodies, including media, if data breaches occur.<br />

Before I c<strong>on</strong>tinue, I’ll give a short quiz. Which of these three sets of pers<strong>on</strong>al informati<strong>on</strong><br />

is de-identified? C<strong>on</strong>sult the White Pages if you want.<br />

Rh<strong>on</strong>da James; DOB: 08-Sep-1988; Address: 71 Ansubet Dr, Charles<str<strong>on</strong>g>to</str<strong>on</strong>g>n, WV<br />

Denise Lewis; DOB: 03-Mar-1976; Address: 23 Adams Chapel Rd, Manka<str<strong>on</strong>g>to</str<strong>on</strong>g>, MN<br />

Rosemarie Hardy; DOB: 14-Nov-1985; Address: 310 Camp Creek Rd, Wes<str<strong>on</strong>g>to</str<strong>on</strong>g>n, MA<br />

And so, how many Denise Lewis’s live in Minneapolis?<br />

PART I – GETTING STARTED 32


Summary<br />

In fact, the source 5 that provided these samples suggested that all three are de-identified<br />

data. Imagine if such de-identified datasets are s<str<strong>on</strong>g>to</str<strong>on</strong>g>len and reported as “the data breach”<br />

by the media. The company may face severe fines and damage <str<strong>on</strong>g>to</str<strong>on</strong>g> its reputati<strong>on</strong> l<strong>on</strong>g<br />

before it can be proven that the s<str<strong>on</strong>g>to</str<strong>on</strong>g>len datasets are fictitious and do not represent any<br />

real pers<strong>on</strong>.<br />

There are different algorithms for record-level data de-identificati<strong>on</strong> such as: data<br />

reducti<strong>on</strong>, data modificati<strong>on</strong> and data suppressi<strong>on</strong>. Before you start implementing your<br />

own, I recommend you read the Tools for De-Identificati<strong>on</strong> of Pers<strong>on</strong>al Health<br />

Informati<strong>on</strong> 6 report written by Ross Fraser and D<strong>on</strong> Willis<strong>on</strong> for the Pan Canadian Health<br />

Informati<strong>on</strong> Privacy (HIP) Group. This report explains major techniques, requirements for<br />

health data de-identificati<strong>on</strong> <str<strong>on</strong>g>to</str<strong>on</strong>g>ols, and some of the commercially available <str<strong>on</strong>g>to</str<strong>on</strong>g>ols.<br />

Other sources worth reading:<br />

• A Canadian standard: “Best Practice” <str<strong>on</strong>g>Guide</str<strong>on</strong>g>lines for Managing the Disclosure of De-<br />

Identified Health Informati<strong>on</strong>.<br />

• A standard from US Department of Health and Human Services: Guidance Regarding<br />

Methods for De-identificati<strong>on</strong> of Protected Health Informati<strong>on</strong> in Accordance with the<br />

Health Insurance Portability and Accountability Act (HIPAA) Privacy Rule.<br />

• Guidance from the UK Informati<strong>on</strong> Commissi<strong>on</strong>er's Office: An<strong>on</strong>ymisati<strong>on</strong>: managing<br />

data protecti<strong>on</strong> risk code of practice.<br />

This chapter shows that in additi<strong>on</strong> <str<strong>on</strong>g>to</str<strong>on</strong>g> typical software development issues, the HL7-<br />

based development project has layers of additi<strong>on</strong>al complexity due <str<strong>on</strong>g>to</str<strong>on</strong>g> interc<strong>on</strong>nected<br />

functi<strong>on</strong>al and n<strong>on</strong>-functi<strong>on</strong>al requirements.<br />

Healthcare by itself is a difficult domain. Software developers that see <str<strong>on</strong>g>CDA</str<strong>on</strong>g> documents as<br />

yet another XML-based feed system run the risk of significantly underestimating the<br />

effort needed <str<strong>on</strong>g>to</str<strong>on</strong>g> complete a project.<br />

HL7 development requires not <strong>on</strong>ly properly eliciting and documenting functi<strong>on</strong>al and<br />

n<strong>on</strong>-functi<strong>on</strong>al requirements, but also the eHealth landscape in which the project<br />

operates. You may be committed <str<strong>on</strong>g>to</str<strong>on</strong>g> build a scalable applicati<strong>on</strong> capable of c<strong>on</strong>structing<br />

countrywide level <str<strong>on</strong>g>CDA</str<strong>on</strong>g> document and processing all secti<strong>on</strong>-level templates, but your<br />

local regula<str<strong>on</strong>g>to</str<strong>on</strong>g>ry restricti<strong>on</strong>s may prevent sharing pers<strong>on</strong>al informati<strong>on</strong> with other<br />

5 The source will not be disclosed. They received my opini<strong>on</strong> and suggesti<strong>on</strong>.<br />

6 Available <str<strong>on</strong>g>to</str<strong>on</strong>g> download at - https://www.ehealthinformati<strong>on</strong>.ca/knowledgebase/getAttach/15/AA-<br />

00118/Tools_for_De-identificati<strong>on</strong>_EN-FINAL.pdf<br />

33 PART I – GETTING STARTED


jurisdicti<strong>on</strong>s. C<strong>on</strong>sider time and effort spent <strong>on</strong> building unnecessary functi<strong>on</strong>ality before<br />

it becomes obvious.<br />

Testing HL7-based systems is a separate (sub) project by itself. It must c<strong>on</strong>form <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

eHealth industry and local regula<str<strong>on</strong>g>to</str<strong>on</strong>g>ry auditing and security requirements <str<strong>on</strong>g>to</str<strong>on</strong>g> protect<br />

sensitive informati<strong>on</strong>, and may require test data sets <str<strong>on</strong>g>to</str<strong>on</strong>g> be prepared upfr<strong>on</strong>t.<br />

Before you start building HL7 messaging applicati<strong>on</strong>, it is essential that you understand<br />

the full complexity of HL7v3 based development work.<br />

PART I – GETTING STARTED 34


CHAPTER 4 Transforming Data with <strong>Mirth</strong> C<strong>on</strong>nect<br />

Transforming Data with <strong>Mirth</strong><br />

U<br />

nlike other universal domains in the HL7v3 Normative Editi<strong>on</strong> , the Clinical Document<br />

Architecture does not specify s<str<strong>on</strong>g>to</str<strong>on</strong>g>ryboards, interacti<strong>on</strong>s and participants. This domain<br />

deals <strong>on</strong>ly with the <str<strong>on</strong>g>CDA</str<strong>on</strong>g> document exchange markup. On the other side, <strong>Mirth</strong><br />

C<strong>on</strong>nect provides greater freedom in data transformati<strong>on</strong> since it allows using different<br />

techniques for data mapping such JavaScript, XSLT and Java.<br />

“Messaging” and “document” are unders<str<strong>on</strong>g>to</str<strong>on</strong>g>od differently by developers, end users and<br />

clinicians. A lab report in PDF format sent as an attachment by email is <strong>on</strong>e of the<br />

opti<strong>on</strong>s but such scenarios are not what I want <str<strong>on</strong>g>to</str<strong>on</strong>g> explore in this book. Before<br />

implementing an imaginary <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder Server using <strong>Mirth</strong> C<strong>on</strong>nect, we need <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

examine what we are trying <str<strong>on</strong>g>to</str<strong>on</strong>g> build. Also, it is good <str<strong>on</strong>g>to</str<strong>on</strong>g> note that this s erver is<br />

“imaginary” because the goal is <str<strong>on</strong>g>to</str<strong>on</strong>g> fully c<strong>on</strong>centrate <strong>on</strong> <strong>Mirth</strong> C<strong>on</strong>nect features rather<br />

than <strong>on</strong> actual <str<strong>on</strong>g>CCD</str<strong>on</strong>g> or MU2 business rules.<br />

Note:<br />

Before we start, I would like <str<strong>on</strong>g>to</str<strong>on</strong>g> stress that HL7 interacti<strong>on</strong>s and templates (in<br />

terms of <str<strong>on</strong>g>CDA</str<strong>on</strong>g>) shown in this book do not represent a real implementati<strong>on</strong> and<br />

should not be used “as is”.<br />

Some words of cauti<strong>on</strong> should be raised before delving any deeper. The <strong>Mirth</strong> C<strong>on</strong>nect<br />

HL7v2 messages parser is based <strong>on</strong> HAPI API which uses HL7 organizati<strong>on</strong> specified data<br />

types. However, in a real word scenario, it is rare that HL7v2 (and HL7v3) messages<br />

match the HL7 defined standard exactly. There are always some differences between a<br />

particular message type and the industry standard. The same is true about HL7 RIM<br />

based messages and document templates.<br />

Prerequisites<br />

<strong>Mirth</strong> C<strong>on</strong>nect: All source code samples in this book are based <strong>on</strong> <strong>Mirth</strong> C<strong>on</strong>nect scripts.<br />

Make sure that <strong>Mirth</strong> C<strong>on</strong>nect is installed and properly c<strong>on</strong>figured <strong>on</strong> your computer. It<br />

is also assumed that you have basic understandings of features and techniques that<br />

<strong>Mirth</strong> C<strong>on</strong>nect uses.<br />

HL7v2: Data source for the <str<strong>on</strong>g>CCD</str<strong>on</strong>g> will be based <strong>on</strong> incoming HL7v2 messages therefore a<br />

working knowledge of the HL7 v2.x message structure and messaging pro<str<strong>on</strong>g>to</str<strong>on</strong>g>cols is<br />

required.<br />

35 PART I – GETTING STARTED


HL7v3: Readers are assumed <str<strong>on</strong>g>to</str<strong>on</strong>g> know HL7v3 c<strong>on</strong>cepts and the Reference Informati<strong>on</strong><br />

Model (RIM), as well as HL7v3 data types. Additi<strong>on</strong>ally, readers should have an<br />

understanding of vocabularies and terminologies such as SNOMED CT, LOINC, ICD, etc.<br />

Scenario Overview<br />

To give you a sense of how <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder Server may work in a real life scenario, I would<br />

like <str<strong>on</strong>g>to</str<strong>on</strong>g> quote several narratives of relevant interacti<strong>on</strong>s from the HL7v3 Normative Editi<strong>on</strong><br />

2014.<br />

If you are not familiar with this c<strong>on</strong>cept, the s<str<strong>on</strong>g>to</str<strong>on</strong>g>ryboard in HL7 terms is “a narrative of<br />

relevant events defined using interacti<strong>on</strong> diagrams or use cases. The s<str<strong>on</strong>g>to</str<strong>on</strong>g>ryboard provides<br />

<strong>on</strong>e set of interacti<strong>on</strong>s that the modeling committee expects will typically occur in the<br />

domain.” (HL7NE)<br />

To begin with: “Mr. Adam Everyman's physician, Dr. Patricia Primary, called the Good<br />

Health Hospital <str<strong>on</strong>g>to</str<strong>on</strong>g> schedule an inpatient visit for Mr. Everyman for lung surgery. The clerk<br />

verified that Mr. Everyman was not already registered as a patient in the GHH Patient<br />

Registry and created a new patient record for him then scheduled the admissi<strong>on</strong> for two<br />

weeks from that day.” (HL7NE > Patient Registry Record Added > PRPA_ST201301UV01)<br />

Later <strong>on</strong>, Mr. Adam Everyman “presents at Good Health Hospital Outpatient Clinic and is<br />

seen by Dr. Bill Beaker. Adam reports extreme thirst, fatigue, and recent unexplained<br />

weight loss. He also reports having a family his<str<strong>on</strong>g>to</str<strong>on</strong>g>ry of diabetes. Dr. Bill Beaker wants <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

rule out diabetes mellitus by performing a GTT2HR. Up<strong>on</strong> the release of the results for the<br />

complete GTT2HR test, the labora<str<strong>on</strong>g>to</str<strong>on</strong>g>ry system reports all the results in a single message.”<br />

(HL7NE > Complex Labora<str<strong>on</strong>g>to</str<strong>on</strong>g>ry Result > POLB_ST221000UV01)<br />

Once labora<str<strong>on</strong>g>to</str<strong>on</strong>g>ry results are available, Dr. Bill Beaker observes them as a single document<br />

and submits them <str<strong>on</strong>g>to</str<strong>on</strong>g> the Good Health Hospital for use during the scheduled inpatient<br />

visit for Mr. Everyman.<br />

(Patient and doc<str<strong>on</strong>g>to</str<strong>on</strong>g>rs names in s<str<strong>on</strong>g>to</str<strong>on</strong>g>ryboards are changed <str<strong>on</strong>g>to</str<strong>on</strong>g> match <strong>on</strong>e another.)<br />

As you can see, several parties, also called Applicati<strong>on</strong> Roles, are involved in this process.<br />

Applicati<strong>on</strong> role is “an abstracti<strong>on</strong> that expresses a porti<strong>on</strong> of the messaging behavior of<br />

an informati<strong>on</strong> system.” (HL7NE)<br />

Thus, we may identify the following applicati<strong>on</strong> roles that will be represented as system<br />

comp<strong>on</strong>ents:<br />

PART I – GETTING STARTED 36


Message Origina<str<strong>on</strong>g>to</str<strong>on</strong>g>r – creates messages and publishes (sends) them <str<strong>on</strong>g>to</str<strong>on</strong>g> a receiver<br />

(played by Patient Registry or Document Origina<str<strong>on</strong>g>to</str<strong>on</strong>g>r in our case).<br />

Patient Registry – represents the Patient Demographics Management System.<br />

Document Origina<str<strong>on</strong>g>to</str<strong>on</strong>g>r – creates a <str<strong>on</strong>g>CCD</str<strong>on</strong>g> document.<br />

The next step is <str<strong>on</strong>g>to</str<strong>on</strong>g> depict interacti<strong>on</strong>s between these three applicati<strong>on</strong> roles. An<br />

interacti<strong>on</strong> is “a single, <strong>on</strong>e-way informati<strong>on</strong> flow that supports a communicati<strong>on</strong><br />

requirement expressed in a scenario.” (HL7NE)<br />

Interacti<strong>on</strong> model<br />

The Interacti<strong>on</strong> Model for s<str<strong>on</strong>g>to</str<strong>on</strong>g>ryboards defined above shows interacti<strong>on</strong>s between<br />

applicati<strong>on</strong> roles and is described using the sequence diagram (Figure 4-1).<br />

Message<br />

Origina<str<strong>on</strong>g>to</str<strong>on</strong>g>r<br />

Patient Registry<br />

Document<br />

Origina<str<strong>on</strong>g>to</str<strong>on</strong>g>r<br />

ADT_A28<br />

ACK<br />

ORU_R01<br />

ACK<br />

query<br />

resp<strong>on</strong>se<br />

FIGURE 4-1 Interacti<strong>on</strong> diagram<br />

As a base for the model’s interacti<strong>on</strong>s I have chosen <str<strong>on</strong>g>to</str<strong>on</strong>g> use HL7v2 transacti<strong>on</strong>s, though<br />

the same can be d<strong>on</strong>e using relevant HL7v3 transacti<strong>on</strong>s. Thus, the Patient Registry<br />

Record Added (PRPA_IN201301UV01) may be used instead of ADT_A28, al<strong>on</strong>g with the<br />

Result Complete with Fulfillment (POLB_IN224200UV01) instead of ORU_R01. The reas<strong>on</strong><br />

why HL7v3 messages are not used is because they are already in a format that is very<br />

37 PART I – GETTING STARTED


close <str<strong>on</strong>g>to</str<strong>on</strong>g> the final <str<strong>on</strong>g>CCD</str<strong>on</strong>g> document. This may over simplify this project and hide important<br />

<strong>Mirth</strong> C<strong>on</strong>nect details.<br />

The interacti<strong>on</strong> model has been intenti<strong>on</strong>ally complicated by adding an interim step <str<strong>on</strong>g>to</str<strong>on</strong>g><br />

s<str<strong>on</strong>g>to</str<strong>on</strong>g>re patient demographics instead of sending it directly <str<strong>on</strong>g>to</str<strong>on</strong>g> the Document Origina<str<strong>on</strong>g>to</str<strong>on</strong>g>r. So<br />

let us quickly go through this sequence diagram <str<strong>on</strong>g>to</str<strong>on</strong>g> see how it works.<br />

1. The Message Origina<str<strong>on</strong>g>to</str<strong>on</strong>g>r does a preliminary step by sending an ADT_A28 (Add Pers<strong>on</strong><br />

or Patient Informati<strong>on</strong>) message <str<strong>on</strong>g>to</str<strong>on</strong>g> a temporary s<str<strong>on</strong>g>to</str<strong>on</strong>g>rage which plays the role of the<br />

database that holds patient-related informati<strong>on</strong>. Jumping ahead, I know that we will<br />

not be using any databases though you are free <str<strong>on</strong>g>to</str<strong>on</strong>g> try. The Patient Registry, in turn,<br />

may acknowledge the message.<br />

2. The Message Origina<str<strong>on</strong>g>to</str<strong>on</strong>g>r sends an ORU_R01 (Unsolicited Observati<strong>on</strong> Message)<br />

message <str<strong>on</strong>g>to</str<strong>on</strong>g> the Document Origina<str<strong>on</strong>g>to</str<strong>on</strong>g>r. The latter may acknowledge this message and<br />

then starts transforming and compiling the <str<strong>on</strong>g>CCD</str<strong>on</strong>g> document from the data it has<br />

received. At some point, the Document Origina<str<strong>on</strong>g>to</str<strong>on</strong>g>r may require patient demographic<br />

data if it was not fully provided in the ORU_R01 message. In such a case, the<br />

Document Origina<str<strong>on</strong>g>to</str<strong>on</strong>g>r makes an (internal) request <str<strong>on</strong>g>to</str<strong>on</strong>g> the Patient Registry and uses the<br />

data that the Patient Registry returns.<br />

Design C<strong>on</strong>siderati<strong>on</strong>s<br />

There are many ways <str<strong>on</strong>g>to</str<strong>on</strong>g> accomplish the same task in <strong>Mirth</strong> C<strong>on</strong>nect. In additi<strong>on</strong>, there<br />

are many ways <str<strong>on</strong>g>to</str<strong>on</strong>g> build a valid <str<strong>on</strong>g>CDA</str<strong>on</strong>g>/<str<strong>on</strong>g>CCD</str<strong>on</strong>g> document. However, the main idea of this book<br />

is <str<strong>on</strong>g>to</str<strong>on</strong>g> explore <strong>Mirth</strong> C<strong>on</strong>nect features, NOT <str<strong>on</strong>g>to</str<strong>on</strong>g> implement the service in a correct way<br />

using standard de-fac<str<strong>on</strong>g>to</str<strong>on</strong>g> libraries such as Model Driven Health Tools (MDHT). The actual<br />

implementati<strong>on</strong> of a real system most likely is different from this <strong>on</strong>e.<br />

The diagram in Figure 4-2 illustrates the game plan for next parts of the book and<br />

mimics the scenario of sending the HL7v2 messages <str<strong>on</strong>g>to</str<strong>on</strong>g> the <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder.<br />

The implementati<strong>on</strong> plan is based <strong>on</strong> followings channels:<br />

• Sender – a channel that plays a role of the Message Origina<str<strong>on</strong>g>to</str<strong>on</strong>g>r and serves as an<br />

interface <str<strong>on</strong>g>to</str<strong>on</strong>g> handle and place an original ADT or ORU messages in<str<strong>on</strong>g>to</str<strong>on</strong>g> the pipe using<br />

the MLLP Message Transport pro<str<strong>on</strong>g>to</str<strong>on</strong>g>col.<br />

• <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder – a channel that does all heavy lifting. Later we will see that this<br />

channel builds separate secti<strong>on</strong>-level templates and then compiles them in<str<strong>on</strong>g>to</str<strong>on</strong>g> a single<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g> document. This channel plays the role of the Document Origina<str<strong>on</strong>g>to</str<strong>on</strong>g>r.<br />

PART I – GETTING STARTED 38


• Global Map – the Global Map, in <strong>Mirth</strong> C<strong>on</strong>nect terms, represents the Patient<br />

Demographics Management System. Its main duty is <str<strong>on</strong>g>to</str<strong>on</strong>g> temporary s<str<strong>on</strong>g>to</str<strong>on</strong>g>re patient<br />

demographic data.<br />

HL7v2<br />

(ADT_A28,<br />

ORU_R01)<br />

Global Map<br />

Reader<br />

MLLP<br />

MLLP<br />

File Writer<br />

Sender<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder<br />

Transform<br />

ACK / NACK<br />

Transform<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g><br />

File Writer<br />

ACK / NACK<br />

FIGURE 4-2 <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder Server channels implementati<strong>on</strong> plan<br />

Throughout this implementati<strong>on</strong> we will explore some major c<strong>on</strong>nec<str<strong>on</strong>g>to</str<strong>on</strong>g>rs: Channel<br />

Reader, TCP/IP Listener and Sender and File Writer.<br />

We will use all techniques explained earlier in this book which includes, but is not limited<br />

<str<strong>on</strong>g>to</str<strong>on</strong>g>: filters, transformers, code templates, maps, global and channel scripts.<br />

At this point it is assumed that you are comfortable with the <strong>Mirth</strong> C<strong>on</strong>nect<br />

Administra<str<strong>on</strong>g>to</str<strong>on</strong>g>r.<br />

Recommended <str<strong>on</strong>g>to</str<strong>on</strong>g>ols and packages<br />

To make the development easier and less tedious, here is a list of recommended <str<strong>on</strong>g>to</str<strong>on</strong>g>ols<br />

and packages. You are free <str<strong>on</strong>g>to</str<strong>on</strong>g> use any other <str<strong>on</strong>g>to</str<strong>on</strong>g>ols that suit you better.<br />

Summary<br />

• HL7v2 viewer such as Messaging Workbench or HL7Spy by Inner Harbour Software;<br />

• HL7v3 viewer such as Al<str<strong>on</strong>g>to</str<strong>on</strong>g>va XMLSpy by Al<str<strong>on</strong>g>to</str<strong>on</strong>g>va GmbH;<br />

And last but not least, use the XML schemas and other related files from the archive<br />

provided with this book.<br />

This secti<strong>on</strong> identified players and outlined the game plan. To do this we went through<br />

the s<str<strong>on</strong>g>to</str<strong>on</strong>g>ryboards as they are defined by HL7v3 Normative Editi<strong>on</strong>, identified applicati<strong>on</strong><br />

39 PART I – GETTING STARTED


oles and interacti<strong>on</strong>s between them. This helped us depict the interacti<strong>on</strong> model and<br />

translate it <str<strong>on</strong>g>to</str<strong>on</strong>g> the <strong>Mirth</strong> C<strong>on</strong>nect channels implementati<strong>on</strong> plan.<br />

In the next part of the book, we will implement these channels in <strong>Mirth</strong> C<strong>on</strong>nect.<br />

This is a preview editi<strong>on</strong> of the book.<br />

The full versi<strong>on</strong> with all related files is available <str<strong>on</strong>g>to</str<strong>on</strong>g> download at<br />

http://ccd<strong>on</strong>mirth.shamilpublishing.com<br />

PART I – GETTING STARTED 40


Book Resources<br />

Book Resources<br />

Other titles you may be interested in:<br />

<str<strong>on</strong>g>Unofficial</str<strong>on</strong>g> <strong>Mirth</strong> C<strong>on</strong>nect v3.x Developer's<br />

<str<strong>on</strong>g>Guide</str<strong>on</strong>g><br />

This book introduces readers <str<strong>on</strong>g>to</str<strong>on</strong>g> versi<strong>on</strong> 3.x of <strong>Mirth</strong><br />

C<strong>on</strong>nect <str<strong>on</strong>g>to</str<strong>on</strong>g> the point that they are c<strong>on</strong>fident enough<br />

<str<strong>on</strong>g>to</str<strong>on</strong>g> start building their own healthcare data exchange<br />

interfaces.<br />

By implementing an imaginary Eligibility Query<br />

Service, this book covers some of the <str<strong>on</strong>g>to</str<strong>on</strong>g>pics <strong>on</strong> XML<br />

schema and Schematr<strong>on</strong> validati<strong>on</strong>, XSL<br />

Transformati<strong>on</strong>, database c<strong>on</strong>necti<strong>on</strong> pool creati<strong>on</strong>,<br />

acknowledgements implementati<strong>on</strong>, <strong>Mirth</strong> C<strong>on</strong>nect<br />

extensi<strong>on</strong>s implementati<strong>on</strong> and sending objects via<br />

the ActiveMQ Message Broker.<br />

The book is available <str<strong>on</strong>g>to</str<strong>on</strong>g> download at –<br />

http://mirthc<strong>on</strong>nect.shamilpublishing.com<br />

<str<strong>on</strong>g>Unofficial</str<strong>on</strong>g> Developer's <str<strong>on</strong>g>Guide</str<strong>on</strong>g> <str<strong>on</strong>g>to</str<strong>on</strong>g> HL7v3 Basics<br />

This book introduces readers <str<strong>on</strong>g>to</str<strong>on</strong>g> HL7 versi<strong>on</strong> 3 <str<strong>on</strong>g>to</str<strong>on</strong>g> the<br />

point that they are c<strong>on</strong>fident enough <str<strong>on</strong>g>to</str<strong>on</strong>g> start building<br />

their own healthcare data exchange interfaces. The<br />

book provides clear and easy <str<strong>on</strong>g>to</str<strong>on</strong>g> use, step-by-step<br />

guidance for learning the standard, with numerous<br />

examples covering many <str<strong>on</strong>g>to</str<strong>on</strong>g>pics.<br />

The book is available <str<strong>on</strong>g>to</str<strong>on</strong>g> download at –<br />

http://hl7basics.shamilpublishing.com


APPENDICES<br />

Appendices<br />

A: <str<strong>on</strong>g>CCD</str<strong>on</strong>g> <strong>Mirth</strong> Templates<br />

B: Code Templates<br />

C: HL7v2 Test Messages<br />

D: XSLT files<br />

E: Archive C<strong>on</strong>tent<br />

These are files provided as supplementary materials required for parts II and III.<br />

Folder Files Comment<br />

..\Channels\<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder.xml<br />

Code Templates.xml<br />

Global Scripts.xml<br />

Query Sender.xml<br />

<strong>Mirth</strong> C<strong>on</strong>nect channels, code<br />

templates and global scripts<br />

discussed in this book<br />

..\Models\coreschemas\<br />

..\Models\Schemas\<br />

..\Models\ExcelView\<br />

..\Models\HTMLView\<br />

..\Models\MWBModels\<br />

..\Models\PictureView\<br />

..\Models\VisioModels\<br />

..\SampleMessages\<str<strong>on</strong>g>CCD</str<strong>on</strong>g>\<br />

datatypes-base.xsd<br />

datatypes-rX-cs.xsd<br />

datatypes.xsd<br />

infrastructureRoot.xsd<br />

NarrativeBlock.xsd<br />

voc.xsd<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g>-Body.xsd<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g>-Header.xsd<br />

POCD_MT000041SN.xsd<br />

POCD_MT000042SN.xsd<br />

POCD_MT000041SN.xls<br />

POCD_MT000042SN.xls<br />

POCD_MT000041SN.htm<br />

POCD_MT000042SN.htm<br />

Add Pers<strong>on</strong> or Patient Informati<strong>on</strong>.mwb<br />

Unsolicited Observati<strong>on</strong> Message.mwb<br />

MsgStructure.txt<br />

POCD_RM000041SN-Header.png<br />

POCD_RM000042SN-Body.png<br />

POCD_RM000041SN-Header.vsd<br />

POCD_RM000041SN-Header.xml<br />

POCD_RM000042SN-Body.vsd<br />

POCD_RM000042SN-Body.xml<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g>_Allergies_<strong>Mirth</strong>_Template.xml<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g>_Body_<strong>Mirth</strong>_Template.xml<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g>_Header_<strong>Mirth</strong>_Template.xml<br />

HL7 core XML schema files required<br />

<str<strong>on</strong>g>to</str<strong>on</strong>g> validate <str<strong>on</strong>g>CCD</str<strong>on</strong>g> document instances<br />

Localized, n<strong>on</strong>-normative XML<br />

schemas for <str<strong>on</strong>g>CCD</str<strong>on</strong>g> header and <str<strong>on</strong>g>CCD</str<strong>on</strong>g><br />

body parts.<br />

Document element descripti<strong>on</strong>s in<br />

MS Excel format<br />

Document element descripti<strong>on</strong>s in<br />

HTML format<br />

Messaging Workbench (MWB)<br />

models <str<strong>on</strong>g>to</str<strong>on</strong>g> validate ADT and ORU<br />

message samples.<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g> header and body R-MIM<br />

representati<strong>on</strong><br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g> header and body R-MIM models<br />

in Visio format<br />

Parts of <str<strong>on</strong>g>CCD</str<strong>on</strong>g> document <str<strong>on</strong>g>to</str<strong>on</strong>g> serve as<br />

outbound <strong>Mirth</strong> C<strong>on</strong>nect templates<br />

for the <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder channel’s


\SampleMessages\HL7v2<br />

..\XSLT\<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g>_Header_Template_annotated.xml<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g>_Medicati<strong>on</strong>s_<strong>Mirth</strong>_Template.xml<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g>_Problems_<strong>Mirth</strong>_Template.xml<br />

<str<strong>on</strong>g>CCD</str<strong>on</strong>g>_Results_<strong>Mirth</strong>_Template.xml<br />

ADT_A28.hl7<br />

ORU_R01.hl7<br />

Allergies_Entry.xslt<br />

Medicati<strong>on</strong>s_Entry.xslt<br />

NoResults_Entry.xslt<br />

Problems_Entry.xslt<br />

Results_Entry.xslt<br />

destinati<strong>on</strong>s<br />

Samples of HL7v2.6 messages (uses<br />

v2.7 datatypes)<br />

XSL Transformati<strong>on</strong> scripts required<br />

for <str<strong>on</strong>g>CCD</str<strong>on</strong>g> Builder channel’s<br />

destinati<strong>on</strong>s<br />

43 APPENDICES

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!