Friday, January 10, 2014

How To Generate CCDA/CCD XML Documents for MU 2014

Most of the IT service providers in the healthcare space are busy taking steps towards getting Meaningful Use (MU 2014) certified. One of the key certification compliance criteria is the generation of various documents in XML format that adhere strictly to the CCDA or Consolidated Clinical Document Architecture. 

If you are new to these terminologies or the concepts then I recommend you go through these immensely helpful tutorials first:
  • The bible of all healthcare industry standards: HL7
  • Very nicely explained tutorials (videos) at: healthit.gov
  • Another one describing MU 2014 and CCDA (ppt) at: healthit.gov
So, you want to generate CCDA compliant document from your .net code.

But How? 

Well, there are 2 parts to the making of a CCDA document. 
  1. Prepare a .net type that mimics the XML. When serialized, this type will give us the XML that we want. Now, there are 3 ways to do this:
    • Hand-code the entire .net type(s). This requires in-depth analysis and understanding of the CCDA standard. Also considerable effort is required to develop and maintain the code when the standards change.
    • Download the schema XSDs as published by HL7 and then generate the .net type(s) out of it. This can be done by using tools like xsd.exe.
    • Use an API that already has such a .net object and exposes it to be used in the code. 
  2. Populate this .net type with the relevant data and serialize it to generate an XML out of it.
It is obvious that the API approach sounds the most cost effective and quick. In a later blog post we will evaluate a few APIs for this purpose. 

No comments: