Friday, October 19, 2012

A Dual Compatible CCD

On Wednesday I talked about template versioning.  This morning's post I'm going to expand on how to create a CCD 1.0 that is also a CCD 1.1.

Wes Rishel's Asynchronous Bilateral Cut-over applies here. The rationale for doing this is to enable systems which only understand the CCD 1.0 to understand your newer documents as well as best they can.

Normally, when you create a new version of a template, you would do so in a way that was backwards compatible with the old template.  That is to say, that none of the constraints in the new template would violate the constraints of the old template.  That's just not possible with some of the CCD 1.1 templates, because certain 1.1 templates violate constraints of the 1.0 templates.

So, the question is: How do  you create a document conforming to a particular template in such a way as to support systems that understood older versions and newer versions of the same template. But when you have a two versions which aren't compatible with each other (such as the CCDA Problem Act and the CCD Problem Act), what would you do?

One possible solution is to present the content using both versions of the template. This takes advantage of the "indirect containment rule".  In CCD, certain templates SHALL/SHOULD/MAY contain other templates.  But containment needn't be direct.  That was implicit in CCD 1.0, in the IHE PCC Technical Framework, and in the HITSP C32 (because it relied on those specifications).  This means that to meet the "contains" constraint, a template may be a descendant rather than a direct child of another template.

What we want to be able to do is represent the same content twice using two different versions of the same template. Because the templates are dealing with the same concept, we should be able to assume that the later version is functionally compatible as the earlier version, even if not "wire format" compatible. If they are functionally compatible, then one should be able to transform the newer template into the older format.  Note, that in doing so, it is possible that you could lose some information that isn't supported in the older version. The older version can be created via a transform, derived from the newer version. Given that there is some data loss, you could also consider it an an excerpt from the newer template. Transform (XFRM), derived (DRIV), and Excerpt (XCRPT) are all act relationship types in CDA R2.

So, to represent a CCD 1.1, in a way that was also interpretable as a CCD 1.0, you would include the "wire format" incompatible older templates as being excerpts of the newer template versions.  The example below shows the general structure that you would use.

<entry>
  <act ...>
    <templateId root='newTemplateId'/>
      ...
    <entryRelationship typeCode='XCRPT'>
      <act ...>
        <templateId root='oldTemplateId'/>
          ...
      </act>
    </entryRelationship>
  </act>
</entry>

When the entry templates require containment of other templates, you wind up creating a parallel structure under the first excerpt.

Because of the functional equivalences between the two templates, it should also be possible to create a transform from the CCD 1.0 template to its CCD 1.1 successor (and vice versa).  Developing such transforms isn't necessarily an academic exercise.  It allows systems which understood CCD 1.0 to be used with systems that generate only CCD 1.1, or alternatively, allows systems which generate a CCD 1.0 to be able to generate CCD 1.1 without significant retooling.

Wednesday, October 17, 2012

ONC Commissioned CQM Testing Tool for MeaningfulUse


HealthIT.gov
Clinical Quality Measure EHR Certification
Certification of Electronic Health Record (EHR) technologies requires that EHR software products and EHR modules be tested, as applicable, for the capability to accurately capture, calculate and report the Clinical Quality Measure results. ONC has commissioned the development of the open source Cypress certification testing tool. Cypress has already encoded the measure logic required in a software implementation. The process for submitting the Cypress tool for official approval to be used in the ONC Certification Program is currently under way. The Cypress website has been and will remain updated to reflect the testing initiative. 
The Office ofthe National coordinator for Health Information Technology

Versioning Templates

In IHE and HL7, we've been using the <templateId> element to identify templates.  One of the challenges has been that creating a new version of a template changes the requirements of any templates that use that template.  Consider the case where an implementation guide has two templates, template A, and template B, and template A says: must contain [n..m] instances of template B.  Making a substantive change to the content of template B means that it must have a new identifier.  We'll use B' in this case.

So now, template A must say: must contain [n..m] instances of template B'.  But this too is a substantive change to template A, and so template A must be given a new identifier (template A').  And so the change propagates upwards through the entire document.  This may be desirable in some cases, but in others, it totally sucks.

