Pages

Thursday, October 28, 2010

Self-Displaying CDA

The HL7 Structured Documents Workgroup today approved a proposal to create a Draft Standard for self-displaying CDA documents.  I created this project proposal in response to several perceived problems about CDA:

  1. ASCII Text is the lowest common denominator for consumers, and CDA is too complicated for them. (i.e., Blue Button)
  2. The CDA XML will not be able to displayed by consumers.
  3. Everyone can view PDF.

These same arguments apply to CCR as well as CDA just in case someone wants to make these arguments for the use of CCR.

On #1, I would argue that it isn't that ASCII Text is the lowest common denominator.  It's that consumers will nearly always be able to do something with ASCII Text, and that for them, something is better than nothing (which is what most have now).

#2 is a legitimate argument, especially for consumers who don't have broadband access.  I've had some experience with that concept this summer, and it is extremely frustrating to not be able to get to the web.  If the consumer could get to the web, they could readily access a web-based stylesheet that a CDA document included to make the information accessible.

#3 is only partially true.  Everyone who has downloaded free software that is widely available, or paid for a commercial product, or had a viewer installed for them on their computer can view a PDF.  I carry around a small computing device that couldn't view PDF until I found an app for it.

After some evaluation, I came to the conclusion that the real requirement is "self-contained" display without use of any outside resources other than what you might have installed on your computing device.

Interestingly enough, there are four different standards already in existence that allow us to converge on a solution.

The first of these is the W3C Associating Stylesheets with XML Documents standards.  This standard tells you how to associate a stylesheet with an XML document, and is the basis for most existing CDA display solutions.  The second of these is the W3C CSS 2 standard, which indicates how structured content can be formatted for display.  It is perhaps not widely known, but you can style an XML document using CSS and most browsers have some support for this (how much is something I get to find out).  Then there is the  IETF URL specification (RFC 1738) which tells you how to resolve a relative URL into a resource.  The last of these is a W3C Note on XML Fragment Identifiers that references XPointer.

If you put all of these together, here is what you get:
1.  A small CSS (< 4Kb) stylesheet that can be included in an element in a CDA document
2.  An XML Stylesheet processing instruction that can be used to render the CDA document by referencing the element by its ID attribute.
3.  A CDA document that can be displayed in any browser.

I've verified that this is at least feasible using the CDA sample document that was built for the original Care Record Summary Implementation Guide and Internet Explorer 8.  I'm still having trouble getting IE to recognize the box-model display formats in the stylesheet, but may be able to address that, and if not, produce an OK workaround.  Firefox works just fine.  Chrome and Safari just do not seem to like referencing a CSS stylesheet via an internal resource URL.  I haven't tried Opera yet, and given the success and failures I've had so far, I think I'm going to limit the scope to desktop display for the moment.

   Keith




2 comments:

  1. Can you post the CSS stylesheet that you used for this?

    ReplyDelete
  2. I know this is an older post Keith, but do you have any thoughts on a self-displaying CDA that does not reference a stylesheet or require a seperate stylesheet downloaded?

    ReplyDelete