5

I have been given a project to create HL7 Continuity of Care Documents (CCD) using data stored in a SQL Server 2008 database. I have intermediate to advanced knowledge in SQL programming but I have never used FOR XML statements.

Has anybody ever built a stored procedure that would successfully create CCD's strictly using only SQL programming with FOR XML?

Any tips would be greatly appreciated. If anybody used anything else besides SQL, feel free to let me know, but my background is mainly in SQL, T-SQL, with some knowledge in Java and VB.

Thanks

Ray Pablo
  • 51
  • 1
  • 2
  • 2
    You really need to review the CCD specification first. Its a pretty detailed standard. It's often referred to as the "standards onion", CCD is based on CDA and is supposedly transformable to/from CCR, CCD is then further constrained by IHE profiles and HITSP profiles. The NIST validation tool will become your best friend: http://xreg2.nist.gov/cda-validation/validation.html use it frequently to validate your messages. Working with CCD messages is not impossible but it is challenging. You should review the standard and plan your work in small pieces, eg demographics, then allergies, then blah. – Freiheit Nov 04 '11 at 17:29

1 Answers1

1

The way that we approached this issue in our .Net application is that we first created classes from the CCD or CDA xsd (which can be obtained from several locations, including the HL7 store) using Microsoft's xsd tool.

We then wrote (a lot of) code that creates and populates the CCD classes from data in the database.

In order to present the data to the user, we first serialized the record to string using the XMLSerializer, then converted the generated XML to HTML using the ccd.xsl transform file. There are several locations for the ccd.xsl including this one.

competent_tech
  • 44,465
  • 11
  • 90
  • 113