When we started with template identifiers in HL7, we did something this:

<templateId root="2.16.840.1.113883.10" 
  extension="IMPL_CDAR2_LEVEL1-2REF_US_I2_2005SEP" />


Later, we shifted to this form:
<templateId root='2.16.840.1.113883.10.20.1'/>

Dropping the extension attribute, and just uniquely identifying the template with the root attribute.

Some have suggested going back to using the extension attribute, but using it to represent the "version" of the template.  Originally, I thought this was a bad idea, because it semantically overloads the extension attribute.  I've changed my mind somewhat, because this is a useful a convention, or best practice, rather than semantics.  What we are doing is saying that: root represents an identifier for the the concept expressed by the template, and extension represents different ways (versions) that this concept can be expressed.

Using versions, we can write templates a bit differently.  Consider our template A above.  Suppose we had written it instead as template A: must contain [n..m] instances of templates whose root is B.root.  Now, when we create a new version of B, B.root will remain the same (because the template expresses the same context), but B.extension will be different.  We could also fix to a particular version, as in:  A must contain [n..m] instances of template whose root is B.root and whose version is B.extension.  Or we could set a lower bound on the version of the template.

Ideally, data types would allow template identifiers to support versioning, just as code systems and value sets can be versioned, but it doesn't.  So, we can make a gentleperson's agreement to deal with root and extension in this fashion.

A disadvantage of this scheme is that a system that only knows how to address version 1.0 the content of template B, won't know what to do with version 2.0 when it encounters it.  Furthermore, it can no longer just look at the document template to see whether it knows how to deal with all of the templates inside of it.  So, you'd need to look at more than just the document template to understand whether you can deal with all of the content.

I've got some thoughts on how to generate a CDA document that uses two different versions of (wire-format incompatible) templates, but I'll save that for tomorrow.


Monday, October 15, 2012

HL7 Offers Free Webinar Oct 24 on Laboratory Results Interface Implementation Guide Named in MeaningfulUse Stage2


 Health Level Seven® International
For Immediate Release
                                                                               
Contact: Andrea Ribick
+1 (734) 677-7777


HL7 Offers Free Ambassador Webinar on the S&I Framework Laboratory Results Interface Implementation Guide Named in Meaningful
Use Stage 2, on October 24, 2012

          Ann Arbor, Michigan, USA – October 15, 2012 – Health Level Seven® International (HL7®), the global authority for interoperability and standards in healthcare information technology with members in 55 countries, will present a complimentary Ambassador webinar on the Standards and Interoperability (S&I) Framework’s Laboratory Results Interface Implementation Guide on Wednesday, October 24 from 12:00 pm  - 1:00 pm EDT.
          This webinar will provide a background on the development and need for the Laboratory Results Interface (LRI) Implementation Guide (IG), which was included in the Meaningful Use Stage 2 Standards and Certification Criteria for 2014. The LRI Implementation Guide is based on HL7’s Version 2.5.1 and provides guidance for electronic reporting of laboratory test to ambulatory care providers in the U.S. This guide was developed within the S&I Framework supported by the Office of the National Coordinator of Healthcare Information Technology (ONC) and balloted through HL7. This session will give an explanation of why the guide is important, its benefits, and how it can handle multiple settings of the EHR from Ambulatory, Acute Care and Public Health through the use of profiles.  The LRI IG uses profiles to further refine the IG. The refinement can occur through the use of identifers, fields or other critical items that help define the information necessary to support the EHR and the Laboratory based on business requirements and the healthcare setting. In addition, this flexibility allows implementers to expand their use of the guide as they gain more functionality in their systems through the selection of more complex profiles.
The webinar will be presented by Ken McCaslin, Director of Healthcare Standards at Quest Diagnostics. Mr. McCaslin is an HL7 Fellow and Ambassador and serves as the co-chair of the HL7 Orders and Observations Work Group. In addition, he is also the co-chair of the S&I Framework LRI and LOI (Laboratory Order Interface) Implementation Guide Work Groups.
          This webinar is free and open to anyone interested in healthcare IT or standards development. To register for this free webinar, please visit http://www.hl7.org/events/ambassador20121024/.
