Pages

Thursday, July 22, 2010

Where is the XSD for CCD?

This is a question that shows up in various places quite a bit. People who are familiar with mainstream XML development want a schema to support conformance to all of the constraints of an XML implementation.

The CCD is a specialization of the CDA specification, for which you can find schemas. These schemas are available from HL7. If you are already an HL7 member, you can get them for free.  If not already a member, you can purchase them from the HL7 store (The CDA standard and CCD implementation guide will set you back $50.00 each).

Why isn't there a schema jsut for CCD?  The W3C Schema standard just isn't able to solve this particular problem.  To make a long story short, XML descends from SGML.  One of the requirements in SGML for DTDs which made its way into XML and subsequently the XML Schema specification was implementation simplicity in parsing tags.  This means that schemas are not permitted to use any look-ahead to determine the type of an element.  They can only look at the element name.  The problem comes into play when you need to distinguish between for example, a problem, and a result.  Both of these use the observation element of the CDA, with differing requirements on what appears inside.  But, the element has the same name, and so cannot have different requirements according to the W3C schema specification.  Another example that W3C schema doesn't support very well are co-occurence constraints.  These are constraints that say if A is X, then B must be Y.  These kinds of contraints are very difficult to model in W3C schema (yeah, I know, it can be done using certain features, but those are the very same features that often break, or aren't supported in schema driven persistence models).

In the contest between the information modeling perspective which says that these two things carry many of the same semantics, and the business viewpoint which says that there are different rules that apply, something has to give.  The HL7 XML ITS says that the information model, which ensures semantic interoperability, is paramount, not the business viewpoint which imposes these different constraints.  After all, semantic interoperability has been the Holy Grail that we've all been persuing, right?

All is not lost (especially if you code in Java).  The Model Driven Healthcare Tools project (MDHT) from Open Health Tools has a great deal of support for CDA, the CCD, IHE XPHR and the HITSP C32 specifications.  Those of you using .Net might be a bit stuck.  I encourage you to participate in the MDHT work, because there is a definite need for EMF driven .Net code generation tools here.

10 comments:

  1. Hello MotorcycleGuy!

    Thank you for the links. Interestingly, if you go to the home page in the HL7 site and search for "CDA XSD", you get a lot of links, but not the important one that you have referenced.

    While your point about the data relationship complexities is true, it is still better to have an imperfect XSD than none.

    If you look at the implementation of the X12 837 v5010, it was fairly straightforward, yes!, it is simpler to define a claim, but it was well documented. Of course, not without a fee: http://store.x12.org/store/healthcare-5010-consolidated-guides

    Best!

    Alfred

    ReplyDelete
  2. the MDHT validation is as of today a broken link and does not work.

    ReplyDelete
  3. Looking at CCR/CCD stuff now, and stumbled upon this blog. Answer to last poster, the MDHT project can be found here: http://cdatools.org. I couldn't get the link in the post to work either.

    ReplyDelete
  4. $50 for an XSD! now that's lame..

    ReplyDelete
    Replies
    1. Free now to all. And that price was not just the XSD, but also the entire specification that goes with it. Have you ever tried to get an ISO specification, or IEEE? You'd be shelling out a lot more.

      Delete
    2. Keith can you please provide me the link here if possible ? There is so much on that store page and I cant find a link to xsd file .

      Thanks in advance

      Delete
  5. On this page: http://www.hl7.org/implement/standards/product_brief.cfm?product_id=7 there are a number of downloads. I downloaded the CDA Release 2 which seems to have the proper schema definitions: http://www.hl7.org/documentcenter/private/standards/cda/r2/cda_r2_normativewebedition2010.zip
    Downloading was free.

    ReplyDelete
    Replies
    1. I searched for days to find all the material so comprehensively organized and included in this link. Thank you so much Sir!

      Delete
    2. Another alternative is to get it from NIST CDA Guideline Validation website:
      1. http://cda-validation.nist.gov/cda-validation/downloads.html
      2. http://cda-validation.nist.gov/cda-validation/downloads/HITSP_C32_v_2_5_C83_v2_0_TestPackage_20101007.tar.gz.

      Delete