HL7 Ambassadors present standardized presentations about HL7 as speaker volunteers. They are available to present at local, regional or national conferences. Please contact HL7 at +1 (734) 677-7777 if you would like to schedule an HL7 Ambassador for an upcoming event.


About Health Level Seven International (HL7)
Founded in 1987, Health Level Seven International is the global authority for healthcare Information interoperability and standards with affiliates established in more than 30 countries. HL7 is a non-profit, ANSI accredited standards development organization dedicated to providing a comprehensive framework and related standards for the exchange, integration, sharing, and retrieval of electronic health information that supports clinical practice and the management, delivery and evaluation of health services. HL7’s more than 2,300 members represent approximately 700 corporate members, which include more than 90 percent of the information systems vendors serving healthcare. HL7 collaborates with other standards developers and provider, payer, philanthropic and government agencies at the highest levels to ensure the development of comprehensive and reliable standards and successful interoperability efforts.

HL7’s endeavors are sponsored, in part, by the support of its benefactors: Abbott; Accenture; Centers for Disease Control and Prevention; Duke Translational Medicine Institute; Epic; European Medicines Agency; the Food and Drug Administration; GE Healthcare Information Technologies; GlaxoSmithKline; IBM; Intel Corporation; InterSystems Corporation; Kaiser Permanente; Lockheed Martin; McKesson Provider Technology; Microsoft Corporation; NICTIZ National Healthcare; Novartis; Oracle Corporation; Partners HealthCare System, Inc.; Pfizer, Inc.; Philips Healthcare; Quest Diagnostics Inc.; Siemens Healthcare; Thomson Reuters; the U.S. Department of Defense, Military Health System; and the U.S. Department of Veterans Affairs.

Numerous HL7 Affiliates have been established around the globe including Argentina, Australia, Austria, Brazil, Canada, Colombia, Croatia, Czech Republic, Finland, Germany, Greece, Hong Kong, India, Italy, Japan, Korea, Luxembourg, The Netherlands, New Zealand, Norway, Romania, Russia, Singapore, Spain, Sweden, Switzerland, Taiwan, Turkey, United Kingdom, and Uruguay.

For more information, please visit: www.HL7.org

# # #

IHE PCC Profiles and CCDA Compatibility

One of the outstanding items that Patient Care Coordination has to address is the impact of Consolidated CDA on its profiles.  IHE contributed the PCC content to this effort, and ANSI also contributed the C32/C83/C80 specification to the effort.  As a result, we have a new HL7 implementation guide (the CCDA) that should be a valid representation of profile content such as that found in XDS-MS, XPHR, and other profiles that aren't yet final text

There are some challenges that we need to address.  The IHE PCC Technical Framework is used around the globe as a library of templates.  These are used in national and regional projects such as the French DMP, in epSOS, by the Ministry of Health in China and elsewhere.  The challenge for IHE in adopting CCDA is to do so in a way that doesn't make the technical framework to US-centric.

Three of the biggest challenges include:

  1. The General Header is focused on US requirements for names and addresses.
  2. Vocabulary is focused on US national selections.
  3. Backwards Compatibility
Header
We also had issues with the US General Header in the Health Story guides.  In PCC, we only adopted  those requirements from the guides that were non-US specific, noting that when the realm was US, that all other requirements applied.  I imagine we could do the same here.  There is some interest in HL7 for creating an generalized, UV Realm header, which ideally would subset the US Realm header described in CCDA.  I'm adverse to duplicating this effort in IHE.  It might be well worth it to make this a joint IHE/HL7 project.

Vocabulary
Vocabulary is a lot trickier.  There is some vocabulary which should be used internationally (language and gender codes in the header), but just about everything else is negotiable due to various regional and national policies.  I expect that straight use of Consolidated CDA wouldn't fly in France.  They have particular requirements for lab results and medications that Consolidated doesn't match up with.  Perhaps we could stick with SNOMED and LOINC as a baseline, allowing national extensions to override the defaults.

Backwards Compatiblity
Backwards compatibility will be a big issue.  Structurally, the existing templates in final text profiles (XDS-MS and XPHR) are nearly identical with the CCDA templates, but the template identifiers are different, and so are not backwards compatible.  I don't see how we escape from assigning IHE template identifiers for structures that already exist in CCDA, but which have relaxed constraints to support international use.

Ideally, there would be minimal changes of systems needed to support this content in whatever new profile comes out of this effort.  More would be needed for full CCDA compatibility.  We could leave it to the US national deployment committee to deliver US regional extensions that bring the content fully into CCDA Compliance.

Another issue with respect to backwards compatibility is how we structure template identifiers.  We began (in CRS Release 1) by using template identifiers that had a root and extension, where each distinct ID represented a different concept.  Subsequently, we realized that just using root was sufficient.  Now there are some who'd like to use extension to represent "template version".  At first, this sounds like a very bad idea, but on second thought, it isn't so bad after all.

If you want to require use of a specific version of a template, you can do so.  But if you just want to bind to the template representing a specific concept, you could do that as well by just placing constraints on root, rather than root and extension.  If we had done that in CCDA, using the same template identifiers, but new extension values, we could have made things a lot simpler.  It's probably too late to go back and fix CCDA, but at the very least, we can now fix this problem for future releases in IHE.

I'll write more about this approach to template versioning tomorrow.



Friday, October 12, 2012

Building Code and Building Standards

Spending a day writing code makes me feel younger.  Writing code well into the evening and next morning makes me remember I'm not so young any more.  I code like I write, getting out the raw ideas on the page, and then going back and neatening up afterwards.  What is most important is the raw concept.  I often start out with a high level outline of what I want the code to do, especially if it's implementing a complex algorithm.

Modern tools make it easier to go back and refactor my code, which I do rather often.  When I wind up doing the same thing twice or three times in different places, I usually copy and paste the first one or two times.  The third or fourth time, I create a method to do it, often in the class I'm writing.  After a while, I collect a bunch of these methods that are helpers, and put them somewhere else.

Modern tools also make it very easy to document my code.  Sometimes I start with the documentation, at other times, I start with the code.  I leave a lot of bread crumbs, little TODO markers about things I haven't finished, or things I'd like to do differently later.  These are things I can do in later iterations, but often aren't essential to the raw idea I'm trying to finish right now.

As I finish each task, I check my code back in to a source repository.  Most of the time I'm not working with others, but when I am, that also means that I have to be careful to merge my changes back in.  Coding has a necessary build and test component.  When I make changes, I have to be sure they work.  After I've merged changes back, I have to make sure that a) my changes still work and b) that the code I've merged back with still works.

There's nearly nothing like this when writing Healthcare standards, but it is certainly changing.  One of the nice things about what Grahame Grieve has done with FHIR is develop a great set of tools that produces the standard.  There are a variety of resources that you can create and edit, and when you are done, there is a build process that generates the standard.  If there's a problem, the build tells you what is wrong.

He's even gone so far (and at this point I'm guessing), as to take the data from the standard, and turning it into code automatically.

The same thing is true for tools like MDHT.  You build a model, based perhaps on an existing one (e.g., like CCDA is on CDA).  From that, you generate the guide.  And the testing tools.  And a reference implementation in one or more programming languages.  While it's taken us nearly two decades to get from the clunky compilers and code development tools we had to where we are today with modern IDE's, FHIR and MDHT have done so in a lot less time (a year, and a few years respectively).  MDHT builds on some of the same modern tools we use to write code.  No, there isn't really a FHIR IDE environment.  That's much closer to my ideal of simple things put together in really interesting ways to produce a complex result.

I haven't done much standards development with FHIR or MDHT, and should really be doing more.  If I did, I'm sure I could figure out a way to make it possible to build some kinds of IHE profiles much more quickly.  For example, a simple spreadsheet containing the actor transaction table written in a certain way could be used to automatically generate the Actor/Transaction diagram.  Some of the IHE Connectathon tools do this using GraphViz (an open source graph generator).  I've done similar things using a database of IHE Actors and Transactions.

The challenge with this is that this kind of change impacts standards developers who are familiar with the current way of doing things pretty radically.  Some will never use new tools, because they are already quite comfortable with what they've been using.  And new tools take time to develop and make their impact felt.  They usually don't start out solving the whole problem.  In order for them to be adopted, they have to address enough of the existing problems better than existing tools, and not create enough new issues that cause more pain (the whack-a-mole problem).  You also need to have a cadre of people who have enough interest in trying out a new way of doing things to make it take hold.  And they have to be willing to deal with change and potential of the new way of doing things.

To have time to build these tools, other urgent problems might have to wait.  That makes it even more challenging, especially now when so many things are going on.  This is where you need to step back and thing about what your priorities are.  If you can't ever reduce the rate of production to increase later capacity, then you have a critical challenge.  Someone else is likely to figure out how to automate your process and will eventually be able to outpace you.

What is really scary about this is the end result.  If the current pace of standards development is impacting you severely, increasing it yet further is not something you might be willing to consider.  You have to move beyond scary, and realize that even though the pace of innovation might increase, the amount of effort could decrease quite dramatically.  I'd be happy producing twice the output with two thirds of the existing effort.

The one thing that we aren't automating is the review stage of standards.  MDHT and FHIR both rely dramatically on using data to generate standards.  They make it relatively easy to generate hundreds of pages of text (and thousands of lines reference code) from a dozen or so models.  Reading hundreds of pages of text to ensure that it is right is still a daunting task.  I'll write a bit more about that later.

   -- Keith

P.S.  Just to show you how my mind works, I started writing this post without any idea where it was headed.  The first two sentences were on my mind, so I wrote them down.  The rest of the post wrote followed from there.

Wednesday, October 10, 2012

I iz in UR Cloud. It iz mai Sandbox


I finally got my ABBI Prototype running in the cloud after about two weeks.  I spent about four hours one night a couple of weeks back trying to find a free place to put it, and finally settled on OpenShift.  I had been using Tomcat 5.0 (because I never needed anything more) for my own development, but wound up having to install Tomcat 7.0 in OpenShift because I could never get Tomcat 5.0 working there.  I followed the manual instructions rather than the automatic ones (see yesterday's post).

I used it to test out my OAuth implementations (both client and server), but wasn't quite ready to put my prototype up there.  Yesterday, Pierce (one of the coordinators on the ABBI project) talked me into giving a demonstration of what I've accomplished thus far.  That was enough inspiration to get me to finish up a major refactoring and launch the site this evening.  It took me longer than I figured because I almost forgot to install a key feature on the site before I launched it.

One of my happy accidents in starting this blog was my nearly simultaneous discovery of Google Analytics.  It's become a very powerful tool for me in blogging.  I figured that I was generating enough content for my ABBI prototype that it would be helpful for me to understand what pages people were using and playing with.  So I spend a bit of time figuring out what I needed to do to make analytics work with some of the machine generated content I figured I'd also load up there.

For now, the code for the prototype is hosted on Google Code, and that also has a wiki (which I've barely used), and a place for you to report issues.

Have at, play around!  Break it (at this early stage, it shouldn't be too hard to do).

Having now built and demonstrated three different protocols, I'm ready to pick one.  My favorite thus far is HL7 FHIR's xdsentry.  My next small bit of code will develop a FHIR XML to JSON conversion routine so that I can demonstrate what the result looks like when you request the JSON format using that API (which obviously, I don't support yet).

Wanna help?  Drop me an e-mail.

  -- Keith

P.S.  I couldn't get my cat to sit still for an appropriate picture for this post, but eventually, I'll rope him in as well.  What the heck, I've already got my kids writing the ads...

10/11/2012 8:14 The service seems to be stopping rather frequently and not restarting. I'm looking into it...

10/11/2012 12:39 I seem to have fixed it. I was overrunning my memory allocation, and that was killing my process.